KUMARGAURAV
Newbie
- Joined
- Mar 18, 2015
- Messages
- 5
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,325
Hi, can anyone help me with the synthesizable verilog code for Asynchronous FIFO?
regards
regards
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Code dot - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 //'EqualAddresses' logic: assign EqualAddresses = (pNextWordToWrite == pNextWordToRead); //'Quadrant selectors' logic: assign Set_Status = (pNextWordToWrite[ADDRESS_WIDTH-2] ~^ pNextWordToRead[ADDRESS_WIDTH-1]) & (pNextWordToWrite[ADDRESS_WIDTH-1] ^ pNextWordToRead[ADDRESS_WIDTH-2]); assign Rst_Status = (pNextWordToWrite[ADDRESS_WIDTH-2] ^ pNextWordToRead[ADDRESS_WIDTH-1]) & (pNextWordToWrite[ADDRESS_WIDTH-1] ~^ pNextWordToRead[ADDRESS_WIDTH-2]); //'Status' latch logic: always @ (Set_Status, Rst_Status, Clear_in) //D Latch w/ Asynchronous Clear & Preset. if (Rst_Status | Clear_in) Status = 0; //Going 'Empty'. else if (Set_Status) Status = 1; //Going 'Full'. //'Full_out' logic for the writing port: assign PresetFull = Status & EqualAddresses; //'Full' Fifo. always @ (posedge WClk, posedge PresetFull) //D Flip-Flop w/ Asynchronous Preset. if (PresetFull) Full_out <= 1; else Full_out <= 0; //'Empty_out' logic for the reading port: assign PresetEmpty = ~Status & EqualAddresses; //'Empty' Fifo. always @ (posedge RClk, posedge PresetEmpty) //D Flip-Flop w/ Asynchronous Preset. if (PresetEmpty) Empty_out <= 1; else Empty_out <= 0;
Hi, can anyone help me with the synthesizable verilog code for Asynchronous FIFO?
regards
A simple search engine query would have found what you are looking for.
https://lmgtfy.com/?q=asynchronous+fifo
The second link at asic-world has code.