Hi folks,
currently I'm developing a small 2-stage RISC processor. For that, I use
the ALDEC Active-HDL 10.5 simulator to have a look into the design for debugging purposes. That's working fine, but I want to switch to a VHDL testbench to automate the validations.
Is there any possibility in the main testbench to get access to signals
deep down in my design when I want to ASSERT some signal? I have asked
google but it always responds with some somewhat trivial syntax
definitions for the ASSERT statement.
Is there something like
ASSERT (MyProcessor.HazardDetectionUnit.readPortAOp = '1') report "readPortAOp in the hazard detection unit is not set" SEVERITY FAILURE
in VHDL?
Or am I bound to the top level signals and can't look into the design
using ASSERT? What would be the proper way to do this in a testbench? I prefer to not alter the design to pass internal signals to the top level
to be able to check them.
TIA
Is there something like
ASSERT (MyProcessor.HazardDetectionUnit.readPortAOp = '1') report "readPortAOp in the hazard detection unit is not set" SEVERITY FAILURE
in VHDL?
I think your best best would be to put the ASSERT statement in the VHDL entity/architecture where the signal exists. ASSERT statements are
ignored by synthesis tools.
I'm not familiar with ALDEC Active-HDL but most commercial simulators
have the capability to put a watch on any signal in the design using the simulator's scripting language, such as TCL. You can have simulator
take some action, such as printing out a message, when the signal meets
some test condition. So, that would be another approach.
Charles Bailey
Hello,
Am Montag, 17. Februar 2020 21:34:19 UTC+1 schrieb Volker Kriszeit:
Is there something like
ASSERT (MyProcessor.HazardDetectionUnit.readPortAOp = '1') report "readPortAOp in the hazard detection unit is not set" SEVERITY FAILURE
in VHDL?
VHDL 2008 provides a mechanisms to access hierarchy. This allows something like
ALIAS internalReadport << MyProcessor.HazardDetectionUnit.readPortAOp >>;
..
ASSERT internalReadport='1'....
Additionally ALDEC has similar to Modelsim a propritary mechanism to access signals inside, see the documentation of ALDEC for details, but be aware that this mechanism is simulator dependend and therefore not valid VHDL.
regards,
Thomas
I'm defintely going to try this, if the suggestion Thomas made (using VHDL-2008 ALIAS statement) doesn't work for me.
Another option for pre-2008 VHDL signal monitoring, without using vendor specific simulator extensions, is to put a copy of the signals needing to be traced into a package, where they can then be driven from the appropriate level of the hierarchy.
I used this approach to provide the simulator trace dumps for my own homebrew RISC verification test bench many years ago, code examples here:
https://github.com/brimdavis/yard-1/blob/master/hdl/cores/y1a/y1a_probe_pkg.vhd
https://github.com/brimdavis/yard-1/blob/master/hdl/cores/y1a/y1a_probe.vhd
-Brian
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 292 |
Nodes: | 16 (2 / 14) |
Uptime: | 198:35:00 |
Calls: | 6,617 |
Calls today: | 1 |
Files: | 12,168 |
Messages: | 5,315,889 |