[sv-bc] $readmemb and always_latch/always_ff

From: Stuart Sutherland <stuart_at_.....>
Date: Thu Apr 13 2006 - 16:12:04 PDT
I encountered a compatibility difference between two major simulators today
during a training class.  One simulator allows a testbench to use $readmemb
to load a RAM that was modeled using always_latch for the RAM write logic.
The other simulator gives a compilation/elaboration error, saying that
$readmemb is illegal, because it is a second procedural block writing to the
memory array.

Which simulator is correct?  While it is true that
always_comb/always_latch/always_ff do not allow multiple procedural blocks
to assign to the same variable, I do not believe that $readmemb is a
"procedural assignment".  I have a group of students interested in knowing
if always_latch and always_ff can be used to model RAMs.  Any thoughts from
SV-BC would be appreciated.

Stu
~~~~~~~~~~~~~~~~~~~~~~~~~
Stuart Sutherland
stuart@sutherland-hdl.com
+1-503-692-0898
 
Received on Thu Apr 13 16:12:47 2006

This archive was generated by hypermail 2.1.8 : Thu Apr 13 2006 - 16:12:53 PDT