M
mrfirmware
Guest
I'm in testbench land and I've got a DUT with a DDR2 controller
circuit and DIMM model. The circuit and the DIMM model are not our IP
and we'd like not to waste clocks on them in certain simulation runs,
e.g. we wish to focus on our IP. So, I've create a very simple fake
DDR2 controller and DIMM BFM that has the exact module port list as
the DDR2 controller in the circuit. My make file picks either the real
circuit+model or the fake BFM based upon the target name so no Verilog
source code needs to change when switching version, just a rebuild of
the instantiating module.
This is great b/c it's much faster than the actual circuit + model
version. However, we'd like to go faster. In my BFM I have a fake_ddr
hash that is accessed by read and write FIFO. What I'd like to do is
put the data directly into this hash from a few layers up w/o using
any clocks, e.g. from a class method. The problem is, my
write_to_ram() method is in a class within a package and QuestaSim
says (essentially) that I cannot access the fake_ddr hash
hierarchically from within a package.
Any suggestions on how to get to this hash? If I put the hash in my
class, then I might be able to refer back to it from the module
hierarchically but the hash is dependent upon burst size, data bus
width, etc. that is (currently) only known to the BFM via module
parameters.
Thanks,
- Mark
circuit and DIMM model. The circuit and the DIMM model are not our IP
and we'd like not to waste clocks on them in certain simulation runs,
e.g. we wish to focus on our IP. So, I've create a very simple fake
DDR2 controller and DIMM BFM that has the exact module port list as
the DDR2 controller in the circuit. My make file picks either the real
circuit+model or the fake BFM based upon the target name so no Verilog
source code needs to change when switching version, just a rebuild of
the instantiating module.
This is great b/c it's much faster than the actual circuit + model
version. However, we'd like to go faster. In my BFM I have a fake_ddr
hash that is accessed by read and write FIFO. What I'd like to do is
put the data directly into this hash from a few layers up w/o using
any clocks, e.g. from a class method. The problem is, my
write_to_ram() method is in a class within a package and QuestaSim
says (essentially) that I cannot access the fake_ddr hash
hierarchically from within a package.
Any suggestions on how to get to this hash? If I put the hash in my
class, then I might be able to refer back to it from the module
hierarchically but the hash is dependent upon burst size, data bus
width, etc. that is (currently) only known to the BFM via module
parameters.
Thanks,
- Mark