32ビットの入力を取り、一度に2ビットを出力する小さなコードを書いています。シミュレーションの試行に基づいて、while ループから無限ループの問題が発生していると思います。私が見た他のループの例と比較して、すべてが私には正しいように見えます。私が間違っている可能性がある手がかりはありますか?
library ieee;
use ieee.std_logic_1164.all;
entity regA is
port(mpcnd: in std_logic_vector(31 downto 0);
clk: in std_logic;
twobits: out std_logic_vector(1 downto 0));
end regA;
architecture behavior of regA is
begin
process
variable count: integer;
begin
count := 0;
while (count < 32) loop
if rising_edge(clk) then
twobits(0) <= mpcnd(count);
twobits(1) <= mpcnd(count+1);
count := count + 2;
end if;
end loop;
end process;
end behavior;