entity s1238_testbench is
port (
G0,G1,G2,G3,G4,G5,G6,G7,G8,G9,G10,G11,G12,G13: out bit;
clk,scan_in1,scan_en: out bit;
------------------------------------------------------
G549_1,G550_1,G551_1,G552_1,G542_1,G546_1,G547_1,G548_1,G530_1,G532_1,G535_1,G537_1,G45_1,G539_1: in bit;
G549_2,G550_2,G551_2,G552_2,G542_2,G546_2,G547_2,G548_2,G530_2,G532_2,G535_2,G537_2,G45_2,G539_2: in bit
);

end s1238_testbench;

architecture bench of s1238_testbench is
signal vout : bit_vector (13 downto 0);


signal Gin1 : bit_vector (13 downto 0);
signal Gin2 : bit_vector (13 downto 0);
begin

process
variable i : integer range 0 to 255;
variable vtemp : bit_vector (13 downto 0);
begin

-----------------------------------------------initial
scan_in1 <= '0' ;
scan_en <= '0';
vout <= "01111111111111";

------------------------------------------------generate test vector
--for i in 0 to 255 loop
--vtemp(12 downto 0) <= vout(13 downto 1);
-- vtemp(13) <= ( vout(0) xor vout(1) xor vout(11) xor vout(12) );
--
for i in 0 to 1000 loop

vtemp(0) := vout(1);
vtemp(1) := vout(2);
vtemp(2) := vout(3);
vtemp(3) := vout(4);
vtemp(4) := vout(5);
vtemp(5) := vout(6);
vtemp(6) := vout(7);
vtemp(7) := vout(8);
vtemp(8) := vout(9);
vtemp(9) := vout(10);
vtemp(10) := vout(11);
vtemp(11) := vout(12);
vtemp(12) := vout(13);
vtemp(13) := ( vout(0) xor vout(1) xor vout(11) xor vout(12) );
clk <='1' after 5 ns, '0' after 10 ns;
wait for 25 ns;
vout <= vtemp;
G0 <= vout(0);
G1 <= vout(1);
G2 <= vout(2);
G3 <= vout(3);
G4 <= vout(4);
G5 <= vout(5);
G6 <= vout(6);
G7 <= vout(7);
G8 <= vout(8);
G9 <= vout(9);
G10 <= vout(10);
G11 <= vout(11);
G12 <= vout(12);
G13 <= vout(13);


Gin1(0) <= G549_1;
Gin1(1) <= G550_1;
Gin1(2) <= G551_1;
Gin1(3) <= G552_1;
Gin1(4) <= G542_1;
Gin1(5) <= G546_1;
Gin1(6) <= G547_1;
Gin1(7) <= G548_1;
Gin1(8) <= G530_1;
Gin1(9) <= G532_1;
Gin1(10) <= G535_1;
Gin1(11) <= G537_1;
Gin1(12) <= G45_1;
Gin1(13) <= G539_1;
Gin2(0) <= G549_2;
Gin2(1) <= G550_2;
Gin2(2) <= G551_2;
Gin2(3) <= G552_2;
Gin2(4) <= G542_2;
Gin2(5) <= G546_2;
Gin2(6) <= G547_2;
Gin2(7) <= G548_2;
Gin2(8) <= G530_2;
Gin2(9) <= G532_2;
Gin2(10) <= G535_2;
Gin2(11) <= G537_2;
Gin2(12) <= G45_2;
Gin2(13) <= G539_2;

assert (Gin1=Gin2)
report "-----Equal!-------"
severity note;
end loop;
---------------------------------------------------
end process;

end;