赛灵思
直播中

张林锋

7年用户 257经验值
私信 关注
[问答]

长度不等的数组之间的比较总是返回FALSE

我正在尝试将我的工作Spartan 3A BRAM设计转换为Spartan 6,并且我遇到VHDL实例化问题。
下面是我的标准双端口18kb BRAM的实例化,具有1位宽输入和4位宽输出。
合成器有多个警告:
“长度不等的数组之间的比较总是返回FALSE”
和1个错误:
“切片方向与类型范围方向不匹配。”
全部在BRAM_TDP_MACRO.vhd中。
谁能帮我解决这个问题?
谢谢,
Burt Hashizume。
RAMB_0:BRAM_TDP_MACRO通用映射(BRAM_SIZE =>“18Kb”, - 目标BRAM,“18Kb”或“36Kb”DEVICE =>“SPARTAN6”, - 目标设备:“VIRTEX5”,“VIRTEX6”,“SPARTAN6”DOA_REG =
> 0, - 可选端口A输出寄存器(0或1)DOB_REG => 0, - 可选端口B输出寄存器(0或1)INIT_A => X“000000000”, -  A输出端口上的初始值INIT_B =
> X“000000000”, -  B输出端口上的初始值INIT_FILE =>“NONE”,READ_WIDTH_A => 1, - 有效值为1-36(19-36仅在BRAM_SIZE =“36Kb”时有效)READ_WIDTH_B =>
4, - 有效值为1-36(19-36仅在BRAM_SIZE =“36Kb”时有效)SIM_COLLISION_CHECK =>“ALL”, - 碰撞检查启用“ALL”,“WARNING_ONLY”, - “GENERATE_X_ONLY”或“
无“SIM_MODE =>”SAFE“, - 模拟:”安全“与”快速“, - 有关详细信息,请参阅”综合与仿真设计指南“SRVAL_A => X”000000000“, -  A端口的设置/复位值
输出SRVAL_B => X“000000000”, -  B端口输出的设置/复位值WRITE_MODE_A =>“WRITE_FIRST”, - “WRITE_FIRST”,“READ_FIRST”或“
NO_CHANGE“WRITE_MODE_B =>”WRITE_FIRST“, - ”WRITE_FIRST“,”READ_FIRST“或”NO_CHANGE“WRITE_WIDTH_A => 1, - 有效值为1,2,4,9,18或36(36仅在BRAM_SIZE =时有效
“36Kb”)WRITE_WIDTH_B => 4  - 有效值为1,2,4,9,18或36(36仅在BRAM_SIZE =“36Kb”时有效))端口映射(DOA => x(0 downto 0), -
- 输出端口-A dataDOB => d(3 downto 0), - 输出端口-B dataADDRA => wraddr, - 输入端口-A addressADDRB => rdaddr, - 输入端口-B addressCLKA => fifo_clk, -
输入端口-A clockCLKB => clk, - 输入端口-B clockDIA => datain(0 downto 0), - 输入端口-A dataDIB =>“0000”, - 输入端口-B dataENA =>'1'
, - 输入端口-A使能ENB =>'1', - 输入端口-B使能REGCEA =>'0', - 输入端口-A输出寄存器enableREGCEB =>'0', - 输入端口-B输出寄存器
enableRSTA => rst, - 输入端口-A resetRSTB => rst, - 输入端口-b resetWEA => write_en_vec, - 输入端口-A写入enableWEB =>“0000” - 输入端口-B写入使能);

以上来自于谷歌翻译


以下为原文

I am trying to convert my working Spartan 3A BRAM design to Spartan 6 and am having problems with the VHDL instantiation.  Below is my instantiation of a standard dual port 18kb BRAM with 1-bit wide input and 4-bit wide output.  The synthesizer has multiple warnings:
"Comparison between arrays of unequal length always returns FALSE"
and 1 error:
"Slice direction does not match type range direction."
all in the BRAM_TDP_MACRO.vhd.
Can anyone help me fix this?

Thanks,

Burt Hashizume.


RAMB_0 : BRAM_TDP_MACRO
  generic map (
    BRAM_SIZE => "18Kb", -- Target BRAM, "18Kb" or "36Kb"
    DEVICE => "SPARTAN6", -- Target device: "VIRTEX5", "VIRTEX6", "SPARTAN6"
    DOA_REG => 0, -- Optional port A output register (0 or 1)
    DOB_REG => 0, -- Optional port B output register (0 or 1)
    INIT_A => X"000000000", -- Initial values on A output port
    INIT_B => X"000000000", -- Initial values on B output port
    INIT_FILE => "NONE",
    READ_WIDTH_A => 1,   -- Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb")
    READ_WIDTH_B => 4,   -- Valid values are 1-36 (19-36 only valid when BRAM_SIZE="36Kb")
    SIM_COLLISION_CHECK => "ALL", -- Collision check enable "ALL", "WARNING_ONLY",
                                  -- "GENERATE_X_ONLY" or "NONE"
    SIM_MODE => "SAFE", -- Simulation: "SAFE" vs "FAST",
                        -- see "Synthesis and Simulation Design Guide" for details
    SRVAL_A => X"000000000",   -- Set/Reset value for A port output
    SRVAL_B => X"000000000",   -- Set/Reset value for B port output
    WRITE_MODE_A => "WRITE_FIRST", -- "WRITE_FIRST", "READ_FIRST" or "NO_CHANGE"
    WRITE_MODE_B => "WRITE_FIRST", -- "WRITE_FIRST", "READ_FIRST" or "NO_CHANGE"
    WRITE_WIDTH_A => 1, -- Valid values are 1, 2, 4, 9, 18 or 36 (36 only valid when BRAM_SIZE="36Kb")
    WRITE_WIDTH_B => 4 -- Valid values are 1, 2, 4, 9, 18 or 36 (36 only valid when BRAM_SIZE="36Kb")
)
  port map (
DOA => x(0 downto 0), -- Output port-A data
DOB => d(3 downto 0), -- Output port-B data
ADDRA => wraddr,  -- Input port-A address
ADDRB => rdaddr,  -- Input port-B address
CLKA => fifo_clk,  -- Input port-A clock
CLKB => clk,   -- Input port-B clock
DIA => datain(0 downto 0), -- Input port-A data
DIB => "0000",   -- Input port-B data
ENA => '1',    -- Input port-A enable
ENB => '1',    -- Input port-B enable
REGCEA => '0',   -- Input port-A output register enable
REGCEB => '0',   -- Input port-B output register enable
RSTA => rst,   -- Input port-A reset
RSTB => rst,   -- Input port-B reset
WEA => write_en_vec, -- Input port-A write enable
WEB => "0000"   -- Input port-B write enable
);

回帖(8)

黄淳

2019-6-21 14:34:53
burthashizume写道:
我正在尝试将我的工作Spartan 3A BRAM设计转换为Spartan 6,并且我遇到VHDL实例化问题。
下面是我的标准双端口18kb BRAM的实例化,具有1位宽输入和4位宽输出。
合成器有多个警告:
“长度不等的数组之间的比较总是返回FALSE”
和1个错误:
“切片方向与类型范围方向不匹配。”
全部在BRAM_TDP_MACRO.vhd中。
谁能帮我解决这个问题?
这些警告都与BRAM实例化无关。
----------------------------是的,我这样做是为了谋生。

以上来自于谷歌翻译


以下为原文

 
burthashizume wrote:
I am trying to convert my working Spartan 3A BRAM design to Spartan 6 and am having problems with the VHDL instantiation.  Below is my instantiation of a standard dual port 18kb BRAM with 1-bit wide input and 4-bit wide output.  The synthesizer has multiple warnings:
"Comparison between arrays of unequal length always returns FALSE"
and 1 error:
"Slice direction does not match type range direction."
all in the BRAM_TDP_MACRO.vhd.
Can anyone help me fix this?
 
 
 

Neither of those warnings have anything to do with BRAM instantiation.
 
----------------------------Yes, I do this for a living.
举报

方春晓

2019-6-21 14:44:32
我认为我的警告和错误与我的BRAM实例化直接相关,原因如下:
1.警告和错误与警告/错误消息中的“BRAM_TDP_MACRO.vhd”相关联。
该宏来自Xilinx UNIMACRO BRAMs库。
2.如果我回到Spartan 3 BRAM实例,警告和错误就会消失,尽管合成器注意到Spartan 3 RAMB ......正在转换为Spartan 6 RAMB ......
Burt Hashizume。

以上来自于谷歌翻译


以下为原文

I believe that my warnings and error are directly related to my BRAM instantiation for these reasons:
1. the warnings and error are tied to "BRAM_TDP_MACRO.vhd" in the warning/error message.  This macro is from the Xilinx UNIMACRO Library for BRAMs.
2. the warnings and error disappear if I go back to the Spartan 3 BRAM instantiation, though the Synthesizer notes that the Spartan 3 RAMB... is being converted to the Spartan 6 RAMB...
 
Burt Hashizume.
 
举报

黄淳

2019-6-21 15:00:41
burthashizume写道:
我认为我的警告和错误与我的BRAM实例化直接相关,原因如下:
1.警告和错误与警告/错误消息中的“BRAM_TDP_MACRO.vhd”相关联。
该宏来自Xilinx UNIMACRO BRAMs库。
2.如果我回到Spartan 3 BRAM实例,警告和错误就会消失,尽管合成器注意到Spartan 3 RAMB ......正在转换为Spartan 6 RAMB ......
Burt Hashizume。
您显示的代码都没有任何比较,因此有关相同的警告必须来自其他代码。
----------------------------是的,我这样做是为了谋生。

以上来自于谷歌翻译


以下为原文

 
burthashizume wrote:
I believe that my warnings and error are directly related to my BRAM instantiation for these reasons:
1. the warnings and error are tied to "BRAM_TDP_MACRO.vhd" in the warning/error message.  This macro is from the Xilinx UNIMACRO Library for BRAMs.
2. the warnings and error disappear if I go back to the Spartan 3 BRAM instantiation, though the Synthesizer notes that the Spartan 3 RAMB... is being converted to the Spartan 6 RAMB...
 
Burt Hashizume.
 
None of the code you've shown has any comparisons, so the warning about same must come from other code.
 
----------------------------Yes, I do this for a living.
举报

方春晓

2019-6-21 15:09:49
我附上了我的代码的缩减版本。
它仍然显示这些警告/错误。
所有这些附加代码都是为单个BRAM提供输入。
该代码有一个Spartan 3A BRAM注释掉了。
如果您注释掉Spartan 6 BRAM并取消注释Spartan 3A BRAM,则警告/错误消失。
Burt Hashizume。
BRAM.vhd 7 KB

以上来自于谷歌翻译


以下为原文

I've attached a cutdown version of my code.  It still exhibits these warnings/error.  All this attached code does is provide the inputs to a single BRAM.  The code has a Spartan 3A BRAM commented out.  If you comment out the Spartan 6 BRAM and uncomment the Spartan 3A BRAM, the warnings/error disappears.
 
 
Burt Hashizume.
 
            BRAM.vhd ‏7 KB
举报

更多回帖

发帖
×
20
完善资料,
赚取积分