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.

Passing RAM as argument in tasks in Verilog

Status
Not open for further replies.

hassanzia

Junior Member level 3
Joined
Nov 24, 2011
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,506
HI all.

Is it possible to pass a RAM as an argument in a verilog task. Also can a task return a value as a RAM?

for example is the following code acceptable?

Code:
task xyz();

input [7:0] reg_in [0:3];
output [7:0] reg_out [0:3];


endtask

PS can a task return a value (like a C++ function)
 

Similar to modules, Verilog tasks and functions don't provide multi-dimensional vectors as port items. Look for System Verilog features if you want to overcome this restrictions.

There are functions in Verilog, with some restrictions compared to tasks. Consult your Verilog text book or IEEE 1364 for details.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top