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.

verilog tasks - output reg does not update

Status
Not open for further replies.

eng.amr2009

Junior Member level 3
Joined
Dec 21, 2009
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Egypt
Activity points
1,509
Hi guys,

I implemented some tasks in a separate file. Then I include these tasks in my test bench. The tasks have output ports. I call the tasks in initial block in test bench and connect the outputs of the tasks to reg types in the test bench.

The problem now is that the registers in test bench do not get updated. However when I view the task internal signals I see them toggling !!!!
I do not know why the toggling signals in the tasks do not reflect to the port mapping in the test bench.
 

In Verilog, task inputs are copied by value upon entry to the task, and task output are copied by value upon exit of the task. They are not like ports of a module.

SystemVerilog allows variables (not wires) to be passed by reference. That may give you the functionality you are looking for. See section 13.5 Subroutine calls and argument passing of the 1800-2012 LRM.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top