https://github.com/drom/verilog-pinlist
extract pinlist from verilog files
https://github.com/drom/verilog-pinlist
Last synced: over 1 year ago
JSON representation
extract pinlist from verilog files
- Host: GitHub
- URL: https://github.com/drom/verilog-pinlist
- Owner: drom
- License: mit
- Created: 2018-11-26T08:30:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-13T20:38:22.000Z (almost 5 years ago)
- Last Synced: 2024-10-26T17:13:06.015Z (over 1 year ago)
- Language: JavaScript
- Size: 32.2 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.org/package/pinlist)
[](https://travis-ci.org/drom/verilog-pinlist)
Extract pinlist from Verilog files.
## Install
```sh
npm i pinlist
```
## Library usage
```js
const pinlist = require('pinlist');
const pl = pinlist(); // instance of pinlist extractor tool
const pinst = pl(`
module mod (
input clk,
input [31:0] wdata,
output valid,
output reg [DWIDTH-1:0] rdata
);
endmodule
`);
// {
// mod: {
// type: 'module',
// ports: {
// clk: 1,
// rdata: '-(DWIDTH)',
// valid: -1,
// wdata: 32
// }
// }
```
## CLI Usage
```sh
cat top.v | pinlist > alpha.json5
```
Verilator can be used to remove preprocessor directives:
```sh
verilator -E top.v | pinlist > alpha.json5
```