Skip to content

Instantly share code, notes, and snippets.

View khwong-c's full-sized avatar

Kin Wong khwong-c

View GitHub Profile
@khwong-c
khwong-c / io_param_extraction.py
Last active December 30, 2023 21:12
Extract I/O Port and Parameters of a given SV file
# pip install pyverilog
from pyverilog.vparser.ast import Inout, Input, Localparam, ModuleDef, Output, Parameter, Supply
from pyverilog.vparser.parser import VerilogCodeParser
parser = VerilogCodeParser([])
# Hack: Get rid of the icarus verilog dependency
# Place your Verilog in a lambda function