- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn' use schematic entry with Quartus since years, but with VHDL coded blocks, generic constant are generally displayed in the schematic editor and can be edited also. The Verilog equivalent to GENERIC isn't `define but parameter syntax, I would expect, parameters from the module definition to be displayed with the block symbol.
parameter width = 18;
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page