项目作者: wavedrom

项目描述 :
Value Change Dump (VCD) parser
高级语言: JavaScript
项目地址: git://github.com/wavedrom/vcd.git
创建时间: 2019-06-25T04:14:52Z
项目社区:https://github.com/wavedrom/vcd

开源协议:MIT License

下载


Linux NAPILinux WASMMacOS NAPIMacOS WASMWindows WASM
NPM version

Value Change Dump (VCD) parser using llparse

Usage

Install

  1. npm i vcd-stream
  2. make wasm

Require

  1. let vcd = require('vcd-stream');

Create parser writable stream instance

  1. let inst = vcd.parser();

General event emitter

  1. inst.on(<eventName>, () => {});

Events:

  • $enddefinitions - when all modules/wires are defined
  • finish - end of stream
  • error - error during parsing process

Change event emitter

  1. inst.change.on(<wireName>, (time, cmd) => {});
  • time — change time
  • cmd — change type

Info object

  1. let info = inst.info;
  • info.status - ('declaration'|'simulation')
  • info.wires - hierarchy object of modules and wires

Pipe data into the instance

  1. myStream.pipe(inst);

Test

Build / Test Napi version

  1. npm i
  2. npm run mocha_napi

Build / Test Wasm version

  1. make
  2. npm run mocha_wasm

Test all

  1. npm test

License

MIT LICENSE