vhdl - 有线或未合成
问题描述
我希望有两个组合过程以有线或方式驱动一个信号。每个进程都可以将“Z”或“1”值驱动到信号,并且有一个全局下拉到“L”。
Vivado 2017.1 综合“优化”我的代码以将常量 0 驱动到输出端口。为什么会这样?我该如何解决这个问题?
代码:
library ieee;
use ieee.std_logic_1164.all;
entity test is
port(
input_0 : in std_logic;
input_1 : in std_logic;
output : out std_logic
);
end entity test;
architecture rtl of test is
signal s_output : std_logic;
begin
output <= to_X01(to_bit(s_output));
process(input_0)
begin
s_output <= 'Z';
if input_0='1' then
s_output <= '1';
end if;
end process;
process(input_1)
begin
s_output <= 'Z';
if input_1='1' then
s_output <= '1';
end if;
end process;
s_output <= 'L';
end architecture rtl;
合成结果:
WARNING: [Synth 8-3917] design test has port output driven by constant 0
解决方案
推荐阅读
- c - 使用用户定义的头文件 C
- r - 在R中使用大于和等号
- pandas - 仅给定级别 0 列选择器和对齐级别 1 的新 MultiIndex 列的分配
- python - 解释为什么程序对 x 和 y 都输出 4?
- r - 如何在 R 中使用 nls pacakge 强制拦截为零?
- javascript - jQuery:文本切换应始终只显示一个文本
- wmi - WMI 可以查询一个类属性并使用另一个类属性进行过滤吗?
- actionscript-3 - 转到奇数或偶数周闪存 as3 cs6
- c++ - 如何减慢蹲伏功能 UE4
- python - 当我尝试使用 pandas 运行此代码时,为什么会出现无效语法?