Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Verilog register cannot be driven by primitives or continuous assignment

Tags:

verilog

I want to use a module in a test bench like this:

reg [31:0] OutputVal;
reg [15:0] InputVal;
sign theSignExtender(InputVal,OutputVal);

When I compile, I get the error:

error: reg OutputVal; cannot be driven by primitives or continuous assignment.

Any suggestions?

like image 966
user1730250 Avatar asked Nov 09 '13 02:11

user1730250


1 Answers

Change:

reg [31:0] OutputVal;

to:

wire [31:0] OutputVal;
like image 148
toolic Avatar answered Nov 11 '22 17:11

toolic