首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

求助QUATUSii5.0和Verilog高手帮忙

求助QUATUSii5.0和Verilog高手帮忙

求助QUATUSii5.0和Verilog高手帮忙 我用Verilog编写了一个加密程序如下: 'define del 1 'define enc 8'b10001110 'define width 8 'timescale 1ns/10ps module encrypt(clk,load,key,data_in,data_out); input clk; input load; input ['width-1:0] key; input ['width-1:0] data_in; output ['width-1:0] data_out; wire clk; wire load; wire ['width-1:0] key; wire ['width-1:0] data_in; wire ['width-1:0] data_out; reg ['width-1:0] temp; assign #'del data_out=temp^data_in; always @(posedge clk) begin if(load) begin temp<=#'del key; end; else begin temp['width-1:1]<=#'del temp['width-2:0]; temp[0]<=#'del ^(temp & 'enc); end end endmodule 编译后出现这样的错误Error: Verilog HDL syntax error at encrypt.v(1) near text "'d"; expecting "module", or "macromodule", or "primitive", or "(*", or "config", or "include", or "library" Error: Verilog HDL syntax error at encrypt.v(4) near text ' Error: Verilog HDL syntax error at encrypt.v(8) near text ' Error: Verilog HDL syntax error at encrypt.v(8) near text "'"; expecting an identifier, or a number, or a system task, or "(", or "{", or unary operator, Error: Verilog HDL syntax error at encrypt.v(9) near text ' Error: Verilog HDL syntax error at encrypt.v(9) near text "'"; expecting an identifier, or a number, or a system task, or "(", or "{", or unary operator, Error: Verilog HDL syntax error at encrypt.v(10) near text ' Error: Verilog HDL syntax error at encrypt.v(10) near text "'"; expecting an identifier, or a number, or a system task, or "(", or "{", or unary operator, Error: Verilog HDL syntax error at encrypt.v(13) near text ' Error: Verilog HDL syntax error at encrypt.v(13) near text "'"; expecting an identifier, or a number, or a system task, or "(", or "{", or unary operator, Error: Verilog HDL syntax error at encrypt.v(14) near text ' Error: Verilog HDL syntax error at encrypt.v(14) near text "'"; expecting an identifier, or a number, or a system task, or "(", or "{", or unary operator, Error: Verilog HDL syntax error at encrypt.v(15) near text ' Error: Verilog HDL syntax error at encrypt.v(15) near text "'"; expecting an identifier, or a number, or a system task, or "(", or "{", or unary operator, Error: Verilog HDL syntax error at encrypt.v(16) near text ' Error: Verilog HDL syntax error at encrypt.v(16) near text "'"; expecting an identifier, or a number, or a system task, or "(", or "{", or unary operator, Error: Verilog HDL syntax error at encrypt.v(17): illegal character in decimal number Warning: Verilog HDL net warning at encrypt.v(17): created undeclared net "l" Error: Verilog HDL syntax error at encrypt.v(17) near text "data_out"; expecting "=" Error: Verilog HDL syntax error at encrypt.v(22) near text "'d"; expecting an identifier, or a number, or "(", or a real number Inf Found 0 design units, including 0 entities, in source file encrypt.v
我很烂
符号打错了
不是 '
而是 `

键盘左上角(数字1旁边那个)
返回列表