summaryrefslogtreecommitdiff
path: root/hdl/util.svh
diff options
context:
space:
mode:
authorJulian Blake Kongslie2021-04-05 10:20:02 -0700
committerJulian Blake Kongslie2021-04-05 10:20:02 -0700
commit6a1c04608090cc8fc88aafac0b4899e4cbb9cae9 (patch)
tree9a03984357020c00dfeed299a8b321f832a48bd4 /hdl/util.svh
parentMake PC ADDR-sized rather than DATA-sized for now (diff)
downloadnoncpu-6a1c04608090cc8fc88aafac0b4899e4cbb9cae9.tar.xz
Change our simulator timing model to use continuous assignment guards.
Instead of depending on verilator getting $past right, this (ab-)uses the SystemVerilog scheduling model which allows us to get a consistent view of the universe by "isolating" the blocking updates. Easier to code to and seems to be more reliable in verilator.
Diffstat (limited to 'hdl/util.svh')
-rw-r--r--hdl/util.svh7
1 files changed, 2 insertions, 5 deletions
diff --git a/hdl/util.svh b/hdl/util.svh
index db5e4e6..fa6ddc5 100644
--- a/hdl/util.svh
+++ b/hdl/util.svh
@@ -1,5 +1,2 @@
1`ifdef SYNTHESIS 1`define input(x) type(x) x``_; assign x``_ = x;
2`define past(x) x 2`define output(x) type(x) x``_; assign x = x``_;
3`else
4`define past(x) $sampled(x)
5`endif