1

I have a VHDL code in which I have created several hierarchies inside the generate block, below is the snippet of the code:

gen : for i in 1 to WIDTH-1 generate
        u_4to2 : adder4to2
        port map (
            op1 => op1(i),
            op2 => op2(i),
            op3 => op3(i),
            op4 => op4(i),
            ci  => co(i-1),
            c   => vc(i),
            s   => vs(i),
            co  => co(i)
        );

    end generate;

I am trying to look at the waveform of these instances but I cannot figure out the hierarchies of these instances in the design. I am using ".do" file to add the waveforms to waveform viewer as follows:

add wave -group in_4to2 sim:/tb_compressor4to2/u_4to2(1)/*

But I get an error:

 ** Error: (vish-4014) No objects found matching '/tb_compressor4to2/u_4to2(1)/*'.

I also tried these:

add wave -group in_4to2 sim:/tb_compressor4to2/u_4to2/*
add wave -group in_4to2 sim:/tb_compressor4to2/u_4to2_1/*

But the same error comes. How should I add the hierarchy of the instances to view their waveforms.

sarthak
  • 774
  • 1
  • 11
  • 27
  • 4
    You know that you can open the ModelSim GUI and drag and drop the signals from hierarchy window into the waveform? You can also save that view as a TCL file (*.do or *.wdo). – Paebbels Jun 17 '17 at 11:16
  • Thanks... I did not know that because I just started but it is working...you can write it in the answer – sarthak Jun 17 '17 at 11:21
  • 1
    You were also missing gen from the pathname. –  Jun 17 '17 at 12:39
  • 1
    In addition to @Paebbels suggestion, for small designs you might want to try out something like `add wave -recursive "/*"`, which, as the name implies, will add all signals recursively. Just be mindful that this might eat up your RAM :) – suoto Jun 19 '17 at 08:31

0 Answers0