r/FPGA • u/synaloephe • 7h ago
VCD Viewer
Last week I decided to continue one of my ongoing side projects: A VCD viewer directly in the terminal.
Mostly because I was fed up with the strange UX/UI of traditional tools like QuestaSim or GTKWave. Im not saying my "fuck this shit, im doing it myself" approach resulted in something actually better, but it does look quite cool in my opinion.
Its available here, but keep in mind that it only works with Linux and does not support all VCD features.
3
u/Puzzle5050 4h ago
What is the use case here? How do you generate a VCD without having a GUI to be able view the output of whatever created the VCD?
1
u/synaloephe 4h ago
most if not all RTL simulators are either terminal tools without any GUI (icarus, verilator, ghdl, etc) or terminal tools with an attached GUI (questasim, vivado). Im actually not aware of a pure GUI simulator that cannot be controlled by terminal. this is also really necessary because you cannot really automize GUI-based simulations running on some server
1
u/synaloephe 4h ago
EDIT. Which is also a reason why terminal-based VCD rendering is usefull. Very often RTL simulations run on some server where you have just an ssh connection.
1
u/Puzzle5050 4h ago
I guess I still don't understand the use case when there are built in tools for something like VS Code and GUI tools support tcl? I suppose I can kind of see the ssh point, but if you work at a company that provides a server, they don't provide an X windows or remote desktop capability?
0
u/synaloephe 3h ago
to be fair, I dont try to sell this as a one-solution-fits-all product ;-)
Sure if you work already with VS Code and have the trace file locally available using VS Code extensions is the way to go. But if you work mostly with vim over ssh (like me) this doesnt work.Also, I tried QuestaSim via ssh-X-forwarding once and this is really not working well.
Remote desktops like VNC are of course an alternative.
3
u/sopordave Xilinx User 4h ago
I’m a friend of the terminal and I can’t say I’ve ever thought, “I wish I could view waveforms in the terminal.”
But if I ever do, I’ll take comfort in knowing that you’re out there somewhere, paving the road we never knew we needed. Thank you for your service.
🫡
7
u/ElectricBill- 6h ago edited 6h ago
Nice effort but useless if you ask me ! First, Gtkwave is there. Second, Idk anyone who still write RTL directly from the terminal. (Maybe defense ??). Everyone I know is using VS code, and there’s a bunch of vcd waveform viewer extensions. Surfer is one of them https://surfer-project.org
1
u/chris_insertcoin 34m ago edited 24m ago
A bunch of people here use Neovim, Helix, Kakoune or Emacs. VS Code doesn't even have Treesitter lmao. And it's slow af.
1
u/synaloephe 6h ago
I know someone, its me
1
u/ElectricBill- 6h ago
Nice. Defense Job?
2
u/synaloephe 6h ago
nope ;-)
But funnily enough, most AI agents like claude code or opencode work from the terminal too. And can make use of any terminal tool as well. Thats why there are cli-arguments1
1
u/hieg_siel 1h ago
That is so cool. Can I try this out too pls.
I've always used $displays and printed the value directly to terminal, for similar reasons to yours ig.
1
3
u/ChainsawZz 5h ago
I prefer Surfer, particularly the VSCode extension.
It's not a TUI, but definitely functional alternative to gtkwave and questasim.
For the novelty alone, good luck on writing your terminal UI waveform viewer!
Just a thought, you might be able to fork Surfer and re-use all the backend of handling VCDs and FST files, then only provide a new front-end which is the terminal.