# VERIFICATION ASYNCHRONOUS FIFO CUMMINGS

**URL:** <https://verificationacademy.com/forums/t/verification-asynchronous-fifo-cummings/41199>\
**Category:** SystemVerilog\
**Tags:** sysyem-verilog, SystemVerilog, systemverilog-driver-monitor-virtual-interface-transaction, fifo, asynchronous\
**Created:** [January 23, 2023, 9:12am UTC](https://verificationacademy.com/forums/t/verification-asynchronous-fifo-cummings/41199 "2023-01-23T09:12:30Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![user49](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/user49/32/4533_2.png) [@user49](https://verificationacademy.com/forums/u/user49)\
**Post date:** [January 30, 2023, 7:29pm UTC](https://verificationacademy.com/forums/t/verification-asynchronous-fifo-cummings/41199/9 "2023-01-30T19:29:14Z")

</div>

_In reply to [GiuseppeT](https://verificationacademy.com/forums/t/verification-asynchronous-fifo-cummings/41199/8):_  
You’re in the right direction. Some comments:

1. **Clocks and interface**  
It is much more common to have the clock passes as an argument to the interface. It is very uncommon to have an interface just for the clock. Thus, do this instead:

```verilog
interface write_if(input logic wclk);
logic winc;
logic [7:0] wdata;
endinterface
interface read_if(input logic rclk);
logic rinc;
logic [7:0] rdata;
endinterface

```

1. **class full\_transaction;**  
Looks ok. On situation, you may need to add an IDLE condition  
// typedef enum {RD, WR, RD\_WR} situation;
2. **class full\_generator; write\_driver**  
Looks OK. You have 2 mailboxes,and in _main_ you put transactions. That is OK.  
However, in write\_driver you declare another mailbox _mailbox wgen2wdriv;_, but I don’t see the connection between the mailbox in full\_generator and the write\_driver. Also, where is the call to the _full\_generator.main()_?

I understand that it is partial code. You still need to add the scoreboard/monitor and verifier.  
In my SVA book I wrote a model of a traffic light controller with East/West nd North/South lights for use in formal. My first attempt at the design was to have 2 separate control logic, one for each direction with the 2 controls talking to each other. I struggled making it work because I had issues wtht he synchronization between the two controls. I ended up with one master control directing the traffic between the 2 logic units (i.e., EW NS).  
My point here is that I see the possibility of some difficulties in having 2 separate, non-coordinated transactions and monitor without good coordination. After all, if you want to do a write on full or read on empty, there’s got to be coordination in creating the full or empty conditions before exercising the test.  
I would prefore ONE interface, ONE triver with separate tasks (1 for rd, 1 for wr), constrained randomization to create the end conditions.

---

_[View the full topic](https://verificationacademy.com/forums/t/verification-asynchronous-fifo-cummings/41199)._
