Verilog 无法编译Micron';Modelsim中的DDR3内存模型

Verilog 无法编译Micron';Modelsim中的DDR3内存模型,verilog,fpga,hdl,modelsim,Verilog,Fpga,Hdl,Modelsim,我从Micron的网站()下载了DDR3银行的内存模型,我将使用Modelsim(2019.2)进行模拟测试 我按照自述文件中的说明进行编译,但遇到语法错误!我不认为Micron会将错误代码公开并提供给开发人员 Modelsim命令: vlog +define+sg25 C:/Micro_projects/FPGA/hdl/micron/ddr3/ddr3.v 错误 # ** Error: (vlog-13069) C:/Micro_projects/FPGA/hdl/micron/ddr3/

我从Micron的网站()下载了DDR3银行的内存模型,我将使用Modelsim(2019.2)进行模拟测试

我按照自述文件中的说明进行编译,但遇到语法错误!我不认为Micron会将错误代码公开并提供给开发人员

Modelsim命令:

vlog +define+sg25 C:/Micro_projects/FPGA/hdl/micron/ddr3/ddr3.v
错误

# ** Error: (vlog-13069) C:/Micro_projects/FPGA/hdl/micron/ddr3/ddr3.v(421): near ";": syntax error, unexpected ';', expecting '('.
# ** Error: C:/Micro_projects/FPGA/hdl/micron/ddr3/ddr3.v(424): Illegal declaration after the statement near line '421'.  Declarations must precede statements.  Look for stray semicolons.
# ** Error: (vlog-13069) C:/Micro_projects/FPGA/hdl/micron/ddr3/ddr3.v(433): near "integer": syntax error, unexpected integer, expecting IDENTIFIER or genvar.
# ** Error: C:/Micro_projects/FPGA/hdl/micron/ddr3/ddr3.v(433): (vlog-13205) Syntax error found in the scope following 'i'. Is there a missing '::'?
首字母
开始:文件\u io\u打开
reg[BA_位-1:0]银行;
reg[行\位-1:0]行;
reg[COL_BITS-1:0]列;
reg[BA_位+行位+列位-1:0]地址;
reg[BL_MAX*DQ_位-1:0]数据;
字符串_char//第421行
整数输入,fio_状态;
if(!$value$plusargs(“型号数据+%s”,tmp型号目录))
开始
tmp_model_dir=“/tmp”;
$display(
%m:在时间%t警告:未指定+model_数据选项,使用/tmp。“,
$time
);
结束
对于(整数i=0;i<`BANKS;i=i+1)
memfd[i]=打开银行文件(i);
我希望有人能建议我如何进行。我已经联系了美光公司,但还没有他们的消息(已经有几天了)。我被卡住了,任何评论都很感激

谢谢,,
Surabhi

错误来自包含
字符串的行,该字符串是SystemVerilog关键字


您需要使用modelsim
-sv
选项启用SystemVerilog语法。

错误来自包含SystemVerilog关键字的
字符串的行


您需要使用modelsim
-sv
选项启用SystemVerilog语法。

我无法在此处附加文件,但它位于链接中!你是说这个吗?vlog-sv+define+sg25 C:/Micro_projects/FPGA/hdl/micron/ddr3/ddr3.v我会尝试一下,但文档中没有任何地方说它是sv,但绝对可能。我不能在这里附加文件,但它在链接中!你是说这个吗?vlog-sv+define+sg25 C:/Micro_projects/FPGA/hdl/micron/ddr3/ddr3.v我会尝试一下,但文档中没有任何地方说它是sv,但绝对可能。
initial
begin : file_io_open
    reg [BA_BITS - 1 : 0] bank;
    reg [ROW_BITS - 1 : 0] row;
    reg [COL_BITS - 1 : 0] col;
    reg [BA_BITS + ROW_BITS + COL_BITS - 1 : 0] addr;
    reg [BL_MAX * DQ_BITS - 1 : 0] data;
    string _char;                                          //LINE 421
    integer in, fio_status;

    if (!$value$plusargs("model_data+%s", tmp_model_dir))
    begin
        tmp_model_dir = "/tmp";
        $display(
            "%m: at time %t WARNING: no +model_data option specified, using /tmp.",
            $time
        );
    end

    for (integer i = 0; i < `BANKS; i = i + 1)
        memfd[i] = open_bank_file(i);