Comments on: Dual-Clock Asynchronous FIFO in SystemVerilog https://www.verilogpro.com/asynchronous-fifo-design/ Verilog and Systemverilog Resources for Design and Verification Sun, 16 Oct 2022 20:01:36 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Jason Yu https://www.verilogpro.com/asynchronous-fifo-design/#comment-8033 Sun, 16 Oct 2022 20:01:36 +0000 http://www.verilogpro.com/?p=199#comment-8033 In reply to Hari.

Yes that will work too. But for a real life design you should separate the test bench from the design so the design files can be taken through the complete design flow including synthesis and physical design.

]]>
By: Hari https://www.verilogpro.com/asynchronous-fifo-design/#comment-8032 Sun, 16 Oct 2022 17:57:07 +0000 http://www.verilogpro.com/?p=199#comment-8032 Hey Jason ,
can we implement the same code with only one testbench and design file.

]]>
By: Jason Yu https://www.verilogpro.com/asynchronous-fifo-design/#comment-5366 Sun, 20 Mar 2022 06:53:09 +0000 http://www.verilogpro.com/?p=199#comment-5366 In reply to Sarathkumar S.

Hi. Yes each of the pointers are multi-bit, in parallel. Therefore each of the bits require a 2-flop synchronizer.

]]>
By: Jason Yu https://www.verilogpro.com/asynchronous-fifo-design/#comment-5365 Sun, 20 Mar 2022 06:52:00 +0000 http://www.verilogpro.com/?p=199#comment-5365 In reply to Dong.

Hi Dong. I simulated my code at edaplayground.com using Synopsys VCS.

]]>
By: Jason Yu https://www.verilogpro.com/asynchronous-fifo-design/#comment-5364 Sun, 20 Mar 2022 06:36:00 +0000 http://www.verilogpro.com/?p=199#comment-5364 In reply to Max.

Hi Max. I realized there is an important detail I missed/assumed in the article. Besides coding the RTL design correctly, there also needs to be a timing constraint placed on the signals of the gray code. The timing constraint has to say that each of the bits of the gray code, must be sent from the fast to slow clock, within 1 cycle of the fast clock. This is a timing constraint on the physical wire, to constrain the flight time of the signal on the wire. With this constraint, it will ensure that the recipient flip flops, on the slow clock, will see the values changing 1 bit at a time (at the rate of the fast clock). Therefore at any point in time when the slow clock ticks, there can only have been 1 bit transition on the gray code signals.

]]>
By: Max https://www.verilogpro.com/asynchronous-fifo-design/#comment-5349 Sat, 19 Mar 2022 03:13:15 +0000 http://www.verilogpro.com/?p=199#comment-5349 In reply to Jason Yu.

But if one or more values are skipped, then back-to-back values seen by the (slow) receiver can differ by more than one bit, despite the use of gray code. Is this not a problem?

]]>
By: Dong https://www.verilogpro.com/asynchronous-fifo-design/#comment-4708 Wed, 05 Jan 2022 10:27:19 +0000 http://www.verilogpro.com/?p=199#comment-4708 How to run your code?
I tried icarus verilog, but failed.
What’s your simulation envirement to generate the waveform picture?
Thanks!

]]>
By: Sarathkumar S https://www.verilogpro.com/asynchronous-fifo-design/#comment-4192 Sun, 14 Nov 2021 15:45:36 +0000 http://www.verilogpro.com/?p=199#comment-4192 Hello Jason,
In this article provided, the rd ptr and wr ptr are multibit. is that multi bit ptr’s are sending serially through cross domain or it is parallel transmission, so the synchronizer used is each bit need to have two flop synchronizer

]]>
By: Jason Yu https://www.verilogpro.com/asynchronous-fifo-design/#comment-1534 Wed, 27 Mar 2019 05:47:49 +0000 http://www.verilogpro.com/?p=199#comment-1534 In reply to Test.

Oops, typo in the comments.

]]>
By: Test https://www.verilogpro.com/asynchronous-fifo-design/#comment-1533 Wed, 27 Mar 2019 04:56:01 +0000 http://www.verilogpro.com/?p=199#comment-1533 // Convert gray to binary ==> has to be “binary to gray”
assign gray[0] = binary[1] ^ binary[0];
assign gray[1] = binary[2] ^ binary[1];
assign gray[2] = binary[3] ^ binary[2];
assign gray[3] = binary[3];

]]>