Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Designing a synchronous FIFO with the registered data_out but without 1 clock cycle

Status
Not open for further replies.

leongch

Member level 2
Joined
Dec 22, 2005
Messages
44
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,692
Hi guys,

A ) In normal syn FIFO design, the data out is not registered.
assign data_out = MEM[RD_PTR];

B) If we would like to register the data_out as
always @(posedge clk)
data_out <= MEM[RD_PTR];

Compared the method, the B (registered data_out) will read out the data_out 1 clk cycle slower than method A.

In my design I have to design the FIFO with the registered data_out but without the 1clk cycle delay as shown at Method B.
I heard there's some design technics called pre-pop, anyone has any idea of this ? Please advice!
 

synchronous fifo

I am no expert but this is my idea. Pros please feel free to correct me.

In your code. The READ_PTR in Ex.A is most probably being incremented synchronously with the clock and !wr/rd signals. So there is still 1 clk cycle delay in the entire read process.

now consider this for Ex.B

Code:
always @(posedge clk)
    if (!wr)
       begin
          data_out  <= MEM[READ_PTR];
          READ_PTR  <= READ_PTR + 1;
       end

so the read pointer is updated in this clock cycle and all set up for the next read which is when rd/!wr is asserted.
 

fifo technics

U just need a pre-read logic, and Register to hold the data u read last time

pre-read logic: when rd is assert, raddr = nxt_rtpr// read the next data

there is problem , that is when FIFO is empty, and wr happen, so the FIFO depth=1
but there is no read happen, so u need to read the first data out into REG that u can use the value in REG when read happen. After that, every read operation read the next data in FIFO and store it in REG
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top