Quick Verilog question

Status
Not open for further replies.

vlad928

Newbie level 1
Joined
Oct 18, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
7
I have a wire that I want to assign to my output. I have tried using x1 = out1 and it gives an error. Here is a pseudo code of what I am talking about.


Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
module test (out1, in1);
output out1;
input in1;
wire x1;
 
not (x1, in1);
 
wire x1 = out1;
 
endmodule

 
Last edited by a moderator:

the 8th line is incorrect.. you must replace "wire" with "assign".
 
It should also have the x1 and out1 swapped.
Code:
assign out1 = x1;
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…