Hi! A few months ago you asked me for a wishlist for fastwave features, and I kind of forgot about it :sweat:
Anyway, after having to deal with gtkwave today, I was reminded that something nicer would be nice.
I think gtkwave does reasonably well for general verilog work, but when using it with spade, I have to jump through a whole bunch of hoops to get it to work well with the Spade type system. Most of those problems come down to wanting a way to translate names and values back into their spade counterparts.
For example, here are a few traces from my current project:
the bottom line is the raw value used in the simulator, it is just a bit vector, but in Spade, this corresponds to a struct with a few fields, which is what the middle trace is.
This middle trace is generated externally, an intermediate tool takes the vcd file, finds all spade signals, and translates their value into strings. This translation can be done in gtkwave, but the interface to do so is hard to script, and very error prone if your translation program isn't correct. A better interface for a task like that would be amazing
Additionally, now I translate the value into a String, which means I can't destructure it further. Being able to have such a translation generate new traces, one for each field would be very useful.
Those two things would make Spade debugging a whole lot nicer.
Another minor issue is names, as you can see those signal names are a bit odd, with some annotations added to them. Being able to have a name translation system, where I could provide a translation from s3_name_n32 to name (stage 3) (defined on line X of file Y) would be amazing. I think I'd wantname (stage 3)` to be visible all the time, and the source location to only be visible on hover, or something like that.
I'm not sure what the best API for this would be. I can imagine a few ways to do it, but for my use case, I think the best way would be some sort of a query system, where I provide a binary which fastwave can run and query for translations. Perhaps something like
This would be pretty general, in the sense that you're not locked into any particular language or interface, just send something universal (I guess json)
A more tightly integrated option might be a library where a translator provides some functions that fastwave calls, but that's a bit harder with interop
Hi! A few months ago you asked me for a wishlist for fastwave features, and I kind of forgot about it :sweat:
Anyway, after having to deal with gtkwave today, I was reminded that something nicer would be nice.
I think gtkwave does reasonably well for general verilog work, but when using it with spade, I have to jump through a whole bunch of hoops to get it to work well with the Spade type system. Most of those problems come down to wanting a way to translate names and values back into their spade counterparts.
For example, here are a few traces from my current project:![image](https://user-images.githubusercontent.com/5312813/208943858-a3659587-49cf-4e0d-8087-fb8af5c1f01f.png)
the bottom line is the raw value used in the simulator, it is just a bit vector, but in Spade, this corresponds to a struct with a few fields, which is what the middle trace is.
This middle trace is generated externally, an intermediate tool takes the vcd file, finds all spade signals, and translates their value into strings. This translation can be done in gtkwave, but the interface to do so is hard to script, and very error prone if your translation program isn't correct. A better interface for a task like that would be amazing
Additionally, now I translate the value into a String, which means I can't destructure it further. Being able to have such a translation generate new traces, one for each field would be very useful.
Those two things would make Spade debugging a whole lot nicer.
Another minor issue is names, as you can see those signal names are a bit odd, with some annotations added to them. Being able to have a name translation system, where I could provide a translation from
s3_name_n32
toname (stage 3) (defined on line X of file Y) would be amazing. I think I'd want
name (stage 3)` to be visible all the time, and the source location to only be visible on hover, or something like that.I'm not sure what the best API for this would be. I can imagine a few ways to do it, but for my use case, I think the best way would be some sort of a query system, where I provide a binary which fastwave can run and query for translations. Perhaps something like
This would be pretty general, in the sense that you're not locked into any particular language or interface, just send something universal (I guess json)
A more tightly integrated option might be a library where a translator provides some functions that fastwave calls, but that's a bit harder with interop
I hope that gives some ideas at least :)