-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e53d54
commit 34dc4a0
Showing
3 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
browserify ./bin/vcd.js | terser --compress -o ./out/vcd-web.js | ||
sed -i -e 's/wasmBinaryFile=Module.locateFile?Module.locateFile(path,scriptDirectory):scriptDirectory+path/wasmBinaryFile=self.location.href.replace("worker.js", "vcd.wasm")/g' out/vcd-web.js | ||
sed -i -e 's/wasmBinaryFile=Module.locateFile?Module.locateFile(path,scriptDirectory):scriptDirectory+path/wasmBinaryFile=Module.locateFile?Module.locateFile(path,scriptDirectory):scriptDirectory+path/g' out/vcd-web.js | ||
cp out/vcd-web.js $1/public/vcd.js | ||
cp out/vcd.wasm $1/public/vcd.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const fs = require('fs'); | ||
const { makeVcdStream } = require('../bin/vcd'); | ||
const createVcd = require('../out/vcd.js'); | ||
|
||
async function main() { | ||
const wasmBinary = fs.readFileSync('./vcd.wasm'); | ||
const wasm = await createVcd({ wasmBinary }); | ||
console.log(wasm); | ||
|
||
|
||
return; | ||
|
||
// const vcdstream = await makeVcdStream(); | ||
// const arraybuffer = fs.readFileSync('./test/samples/iverilog.small.vcd'); | ||
// const answers = JSON.parse(fs.readFileSync('./test/samples/iverilog.small.json')); | ||
|
||
// vcdstream.consume(arraybuffer); | ||
// const info = vcdstream.getBasicInfo(); | ||
// const values = info.signalValues; | ||
} | ||
|
||
|
||
main(); |