I have about six errors but they are all the same. The error goes as such: near "?": syntax error, unexpected '?'
I've been trying to figure out how to fix this and I've looked at other problems in stackoverflow relating to this problem but to no avail. At first I thought it was how I was formatting my ternary statements but that wasn't it. So what could the prroblem be?
Code:
always_ff@(posedge clk, posedge reset)
if (reset) state <= S0;
else state <= nextstate;
always_comb
case (state)
S0: OpCode1 ? nextstate <= S2 : nextstate <= S1;
S1: OpCode2 ? nextstate <= S8 : nextstate <= S4;
S2: OpCode2 ? nextstate <= S3 : nextState <= S9;
S3: nextstate <= S0;
S4: A ? nextstate <= S5 : nextstate <= S13;
S5: B ? nextstate <= S7 : nextstate <= S6;
S6: Binv ? nextstate <= S14 : nextstate <= S13;
S7: Binv ? nextstate <= S13 : nextstate <= S14;
endcase
Note S1 to S14 are part of an enum that holds 5 bits[4:0]. The rest are inputs.