I';我是verilog的新手,请帮我找出可能的错误 模块ram\u 1\u verilog(输入EnA、输入EnB、, 输入WeA,输入WeB, 输入Oe, 输入时钟); 行:25输入[7:0]地址a//错误 第26行输入[7:0]地址//错误 行:27输入寄存器[7:0]dout1//错误 行:28输出寄存器[7:0]dout_2//错误 reg[7:0]ram[255:0]; 始终@(posedge clk) 开始 如果(EnA==1&&WeA==1)开始 第35行ram(Addr_a)
我看到的一个问题是,您试图使用括号进行数组选择,而它应该使用方括号: 更改为:I';我是verilog的新手,请帮我找出可能的错误 模块ram\u 1\u verilog(输入EnA、输入EnB、, 输入WeA,输入WeB, 输入Oe, 输入时钟); 行:25输入[7:0]地址a//错误 第26行输入[7:0]地址//错误 行:27输入寄存器[7:0]dout1//错误 行:28输出寄存器[7:0]dout_2//错误 reg[7:0]ram[255:0]; 始终@(posedge clk) 开始 如果(EnA==1&&WeA==1)开始 第35行ram(Addr_a),verilog,Verilog,我看到的一个问题是,您试图使用括号进行数组选择,而它应该使用方括号: 更改为: Syntax error near "<=". line 35 Line 25: Port Addr_a is not defined Verilog file C:/Documents and Settings/verilog_examples/ram_1_verilog.v ignored due to errors Line 25: Port declaration not allowed in ram_
Syntax error near "<=". line 35
Line 25: Port Addr_a is not defined Verilog file C:/Documents and Settings/verilog_examples/ram_1_verilog.v ignored due to errors
Line 25: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 26: Port Addr_b is not defined
Line 26: Port Addr_b is not defined
Line 26: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 27: Port dout1 is not defined
Line 27: Non-net port dout1 cannot be of mode input
Line 27: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 28: Port dout_2 is not defined
Line 28: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 35: dout1 is not a task
Line 44: ram is not a function.
Line 44: ram expects 0 arguments.
Line 44: Cannot assign an unpacked type to a packed type.
第35行ram(Addr_a)我看到的一个问题是,您试图使用括号进行数组选择,而它应该使用方括号:
更改为:
Syntax error near "<=". line 35
Line 25: Port Addr_a is not defined Verilog file C:/Documents and Settings/verilog_examples/ram_1_verilog.v ignored due to errors
Line 25: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 26: Port Addr_b is not defined
Line 26: Port Addr_b is not defined
Line 26: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 27: Port dout1 is not defined
Line 27: Non-net port dout1 cannot be of mode input
Line 27: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 28: Port dout_2 is not defined
Line 28: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 35: dout1 is not a task
Line 44: ram is not a function.
Line 44: ram expects 0 arguments.
Line 44: Cannot assign an unpacked type to a packed type.
第35行ram(Addr_a)我看到的一个问题是,您试图使用括号进行数组选择,而它应该使用方括号:
更改为:
Syntax error near "<=". line 35
Line 25: Port Addr_a is not defined Verilog file C:/Documents and Settings/verilog_examples/ram_1_verilog.v ignored due to errors
Line 25: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 26: Port Addr_b is not defined
Line 26: Port Addr_b is not defined
Line 26: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 27: Port dout1 is not defined
Line 27: Non-net port dout1 cannot be of mode input
Line 27: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 28: Port dout_2 is not defined
Line 28: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 35: dout1 is not a task
Line 44: ram is not a function.
Line 44: ram expects 0 arguments.
Line 44: Cannot assign an unpacked type to a packed type.
第35行ram(Addr_a)我看到的一个问题是,您试图使用括号进行数组选择,而它应该使用方括号:
更改为:
Syntax error near "<=". line 35
Line 25: Port Addr_a is not defined Verilog file C:/Documents and Settings/verilog_examples/ram_1_verilog.v ignored due to errors
Line 25: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 26: Port Addr_b is not defined
Line 26: Port Addr_b is not defined
Line 26: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 27: Port dout1 is not defined
Line 27: Non-net port dout1 cannot be of mode input
Line 27: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 28: Port dout_2 is not defined
Line 28: Port declaration not allowed in ram_1_verilog with formal port declaration list
Line 35: dout1 is not a task
Line 44: ram is not a function.
Line 44: ram expects 0 arguments.
Line 44: Cannot assign an unpacked type to a packed type.
第35行ram(地址a)
第35行和第44行-你犯了两次同样的错误,由蒂姆向你解释
第25-28行被标记,因为Addr\u a
、Addr\u b
、dout1
和dout\u 2
未在端口声明列表中声明,然后被定义为输入
/输出
第35行和第44行-你犯了两次同样的错误,由蒂姆向你解释
第25-28行被标记,因为Addr\u a
、Addr\u b
、dout1
和dout\u 2
未在端口声明列表中声明,然后被定义为输入
/输出
第35行和第44行-你犯了两次同样的错误,由蒂姆向你解释
第25-28行被标记,因为Addr\u a
、Addr\u b
、dout1
和dout\u 2
未在端口声明列表中声明,然后被定义为输入
/输出
第35行和第44行-你犯了两次同样的错误,由蒂姆向你解释
第25-28行被标记,因为Addr\u a
、Addr\u b
、dout1
和dout\u 2
未在端口声明列表中声明,然后被定义为输入
/输出
大家好,欢迎来到StackOverflow。我很抱歉这么说,但像这样的问题(帮助查找代码中的错误)在这个网站上被认为是离题的。如果你能把这个问题缩短为一个关于Verilog的问题,你可以把它贴在这里;否则,您可能会在EDA论坛或类似的论坛上有更好的运气。您好,欢迎来到StackOverflow。我很抱歉这么说,但像这样的问题(帮助查找代码中的错误)在这个网站上被认为是离题的。如果你能把这个问题缩短为一个关于Verilog的问题,你可以把它贴在这里;否则,您可能会在EDA论坛或类似的论坛上有更好的运气。您好,欢迎来到StackOverflow。我很抱歉这么说,但像这样的问题(帮助查找代码中的错误)在这个网站上被认为是离题的。如果你能把这个问题缩短为一个关于Verilog的问题,你可以把它贴在这里;否则,您可能会在EDA论坛或类似的论坛上有更好的运气。您好,欢迎来到StackOverflow。我很抱歉这么说,但像这样的问题(帮助查找代码中的错误)在这个网站上被认为是离题的。如果你能把这个问题缩短为一个关于Verilog的问题,你可以把它贴在这里;是的,先生,模块括号内的声明是ANSI风格的声明,如果我们在括号外正确声明也是一样的???@user3751971:否。您可以跳过括号内的输入
/输出
字,然后定义信号,作为输入
/输出
,在括号外。但是它必须在端口声明列表中。非常感谢,顺便说一下,我试图初始化的值,它们没有存储在ram addrerss中??在modelsim中,它显示XXXXXXX…..XXX。但是当我上网时,预定义代码中的逻辑看起来是一样的。你初始化它吗?ram(Addr_a)是的,先生,模块括号内的声明是ANSI风格的声明,如果我们在右括号外声明???@user3751971:no,情况也是一样。您可以跳过括号内的输入
/输出
字,然后在括号外将信号定义为输入
/输出
。但是它必须在端口声明列表中。非常感谢,顺便说一下,我试图初始化的值,它们没有存储在ram addrerss中??在modelsim中,它显示XXXXXXX…..XXX。但是当我上网时,预定义代码中的逻辑看起来是一样的。你初始化它吗?ram(Addr_a)是的,先生,模块括号内的声明是ANSI风格的声明,如果我们在右括号外声明???@user3751971:no,情况也是一样。您可以跳过括号内的输入
/输出
字,然后在括号外将信号定义为输入
/输出
。但是它必须在端口声明列表中。非常感谢,顺便说一下,我试图初始化的值,它们没有存储在ram addrerss中??在modelsim中,它显示XXXXXXX…..XXX。但是当我上网时,预定义代码中的逻辑看起来是一样的。你初始化它吗?ram(Addr_a)是的,先生,模块括号内的声明是ANSI风格的声明,如果我们在右括号外声明???@user3751971:no,情况也是一样。您可以跳过括号内的输入
/输出
字,然后在括号外将信号定义为输入
/输出
。但它必须在港口申报单上。非常感谢