Don't toggle top.cpp clock and reset on same cycle (#1820) (#1823)
Change top.cpp to deassert reset one time unit before the clock asserts. This avoids a Verilator simultation issue in top.cpp where the eval() function is only called once per simultation loop. If the clock and reset are both changed and eval() is only called once, then any combinational update due to a change in reset is not visible to the sequential logic. This avoids issues where the downstream compilation utilities move synchronous reset logic outside of an always block that describes a synchronous reset flip flop. Reset now deasserts on time unit 10 and the clock ticks on time unit 11. h/t @albert-magyar Signed-off-by:Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit ac094a5e ) Co-authored-by:
Schuyler Eldridge <schuyler.eldridge@sifive.com>
parent
3f987c97
Please register or sign in to comment