Closed rbarzic closed 2 years ago
Hi, Ronan,
I have a similar example (it's in std xschem distribution examples,logic/testbench.sch
). I have the exact parametrized bus width on a port, and parameters specified in the 1995 veriilog format. However simulator (icarus verilog) runs fine.
Are some tools refusing this pre-2001 syntax for parameters?
Anyway it's a good point. If verilog2001 option is enabled in the 'Options' menu i will switch the parameter declaration as you suggested. Thanks
Please update your xschem, can you please test? I have changed the module parameter declaration as you suggested if verilog2001 is enabled in Options menu (the default setting).
// expanding symbol: ram.sym # of pins=8
// sym_path: /home/schippes/xschem-repo/trunk/xschem_library/logic/ram.sym
// sch_path: /home/schippes/xschem-repo/trunk/xschem_library/logic/ram.sch
`timescale 1ps / 1ps
module ram
#(
parameter dim = 5,
parameter width = 8,
parameter hex = 0,
parameter datafile = "ram.list",
parameter modulename = "ram",
parameter access_delay = 3000,
parameter oe_delay = 300
)
(
input wire [dim-1:0] ADD,
input wire [width-1:0] M,
output wire [width-1:0] DOUT,
input wire [width-1:0] DIN,
input wire WEN,
input wire CEN,
input wire OEN,
input wire CK
);
Hi,
I'm making a schematic where I would like some I/Os to have a width that depends from a parameter. I give the pin name a lab parameter like:
name=p1 lab=sel_delay[RIPPLE_COUNTER_BITS-1:0]
When I generate the netlist, I get the pin generated correctly:I used the following attributes in the matching symbols:
How can I get the verilog parameters to be defined before the input/output list (verilog-2001 style):
I tried to play with the verilog_format attribute but it does seem to have an effect there