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 Error!! Please help..

Status
Not open for further replies.

jeetesh

Newbie level 4
Joined
Dec 19, 2013
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
54
I am getting an error as while designing an OAI22 in verilog(Xilinkx ISE 14.1) : ERROR:HDLCompilers:26 - "OAI21.v" line 26 expecting 'endmodule', found 'if'
21: module OAI21(a, b, cntrl, z);
22: input a, b, cntrl;
23: output z;
24: reg z;
25: always @(a or b or cntrl);
26: if (cntrl)
27: z = a & b;
28: else
29: z = a | b;
30: endmodule
Help me
Thanks in advance!!
 

I guess you wanted the if statement inside the always block. The you should delete the semicolon in line 25.
 
thank u.... I was doing the same silly mistake....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top