我也在学习VHDL并使用Vivado编写测试平台....
我查看了VHDL参考手册,VHDL设计指南,第三版,Ashenden,第308页,例9.4。
本节讨论的是标准数字包。
我只是想在计数器中添加1并将结果放入电路的输入端。
我的测试平台包含类似示例的内容(我已经注释掉了我的所有代码,除了现在示例中的内容,但最终,这将发生在DCLK的上升沿):
signal inc_reg:unsigned(7 downto 0):= x“00”;
signal inc_en:std_ulogic:='1';
counter_process:进程(DCLK)开始
inc_reg end process counter_process;
我收到错误:ERROR:[VRFC 10-724]发现运算符“+”的'0'定义,无法确定“+”的精确重载匹配定义
我正在使用这些库:
库IEEE;使用IEEE.STD_LOGIC_1164.ALL;
使用IEEE.NUMERIC_STD.ALL;
听起来我应该使用铸造而不是添加另一个库,对我来说,结果+被定义两次....
我如何正确地投射它以使它有效?
我应该使用不同的refence告诉我在使用Vivado时如何编写VHDL?
谢谢,
Steven R. Stadler PESenior电气工程师TSI Incorporated。
以上来自于谷歌翻译
以下为原文
I am also learning VHDL and writing a testbench using Vivado....
I looked in the VHDL reference book I have, the designers guide to VHDL, third edition, Ashenden, page 308, example 9.4. This section is talking about the standard numeric package.
I'm just trying to add 1 to a counter and put that result into an input of my circuit.
My testbench contains something like the example (I commented out all my code except for what is in the example for now, but eventually, this will happen on the rising edge of DCLK):
signal inc_reg : unsigned ( 7 downto 0 ) := x"00";
signal inc_en : std_ulogic := '1';
counter_process : process (DCLK) is
begin
inc_reg <= inc_reg + inc_en;
end process counter_process;
I get the error: ERROR: [VRFC 10-724] found '0' definitions of operator "+", cannot determine exact overloaded matching definition for "+"
I am using these libraries:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
It sounds like I am supposed to use casting instead of adding another library, whish, for me results in + being defined twice....
How do I properly cast this so it works??
Is there a different refence I should be using that tells me how to write VHDL when using Vivado?
Thank You,
Steven R. Stadler PE
Senior Electrical Engineer
TSI Incorporated
.