構造記述を使用して、VHDL で 32 ビット バイナリ シリアル加算器を設計しようとしています。加算器は、全加算器と d ラッチを使用する必要があります。私がそれを見る方法は次のとおりです。
全加算器:
architecture Behavioral of FullAdder is
begin
s <= (x xor y) xor cin;
cout <= (x and y) or (y and cin) or (x and cin);
end Behavioral;
D-ラッチ:
architecture Behavioral of dLatch is
begin
state: process(clk)
begin
if(clk'event and clk = '1') then
q <= d;
end if;
end process;
end Behavioral;
シリアル加算器:
add: process ( clk )
variable count : integer range 0 to 31;
variable aux : STD_LOGIC;
variable aux2 : STD_LOGIC;
begin
if(clk'event and clk = '1') then
fa: FullAdder port map(x(count), y(count), aux, s(count), aux2);
dl: dLatch port map(clock, aux2, aux);
count := count + 1;
end if;
end process;
しかし、うまくいかないようです。また、シリアル加算器をパイプライン処理する最も簡単な方法は何ですか?