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.

help me with programming error plz

Status
Not open for further replies.

Parth Adroja

Newbie level 3
Newbie level 3
Joined
Nov 7, 2014
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
15

Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module assignment(Q,clk,rst);
input clk,rst;
output [2:0]Q;
always @(posedge clk)
begin
if(rst);
begin
Q<=3'b000;
end
else()
begin
case(Q)
3'b000: Q<=3'b001;
3'b001: Q<=3'b010;
3'b010: Q<=3'b100;
3'b100: Q<=3'b110;
default: Q<=3'b000;
endcase
end
end
endmodule




i'm getting this error in above program.
"near "else": syntax error, unexpected else"
can anyone help me?
thanks in advance
 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top