gpt4 book ai didi

casting - 将 STD_LOGIC 连接到一位 STD_LOGIC_VECTOR

转载 作者:行者123 更新时间:2023-12-05 00:12:46 25 4
gpt4 key购买 nike

我正在使用 Xilinx ISE 并使用 CORE Generator & Architecture Wizard 生成了一个内存。

问题是它创建了一个写使能信号 ( wea ) 作为 STD_LOGIC_VECTOR(0 downto 0) 并导致类型不匹配:

Line ###: Type error near encnt ; current type std_logic; expected type std_logic_vector



怎么投 encnt ,这是 std_logic,到一位 std_logic_vector?

(ISE 不允许我从内存文件中更改 wea。)

最佳答案

这是这些 IP 块的一个非常常见的场景。您可以轻松关联您的 std_logic像这样的信号:

wea(0) => encnt,

而不是关联 wea总的来说,您只是将一个元素关联起来 (0) .如 wea只有一个元素,这分配了整个向量。

关于casting - 将 STD_LOGIC 连接到一位 STD_LOGIC_VECTOR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49851974/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com