新手求助,verilog hdl要设计一个带异步清零和异步预置的8 位二进制加法计数器,麻烦看看代码哪儿错了。。
想了半天了,编译错误里面总是提示Error(10170):VerilogHDLsyntaxerroratVerilog1.v(11)neartext?Error(1017...
想了半天了,编译错误里面总是提示
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 展开
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 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询