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.

how to generate almost full and almost empty signal in async FIFO

Status
Not open for further replies.

sathi.repala

Newbie level 5
Joined
May 6, 2011
Messages
9
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,283
Location
bangalore
Activity points
1,335
hi,

In your memory(FIFO) if the read address and write address are equal then the FIFO is empty"wr_add[n:0]==rd_add[n:0]" and where as in Full case, you should ~the MSB of write address and then compare the wr_add and rd_add if both are equal then you can say FIFO is full else FIFO is not full.."{~wr_add[n],wr_add[n-1:0]} == rd_add[n:0]"
 

umairsiddiqui

Full Member level 2
Joined
Apr 13, 2004
Messages
143
Helped
7
Reputation
14
Reaction score
1
Trophy points
1,298
Location
Sweden
Activity points
1,434
hi,

In your memory(FIFO) if the read address and write address are equal then the FIFO is empty"wr_add[n:0]==rd_add[n:0]" and where as in Full case, you should ~the MSB of write address and then compare the wr_add and rd_add if both are equal then you can say FIFO is full else FIFO is not full.."{~wr_add[n],wr_add[n-1:0]} == rd_add[n:0]"

I'm asking about "Almost Full" and "Almost Empty" flags, you are telling me about "Full" and "Empty" flags.
 

sathi.repala

Newbie level 5
Joined
May 6, 2011
Messages
9
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,283
Location
bangalore
Activity points
1,335
I'm asking about "Almost Full" and "Almost Empty" flags, you are telling me about "Full" and "Empty" flags.

hi,
am sorry,

then you need to define a variable pointer_difference, compare the both wr_add_ptr and rd_add_ptr and store the difference in pointer_difference so that you can estimate weather FIFO is almost_full or almost_empty.
go through this link you may gain more knowledge about FIFO..

ASIC-SoC-VLSI Design: New Asynchronous FIFO Design

i hope that it will helpful to you:roll::roll::!:
 

umairsiddiqui

Full Member level 2
Joined
Apr 13, 2004
Messages
143
Helped
7
Reputation
14
Reaction score
1
Trophy points
1,298
Location
Sweden
Activity points
1,434
hi,
am sorry,

then you need to define a variable pointer_difference, compare the both wr_add_ptr and rd_add_ptr and store the difference in pointer_difference so that you can estimate weather FIFO is almost_full or almost_empty.
go through this link you may gain more knowledge about FIFO..

ASIC-SoC-VLSI Design: New Asynchronous FIFO Design

i hope that it will helpful to you:roll::roll::!:

that design has a problem...

Code:
always @(*) //pointer difference is evaluated for both clock edges

begin

if(w_ptr>r_ptr)

ptr_diff<=w_ptr-r_ptr;

else if(w_ptr)

ptr_diff<=((f_depth-r_ptr)+w_ptr);

else ptr_diff<=0; end

you can't compare two counters with gates, when the two counters are running on different clocks. The results from the comparison will not always be stable on any given clock edge, due to possible recent count on the edge of the other clock.
 

Nikartol

Newbie level 1
Joined
Feb 21, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,284
Hello! I have the same question. Have you found a solution for "Almost Full" and "Almost Empty" flags?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top