Skip to content

Instantly share code, notes, and snippets.

@morganp
Last active August 10, 2023 02:49
Show Gist options
  • Save morganp/5797016 to your computer and use it in GitHub Desktop.
Save morganp/5797016 to your computer and use it in GitHub Desktop.
Creating SHM waveforms with irun

To run a verilog simulation using irun and create a shm waveform file,

initial begin
  $shm_open("waves.shm"); $shm_probe("AS");
end

run with irun -access +r testcase.sv

Or create this tcl file:

shm.tcl

database -open waves -shm
probe -create your_top_level -depth all -all -shm -database waves
run 
exit

run with :

irun -access +r testcase.sv -input shm.tcl
@morganp
Copy link
Author

morganp commented Dec 3, 2019

To add Memories to the shm_probe command add 'M' to the end of the option ie.

$shm_probe("ASM");

@shanthab2
Copy link

how can we enable different hierarchy ? can we pass the hierarchy from valueplusargs? whats the type of hierarchy expression,

@shanthab2
Copy link

if we pass the hierarchy as string I see error as E,SHMSTR () Illegal string argument.

@morganp
Copy link
Author

morganp commented Mar 1, 2022

@shanthab2 For controlling hierarchy using the tcl file is best. Cadence tools have this example:
I can not get the shm_probe command to accept a hierarchy that is in the form "Testharness.dut_1"

//shm probe
integer i, j;

module test_2;

initial begin
  $shm_open ("comp_units");
  $shm_probe ("ASCTF", $unit::i, $unit::j); end
initial begin
// ...
#10 $finish;
end
 endmodule

@shanthab2
Copy link

Hi @morganp , Thanks for the info,
Do we have any option to enable power dump also wit $shm_probe like M for memories ?

@ALLENzzzhu
Copy link

Hi @morganp how can i dump testcase signals rather than top.tb in UVM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment