[Libre-soc-dev] Improving GTKWave debugging

Cesar Strauss cestrauss at gmail.com
Sun Aug 23 22:06:45 BST 2020


On 08/22/2020 11:04, Luke Kenneth Casson Leighton wrote:
> On Sat, Aug 22, 2020 at 2:58 PM Cesar Strauss <cestrauss at gmail.com> wrote:
> 
>>> ok so the list-of-dictionaries is a preview of what is currently
>>> hard-coded in write_gtkw()?
>>
>> Indeed. There will be a new write_gtkw() that will accept this data, and
>> must output the same GTKWave document as before.

It works!

Implementation:
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/experiment/alu_fsm.py;hb=HEAD#l254

Usage example:
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/experiment/alu_fsm.py;hb=HEAD#l413

I intend to update the GTKWave tutorial on the wiki to reflect this. The
function and example seem well documented to me, but a tutorial would be
nice to have.

> very nice.  and it can be used elsewhere.

Indeed. I will probably adopt it on most of the unit tests I'm working on.

Where would be a good place to put it? Maybe in nmutil? How about:

from nmutil.gtkw import write_gtkw

Although, it is not nmigen specific, for now.

Regards,

Cesar



More information about the Libre-soc-dev mailing list