【发布时间】:2016-02-23 07:20:51
【问题描述】:
reg [11:0] rom_sin_type [0:4095]= '{12'h000, 12'h003, 12'h006, 12'h009, 12'h00d, 12'h010, 12'h013, 12'h016, .....};
在verilog中,当我合成上面包含4096个值的代码行时,每个12位,它的显示错误如下所示。
期望 ';',发现 '='
期待 'endmodule',发现 '{'
请任何人帮助我,如何克服这个问题?
【问题讨论】:
-
请显示更多代码并指出错误行。
-
我存储了 4096 个值,这将是巨大的代码显示在这里
-
你使用的是verilog还是system-verilog?如果你这样做会发生什么:
reg [11:0] rom_sin_type [0:4095]; initial begin rom_sin_type = '{12'h000, 12'h003, 12'h006, 12'h009,...} end你的endmodule可能在错误的地方。 -
我使用的是 Verilog 代码,基本上是我在编码 NCO,在 "rom_sin_type 和 rom_cos_type" 中输入值
标签: arrays compiler-errors syntax-error verilog xilinx