diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2013-11-04 23:47:56 +0100 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2013-11-04 23:47:56 +0100 |
commit | 7950298bf80fd1d1f311e7bd4f75b442df7c679c (patch) | |
tree | efb935d351a6dd798795641461f63cf17ca9f390 /sched/netlist_printer.ml | |
parent | 62705818bf8227a9a35fff6879306c1b861e9dfd (diff) | |
download | SystDigit-Projet-7950298bf80fd1d1f311e7bd4f75b442df7c679c.tar.gz SystDigit-Projet-7950298bf80fd1d1f311e7bd4f75b442df7c679c.zip |
C simulator quite completed.
Diffstat (limited to 'sched/netlist_printer.ml')
-rw-r--r-- | sched/netlist_printer.ml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sched/netlist_printer.ml b/sched/netlist_printer.ml index fbd432a..b8cf385 100644 --- a/sched/netlist_printer.ml +++ b/sched/netlist_printer.ml @@ -138,11 +138,9 @@ let print_dumb_program oc p = begin match n with | VBit(x) -> fprintf ff "%d" (if x then 1 else 0) | VBitArray(a) -> - let k = ref 0 in for i = 0 to Array.length a - 1 do - k := 2 * !k + (if a.(i) then 1 else 0) - done; - fprintf ff "%d" !k + fprintf ff "%d" (if a.(i) then 1 else 0) + done end in List.iter |