Skip to content

Commit

Permalink
Candidate for 1.1.9 (Not released to Marketplace)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lramseyer committed Nov 2, 2024
1 parent 1bb0a2c commit 97ded88
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 127 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

# Next release (Version TBD)

- Removed checkboxes for scope \[module\] items in netlist viewer to reduce confusion
- File parsing uses the [wellen](https://github.com/ekiwi/wellen/tree/new-api) library compiled to wasm. Benefits include:
- FST and GHW file support
- Improves file parsing speed
- Improves memory efficiency (over storing everything in JS objects)
- Improves file parsing speed and memory efficiency (over storing everything in JS objects)
- Removed checkboxes for scope \[module\] items in netlist viewer to reduce confusion
- Variables loaded into viewer show up before waveform data is loaded as a better visual acknowledgement to user action

# 1.1.0

Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# VaporView

VaporView is an open source VCD waveform viewer extension for Visual Studio Code designed for FPGA/RTL developers.
VaporView is an open source waveform viewer extension for Visual Studio Code

![](https://github.com/Lramseyer/vaporview/blob/main/readme_assets/overview.png?raw=true)

# Features

## Waveform Viewer

VaporView automatically opens .vcd files in the waveform viewer. In the viewer, you can:
Supports VCD and FST waveform dump formats

VaporView automatically opens the waveform files in a viewer, where you can:
- Add, remove, and rearrange signals
- Pan and zoom in on the view
- Place and move markers
Expand Down Expand Up @@ -142,8 +144,7 @@ New for 1.1.0 - Added large VCD file support. Contents of VCD files are statical
- Removed checkboxes for scope \[module\] items in netlist viewer to reduce confusion
- File parsing uses the [wellen](https://github.com/ekiwi/wellen/tree/new-api) library compiled to wasm. Benefits include:
- FST and GHW file support
- Improves file parsing speed
- Improves memory efficiency (over storing everything in JS objects)
- Improves file parsing speed and memory efficiency (over storing everything in JS objects)

## Planned Features

Expand Down Expand Up @@ -175,4 +176,6 @@ This extension was written by one person, with a full time job that doesn't invo

# Acknowledgements

This project uses the [wellen](https://github.com/ekiwi/wellen/tree/new-api) library compiled to WASM for file parsing and back-end data management.

Thanks to my coworkers for their encouragement, feature requests, bug reports, and contribution of VCD files that made this project possible!
85 changes: 13 additions & 72 deletions media/vaporview.js
Original file line number Diff line number Diff line change
Expand Up @@ -2182,7 +2182,6 @@ goToNextTransition = function (direction, edge) {
}
case 'add-variable': {
// Handle rendering a signal, e.g., render the signal based on message content

//console.log(message);

let signalId = message.signalId;
Expand All @@ -2202,8 +2201,7 @@ goToNextTransition = function (direction, edge) {

if (waveformData[signalId]) {

console.log('signal already exists');

// console.log('signal already exists');
updateWaveformInCache([message.netlistId]);
renderLabelsPanels();

Expand All @@ -2220,8 +2218,7 @@ goToNextTransition = function (direction, edge) {
totalChunks: 0
};

console.log('signal data not found, fetching data');

//console.log('signal data not found, fetching data');
vscode.postMessage({
command: 'fetchTransitionData',
signalId: signalId,
Expand All @@ -2234,48 +2231,6 @@ goToNextTransition = function (direction, edge) {

break;
}
case 'update-waveform': {
let signalId = message.signalId;
let netlistId = message.netlistId;
let transitionData = message.transitionData;
let signalWidth = netlistData[netlistId].signalWidth;
let numberFormat = netlistData[netlistId].numberFormat;
let nullValue = "X".repeat(signalWidth);

if (transitionData[0][0] !== 0) {
transitionData.unshift([0, nullValue]);
}
if (transitionData[transitionData.length - 1][0] !== timeStop) {
transitionData.push([timeStop, nullValue]);
}
waveformData[signalId] = {
transitionData: transitionData,
signalWidth: signalWidth,
textWidth: getValueTextWidth(signalWidth, numberFormat),
};

// Create ChunkStart array
waveformData[signalId].chunkStart = new Array(chunkCount).fill(transitionData.length);
let chunkIndex = 0;
for (let i = 0; i < transitionData.length; i++) {
while (transitionData[i][0] >= chunkTime * chunkIndex) {
waveformData[signalId].chunkStart[chunkIndex] = i;
chunkIndex++;
}
}
waveformData[signalId].chunkStart[0] = 1;
waveformDataTemp[signalId] = undefined;

updateWaveformInCache([netlistId]);
renderLabelsPanels();

updatePending = true;
updateContentArea(leftOffset, getBlockNum());
contentArea.style.height = (40 + (28 * displayedSignals.length)) + "px";
handleSignalSelect(netlistId);

break;
}
case 'update-waveform-chunk': {
// Newer command used for fetching transition data in chunks

Expand Down Expand Up @@ -2386,38 +2341,24 @@ goToNextTransition = function (direction, edge) {

break;
}
case 'setMarker': {
//console.log('setting marker');
// Handle setting the marker, e.g., update the marker position
handleMarkerSet(message.time, 0);
break;
}
case 'setSelectedSignal': {
// Handle setting the selected signal, e.g., update the selected signal
handleSignalSelect(message.netlistId);
break;
}
case 'getSelectionContext': {

sendWebviewContext('response');
//vscode.postMessage({type: 'context', context: displaySignalContext});
break;
}
case 'getContext': {
sendWebviewContext('response');
break;
}
case 'copyWaveDrom': {
copyWaveDrom();
break;
}
case 'setWaveDromClock': {
waveDromClock = {
netlistId: message.netlistId,
edge: message.edge,
};
break;
}
case 'getSelectionContext': {
sendWebviewContext('response');
//vscode.postMessage({type: 'context', context: displaySignalContext});
break;
}
// Handle setting the marker, e.g., update the marker position
case 'setMarker': {handleMarkerSet(message.time, 0); break; }
// Handle setting the selected signal, e.g., update the selected signal
case 'setSelectedSignal': {handleSignalSelect(message.netlistId); break; }
case 'getContext': {sendWebviewContext('response'); break;}
case 'copyWaveDrom': {copyWaveDrom(); break;}
}
});

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
"Other"
],
"keywords": [
"VCD",
"Waveform",
"VCD",
"FST",
"Logic Simulation",
"Logic Analyzer"
],
"engines": {
Expand Down
Loading

0 comments on commit 97ded88

Please sign in to comment.