Forum Discussion
Altera_Forum
Honored Contributor
8 years agoError in Modulesim verilog
my program is compile successfully without saving but when i save the project transcript shows error unexpected integers error module auto_segment (output [6:0]hex 0,input clk); integer c...
Altera_Forum
Honored Contributor
8 years agoalways@(posedge clk); Notice the semi-colon after the always? It shouldn't be there - you basically ended the always block after that line. Always indent your code properly, and always use begin and end statements after each "always", "if", "else", "for", and "initial" block. Even if that statement is just one line. It makes it far easier to see what is going on. I also always put the begin on the same line as the "always"/"if"/"else"/etc. statement because it's easier to avoid making mistakes like semi-colons where they shouldn't be.