Я пытаюсь сделать 4-битный множитель. Вот мой дизайн верхнего уровня:
А вот и два модуля:
Однако, когда я пытаюсь смоделировать это, я не получаю никакого результата. Мой тестовый стенд:
ARCHITECTURE behavior OF sim3 IS
-- Component Declaration for the Unit Under Test (UUT)
COMPONENT multiplicator
PORT(
a : IN std_logic_vector(3 downto 0);
b : IN std_logic_vector(3 downto 0);
reset : IN std_logic;
clk : IN std_logic;
start : IN std_logic;
prod : OUT std_logic_vector(7 downto 0);
ready : OUT std_logic
);
END COMPONENT;
--Inputs
signal a : std_logic_vector(3 downto 0) := (others => '0');
signal b : std_logic_vector(3 downto 0) := (others => '0');
signal reset : std_logic := '0';
signal clk : std_logic := '0';
signal start : std_logic := '0';
--Outputs
signal prod : std_logic_vector(7 downto 0);
signal ready : std_logic;
-- Clock period definitions
constant clk_period : time := 10 ns;
BEGIN
-- Instantiate the Unit Under Test (UUT)
uut: multiplicator PORT MAP (
a => a,
b => b,
reset => reset,
clk => clk,
start => start,
prod => prod,
ready => ready
);
-- Clock process definitions
clk_process :process
begin
clk <= '0';
wait for clk_period/2;
clk <= '1';
wait for clk_period/2;
end process;
-- Stimulus process
stim_proc: process
begin
wait for clk_period;
reset<='1';
wait for clk_period;
reset<='0';
a<="0011";
b<="0010";
start <='1';
wait for clk_period*10;
end process;
END;
Когда я устанавливаю начало на «1», симуляция просто останавливается. Я не знаю почему. Я получаю следующую ошибку:
ERROR: at 20 ns(10000): Iteration limit 10000 is reached. Possible zero delay oscillation detected where simulation can not advance in time because signals can not resolve to a stable value in File "D:/faculta/PL II/multiplicator/reg8.vhd" Line 45. Please correct this code in order to advance past the current simulation time.
Я не вижу, что может быть не так в этой строке:
q_s <= "00000000" WHEN reset='1' ELSE d WHEN reset='0' and load='1' ELSE q_s;
Некоторая помощь, пожалуйста?
reg8
. Было бы полезно иметь возможность увидеть этот код; одной строки, которую вы разместили, недостаточно, чтобы мы увидели, где находится петля. - person scary_jeff   schedule 21.05.2015