Replies: 6 comments
-
|
I'm not sure I understand your question. Are you talking about loading settings when opening up a file, or when you decide to close the file? |
Beta Was this translation helpful? Give feedback.
-
|
I think I found what's causing the issue I'm experiencing. I have autosave enabled to save files after a 1s delay. If I open a VCD and add any nets, the autosave appears to be prompting to save the VCD and settings. (Much like Is there a workaround to avoid this behavior? It'd be nice (at least for my needs) to either just always save to default names or never save.... But I'm not sure this is what any other users would want. If there's an existing setting that can do such a thing or any benefit to adding that for other uses, please let me know. Otherwise I may be able to use a different extension to only autosave other types of files and not .vcd . |
Beta Was this translation helpful? Give feedback.
-
|
Oh, I know what your problems is! Short term solution - You either need to turn off auto-save, or just have a dummy file that you write to, which you delete afterwards. I have a potential fix in mind (which I tested, and it works) but it breaks save behavior when users use autosave and actually want to save their settings to a file. They would have to select File > Save As... which is a little clunky and slightly breaks convention. Let me ask around about what I should do. I have a release coming out real soon, and I think I can get this in that release (which I plan to put out by the beginning of next week. If you're curious, this is a quirk of the VScode API. I am using a CustomEditorProvider, with this, it can track edits and put the document into a "dirty state" after said edit events (that's where it replaces the X with the dot on the tab, and if you close, it asks if you want to save your changes.) The API is designed under the assumption that the file you're opening is the one you're editing. Not the case with Vaproview. You don't really edit waveform dump files in a waveform viewer. The saveCustomDocument() function is called by the IDE when a save event is triggered, but the function is implemented by the extension. This allows me to have a different save file from the waveform dump file. When you open a waveform dump, the save file is not defined, which causes it to prompt the user on a save event. However, if you load settings from a file or save settings to a file, it uses that file as the save location when saveCustomDocument() is called. If it has a known file to save to, it won't prompt the user unless you select "Save As". |
Beta Was this translation helpful? Give feedback.
-
|
Actually scratch that. I figured it out. I was able to modify the menu handler for Save Vaporview Settings and make it show a save dialog regardless of autosave settings. It should still leave you alone if you have autosave turned on. Check the downloads page for test builds. |
Beta Was this translation helpful? Give feedback.
-
|
Awesome! Thanks so much! I'll try it out in the next day or two. One alternative that I had considered is a potential feature: An association to open .vcd.json files. My build process could generate a vcd.json if it doesn't exist. Vaporview could open it and the associated .vcd, then auto-save changes in the selected nets to the json. Some more background: I mentioned that I'm using Vaporview in a course. We provide students with Dev Containers / Codespaces for several assignment and for in-class lab-like activities. [Side effect: If there's a dashboard of installations, our assignments may look like ~300-700 installs per year] To simplify the experience, especially for the in-class activities, much of the build process is automated --- click a button to run a test bench and automatically open the associated traces. Here's an example video that shows how it worked with Surfer: https://www.youtube.com/watch?v=8fX3ykVTSbU (Surfer part at 1:40). I've replaced Surfer with Vaporview. Students often iterate and want to use the same sets of signals. The Auto Reload (and several other features) make Vaporview a smoother experience than Surfer. Automatically and transparently saving the selected set of nets when the view is closed/reopened would also be great. Shameless plug if anyone is interested... here's a brief overview of the environment we're using: https://www.youtube.com/watch?v=8_A3eMQ-_WY . The video is a year old --- there have been several updates, new features, etc. since then. One of my goals is to have an environment that makes it a lot easier to teach courses in digital logic/computer architecture and to make FPGA deployment nearly as friction-free as the Arduino ecosystem has made microcontroller development. I'm happy to help any other schools adopt this approach. |
Beta Was this translation helpful? Give feedback.
-
|
I am working on a dedicated format for settings files, and Frans and I have it on our to-do list to make Surfer and Vaporview be interoperable with settings files so that users can use either viewer. I was waiting to finish that project before deciding on a file extension to associate. Regarding your university project, have you checked out the Vaporview API docs? I can't tell if you're using a custom extension there, but it allows other extensions to add and remove variables from the viewer and place markers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi --- I've set Vaporview as the default extension for .vcd files. I have a workflow that will open files automatically via command line (
code thing-to-see.vcd) If it's relevant, I'm in a Dev Container and often running from Codespaces.When I add nets to view there are pop-ups listing the
thing-to-see.vcdand, if I just hit ok, then asking to overwrite thething-to-see.vcd.json. Is there a setting or approach to disable or avoid the pop-ups? Or set it to save / overwrite by default?Thanks for any insight!
P.S. I appreciate this extension! I'm using it for a Digital Logic course.
Beta Was this translation helpful? Give feedback.
All reactions