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.

Problem with assigning value to a net

Status
Not open for further replies.

rohankewl

Newbie level 5
Joined
Feb 27, 2007
Messages
10
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,283
Activity points
1,328
I'm getting the following the error message.
Please help me fix it.
Error: C:/Modeltech_xe_starter/examples/mph.v(45): (vlog-2110) Illegal reference to net "out".
** Error: C:/Modeltech_xe_starter/examples/mph.v(61): (vlog-2110) Illegal reference to net "out".

I have declared out as output[2:0] out
and in always block
I have the two statements where it is showing the error
out =3'b000;
out= mem[ptr];
 

(vlog-2110) illegal reference to net

hi,

When assigning a value to a net, you cannot use the following type of
assignment statement:
out = 3'b000;

This will result in an "Illegal reference to net" error message.
Instead, if you want to make several assignments to a net, do something
like the following:

// An example in test bench

reg [2:0] out_tmp;
wire [2:0] out = out_tmp;
initial begin
...
out_tmp = 3'bzzz;
...
out_tmp = 3'b000;
...
end


Hope it helps.
 

vlog 2110

declare it as :
output reg [2:0] out;
 

illegal reference to net

if inside always block. use reg type, and out <= ... (other wise, blocking statement)
other wise, use assign out = ....


rohankewl said:
I'm getting the following the error message.
Please help me fix it.
Error: C:/Modeltech_xe_starter/examples/mph.v(45): (vlog-2110) Illegal reference to net "out".
** Error: C:/Modeltech_xe_starter/examples/mph.v(61): (vlog-2110) Illegal reference to net "out".

I have declared out as output[2:0] out
and in always block
I have the two statements where it is showing the error
out =3'b000;
out= mem[ptr];
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top