fixes #7 ; initial README.md
This commit is contained in:
parent
c2fbbc6c3f
commit
e932cc57a6
57
README.md
57
README.md
@ -1,10 +1,63 @@
|
||||
# :construction: Work In Progress :construction:
|
||||
|
||||
[](https://www.npmjs.org/package/vcd-stream)
|
||||
[](https://github.com/wavedrom/vcd/actions)
|
||||
|
||||
Value Change Dump ([VCD](https://en.wikipedia.org/wiki/Value_change_dump)) parser using [llparse](https://github.com/nodejs/llparse)
|
||||
|
||||
## Usage
|
||||
|
||||
Install
|
||||
|
||||
```
|
||||
npm i vcd-stream
|
||||
```
|
||||
|
||||
Require
|
||||
|
||||
```js
|
||||
let vcd = require('vcd-stream');
|
||||
```
|
||||
|
||||
Create parser writable stream instance
|
||||
|
||||
```js
|
||||
let inst = vcd.parser();
|
||||
```
|
||||
|
||||
General event emitter
|
||||
|
||||
```js
|
||||
inst.on(<eventName>, () => {});
|
||||
```
|
||||
|
||||
Events:
|
||||
* `$enddefinitions` - when all modules/wires are defined
|
||||
* `finish` - end of stream
|
||||
* `error` - error during parsing process
|
||||
|
||||
Change event emitter
|
||||
|
||||
```js
|
||||
inst.change.on(<wireName>, (time, cmd) => {});
|
||||
```
|
||||
|
||||
* `time` -- change time
|
||||
* `cmd` -- change type
|
||||
|
||||
Info object
|
||||
|
||||
```js
|
||||
let info = inst.info;
|
||||
```
|
||||
|
||||
* `info.status` - (`'declaration'`|`'simulation'`)
|
||||
* `info.wires` - hierarchy object of modules and wires
|
||||
|
||||
Pipe data into the instance
|
||||
|
||||
```js
|
||||
myStream.pipe(inst);
|
||||
```
|
||||
|
||||
## Test
|
||||
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user