This commit is contained in:
Tommischiri
2026-10-24 17:18:17 +02:00
parent 86e83215ea
commit 5d92d66a7b
148 changed files with 48187 additions and 1 deletions
@@ -0,0 +1,47 @@
library IEEE;
use IEEE.numeric_bit.all;
entity Sim_CSA16 is
end Sim_CSA16;
architecture MySim_CSA16 of Sim_CSA16 is
component CSA16_2x8
Port (A,B: in bit_vector(15 downto 0);
cin: in bit;
S: out bit_vector(15 downto 0);
cout: out bit);
end component;
component CSA16_4x4
Port (A,B: in bit_vector(15 downto 0);
cin: in bit;
S: out bit_vector(15 downto 0);
cout: out bit);
end component;
signal IA,IB,OS1,OS2: bit_vector(15 downto 0);
signal Icin, Ocout1,Ocout2: bit;
begin
CUT1: CSA16_2x8 port map(IA,IB,Icin,OS1,Ocout1);
CUT2: CSA16_4x4 port map(IA,IB,Icin,OS2,Ocout2);
process begin
Icin <= '0';
for j in 65279 to 65535 loop
for k in 65279 to 65535 loop
IA <= bit_vector(to_signed(j,16));
IB <= bit_vector(to_signed(k,16));
wait for 10ns;
end loop;
end loop;
Icin <= '1';
for j in 65279 to 65535 loop
for k in 65279 to 65535 loop
IA <= bit_vector(to_signed(j,16));
IB <= bit_vector(to_signed(k,16));
wait for 10ns;
end loop;
end loop;
wait;
end process;
end MySim_CSA16;