信号_IBUF>不完整
我正在尝试编写一个 VHDL 模块,但我遇到了一些输入问题,这是我的代码:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--use ieee.std_logic_arith.all;
use ieee.std_logic_signed.all;
entity binary_add is
port( n1 : in std_logic_vector(3 downto 0);
n2 : in std_logic_vector(3 downto 0);
segments : out std_logic_vector(7 downto 0);
DNout : out std_logic_vector(3 downto 0));
end binary_add;
architecture Behavioral of binary_add is
begin
DNout <= "1110";
process(n1, n2)
variable x: integer;
begin
x:= conv_integer(n1(3)&n1(2)&n1(1)&n1(0)) + conv_integer(n2(3)&n2(2)&n2(1)&n2(0));
if(x = "0") then
segments <= "10000001";
elsif(x = "1") then
segments <= "11001111";
else
segments <= "00000000";
end if;
end process;
end Behavioral;
我收到这些错误:
WARNING:PhysDesignRules:367 - The signal <n1<1>_IBUF> is incomplete. The signal
does not drive any load pins in the design.
WARNING:PhysDesignRules:367 - The signal <n1<2>_IBUF> is incomplete. The signal
does not drive any load pins in the design.
WARNING:PhysDesignRules:367 - The signal <n1<3>_IBUF> is incomplete. The signal
does not drive any load pins in the design.
WARNING:PhysDesignRules:367 - The signal <n2<1>_IBUF> is incomplete. The signal
does not drive any load pins in the design.
WARNING:PhysDesignRules:367 - The signal <n2<2>_IBUF> is incomplete. The signal
does not drive any load pins in the design.
WARNING:PhysDesignRules:367 - The signal <n2<3>_IBUF> is incomplete. The signal
does not drive any load pins in the design.
WARNING:Par:288 - The signal n1<1>_IBUF has no load. PAR will not attempt to route this signal.
WARNING:Par:288 - The signal n1<2>_IBUF has no load. PAR will not attempt to route this signal.
WARNING:Par:288 - The signal n1<3>_IBUF has no load. PAR will not attempt to route this signal.
WARNING:Par:288 - The signal n2<1>_IBUF has no load. PAR will not attempt to route this signal.
WARNING:Par:288 - The signal n2<2>_IBUF has no load. PAR will not attempt to route this signal.
WARNING:Par:288 - The signal n2<3>_IBUF has no load. PAR will not attempt to route this signal.
WARNING:Par:283 - There are 6 loadless signals in this design. This design will cause Bitgen to issue DRC warnings.
错误看起来很复杂,但实际上它说,我认为,无法路由我的 n1 和 n2 的其他 3 个输入信号。我不知道为什么会发生这种情况,但我想做的就是将 n1 和 n2 有符号数的总和显示到 7 段显示器中。如果有人能帮助我解决这个问题,我将非常感激。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一:不要使用
std_logic_arith
或std_logic_signed
- 我已经我会将我的端口设为
signed
类型和使用 ieee.numeric_stdd.all;
。或者甚至在输入端口上使用整数类型。如果这是顶级块,您需要放置一个包装器以获取最外层引脚上的 std_logic_vectors,将它们转换为整数并将它们输入到上面编写的块中:然后您需要执行类似的操作...
等等
或者创建一个常量数组将整数转换为7段并执行
First: Don't use
std_logic_arith
orstd_logic_signed
- I've written about why not.Second: you have created an asynchronous process, which is not great practise in FPGAs which are designed for use (and the tools expect you to use) in a synchronous fashion. Create a clock input and use it. You can do it asynchronously, but until you really know what you're doing, avoid it. Once you really know what you're doing, chances are you'll avoid it as well, because you understand how nasty it will be :)
I'd make my ports of
signed
type anduse ieee.numeric_stdd.all;
. Or even use theinteger
type on the input ports. If this is the top-level block, you'll need to put a wrapper around to take std_logic_vectors on the outermost pins, turn them into integers and feed them into the block you've written above:Then you need to do something like this...
etc
Or create a constant array to convert integer to 7-segment and do