|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
'define WIDTH 4
module Gray_ji_shu_qi (output reg [' WIDTH-1:0] gray,
input clk,
input rst_n);
reg[' WIDTH-1:0] gnext,bnext,bin;
integer i;
always @(posedge clk or negedge rst_n)
if(!rst_n)
gray<=0;
else
gray<=gnext;
always @(gray) begin
for(i=0;i<4;i=i+1)
bin=^(gray>>i);
bnext=bin+1;
gnext=(bnext>>1)^bnext;
end
endmodule
高手指点下,为什么会出现下面的情况啊?我用quartusII6.0.
Error (10170): Verilog HDL syntax error at Gray_ji_shu_qi.v(1) near text "'d"; expecting "module", or "macromodule", or "primitive", or "(*", or "config", or "include", or "library" |
|