想了半天了,编译错误里面总是提示
Error (10170): Verilog HDL syntax error at Verilog1.v(11) near text ?
Error (10170): Verilog HDL syntax error at Verilog1.v(11) near text "?; expecting ")", or "?", or binary operator
这是代码
module counter(qout,cout,data,load,reset,clk);
output[7:0] qout;
output cout;
input[7:0] data;
input load,reset,clk;
reg[7:0] qout;
reg cout;
always @ (posedge clk)
if(reset) qout = 0;
else if(load) qout = data;
else if (qout==8’b11111111)
begin qout=0; cout=1; end
else
begin qout=qout+1; cout=0; end
endmodule