Hello,

I started looking at the ghw waveform generation and I have found the
procedure Wave_Put_Hierarchy_1 in grt-waves.adb where all signals are
extracted from the instance given in parameter. This instance contains
the hierarchy of the design. Before that there is something called hooks
that initialize all the waveform generators (vcd, ghw, etc) and call the
initialisation procedure of all the waveform generators (Wave_Start for
the ghw generator which is on the stacktrace of the call to
Wave_Put_Hierarchy_1).

Correct.

My idea was to find the place were the instance is generated before
being available to the waveform generators and to create there another
instance with only the hierarchy of what needs to be displayed as
specified in a text file.

That's what I would do too: create an instance tree from the text file.
Or maybe annotate the existing one with a flag, that would be simpler.

The next step is to make the waveform
generators use this instance instead of the instance with everything.

Here I would differ: pass both trees to the waveform generator and it
will only select the enabled signals.

> I believe I have to put this new instance in the Grt.Rtis package.

You shouldn't change grt.rtis as it defines the interface with the
compiler.  Create a new package.

> At
grt-main.adb, there is a call to Ghdl_Elaborate which execute some code
coming from I don't know where.  This code will generate the instance (as
I believe) and eventually call procedure Ghdl_Rti_Add_Top in
grt-rtis.adb with the generated instance as input parameter.

What I would like to know is where is the code that generate the
instance with the hierarchy of the design and if you think that my
approach is good.

The elaboration code is generated by the compiler.

I think you approach is correct.

Tristan.


_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to