Unverified Commit ac094a5e authored by Schuyler Eldridge's avatar Schuyler Eldridge Committed by GitHub
Browse files

Don't toggle top.cpp clock and reset on same cycle (#1820)



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: default avatarSchuyler Eldridge <schuyler.eldridge@sifive.com>
parent 492a71d6
Supports Markdown
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