V
VerilogNewb
Guest
Hello,
I'm new to this group and new to Verilog and am having a compiler error for what i hope is a simple syntax mistake. I'm a first year college student with a little background in Java, that might show in how I wrote my verilog code...
I'd rather not put my entire code onto this page since sharing projects between students would constitute cheating and if someone sniped it I'd never know until it was too late...
So I'll post a general area of where I'm getting an error, and if you can see what I'm doing wrong, that'd be nice but if you would like to see the rest just let me know.
ERRORS IM RECEIVING:
Error (10170): Verilog HDL syntax error at controller.v(25) near text "always"; expecting "end"
Error (10170): Verilog HDL syntax error at controller.v(43) near text "always"; expecting "end"
Error (10170): Verilog HDL syntax error at controller.v(165) near text "always"; expecting "end"
Error (10170): Verilog HDL syntax error at controller.v(188) near text "always"; expecting "end"
Error (10112): Ignored design unit "controller" at controller.v(1) due to previous errors
Info: Found 0 design units, including 0 entities, in source file controller.v
Error: Quartus II Analysis & Synthesis was unsuccessful. 5 errors, 0 warnings
Error: Peak virtual memory: 199 megabytes
Error: Processing ended: Mon Apr 22 22:02:24 2013
Error: Elapsed time: 00:00:00
Error: Total CPU time (on all processors): 00:00:00
Error: Quartus II Full Compilation was unsuccessful. 7 errors, 0 warnings
-----------------------------------------------------------------
A sample of my code with most of the case statement info removed:
always @ (posedge clk) begin
always @ (posedge enter) begin
case (inputState)
endcase // end case 1
end // end inner always 1
always @ (inputState) begin
case (inputState)
endcase // end case 2
end // end inner always 2
end // end outer always
-----------------------------------------------------------------
the first error happens at the second always @:
"always @ (posedge clk) begin"
but i know its connected to the end at my line 41 which is the end at:
"end // end inner always 1"
the second error happens at the third always @:
"always @ (inputState) begin"
but i know its connected to the end at my line 58 which is the end at:
"end // end inner always 2"
The other two syntax errors happen later in the code but in similiar circumstance (2 always @ statements within another always @ statement)
Is there an issue of trying to have an always @ statement within another always @ statement?
Any help you could give would be appreciated.
I'm new to this group and new to Verilog and am having a compiler error for what i hope is a simple syntax mistake. I'm a first year college student with a little background in Java, that might show in how I wrote my verilog code...
I'd rather not put my entire code onto this page since sharing projects between students would constitute cheating and if someone sniped it I'd never know until it was too late...
So I'll post a general area of where I'm getting an error, and if you can see what I'm doing wrong, that'd be nice but if you would like to see the rest just let me know.
ERRORS IM RECEIVING:
Error (10170): Verilog HDL syntax error at controller.v(25) near text "always"; expecting "end"
Error (10170): Verilog HDL syntax error at controller.v(43) near text "always"; expecting "end"
Error (10170): Verilog HDL syntax error at controller.v(165) near text "always"; expecting "end"
Error (10170): Verilog HDL syntax error at controller.v(188) near text "always"; expecting "end"
Error (10112): Ignored design unit "controller" at controller.v(1) due to previous errors
Info: Found 0 design units, including 0 entities, in source file controller.v
Error: Quartus II Analysis & Synthesis was unsuccessful. 5 errors, 0 warnings
Error: Peak virtual memory: 199 megabytes
Error: Processing ended: Mon Apr 22 22:02:24 2013
Error: Elapsed time: 00:00:00
Error: Total CPU time (on all processors): 00:00:00
Error: Quartus II Full Compilation was unsuccessful. 7 errors, 0 warnings
-----------------------------------------------------------------
A sample of my code with most of the case statement info removed:
always @ (posedge clk) begin
always @ (posedge enter) begin
case (inputState)
endcase // end case 1
end // end inner always 1
always @ (inputState) begin
case (inputState)
endcase // end case 2
end // end inner always 2
end // end outer always
-----------------------------------------------------------------
the first error happens at the second always @:
"always @ (posedge clk) begin"
but i know its connected to the end at my line 41 which is the end at:
"end // end inner always 1"
the second error happens at the third always @:
"always @ (inputState) begin"
but i know its connected to the end at my line 58 which is the end at:
"end // end inner always 2"
The other two syntax errors happen later in the code but in similiar circumstance (2 always @ statements within another always @ statement)
Is there an issue of trying to have an always @ statement within another always @ statement?
Any help you could give would be appreciated.