Guest
I created a parameter in the top module of my code. Now I want to instantiate it to use in child modules. How can I do that?
ex.
module fifo_ddr (clk, rst, wr_en, rd_en, clk_div_wr, clk_div_rd, data, buf_full, buf_empty, write_addr, read_addr, buf_out);
parameter DATA_WIDTH=8;
parameter ADDR_WIDTH=6;
input clk, rst, wr_en, rd_en;
input[(DATA_WIDTH-1):0] data;
and then I want to use in the other module
ex.
module fifo_ddr (clk, rst, wr_en, rd_en, clk_div_wr, clk_div_rd, data, buf_full, buf_empty, write_addr, read_addr, buf_out);
parameter DATA_WIDTH=8;
parameter ADDR_WIDTH=6;
input clk, rst, wr_en, rd_en;
input[(DATA_WIDTH-1):0] data;
and then I want to use in the other module