Altera_Forum
Honored Contributor
17 years agoparameters in schematic editor?
Hi all
I want to make block from verilog file with parameters. Example: ------------------------------------------ module dff_mod ( d, clk, enable, nrst, q ); `define width 18 input [`width-1:0] d; input clk; input enable; input nrst; output reg [`width-1:0] q; always @ (posedge clk or negedge nrst) if(~nrst) q <= `width'b0; else if(enable) q <= d; else q <= `width'b0; endmodule -------------------------- I want to make several blocks of dff_mod and use them with different width. How to do it?? width has to be defined in some special way? Couldn't find suitable help...