Continue to Site

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 assign a value async using systemverilog?

Status
Not open for further replies.

lty

Junior Member level 3
Joined
May 24, 2004
Messages
28
Helped
7
Reputation
14
Reaction score
4
Trophy points
1,283
Activity points
214
I want to test a fifo. the fifo read interface have three signals "rd, rdata, nempty".

I hope when nempty is valid, the testbench will assert rd to begin a read operaion.

But in SV program structure, the rd sigal always delay one cycle, maybe because clocking structure.

Can anyone give me one example how to implement this idea using SV.

In verilog, I think I can use "assign rd = nempty".

In SystemVerilog, How?

Thank you!

---------- Post added at 17:13 ---------- Previous post was at 17:01 ----------

I find the following code can implement my idea. Is it a good way?

initial begin
fork
forever begin
@( fifo_rd_if.nempty )
fifo_rd_if.rd = fifo_rd_if.nempty;
end
join_none
#100;
$exit;
end
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top