aquiles viza
04/16/2024, 1:54 PMMitch Bailey
04/16/2024, 2:02 PMONES_COUNTER_pex
spice has the ports in this order
.subckt ONES_COUNTER_pex clk ones[4] ones[9] pulse ready ones[0] ones[1] ones[6] ones[3]
+ ones[8] ones[5] ones[10] rst ones[2] ones[7] VPWR VGND
While the test bench has
x0 VSS VDD N2_R o0 o10 o1 o2 o3 o4 o5 o6 o7 o8 o9 VDD ready rst ONES_COUNTER_pex
aquiles viza
04/16/2024, 2:31 PMverilog
to get port ordering? something like readspice
or so? Maybe generate only an empty .subckt
from the verilog file.Mitch Bailey
04/16/2024, 2:52 PMTim Edwards
04/16/2024, 3:21 PMqflow
repository called vlog2Spice
(compiled from C code) that converts verilog to SPICE. Yosys can also read verilog and output SPICE.
You can't get port ordering from verilog because verilog does not require port ordering (although there is a valid SPICE-like port syntax that does require specific ordering). Most verilog is written with ports in the form .pin_name(net_name)
so that the name of the pin in the module is always given along with the net in the parent cell connecting to it, and ports can therefore be in any order.aquiles viza
04/16/2024, 3:33 PM