From 7950298bf80fd1d1f311e7bd4f75b442df7c679c Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Mon, 4 Nov 2013 23:47:56 +0100 Subject: C simulator quite completed. --- sched/netlist_printer.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sched/netlist_printer.ml') 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 -- cgit v1.2.3