It is useless what you are doing. Look at the simulation log-file. You have always the same data. This is because you are doing the randomization in the constructor of the driver. This is the wrong place.
I mad a quick and dirty hack to modify your code and get some real numbers.
Dee here for details
In reply to Rahulkumar:
It is useless what you are doing. Look at the simulation log-file. You have always the same data. This is because you are doing the randomization in the constructor of the driver. This is the wrong place.
I mad a quick and dirty hack to modify your code and get some real numbers.
Dee here for details axi_streaming(2) - EDA Playground
I haven’t done the randomization in the constructor of the driver. I know very well that it isn’t right approach. I just helped him to fix the compilation issues. There are many such thing require to modify in his code. Please check the code he initially shared.
I have to develop UVC which will be plugged in SoC project-agent, in which I will receive packets of PCIe and transfer into AXI-Streaming protocol format. But I don’t have that agent where I can connect my driver. And why I am randomizing in the contractor because I will get the full packet once an agent is ready but for now I don’t have any packet so I have created a transaction class with few fields and randomizing in the driver.
So my driver logic is simple that it will wait for packet from any transaction class and once it gets the packet and waits for TVALID signal to assert and once asserted it will drive the whole packet to TDATA signal of the interface.
Sounds not so good to me, because you have now nothing you can really reuse. In an agent the driver and the monitor are the components requiring most of the effort. A sequencer is a simple typedef of the uvm_sequencer and the seq_item you can develop from the corresponding specs and adopt to the real content when getting mor ddata.