B
bir
Guest
I have a parameterized fifo which accepts length and depth as its
parameter.
parameter FIFO_WIDTH = 3;
parameter FIFO_DEPTH = 8;
reg [FIFO_WIDTH-1:0] read_ptr;
reg [FIFO_WIDTH-1:0] write_ptr;
reg [FIFO_WIDTH:0] ptr_gap; // Gap between the pointers
always @(negedge pintrst_n or posedge pit_clk)
begin
if(pintrst_n== 1'b0)
begin
read_ptr <= ..??
write_ptr <= ..??
ptr_gap <= ..??
My question is how do I apply reset values to the pointers and ptr_gap
since they can be of varible length?
Thanks
Bir
parameter.
parameter FIFO_WIDTH = 3;
parameter FIFO_DEPTH = 8;
reg [FIFO_WIDTH-1:0] read_ptr;
reg [FIFO_WIDTH-1:0] write_ptr;
reg [FIFO_WIDTH:0] ptr_gap; // Gap between the pointers
always @(negedge pintrst_n or posedge pit_clk)
begin
if(pintrst_n== 1'b0)
begin
read_ptr <= ..??
write_ptr <= ..??
ptr_gap <= ..??
My question is how do I apply reset values to the pointers and ptr_gap
since they can be of varible length?
Thanks
Bir