Closed spth closed 6 months ago
At a quick glance, this is most likely because you have used blocking assignments to model sequential logic. Try changing them to nonblocking assignments.
I recommend reading http://www.sunburst-design.com/papers/CummingsSNUG2000SJ_NBA.pdf
Did updating this to use blocking assignments for the sequential elements resolve the issue?
No response, so closing.
In the current release (12.0 via the Debian package) I noticed a difference in pre- and post-synthesis simulation in my code. After looking into it, I think the pre-synthesis simulation is wrong.
The affected Verilog file is this:
Apparently, the lowest bit of
activereg
goes up the moment the lowest bit ofin
goes up when the lowest bit ofenablereg
is 1, but I think that should happen at the next rising clock edge:My full source is at https://sourceforge.net/p/sdcc/code/14785/tree/branches/f8/f8/hardware/, but I've also attached what I think are the relevant files for this issue.
test.vmem.gz test2.vcd.gz alu2.v.gz cpu2.v.gz gpio.v.gz interruptcontroller.v.gz io2.v.gz memory2.v.gz opcode.v.gz ram2.v.gz rom2.v.gz system2.v.gz testsystem2.v.gz timer.v.gz watchdog2.v.gz