Re: [Gtkwave-users] Request: better struct, union and enum viewing support
Brought to you by:
gtkwave,
joel1234567
From: <by...@nc...> - 2018-10-03 13:08:20
|
I would advise against updating the GUI. I have to maintain both current and gtk3 versions of code. Until I switch over to gtk2/3 (cairo for x11/wayland/etc) and leave behind gtk1/2 (x11), I do not want to have to update two sets of SVN code with what could be substantial user-submitted changes. As far as the currently selected item goes, it's trickier than that. Mouseover doesn't use the currently selected item but uses the pointer's y value then that determines the trace it's hovering over. The traces are in a linked list with some groups open and some not so it's not exactly straightforward. I'd say get Verilator to emit the FST you want, and then when I have FST that looks sane to me, I'll look at what needs to be done in the GUI to accommodate it. The code in gtkwave has evolved piecemeal since 1998 so some code such is very clean, and other code is not pretty at all as some features didn't exactly fit in nicely with the existing architecture. I use gtkwave on my day job and it's stable for how I use it, but developing it isn't my day job. Thanks, Tony ---- Sergi Granell <xer...@gm...> wrote: > Thanks! > > I'm trying to make it import struct types as a group for now. > From what I see, do_sst_popup_menu (menu.c:8783) is called when a right > click is done over an item on the SST menu, > then my idea is to check if the clicked item is an struct > (TREE_VCD_ST_STRUCT?) and if so, append a new > option to the sst_popmenu_items array. The problem is that I'm struggling > to find the current selected item (maybe > it's pointed by some of the GLOBALS-> ??) > > Thanks again! > > El mié., 3 oct. 2018 a las 6:04, <by...@nc...> escribió: > > > The structs/etc should be doable. The trick would be importing them as > > collapsible groups of signals rather than individual structure elements. > > As it stands right now, a hierarchy can be imported recursively in the SST > > however gtkwave currently doesn't do anything except import the individual > > signals, not preserve any groupings. > > > > The mouseover for structs is a nice idea. It's an extension of what > > gtkwave can already do for individual signals. See View->Show Mouseover. > > > > I think enum names as values might already be possible. See what Nick > > Gasson did for VHDL at > > https://github.com/nickg/nvc/blob/master/src/rt/fst.c > > I don't know if that would work for SV or be advisable, but it is one > > implementation out there. > > > > Note that the bulk of my effort lately has been adding touchscreen > > support. > > > > -Tony > > > > > > ---- Sergi Granell <xer...@gm...> wrote: > > > Hi! I've been using Verilator + GTKWave for a few months and currently > > I'm > > > trying to add a FST backend to Verilator so we can make it generate more > > > types of declarations (structs, enums, unions, etc). > > > > > > It would be nice if GTKWave could show types with other sub-types inside > > > (such as structs or unions) as a tree on the Signals panel, just as > > > Modelsim does (and also for arrays). See [1] (ex_mem_reg is a struct with > > > pc, instr, etc. inside). > > > > > > Another very nice feature would be to show a mouseover window/popup with > > > the list of all the struct/union members and their values when hovering > > > over such types, as seen in [2]. In the image, the instr field of the > > > ex_mem_reg struct is an union, that's why a list of different > > > decompositions of the value are shown, maybe that's a bit too much for > > now, > > > and this could be implemented in the future. > > > > > > And finally, another feature would be to print enum names instead (or > > also > > > with) their raw values, as can be seen in [3]. > > > > > > [1]: https://i.imgur.com/m1t0WEr.png > > > [2]: https://i.imgur.com/zYu1gPr.png > > > [3]: https://i.imgur.com/457x6MT.png > > > > |