编译时出现了以下错误提示:Error(10170): Verilog HDL syntax error at dec4()16x.v(5)near text 3; expecting an identifier代码中的第5行为“output reg[15:0] 3yn”这里代码的错误可能是什么?

浏览:677

编译时出现了以下错误提示:Error(10170): Verilog HDL syntax error at dec4()16x.v(5)near text 3; expecting an identifier代码中的第5行为“output reg[15:0] 3yn”这里代码的错误可能是什么? A.变量类型定义错误B.赋值方式错误C.标识符定义不合规范D.语句结尾漏了“:”正确答案:标识符定义不合规范

module SHIF4(DIN,CLK,RST,DOUT);input CLK,DIN,RST; output DOUT;reg [3:0] SHFT;always@(posedge CLK or posedge RST)if(RST)SHFT=4'B0;else begin SHFT=(SHFT1);SHFT[3]=DIN;endassign DOUT=SHFT[0];endmodule该程序实现的功能是:

浏览:545

module SHIF4(DIN,CLK,RST,DOUT);input CLK,DIN,RST; output DOUT;reg [3:0] SHFT;always@(posedge CLK or posedge RST)if(RST)SHFT=4'B0;else begin SHFT=(SHFT1);SHFT[3]=DIN;endassign DOUT=SHFT[0];endmodule该程序实现的功能是: A.左移移位寄存器B.右移移位寄存器C.同步清零D.异步清零正确答案:右移移位寄存器;异步清零