Unexpected behavior with reading from seq_mem
reference and invoke
#2117
Labels
C: Calyx
Extension or change to the Calyx IL
C: calyx-py
Items that have to do with the builder library
Type: Bug
Bug in the implementation
This issue is about divergent behavior between
icarus-verilog
,verilator
, and the Calyx interpreter.Here's a toy eDSL program and it's associated data file:
This program should read
5
from memoryA
and write this value into memoryB
. However, depending on whether it's run withicarus-verilog
,verilator
, or the calyx interpreter, we find different results:Verilator:
Icarus-verilog:
Calyx interpreter:
(run on Havarti by @anshumanmohan)
verilator
and the Calyx interpreter produce the correct result, whileicarus-verilog
does not.It appears this behavior is specific to reading from sequential memories passed as references to a component called via
invoke
. For example, running either of these programs withbug.data
causes no issues.A
changed from seq to comb memory:Memories no longer passed via reference through
invoke
:You can find the files referenced here on this branch:
bug.py
bug.data
bug.futil
; from runningpython bug.py > bug.futil
bug-after-compile-invoke.futil
; from running the compile-invoke pass onbug.futil
:calyx -p compile-invoke bug.futil -m file > bug-after-compile-invoke.futil
The text was updated successfully, but these errors were encountered: