vhdl - 如何在 VHDL 中实现一个带有反馈的简单系统
问题描述
我希望您能帮助我弄清楚我的 VHDL 代码哪里出了问题。我附上了一个图来显示我正在尝试实现System2的系统。系统应该为其自身添加一个初始数字,当发生溢出时,它会重置为 0。我已经为所有不同的组件编写了代码,然后通过实例化它们来组合所有组件,如下面的代码所示。代码编译得很好,但是当我尝试模拟它时,我得到了下面的错误。请帮忙,谢谢。
################# 循环结束#################
** 错误(可抑制):(vsim-3601)迭代限制 5000 在时间 0 ps 达到。
--!@library libraryName
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity System2 is
port(i_A : in std_logic_vector(1 downto 0);
i_Clk : in std_logic;
o_Out : inout std_logic_vector(1 downto 0));
end entity;
architecture rtl of System2 is
-- 2 bit adder
component Adder_2bit
port (A, B : in STD_LOGIC_VECTOR (1 downto 0);
o_Sum : out STD_LOGIC_VECTOR (1 downto 0);
Cout : out STD_LOGIC);
end component;
-- Mux
component Mux
port(i_Sel : in std_logic;
i_A : in std_logic_vector(1 downto 0);
o_Out : out std_logic_vector(1 downto 0));
end component;
--Dff
component Dff
port(i_d : in std_logic_vector(1 downto 0);
i_Clk : in std_logic;
o_Q : out std_logic_vector(1 downto 0));
end component;
signal S1, S2, S3: std_logic_vector(1 downto 0);
signal S4 : std_logic;
begin
--process(i_Clk) is
--begin
Component_Adder_2bit : Adder_2bit port map(i_A, S3, S1, S4);
Component_Dff : Dff port map(S1, i_Clk, S2);
Component_Mux : Mux port map(S4, S2, o_Out);
S3 <= o_Out;
--end process;
end architecture;
解决方案
推荐阅读
- ios - iOS - Xcode 10.3 和 iOS 目标的构建失败
- ag-grid - 使用 @testing-library/react 测试 ag-grid
- ios - Swift UITableview 单元格搜索不起作用
- c# - 将assetBundle转换为游戏对象
- naming-conventions - Artifactory repo 结构组织
- python - python dask to_parquet 占用大量内存
- spring-webflux - 使用 R2DBC 的动机是什么?
- sql - 当第一个表返回超过 1 条记录时,如何从一个表中选择列并在第二个更新?
- c++ - shared_ptr 如何
知道使用哪个析构函数吗? - java - 使用此函数写入的 Firebase 实时数据库数据不会被删除 为什么?(java 8- Firebase 函数)