Commit 8b8c4010 authored by Martin Pépin's avatar Martin Pépin
Browse files

sync works

parent 5eeadc41
true: use_menhir
true: warn(A-4-41)
<*.ml>: debug
<*.byte>: use_unix, debug
<*.byte> or <*.native>: use_unix, debug
<asm> or <netlist>: include
......@@ -56,7 +56,7 @@ module Env = struct
instr
let get_ram word_size env addr =
let value = _get word_size env.ram addr in
if Ram.int_of_bits addr = 2 && Ram.int_of_bits value = 1 then
if Ram.int_of_bits addr = 0 && Ram.int_of_bits value = 1 then
set_tick_byte env 0;
value
let write_on_ram word_size env bin_addr data =
......@@ -163,7 +163,7 @@ let interp_exp env = function
let interp asm_file n script_mode input_c output_c p =
(* Initiating memory *)
let env = Env.init asm_file 4096 4096 in
let tick = ref @@ Sys.time() in
let tick = ref @@ Unix.gettimeofday() in
(* Main loop *)
let loop = ref 0 in
while !loop <> n do
......@@ -194,7 +194,7 @@ let interp asm_file n script_mode input_c output_c p =
)
p.p_outputs;
(* Handling the sync property *)
let now = Sys.time () in
let now = Unix.gettimeofday() in
if now -. !tick >= 1. then begin
tick := now;
Env.set_tick_byte env 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment