content
stringlengths
1
1.04M
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2814.vhd,v 1.2 2001-10-26 16:30:22 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- entity NEXT is end NEXT; ENTITY c13s09b00x00p99n01i02814ent IS END c13s09b00x00p99n01i02814ent; ARCHITECTURE c13s09b00x00p99n01i02814arch OF c13s09b00x00p99n01i02814ent IS BEGIN TESTING: PROCESS BEGIN assert FALSE report "***FAILED TEST: c13s09b00x00p99n01i02814 - Reserved word NEXT can not be used as an entity name." severity ERROR; wait; END PROCESS TESTING; END c13s09b00x00p99n01i02814
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2814.vhd,v 1.2 2001-10-26 16:30:22 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- entity NEXT is end NEXT; ENTITY c13s09b00x00p99n01i02814ent IS END c13s09b00x00p99n01i02814ent; ARCHITECTURE c13s09b00x00p99n01i02814arch OF c13s09b00x00p99n01i02814ent IS BEGIN TESTING: PROCESS BEGIN assert FALSE report "***FAILED TEST: c13s09b00x00p99n01i02814 - Reserved word NEXT can not be used as an entity name." severity ERROR; wait; END PROCESS TESTING; END c13s09b00x00p99n01i02814
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2814.vhd,v 1.2 2001-10-26 16:30:22 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- entity NEXT is end NEXT; ENTITY c13s09b00x00p99n01i02814ent IS END c13s09b00x00p99n01i02814ent; ARCHITECTURE c13s09b00x00p99n01i02814arch OF c13s09b00x00p99n01i02814ent IS BEGIN TESTING: PROCESS BEGIN assert FALSE report "***FAILED TEST: c13s09b00x00p99n01i02814 - Reserved word NEXT can not be used as an entity name." severity ERROR; wait; END PROCESS TESTING; END c13s09b00x00p99n01i02814
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc863.vhd,v 1.2 2001-10-26 16:30:01 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- package c01s03b01x00p12n01i00863pkg_b is constant zero : integer ; constant one : integer ; constant two : integer ; constant three: integer ; constant four : integer ; constant five : integer ; constant six : integer ; constant seven: integer ; constant eight: integer ; constant nine : integer ; constant fifteen: integer; end c01s03b01x00p12n01i00863pkg_b; package body c01s03b01x00p12n01i00863pkg_b is constant zero : integer := 0; constant one : integer := 1; constant two : integer := 2; constant three: integer := 3; constant four : integer := 4; constant five : integer := 5; constant six : integer := 6; constant seven: integer := 7; constant eight: integer := 8; constant nine : integer := 9; constant fifteen:integer:= 15; end c01s03b01x00p12n01i00863pkg_b; use work.c01s03b01x00p12n01i00863pkg_b.all; package c01s03b01x00p12n01i00863pkg_a is constant low_number : integer := 0; constant hi_number : integer := 3; subtype hi_to_low_range is integer range low_number to hi_number; type boolean_vector is array (natural range <>) of boolean; type severity_level_vector is array (natural range <>) of severity_level; type integer_vector is array (natural range <>) of integer; type real_vector is array (natural range <>) of real; type time_vector is array (natural range <>) of time; type natural_vector is array (natural range <>) of natural; type positive_vector is array (natural range <>) of positive; type record_std_package is record a: boolean; b: bit; c:character; d:severity_level; e:integer; f:real; g:time; h:natural; i:positive; end record; type array_rec_std is array (natural range <>) of record_std_package; type four_value is ('Z','0','1','X'); --enumerated type constant C1 : boolean := true; constant C2 : bit := '1'; constant C3 : character := 's'; constant C4 : severity_level := note; constant C5 : integer := 3; constant C6 : real := 3.0; constant C7 : time := 3 ns; constant C8 : natural := 1; constant C9 : positive := 1; signal Sin1 : bit_vector(zero to five) ; signal Sin2 : boolean_vector(zero to five) ; signal Sin4 : severity_level_vector(zero to five) ; signal Sin5 : integer_vector(zero to five) ; signal Sin6 : real_vector(zero to five) ; signal Sin7 : time_vector(zero to five) ; signal Sin8 : natural_vector(zero to five) ; signal Sin9 : positive_vector(zero to five) ; signal Sin10: array_rec_std(zero to five) ; end c01s03b01x00p12n01i00863pkg_a; use work.c01s03b01x00p12n01i00863pkg_a.all; use work.c01s03b01x00p12n01i00863pkg_b.all; entity test is port( sigin1 : in boolean ; sigout1 : out boolean ; sigin2 : in bit ; sigout2 : out bit ; sigin4 : in severity_level ; sigout4 : out severity_level ; sigin5 : in integer ; sigout5 : out integer ; sigin6 : in real ; sigout6 : out real ; sigin7 : in time ; sigout7 : out time ; sigin8 : in natural ; sigout8 : out natural ; sigin9 : in positive ; sigout9 : out positive ; sigin10 : in record_std_package ; sigout10 : out record_std_package ); end; architecture test of test is begin sigout1 <= sigin1; sigout2 <= sigin2; sigout4 <= sigin4; sigout5 <= sigin5; sigout6 <= sigin6; sigout7 <= sigin7; sigout8 <= sigin8; sigout9 <= sigin9; sigout10 <= sigin10; end; configuration testbench of test is for test end for; end; use work.c01s03b01x00p12n01i00863pkg_a.all; use work.c01s03b01x00p12n01i00863pkg_b.all; ENTITY c01s03b01x00p12n01i00863ent IS END c01s03b01x00p12n01i00863ent; ARCHITECTURE c01s03b01x00p12n01i00863arch OF c01s03b01x00p12n01i00863ent IS component test port( sigin1 : in boolean ; sigout1 : out boolean ; sigin2 : in bit ; sigout2 : out bit ; sigin4 : in severity_level ; sigout4 : out severity_level ; sigin5 : in integer ; sigout5 : out integer ; sigin6 : in real ; sigout6 : out real ; sigin7 : in time ; sigout7 : out time ; sigin8 : in natural ; sigout8 : out natural ; sigin9 : in positive ; sigout9 : out positive ; sigin10 : in record_std_package ; sigout10 : out record_std_package ); end component; begin Sin1(zero) <='1'; Sin2(zero) <= true; Sin4(zero) <= note; Sin5(zero) <= 3; Sin6(zero) <= 3.0; Sin7(zero) <= 3 ns; Sin8(zero) <= 1; Sin9(zero) <= 1; Sin10(zero) <= (C1,C2,C3,C4,C5,C6,C7,C8,C9); K:block component test port( sigin1 : in boolean ; sigout1 : out boolean ; sigin2 : in bit ; sigout2 : out bit ; sigin4 : in severity_level ; sigout4 : out severity_level ; sigin5 : in integer ; sigout5 : out integer ; sigin6 : in real ; sigout6 : out real ; sigin7 : in time ; sigout7 : out time ; sigin8 : in natural ; sigout8 : out natural ; sigin9 : in positive ; sigout9 : out positive ; sigin10 : in record_std_package ; sigout10 : out record_std_package ); end component; BEGIN T5 : test port map ( Sin2(4),Sin2(5), Sin1(4),Sin1(5), Sin4(4),Sin4(5), Sin5(4),Sin5(5), Sin6(4),Sin6(5), Sin7(4),Sin7(5), Sin8(4),Sin8(5), Sin9(4),Sin9(5), Sin10(4),Sin10(5) ); G: for i in zero to three generate T1:test port map ( Sin2(i),Sin2(i+1), Sin1(i),Sin1(i+1), Sin4(i),Sin4(i+1), Sin5(i),Sin5(i+1), Sin6(i),Sin6(i+1), Sin7(i),Sin7(i+1), Sin8(i),Sin8(i+1), Sin9(i),Sin9(i+1), Sin10(i),Sin10(i+1) ); end generate; end block; TESTING: PROCESS BEGIN wait for 1 ns; assert Sin1(0) = Sin1(5) report "assignment of Sin1(0) to Sin1(4) is invalid through entity port" severity failure; assert Sin2(0) = Sin2(5) report "assignment of Sin2(0) to Sin2(4) is invalid through entity port" severity failure; assert Sin4(0) = Sin4(5) report "assignment of Sin4(0) to Sin4(4) is invalid through entity port" severity failure; assert Sin5(0) = Sin5(5) report "assignment of Sin5(0) to Sin5(4) is invalid through entity port" severity failure; assert Sin6(0) = Sin6(5) report "assignment of Sin6(0) to Sin6(4) is invalid through entity port" severity failure; assert Sin7(0) = Sin7(5) report "assignment of Sin7(0) to Sin7(4) is invalid through entity port" severity failure; assert Sin8(0) = Sin8(5) report "assignment of Sin8(0) to Sin8(4) is invalid through entity port" severity failure; assert Sin9(0) = Sin9(5) report "assignment of Sin9(0) to Sin9(4) is invalid through entity port" severity failure; assert Sin10(0) = Sin10(5) report "assignment of Sin10(0) to Sin10(4) is invalid through entity port" severity failure; assert NOT( Sin1(0) = sin1(5) and Sin2(0) = Sin2(5) and Sin4(0) = Sin4(5) and Sin5(0) = Sin5(5) and Sin6(0) = Sin6(5) and Sin7(0) = Sin7(5) and Sin8(0) = Sin8(5) and Sin9(0) = Sin9(5) and Sin10(0)= Sin10(0) ) report "***PASSED TEST: c01s03b01x00p12n01i00863" severity NOTE; assert ( Sin1(0) = sin1(5) and Sin2(0) = Sin2(5) and Sin4(0) = Sin4(5) and Sin5(0) = Sin5(5) and Sin6(0) = Sin6(5) and Sin7(0) = Sin7(5) and Sin8(0) = Sin8(5) and Sin9(0) = Sin9(5) and Sin10(0)= Sin10(0) ) report "***FAILED TEST: c01s03b01x00p12n01i00863 - If such a block configuration contains an index specification that is a discrete range, then the block configuration applies to those implicit block statements that are generated for the specified range of values of the corresponding generate index." severity ERROR; wait; END PROCESS TESTING; END c01s03b01x00p12n01i00863arch; configuration c01s03b01x00p12n01i00863cfg of c01s03b01x00p12n01i00863ent is for c01s03b01x00p12n01i00863arch for K for T5:test use configuration work.testbench; end for; for G(3) for T1:test use configuration work.testbench; end for; end for; for G(0 to 2) for all:test use configuration work.testbench; end for; end for; end for; end for; end;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc863.vhd,v 1.2 2001-10-26 16:30:01 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- package c01s03b01x00p12n01i00863pkg_b is constant zero : integer ; constant one : integer ; constant two : integer ; constant three: integer ; constant four : integer ; constant five : integer ; constant six : integer ; constant seven: integer ; constant eight: integer ; constant nine : integer ; constant fifteen: integer; end c01s03b01x00p12n01i00863pkg_b; package body c01s03b01x00p12n01i00863pkg_b is constant zero : integer := 0; constant one : integer := 1; constant two : integer := 2; constant three: integer := 3; constant four : integer := 4; constant five : integer := 5; constant six : integer := 6; constant seven: integer := 7; constant eight: integer := 8; constant nine : integer := 9; constant fifteen:integer:= 15; end c01s03b01x00p12n01i00863pkg_b; use work.c01s03b01x00p12n01i00863pkg_b.all; package c01s03b01x00p12n01i00863pkg_a is constant low_number : integer := 0; constant hi_number : integer := 3; subtype hi_to_low_range is integer range low_number to hi_number; type boolean_vector is array (natural range <>) of boolean; type severity_level_vector is array (natural range <>) of severity_level; type integer_vector is array (natural range <>) of integer; type real_vector is array (natural range <>) of real; type time_vector is array (natural range <>) of time; type natural_vector is array (natural range <>) of natural; type positive_vector is array (natural range <>) of positive; type record_std_package is record a: boolean; b: bit; c:character; d:severity_level; e:integer; f:real; g:time; h:natural; i:positive; end record; type array_rec_std is array (natural range <>) of record_std_package; type four_value is ('Z','0','1','X'); --enumerated type constant C1 : boolean := true; constant C2 : bit := '1'; constant C3 : character := 's'; constant C4 : severity_level := note; constant C5 : integer := 3; constant C6 : real := 3.0; constant C7 : time := 3 ns; constant C8 : natural := 1; constant C9 : positive := 1; signal Sin1 : bit_vector(zero to five) ; signal Sin2 : boolean_vector(zero to five) ; signal Sin4 : severity_level_vector(zero to five) ; signal Sin5 : integer_vector(zero to five) ; signal Sin6 : real_vector(zero to five) ; signal Sin7 : time_vector(zero to five) ; signal Sin8 : natural_vector(zero to five) ; signal Sin9 : positive_vector(zero to five) ; signal Sin10: array_rec_std(zero to five) ; end c01s03b01x00p12n01i00863pkg_a; use work.c01s03b01x00p12n01i00863pkg_a.all; use work.c01s03b01x00p12n01i00863pkg_b.all; entity test is port( sigin1 : in boolean ; sigout1 : out boolean ; sigin2 : in bit ; sigout2 : out bit ; sigin4 : in severity_level ; sigout4 : out severity_level ; sigin5 : in integer ; sigout5 : out integer ; sigin6 : in real ; sigout6 : out real ; sigin7 : in time ; sigout7 : out time ; sigin8 : in natural ; sigout8 : out natural ; sigin9 : in positive ; sigout9 : out positive ; sigin10 : in record_std_package ; sigout10 : out record_std_package ); end; architecture test of test is begin sigout1 <= sigin1; sigout2 <= sigin2; sigout4 <= sigin4; sigout5 <= sigin5; sigout6 <= sigin6; sigout7 <= sigin7; sigout8 <= sigin8; sigout9 <= sigin9; sigout10 <= sigin10; end; configuration testbench of test is for test end for; end; use work.c01s03b01x00p12n01i00863pkg_a.all; use work.c01s03b01x00p12n01i00863pkg_b.all; ENTITY c01s03b01x00p12n01i00863ent IS END c01s03b01x00p12n01i00863ent; ARCHITECTURE c01s03b01x00p12n01i00863arch OF c01s03b01x00p12n01i00863ent IS component test port( sigin1 : in boolean ; sigout1 : out boolean ; sigin2 : in bit ; sigout2 : out bit ; sigin4 : in severity_level ; sigout4 : out severity_level ; sigin5 : in integer ; sigout5 : out integer ; sigin6 : in real ; sigout6 : out real ; sigin7 : in time ; sigout7 : out time ; sigin8 : in natural ; sigout8 : out natural ; sigin9 : in positive ; sigout9 : out positive ; sigin10 : in record_std_package ; sigout10 : out record_std_package ); end component; begin Sin1(zero) <='1'; Sin2(zero) <= true; Sin4(zero) <= note; Sin5(zero) <= 3; Sin6(zero) <= 3.0; Sin7(zero) <= 3 ns; Sin8(zero) <= 1; Sin9(zero) <= 1; Sin10(zero) <= (C1,C2,C3,C4,C5,C6,C7,C8,C9); K:block component test port( sigin1 : in boolean ; sigout1 : out boolean ; sigin2 : in bit ; sigout2 : out bit ; sigin4 : in severity_level ; sigout4 : out severity_level ; sigin5 : in integer ; sigout5 : out integer ; sigin6 : in real ; sigout6 : out real ; sigin7 : in time ; sigout7 : out time ; sigin8 : in natural ; sigout8 : out natural ; sigin9 : in positive ; sigout9 : out positive ; sigin10 : in record_std_package ; sigout10 : out record_std_package ); end component; BEGIN T5 : test port map ( Sin2(4),Sin2(5), Sin1(4),Sin1(5), Sin4(4),Sin4(5), Sin5(4),Sin5(5), Sin6(4),Sin6(5), Sin7(4),Sin7(5), Sin8(4),Sin8(5), Sin9(4),Sin9(5), Sin10(4),Sin10(5) ); G: for i in zero to three generate T1:test port map ( Sin2(i),Sin2(i+1), Sin1(i),Sin1(i+1), Sin4(i),Sin4(i+1), Sin5(i),Sin5(i+1), Sin6(i),Sin6(i+1), Sin7(i),Sin7(i+1), Sin8(i),Sin8(i+1), Sin9(i),Sin9(i+1), Sin10(i),Sin10(i+1) ); end generate; end block; TESTING: PROCESS BEGIN wait for 1 ns; assert Sin1(0) = Sin1(5) report "assignment of Sin1(0) to Sin1(4) is invalid through entity port" severity failure; assert Sin2(0) = Sin2(5) report "assignment of Sin2(0) to Sin2(4) is invalid through entity port" severity failure; assert Sin4(0) = Sin4(5) report "assignment of Sin4(0) to Sin4(4) is invalid through entity port" severity failure; assert Sin5(0) = Sin5(5) report "assignment of Sin5(0) to Sin5(4) is invalid through entity port" severity failure; assert Sin6(0) = Sin6(5) report "assignment of Sin6(0) to Sin6(4) is invalid through entity port" severity failure; assert Sin7(0) = Sin7(5) report "assignment of Sin7(0) to Sin7(4) is invalid through entity port" severity failure; assert Sin8(0) = Sin8(5) report "assignment of Sin8(0) to Sin8(4) is invalid through entity port" severity failure; assert Sin9(0) = Sin9(5) report "assignment of Sin9(0) to Sin9(4) is invalid through entity port" severity failure; assert Sin10(0) = Sin10(5) report "assignment of Sin10(0) to Sin10(4) is invalid through entity port" severity failure; assert NOT( Sin1(0) = sin1(5) and Sin2(0) = Sin2(5) and Sin4(0) = Sin4(5) and Sin5(0) = Sin5(5) and Sin6(0) = Sin6(5) and Sin7(0) = Sin7(5) and Sin8(0) = Sin8(5) and Sin9(0) = Sin9(5) and Sin10(0)= Sin10(0) ) report "***PASSED TEST: c01s03b01x00p12n01i00863" severity NOTE; assert ( Sin1(0) = sin1(5) and Sin2(0) = Sin2(5) and Sin4(0) = Sin4(5) and Sin5(0) = Sin5(5) and Sin6(0) = Sin6(5) and Sin7(0) = Sin7(5) and Sin8(0) = Sin8(5) and Sin9(0) = Sin9(5) and Sin10(0)= Sin10(0) ) report "***FAILED TEST: c01s03b01x00p12n01i00863 - If such a block configuration contains an index specification that is a discrete range, then the block configuration applies to those implicit block statements that are generated for the specified range of values of the corresponding generate index." severity ERROR; wait; END PROCESS TESTING; END c01s03b01x00p12n01i00863arch; configuration c01s03b01x00p12n01i00863cfg of c01s03b01x00p12n01i00863ent is for c01s03b01x00p12n01i00863arch for K for T5:test use configuration work.testbench; end for; for G(3) for T1:test use configuration work.testbench; end for; end for; for G(0 to 2) for all:test use configuration work.testbench; end for; end for; end for; end for; end;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc863.vhd,v 1.2 2001-10-26 16:30:01 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- package c01s03b01x00p12n01i00863pkg_b is constant zero : integer ; constant one : integer ; constant two : integer ; constant three: integer ; constant four : integer ; constant five : integer ; constant six : integer ; constant seven: integer ; constant eight: integer ; constant nine : integer ; constant fifteen: integer; end c01s03b01x00p12n01i00863pkg_b; package body c01s03b01x00p12n01i00863pkg_b is constant zero : integer := 0; constant one : integer := 1; constant two : integer := 2; constant three: integer := 3; constant four : integer := 4; constant five : integer := 5; constant six : integer := 6; constant seven: integer := 7; constant eight: integer := 8; constant nine : integer := 9; constant fifteen:integer:= 15; end c01s03b01x00p12n01i00863pkg_b; use work.c01s03b01x00p12n01i00863pkg_b.all; package c01s03b01x00p12n01i00863pkg_a is constant low_number : integer := 0; constant hi_number : integer := 3; subtype hi_to_low_range is integer range low_number to hi_number; type boolean_vector is array (natural range <>) of boolean; type severity_level_vector is array (natural range <>) of severity_level; type integer_vector is array (natural range <>) of integer; type real_vector is array (natural range <>) of real; type time_vector is array (natural range <>) of time; type natural_vector is array (natural range <>) of natural; type positive_vector is array (natural range <>) of positive; type record_std_package is record a: boolean; b: bit; c:character; d:severity_level; e:integer; f:real; g:time; h:natural; i:positive; end record; type array_rec_std is array (natural range <>) of record_std_package; type four_value is ('Z','0','1','X'); --enumerated type constant C1 : boolean := true; constant C2 : bit := '1'; constant C3 : character := 's'; constant C4 : severity_level := note; constant C5 : integer := 3; constant C6 : real := 3.0; constant C7 : time := 3 ns; constant C8 : natural := 1; constant C9 : positive := 1; signal Sin1 : bit_vector(zero to five) ; signal Sin2 : boolean_vector(zero to five) ; signal Sin4 : severity_level_vector(zero to five) ; signal Sin5 : integer_vector(zero to five) ; signal Sin6 : real_vector(zero to five) ; signal Sin7 : time_vector(zero to five) ; signal Sin8 : natural_vector(zero to five) ; signal Sin9 : positive_vector(zero to five) ; signal Sin10: array_rec_std(zero to five) ; end c01s03b01x00p12n01i00863pkg_a; use work.c01s03b01x00p12n01i00863pkg_a.all; use work.c01s03b01x00p12n01i00863pkg_b.all; entity test is port( sigin1 : in boolean ; sigout1 : out boolean ; sigin2 : in bit ; sigout2 : out bit ; sigin4 : in severity_level ; sigout4 : out severity_level ; sigin5 : in integer ; sigout5 : out integer ; sigin6 : in real ; sigout6 : out real ; sigin7 : in time ; sigout7 : out time ; sigin8 : in natural ; sigout8 : out natural ; sigin9 : in positive ; sigout9 : out positive ; sigin10 : in record_std_package ; sigout10 : out record_std_package ); end; architecture test of test is begin sigout1 <= sigin1; sigout2 <= sigin2; sigout4 <= sigin4; sigout5 <= sigin5; sigout6 <= sigin6; sigout7 <= sigin7; sigout8 <= sigin8; sigout9 <= sigin9; sigout10 <= sigin10; end; configuration testbench of test is for test end for; end; use work.c01s03b01x00p12n01i00863pkg_a.all; use work.c01s03b01x00p12n01i00863pkg_b.all; ENTITY c01s03b01x00p12n01i00863ent IS END c01s03b01x00p12n01i00863ent; ARCHITECTURE c01s03b01x00p12n01i00863arch OF c01s03b01x00p12n01i00863ent IS component test port( sigin1 : in boolean ; sigout1 : out boolean ; sigin2 : in bit ; sigout2 : out bit ; sigin4 : in severity_level ; sigout4 : out severity_level ; sigin5 : in integer ; sigout5 : out integer ; sigin6 : in real ; sigout6 : out real ; sigin7 : in time ; sigout7 : out time ; sigin8 : in natural ; sigout8 : out natural ; sigin9 : in positive ; sigout9 : out positive ; sigin10 : in record_std_package ; sigout10 : out record_std_package ); end component; begin Sin1(zero) <='1'; Sin2(zero) <= true; Sin4(zero) <= note; Sin5(zero) <= 3; Sin6(zero) <= 3.0; Sin7(zero) <= 3 ns; Sin8(zero) <= 1; Sin9(zero) <= 1; Sin10(zero) <= (C1,C2,C3,C4,C5,C6,C7,C8,C9); K:block component test port( sigin1 : in boolean ; sigout1 : out boolean ; sigin2 : in bit ; sigout2 : out bit ; sigin4 : in severity_level ; sigout4 : out severity_level ; sigin5 : in integer ; sigout5 : out integer ; sigin6 : in real ; sigout6 : out real ; sigin7 : in time ; sigout7 : out time ; sigin8 : in natural ; sigout8 : out natural ; sigin9 : in positive ; sigout9 : out positive ; sigin10 : in record_std_package ; sigout10 : out record_std_package ); end component; BEGIN T5 : test port map ( Sin2(4),Sin2(5), Sin1(4),Sin1(5), Sin4(4),Sin4(5), Sin5(4),Sin5(5), Sin6(4),Sin6(5), Sin7(4),Sin7(5), Sin8(4),Sin8(5), Sin9(4),Sin9(5), Sin10(4),Sin10(5) ); G: for i in zero to three generate T1:test port map ( Sin2(i),Sin2(i+1), Sin1(i),Sin1(i+1), Sin4(i),Sin4(i+1), Sin5(i),Sin5(i+1), Sin6(i),Sin6(i+1), Sin7(i),Sin7(i+1), Sin8(i),Sin8(i+1), Sin9(i),Sin9(i+1), Sin10(i),Sin10(i+1) ); end generate; end block; TESTING: PROCESS BEGIN wait for 1 ns; assert Sin1(0) = Sin1(5) report "assignment of Sin1(0) to Sin1(4) is invalid through entity port" severity failure; assert Sin2(0) = Sin2(5) report "assignment of Sin2(0) to Sin2(4) is invalid through entity port" severity failure; assert Sin4(0) = Sin4(5) report "assignment of Sin4(0) to Sin4(4) is invalid through entity port" severity failure; assert Sin5(0) = Sin5(5) report "assignment of Sin5(0) to Sin5(4) is invalid through entity port" severity failure; assert Sin6(0) = Sin6(5) report "assignment of Sin6(0) to Sin6(4) is invalid through entity port" severity failure; assert Sin7(0) = Sin7(5) report "assignment of Sin7(0) to Sin7(4) is invalid through entity port" severity failure; assert Sin8(0) = Sin8(5) report "assignment of Sin8(0) to Sin8(4) is invalid through entity port" severity failure; assert Sin9(0) = Sin9(5) report "assignment of Sin9(0) to Sin9(4) is invalid through entity port" severity failure; assert Sin10(0) = Sin10(5) report "assignment of Sin10(0) to Sin10(4) is invalid through entity port" severity failure; assert NOT( Sin1(0) = sin1(5) and Sin2(0) = Sin2(5) and Sin4(0) = Sin4(5) and Sin5(0) = Sin5(5) and Sin6(0) = Sin6(5) and Sin7(0) = Sin7(5) and Sin8(0) = Sin8(5) and Sin9(0) = Sin9(5) and Sin10(0)= Sin10(0) ) report "***PASSED TEST: c01s03b01x00p12n01i00863" severity NOTE; assert ( Sin1(0) = sin1(5) and Sin2(0) = Sin2(5) and Sin4(0) = Sin4(5) and Sin5(0) = Sin5(5) and Sin6(0) = Sin6(5) and Sin7(0) = Sin7(5) and Sin8(0) = Sin8(5) and Sin9(0) = Sin9(5) and Sin10(0)= Sin10(0) ) report "***FAILED TEST: c01s03b01x00p12n01i00863 - If such a block configuration contains an index specification that is a discrete range, then the block configuration applies to those implicit block statements that are generated for the specified range of values of the corresponding generate index." severity ERROR; wait; END PROCESS TESTING; END c01s03b01x00p12n01i00863arch; configuration c01s03b01x00p12n01i00863cfg of c01s03b01x00p12n01i00863ent is for c01s03b01x00p12n01i00863arch for K for T5:test use configuration work.testbench; end for; for G(3) for T1:test use configuration work.testbench; end for; end for; for G(0 to 2) for all:test use configuration work.testbench; end for; end for; end for; end for; end;
entity e is end entity; architecture a1 of e is attribute foo : integer; attribute bar : string; signal x, y, z : integer; attribute foo of x : signal is 6; -- OK attribute bar of y : signal is "hello"; -- OK type int_vec is array (integer range <>) of integer; type int_vec_ptr is access int_vec; signal i : int_vec(1 to 3); attribute foo of i : signal is 6; -- OK begin process is variable v : integer; begin v := x'foo; -- OK report y'bar; -- OK end process; process is begin report z'foo; -- Error end process; process is variable v : int_vec_ptr; begin assert v'length = 5; assert v.all'length = 62; end process; process is begin report e'path_name; -- OK report e'instance_name; -- OK report a1'path_name; -- OK report a1'instance_name; -- OK end process; process is begin assert i'event; -- OK assert i(1)'event; -- OK assert i(x)'event; -- OK assert i'foo = 1; -- OK assert i(1)'foo = 2; -- Error end process; end architecture; architecture a2 of e is attribute foo : integer; attribute bar : string; signal x, y, z : integer; attribute foo of z : signal is string'("boo"); -- Error attribute bar of x : signal is 73; -- Error attribute foo of q : signal is 71; -- Error attribute foo of yah : label is 12; -- Ignored begin end architecture; architecture a3 of e is type int10_vec is array (integer range 1 to 10) of integer; begin process is variable x : integer; begin assert int10_vec'low = 1; -- OK assert int10_vec'high = 10; -- OK assert int10_vec'left = 1; -- OK assert int10_vec'right = 10; -- OK assert int10_vec'low(1) = 1; -- OK assert int10_vec'left(x) = 2; -- Error end process; end architecture; package p is function func(x : in integer) return integer; end package; package body p is function func(x : in integer) return integer is begin report func'instance_name; return x + 1; end function; end package body; entity issue39 is generic ( g : bit := '0' ); begin assert (g = '0' or g = '1') report issue39'instance_name & "oops!" severity failure; end entity issue39; architecture a4 of e is begin process is begin assert integer'image(0)(0) = '0'; -- OK end process; process is variable i : integer; attribute a : bit_vector; attribute a of i : variable is "101"; attribute b : integer; attribute b of i : variable is 4; begin assert i'a(1) = '0'; -- OK assert i'b(1) = 1; -- Error end process; process is variable i : integer; attribute a : boolean; attribute a of i : signal is true; -- Error begin end process; process is variable x : integer; begin assert x'last_event = 0 ns; -- Error end process; process is type bv_ptr is access bit_vector; variable a : bv_ptr; type r is record x : integer; end record; variable b : r; begin a(a'range) := "110101"; -- OK a(bit_vector'range) := "110101"; -- Error a(b'range) := "101010"; -- Error a(e'range) := "110101"; -- Error end process; process is function func(x : integer) return bit_vector; variable a : bit_vector(1 to 10); begin a(func(4)'range) := (others => '1'); -- OK end process; process is type bvptr is access bit_vector; variable b : bvptr; begin for i in b.all'range loop -- OK end loop; for i in b'range loop -- OK end loop; end process; end architecture;
entity e is end entity; architecture a1 of e is attribute foo : integer; attribute bar : string; signal x, y, z : integer; attribute foo of x : signal is 6; -- OK attribute bar of y : signal is "hello"; -- OK type int_vec is array (integer range <>) of integer; type int_vec_ptr is access int_vec; signal i : int_vec(1 to 3); attribute foo of i : signal is 6; -- OK begin process is variable v : integer; begin v := x'foo; -- OK report y'bar; -- OK end process; process is begin report z'foo; -- Error end process; process is variable v : int_vec_ptr; begin assert v'length = 5; assert v.all'length = 62; end process; process is begin report e'path_name; -- OK report e'instance_name; -- OK report a1'path_name; -- OK report a1'instance_name; -- OK end process; process is begin assert i'event; -- OK assert i(1)'event; -- OK assert i(x)'event; -- OK assert i'foo = 1; -- OK assert i(1)'foo = 2; -- Error end process; end architecture; architecture a2 of e is attribute foo : integer; attribute bar : string; signal x, y, z : integer; attribute foo of z : signal is string'("boo"); -- Error attribute bar of x : signal is 73; -- Error attribute foo of q : signal is 71; -- Error attribute foo of yah : label is 12; -- Ignored begin end architecture; architecture a3 of e is type int10_vec is array (integer range 1 to 10) of integer; begin process is variable x : integer; begin assert int10_vec'low = 1; -- OK assert int10_vec'high = 10; -- OK assert int10_vec'left = 1; -- OK assert int10_vec'right = 10; -- OK assert int10_vec'low(1) = 1; -- OK assert int10_vec'left(x) = 2; -- Error end process; end architecture; package p is function func(x : in integer) return integer; end package; package body p is function func(x : in integer) return integer is begin report func'instance_name; return x + 1; end function; end package body; entity issue39 is generic ( g : bit := '0' ); begin assert (g = '0' or g = '1') report issue39'instance_name & "oops!" severity failure; end entity issue39; architecture a4 of e is begin process is begin assert integer'image(0)(0) = '0'; -- OK end process; process is variable i : integer; attribute a : bit_vector; attribute a of i : variable is "101"; attribute b : integer; attribute b of i : variable is 4; begin assert i'a(1) = '0'; -- OK assert i'b(1) = 1; -- Error end process; process is variable i : integer; attribute a : boolean; attribute a of i : signal is true; -- Error begin end process; process is variable x : integer; begin assert x'last_event = 0 ns; -- Error end process; process is type bv_ptr is access bit_vector; variable a : bv_ptr; type r is record x : integer; end record; variable b : r; begin a(a'range) := "110101"; -- OK a(bit_vector'range) := "110101"; -- Error a(b'range) := "101010"; -- Error a(e'range) := "110101"; -- Error end process; process is function func(x : integer) return bit_vector; variable a : bit_vector(1 to 10); begin a(func(4)'range) := (others => '1'); -- OK end process; process is type bvptr is access bit_vector; variable b : bvptr; begin for i in b.all'range loop -- OK end loop; for i in b'range loop -- OK end loop; end process; end architecture;
entity e is end entity; architecture a1 of e is attribute foo : integer; attribute bar : string; signal x, y, z : integer; attribute foo of x : signal is 6; -- OK attribute bar of y : signal is "hello"; -- OK type int_vec is array (integer range <>) of integer; type int_vec_ptr is access int_vec; signal i : int_vec(1 to 3); attribute foo of i : signal is 6; -- OK begin process is variable v : integer; begin v := x'foo; -- OK report y'bar; -- OK end process; process is begin report z'foo; -- Error end process; process is variable v : int_vec_ptr; begin assert v'length = 5; assert v.all'length = 62; end process; process is begin report e'path_name; -- OK report e'instance_name; -- OK report a1'path_name; -- OK report a1'instance_name; -- OK end process; process is begin assert i'event; -- OK assert i(1)'event; -- OK assert i(x)'event; -- OK assert i'foo = 1; -- OK assert i(1)'foo = 2; -- Error end process; end architecture; architecture a2 of e is attribute foo : integer; attribute bar : string; signal x, y, z : integer; attribute foo of z : signal is string'("boo"); -- Error attribute bar of x : signal is 73; -- Error attribute foo of q : signal is 71; -- Error attribute foo of yah : label is 12; -- Ignored begin end architecture; architecture a3 of e is type int10_vec is array (integer range 1 to 10) of integer; begin process is variable x : integer; begin assert int10_vec'low = 1; -- OK assert int10_vec'high = 10; -- OK assert int10_vec'left = 1; -- OK assert int10_vec'right = 10; -- OK assert int10_vec'low(1) = 1; -- OK assert int10_vec'left(x) = 2; -- Error end process; end architecture; package p is function func(x : in integer) return integer; end package; package body p is function func(x : in integer) return integer is begin report func'instance_name; return x + 1; end function; end package body; entity issue39 is generic ( g : bit := '0' ); begin assert (g = '0' or g = '1') report issue39'instance_name & "oops!" severity failure; end entity issue39; architecture a4 of e is begin process is begin assert integer'image(0)(0) = '0'; -- OK end process; process is variable i : integer; attribute a : bit_vector; attribute a of i : variable is "101"; attribute b : integer; attribute b of i : variable is 4; begin assert i'a(1) = '0'; -- OK assert i'b(1) = 1; -- Error end process; process is variable i : integer; attribute a : boolean; attribute a of i : signal is true; -- Error begin end process; process is variable x : integer; begin assert x'last_event = 0 ns; -- Error end process; process is type bv_ptr is access bit_vector; variable a : bv_ptr; type r is record x : integer; end record; variable b : r; begin a(a'range) := "110101"; -- OK a(bit_vector'range) := "110101"; -- Error a(b'range) := "101010"; -- Error a(e'range) := "110101"; -- Error end process; process is function func(x : integer) return bit_vector; variable a : bit_vector(1 to 10); begin a(func(4)'range) := (others => '1'); -- OK end process; process is type bvptr is access bit_vector; variable b : bvptr; begin for i in b.all'range loop -- OK end loop; for i in b'range loop -- OK end loop; end process; end architecture;
-- Descp: counts number of exact matches -- -- entity name: g05_num_matches -- -- Version 1.0 -- Author: Felix Dube; [email protected] & Auguste Lalande; [email protected] -- Date: October 1, 2015 library ieee; use ieee.std_logic_1164.all; entity g05_num_matches is port ( P1, P2, P3, P4 : in std_logic_vector(2 downto 0); G1, G2, G3, G4 : in std_logic_vector(2 downto 0); N : out std_logic_vector(2 downto 0) ); end g05_num_matches; architecture behavior of g05_num_matches is component g05_comp6 is port ( A : in std_logic_vector(5 downto 0); B : in std_logic_vector(5 downto 0); AeqB : out std_logic ); end component; component g05_num1s is port ( X : in std_logic_vector(3 downto 0); num1s : out std_logic_vector(2 downto 0) ); end component; signal X : std_logic_vector(3 downto 0); begin compX0 : g05_comp6 port map (A(5 downto 3) => "000", A(2 downto 0) => P1, B(5 downto 3) => "000", B(2 downto 0) => G1, AeqB => X(0)); compX1 : g05_comp6 port map (A(5 downto 3) => "000", A(2 downto 0) => P2, B(5 downto 3) => "000", B(2 downto 0) => G2, AeqB => X(1)); compX2 : g05_comp6 port map (A(5 downto 3) => "000", A(2 downto 0) => P3, B(5 downto 3) => "000", B(2 downto 0) => G3, AeqB => X(2)); compX3 : g05_comp6 port map (A(5 downto 3) => "000", A(2 downto 0) => P4, B(5 downto 3) => "000", B(2 downto 0) => G4, AeqB => X(3)); matches : g05_num1s port map (X => X, num1s => N); end behavior;
component ghrd_10as066n2_clk_0 is port ( in_clk : in std_logic := 'X'; -- clk out_clk : out std_logic -- clk ); end component ghrd_10as066n2_clk_0; u0 : component ghrd_10as066n2_clk_0 port map ( in_clk => CONNECTED_TO_in_clk, -- in_clk.clk out_clk => CONNECTED_TO_out_clk -- out_clk.clk );
library ieee; use ieee. std_logic_1164.all; use ieee. std_logic_arith.all; use ieee. std_logic_unsigned.all; entity ff32_en_IR is generic ( SIZE : integer := 32 ); PORT( D : in std_logic_vector(SIZE - 1 downto 0); en : in std_logic; clk : in std_logic; rst : in std_logic; Q : out std_logic_vector(SIZE - 1 downto 0) ); end ff32_en_IR; architecture behavioral of ff32_en_IR is begin process(clk,rst) begin if(rst='1') then Q <= X"54000000"; else if(clk='1' and clk'EVENT) then if en = '1' then Q <= D; end if; end if; end if; end process; end behavioral;
library ieee; use ieee. std_logic_1164.all; use ieee. std_logic_arith.all; use ieee. std_logic_unsigned.all; entity ff32_en_IR is generic ( SIZE : integer := 32 ); PORT( D : in std_logic_vector(SIZE - 1 downto 0); en : in std_logic; clk : in std_logic; rst : in std_logic; Q : out std_logic_vector(SIZE - 1 downto 0) ); end ff32_en_IR; architecture behavioral of ff32_en_IR is begin process(clk,rst) begin if(rst='1') then Q <= X"54000000"; else if(clk='1' and clk'EVENT) then if en = '1' then Q <= D; end if; end if; end if; end process; end behavioral;
------------------------------------------------------------------------------ -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------- -- Entity: axi2ahb -- File: axi2ahb.vhd -- Author: Martin George -- -- AXI/AHB bridge allowing Altera HPS to access LEON3 bus. -- AHB master interface currently only supports OKAY response from slave. -- AXI slave only supports incrementing bursts of length 1-16 transfers. ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; library grlib; use grlib.amba.all; use grlib.stdlib.all; use grlib.devices.all; Entity axi2ahb is generic( hindex : integer := 0; idsize : integer := 6; lensize : integer := 4; fifo_depth : integer := 16 ); port( ahb_clk : in std_logic; axi_clk : in std_logic; resetn : in std_logic; ahbi : in ahb_mst_in_type; ahbo : out ahb_mst_out_type; s_axi_araddr : in std_logic_vector ( 31 downto 0 ); s_axi_arburst : in std_logic_vector ( 1 downto 0 ); s_axi_arcache : in std_logic_vector ( 3 downto 0 ); s_axi_arid : in std_logic_vector ( idsize-1 downto 0 ); s_axi_arlen : in std_logic_vector ( lensize-1 downto 0 ); s_axi_arlock : in std_logic_vector (1 downto 0); s_axi_arprot : in std_logic_vector ( 2 downto 0 ); s_axi_arqos : in std_logic_vector ( 3 downto 0 ); s_axi_arready : out std_logic; s_axi_arsize : in std_logic_vector ( 2 downto 0 ); s_axi_arvalid : in std_logic; s_axi_awaddr : in std_logic_vector ( 31 downto 0 ); s_axi_awburst : in std_logic_vector ( 1 downto 0 ); s_axi_awcache : in std_logic_vector ( 3 downto 0 ); s_axi_awid : in std_logic_vector ( idsize-1 downto 0 ); s_axi_awlen : in std_logic_vector ( lensize-1 downto 0 ); s_axi_awlock : in std_logic_vector (1 downto 0); s_axi_awprot : in std_logic_vector ( 2 downto 0 ); s_axi_awqos : in std_logic_vector ( 3 downto 0 ); s_axi_awready : out std_logic; s_axi_awsize : in std_logic_vector ( 2 downto 0 ); s_axi_awvalid : in std_logic; s_axi_bid : out std_logic_vector ( idsize-1 downto 0 ); s_axi_bready : in std_logic; s_axi_bresp : out std_logic_vector ( 1 downto 0 ); s_axi_bvalid : out std_logic; s_axi_rdata : out std_logic_vector ( 31 downto 0 ); s_axi_rid : out std_logic_vector ( idsize-1 downto 0 ); s_axi_rlast : out std_logic; s_axi_rready : in std_logic; s_axi_rresp : out std_logic_vector ( 1 downto 0 ); s_axi_rvalid : out std_logic; s_axi_wdata : in std_logic_vector ( 31 downto 0 ); s_axi_wid : in std_logic_vector ( idsize-1 downto 0 ); s_axi_wlast : in std_logic; s_axi_wready : out std_logic; s_axi_wstrb : in std_logic_vector ( 3 downto 0 ); s_axi_wvalid : in std_logic ); end; architecture rtl of axi2ahb is constant hconfig : ahb_config_type := ( 0 => ahb_device_reg ( VENDOR_GAISLER, GAISLER_AXI2AHB, 0, 0, 0), others => zero32); type axi_w_state_type is (w_start, w_wait, w_data_fifo, w_ahb, w_done); type axi_r_state_type is (r_start, r_wait, r_data_fifo, r_done); type ahb_rw_state_type is (idle, w_req, w_first_addr, w_data_addr, w_done, r_req, r_first_addr, r_data_addr, r_done); type fifo is array (fifo_depth-1 downto 0) of std_logic_vector(31 downto 0); type ahb_record is record --States-- ahb_rw_state : ahb_rw_state_type; --Outputs-- hwrite : std_logic; hbusreq : std_logic; hlock : std_logic; hsize : std_logic_vector(2 downto 0); htrans : std_logic_vector(1 downto 0); hwdata : std_logic_vector(31 downto 0); haddr : std_logic_vector(31 downto 0); hwaddr : std_logic_vector(9 downto 0); hraddr : std_logic_vector(9 downto 0); hburst : std_logic_vector(2 downto 0); inc_sel : std_logic_vector(2 downto 0); --FIFO signals-- rfifo : fifo; rfifo_w_ptr : integer range 0 to fifo_depth-1; wfifo_r_ptr : integer range 0 to fifo_depth-1; --Control signals-- ahb_haddr_stop : std_logic; ahb_w_en_ack : std_logic; ahb_r_done : std_logic; ahb_w_done : std_logic; addr_incr : integer range 0 to 15; end record; type axi_record is record --States-- axi_w_state : axi_w_state_type; axi_r_state : axi_r_state_type; --Outputs-- arready : std_logic; awready : std_logic; bvalid : std_logic; rdata : std_logic_vector ( 31 downto 0 ); rlast : std_logic; rvalid : std_logic; wready : std_logic; --FIFO signals-- wfifo : fifo; wfifo_w_ptr : integer range 0 to fifo_depth-1; rfifo_r_ptr : integer range 0 to fifo_depth-1; --Control signals-- --Write-- awaddr : std_logic_vector(31 downto 0); awburst : std_logic_vector(1 downto 0); awlen : std_logic_vector(lensize-1 downto 0); awsize : std_logic_vector(2 downto 0); awid : std_logic_vector(idsize-1 downto 0); --Read-- arid : std_logic_vector(idsize-1 downto 0); araddr : std_logic_vector(31 downto 0); arburst : std_logic_vector(1 downto 0); arlen : std_logic_vector(lensize-1 downto 0); arsize : std_logic_vector(2 downto 0); --AHB-- ahb_r_en : std_logic; ahb_w_en : std_logic; end record; signal h, hin : ahb_record; signal x, xin : axi_record; begin comb: process(resetn, ahbi, x, h, s_axi_araddr, s_axi_arburst, s_axi_arcache, s_axi_arid, s_axi_arlen, s_axi_arlock, s_axi_arprot, s_axi_arqos, s_axi_arsize, s_axi_arvalid, s_axi_awaddr, s_axi_awburst, s_axi_awcache, s_axi_awid, s_axi_awlen, s_axi_awlock, s_axi_awprot, s_axi_awqos, s_axi_awsize, s_axi_awvalid, s_axi_bready, s_axi_rready, s_axi_wdata, s_axi_wid, s_axi_wlast, s_axi_wstrb, s_axi_wvalid) variable vx : axi_record; variable vh : ahb_record; begin vx := x; vh := h; -- AXI WRITE STATES case x.axi_w_state is when w_start => vx.awready := '1'; vx.wready := '0'; vx.ahb_w_en := '0'; vx.bvalid := '0'; if s_axi_awvalid = '1' then vx.axi_w_state := w_wait; vx.awready := '0'; vx.awlen := s_axi_awlen; vx.awburst := s_axi_awburst; vx.awsize := s_axi_awsize; vx.awaddr := s_axi_awaddr; vx.awid := s_axi_awid; end if; when w_wait => vx.awready := '0'; if h.ahb_w_done = '1' then vx.wfifo_w_ptr := 0; vx.axi_w_state := w_data_fifo; end if; when w_data_fifo => vx.awready := '0'; vx.wfifo_w_ptr := x.wfifo_w_ptr; vx.wready := '0'; if s_axi_wvalid = '1' then vx.wready := '1'; if s_axi_wlast = '1' then vx.axi_w_state := w_ahb; else vx.wfifo_w_ptr := x.wfifo_w_ptr + 1; end if; end if; when w_ahb => vx.wready := '0'; vx.ahb_w_en := '1'; if h.ahb_w_en_ack = '1' then vx.ahb_w_en := '0'; vx.bvalid := '1'; vx.axi_w_state := w_done; end if; when w_done => if s_axi_bready = '1' then vx.bvalid := '0'; vx.axi_w_state := w_start; else end if; end case; -- AXI READ STATES case x.axi_r_state is when r_start => vx.arready := '1'; vx.rvalid := '0'; vx.rfifo_r_ptr := 0; vx.rlast := '0'; if s_axi_arvalid = '1' then vx.arready := '0'; vx.ahb_r_en := '1'; vx.arlen := s_axi_arlen; vx.arburst := s_axi_arburst; vx.arsize := s_axi_arsize; vx.araddr := s_axi_araddr; vx.arid := s_axi_arid; vx.axi_r_state := r_wait; end if; when r_wait => vx.arready := '0'; if h.ahb_r_done = '1' then vx.ahb_r_en := '0'; vx.axi_r_state := r_data_fifo; end if; when r_data_fifo => vx.rdata := h.rfifo(x.rfifo_r_ptr); vx.rvalid := '1'; vx.rfifo_r_ptr := x.rfifo_r_ptr; -- if x.rfifo_r_ptr = conv_integer(x.arlen) then if x.rfifo_r_ptr = h.rfifo_w_ptr then vx.rlast := '1'; vx.axi_r_state := r_done; elsif s_axi_rready = '1' then vx.rfifo_r_ptr := x.rfifo_r_ptr + 1; end if; when r_done => vx.rvalid := '1'; if s_axi_rready = '1' then vx.rvalid := '0'; vx.rfifo_r_ptr := 0; vx.rlast := '0'; vx.axi_r_state := r_start; else end if; end case; -- AHB READ/WRITE STATES case h.ahb_rw_state is when idle => vh.ahb_w_en_ack := '0'; vh.ahb_r_done := '0'; vh.htrans := "00"; if x.ahb_w_en = '1' then vh.ahb_w_done := '0'; vh.ahb_rw_state := w_req; vh.hsize := x.awsize; vh.inc_sel := x.awsize; elsif x.ahb_r_en = '1' then vh.ahb_r_done := '0'; vh.ahb_rw_state := r_req; vh.hsize := "010"; vh.inc_sel := x.arsize; else end if; -- WRITE STATES when w_req => vh.ahb_w_en_ack := '1'; vh.hbusreq := '1'; vh.hlock := '1'; vh.hwrite := '1'; if conv_integer(x.awlen) /= 0 then vh.hburst := "001"; else vh.hburst := "000"; end if; if (ahbi.hgrant(hindex) and ahbi.hready) = '1' then vh.ahb_rw_state := w_first_addr; else end if; when w_first_addr => vh.htrans := "10"; vh.hwaddr := x.awaddr(9 downto 0); vh.haddr := x.awaddr; case h.hsize is when "000" => vh.haddr(1 downto 0) := not x.awaddr(1 downto 0); when "001" => vh.haddr(1) := not x.awaddr(1); when others => end case; vh.ahb_rw_state := w_data_addr; when w_data_addr => vh.htrans := "11"; vh.hwdata := x.wfifo(h.wfifo_r_ptr); if h.wfifo_r_ptr = x.wfifo_w_ptr then vh.htrans := "00"; vh.ahb_rw_state := w_done; elsif ahbi.hready = '1' then vh.hwaddr := h.hwaddr + h.addr_incr; vh.haddr(9 downto 0) := vh.hwaddr; case h.hsize is when "000" => vh.haddr(1 downto 0) := not vh.hwaddr(1 downto 0); when "001" => vh.haddr(1) := not vh.hwaddr(1); when others => end case; vh.wfifo_r_ptr := h.wfifo_r_ptr + 1; end if; when w_done => if ahbi.hready = '1' then vh.ahb_haddr_stop := '0'; vh.htrans := "00"; vh.wfifo_r_ptr := 0; vh.ahb_w_en_ack := '0'; vh.ahb_w_done := '1'; vh.hbusreq := '0'; vh.hlock := '0'; vh.ahb_rw_state := idle; else end if; -- READ STATES when r_req => vh.rfifo_w_ptr := 0; vh.hbusreq := '1'; vh.hlock := '1'; vh.hwrite := '0'; if conv_integer(x.arlen) /= 0 then vh.hburst := "001"; else vh.hburst := "000"; end if; if (ahbi.hgrant(hindex) and ahbi.hready) = '1' then vh.ahb_rw_state := r_first_addr; vh.htrans := "10"; vh.haddr := x.araddr; vh.hraddr := x.araddr(9 downto 0); else end if; when r_first_addr => if ahbi.hready = '1' then if h.rfifo_w_ptr /= conv_integer(x.arlen) then vh.hraddr := h.hraddr + h.addr_incr; vh.haddr(9 downto 0) := vh.hraddr(9 downto 2) & "00"; end if; vh.ahb_rw_state := r_data_addr; end if; when r_data_addr => if ahbi.hready = '1' then vh.rfifo(h.rfifo_w_ptr) := ahbi.hrdata; if h.rfifo_w_ptr = conv_integer(x.arlen) then vh.htrans := "00"; vh.ahb_rw_state := r_done; else vh.htrans := "11"; vh.rfifo_w_ptr := h.rfifo_w_ptr + 1; vh.hraddr := h.hraddr + h.addr_incr; vh.haddr(9 downto 0) := vh.hraddr(9 downto 2) & "00"; end if; else end if; when r_done => vh.htrans := "00"; vh.ahb_r_done := '1'; vh.hbusreq := '0'; vh.hlock := '0'; vx.ahb_r_en := '0'; vh.ahb_rw_state := idle; end case; -- WDATA muxing if (s_axi_wvalid and h.ahb_w_done) = '1' then case s_axi_wstrb is when "0001" => vx.wfifo(x.wfifo_w_ptr) := s_axi_wdata(7 downto 0) & s_axi_wdata(7 downto 0) & s_axi_wdata(7 downto 0) & s_axi_wdata(7 downto 0); when "0010" => vx.wfifo(x.wfifo_w_ptr) := s_axi_wdata(15 downto 8) & s_axi_wdata(15 downto 8) & s_axi_wdata(15 downto 8) & s_axi_wdata(15 downto 8); when "0100" => vx.wfifo(x.wfifo_w_ptr) := s_axi_wdata(23 downto 16) & s_axi_wdata(23 downto 16) & s_axi_wdata(23 downto 16) & s_axi_wdata(23 downto 16); when "1000" => vx.wfifo(x.wfifo_w_ptr) := s_axi_wdata(31 downto 24) & s_axi_wdata(31 downto 24) & s_axi_wdata(31 downto 24) & s_axi_wdata(31 downto 24); when "0011" => vx.wfifo(x.wfifo_w_ptr) := s_axi_wdata(15 downto 0) & s_axi_wdata(15 downto 0); when "1100" => vx.wfifo(x.wfifo_w_ptr) := s_axi_wdata(31 downto 16) & s_axi_wdata(31 downto 16); when "1111" => vx.wfifo(x.wfifo_w_ptr) := s_axi_wdata; when others => end case; end if; -- HADDR increment case h.inc_sel is when "000" => vh.addr_incr := 1; when "001" => vh.addr_incr := 2; when others => vh.addr_incr := 4; end case; if resetn = '0' then vx.axi_w_state := w_start; vx.axi_r_state := r_start; vh.ahb_rw_state := idle; vh.rfifo := (others => (others => '0')); vx.wfifo := (others => (others => '0')); vh.hbusreq := '0'; vh.hlock := '0'; vh.hwdata := (others => '0'); vh.haddr := (others => '0'); vx.awlen := (others => '0'); vx.awburst := (others => '0'); vx.awsize := (others => '0'); vx.awaddr := (others => '0'); vx.awid := (others => '0'); vx.wready := '0'; vx.arready := '0'; vx.awready := '0'; vx.rdata := (others => '0'); vx.araddr := (others => '0'); vx.arburst := (others => '0'); vx.arlen := (others => '0'); vx.arid := (others => '0'); vx.bvalid := '0'; vx.rlast := '0'; vx.rvalid := '0'; vx.wready := '0'; vh.ahb_r_done := '0'; vx.ahb_r_en := '0'; vx.ahb_w_en := '0'; vh.hwrite := '0'; vh.hsize := (others => '0'); vh.ahb_w_done := '1'; vx.arsize := (others => '0'); vh.hburst := (others => '0'); end if; xin <= vx; hin <= vh; end process; ahbo.hconfig <= hconfig; ahbo.hindex <= hindex; ahbo.hirq <= (others => '0'); ahbo.haddr <= h.haddr; ahbo.htrans <= h.htrans; ahbo.hprot <= "0011"; ahbo.hburst <= h.hburst; ahbo.hbusreq <= h.hbusreq; ahbo.hwrite <= h.hwrite; ahbo.hwdata <= h.hwdata; ahbo.hlock <= h.hlock; ahbo.hsize <= h.hsize; s_axi_bid <= x.awid; s_axi_rid <= x.arid; s_axi_arready <= x.arready; s_axi_awready <= x.awready; s_axi_bresp <= "00"; s_axi_bvalid <= x.bvalid; s_axi_rdata <= x.rdata; s_axi_rlast <= x.rlast; s_axi_rresp <= "00"; s_axi_rvalid <= x.rvalid; s_axi_wready <= x.wready; --AXI synchronous-- axi_sync: process(axi_clk) begin if rising_edge(axi_clk) then x <= xin; end if; end process; --AHB synchronous-- ahb_sync: process(ahb_clk) begin if rising_edge(ahb_clk) then h <= hin; end if; end process; end;
------------------------------------------------------------------------------- -- Title : Testbench for design "AvalonSTToI2S" -- Project : ------------------------------------------------------------------------------- -- File : AvalonSTToI2S_tb.vhd -- Author : <fxst@FXST-PC> -- Company : -- Created : 2017-05-23 -- Last update: 2017-05-23 -- Platform : -- Standard : VHDL'93/02 ------------------------------------------------------------------------------- -- Description: ------------------------------------------------------------------------------- -- Copyright (c) 2017 ------------------------------------------------------------------------------- -- Revisions : -- Date Version Author Description -- 2017-05-23 1.0 fxst Created ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; ------------------------------------------------------------------------------- entity AvalonSTToI2S_tb is end entity AvalonSTToI2S_tb; ------------------------------------------------------------------------------- architecture Bhv of AvalonSTToI2S_tb is -- component generics constant gDataWidth : natural := 8; constant gDataWidthLen : natural := 5; -- component ports signal iClk : std_logic := '1'; signal inReset : std_logic := '0'; signal iLRC : std_logic := '0'; signal iBCLK : std_logic := '1'; signal oDAT : std_logic; signal iLeftData : std_logic_vector(gDataWidth-1 downto 0); signal iLeftValid : std_logic := '0'; signal iRightData : std_logic_vector(gDataWidth-1 downto 0); signal iRightValid : std_logic := '0'; begin -- architecture Bhv -- component instantiation DUT : entity work.AvalonSTToI2S generic map ( gDataWidth => gDataWidth, gDataWidthLen => gDataWidthLen) port map ( iClk => iClk, inReset => inReset, iLRC => iLRC, iBCLK => iBCLK, oDAT => oDAT, iLeftData => iLeftData, iLeftValid => iLeftValid, iRightData => iRightData, iRightValid => iRightValid); -- clock generation iClk <= not iClk after 10 ns; -- BCLK generation iBCLK <= not iBCLK after 10 us; -- waveform generation WaveGen_Proc : process begin -- insert signal assignments here inReset <= '1' after 10 ns; iLeftData <= "11110001" after 100 ns, "00000000" after 500 ns; iLeftValid <= '1' after 100 ns, '0' after 120 ns; iRightData <= "10001111" after 400 ns, "00000000" after 600 ns; iRightValid <= '1' after 400 ns, '0' after 420 ns; iLRC <= '0' after 0 ns, '1' after 30 us, '0' after 600 us; wait; end process WaveGen_Proc; end architecture Bhv;
--------------------------------------------------------------------------------------- -- Title : Wishbone slave core for FMC ADC 250MS/s core registers --------------------------------------------------------------------------------------- -- File : wb_fmc516_regs.vhd -- Author : auto-generated by wbgen2 from wb_fmc516_regs.wb -- Created : Thu Apr 11 13:17:24 2013 -- Standard : VHDL'87 --------------------------------------------------------------------------------------- -- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE wb_fmc516_regs.wb -- DO NOT HAND-EDIT UNLESS IT'S ABSOLUTELY NECESSARY! --------------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.fmc516_wbgen2_pkg.all; entity wb_fmc516_regs is port ( rst_n_i : in std_logic; clk_sys_i : in std_logic; wb_adr_i : in std_logic_vector(4 downto 0); wb_dat_i : in std_logic_vector(31 downto 0); wb_dat_o : out std_logic_vector(31 downto 0); wb_cyc_i : in std_logic; wb_sel_i : in std_logic_vector(3 downto 0); wb_stb_i : in std_logic; wb_we_i : in std_logic; wb_ack_o : out std_logic; wb_stall_o : out std_logic; fs_clk_i : in std_logic; regs_i : in t_fmc516_in_registers; regs_o : out t_fmc516_out_registers ); end wb_fmc516_regs; architecture syn of wb_fmc516_regs is signal fmc516_fmc_ctl_test_data_en_int : std_logic ; signal fmc516_fmc_ctl_test_data_en_sync0 : std_logic ; signal fmc516_fmc_ctl_test_data_en_sync1 : std_logic ; signal fmc516_fmc_ctl_led_0_int : std_logic ; signal fmc516_fmc_ctl_led_1_int : std_logic ; signal fmc516_fmc_ctl_clk_sel_int : std_logic ; signal fmc516_fmc_ctl_vcxo_out_en_int : std_logic ; signal fmc516_fmc_ctl_reserved_int : std_logic_vector(26 downto 0); signal fmc516_trig_cfg_hw_trig_pol_int : std_logic ; signal fmc516_trig_cfg_hw_trig_pol_sync0 : std_logic ; signal fmc516_trig_cfg_hw_trig_pol_sync1 : std_logic ; signal fmc516_trig_cfg_hw_trig_en_int : std_logic ; signal fmc516_trig_cfg_hw_trig_en_sync0 : std_logic ; signal fmc516_trig_cfg_hw_trig_en_sync1 : std_logic ; signal fmc516_trig_cfg_reserved_int : std_logic_vector(29 downto 0); signal fmc516_adc_ctl_update_clk_dly_dly0 : std_logic ; signal fmc516_adc_ctl_update_clk_dly_int : std_logic ; signal fmc516_adc_ctl_update_data_dly_dly0 : std_logic ; signal fmc516_adc_ctl_update_data_dly_int : std_logic ; signal fmc516_adc_ctl_rst_adcs_int : std_logic ; signal fmc516_adc_ctl_rst_adcs_int_delay : std_logic ; signal fmc516_adc_ctl_rst_adcs_sync0 : std_logic ; signal fmc516_adc_ctl_rst_adcs_sync1 : std_logic ; signal fmc516_adc_ctl_rst_adcs_sync2 : std_logic ; signal fmc516_adc_ctl_rst_div_adcs_int : std_logic ; signal fmc516_adc_ctl_rst_div_adcs_int_delay : std_logic ; signal fmc516_adc_ctl_rst_div_adcs_sync0 : std_logic ; signal fmc516_adc_ctl_rst_div_adcs_sync1 : std_logic ; signal fmc516_adc_ctl_rst_div_adcs_sync2 : std_logic ; signal fmc516_ch0_sta_val_int : std_logic_vector(15 downto 0); signal fmc516_ch0_sta_val_lwb : std_logic ; signal fmc516_ch0_sta_val_lwb_delay : std_logic ; signal fmc516_ch0_sta_val_lwb_in_progress : std_logic ; signal fmc516_ch0_sta_val_lwb_s0 : std_logic ; signal fmc516_ch0_sta_val_lwb_s1 : std_logic ; signal fmc516_ch0_sta_val_lwb_s2 : std_logic ; signal fmc516_ch0_fn_dly_inc_clk_chain_dly_dly0 : std_logic ; signal fmc516_ch0_fn_dly_inc_clk_chain_dly_int : std_logic ; signal fmc516_ch0_fn_dly_dec_clk_chain_dly_dly0 : std_logic ; signal fmc516_ch0_fn_dly_dec_clk_chain_dly_int : std_logic ; signal fmc516_ch0_fn_dly_reserved_clk_incdec_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch0_fn_dly_inc_data_chain_dly_dly0 : std_logic ; signal fmc516_ch0_fn_dly_inc_data_chain_dly_int : std_logic ; signal fmc516_ch0_fn_dly_dec_data_chain_dly_dly0 : std_logic ; signal fmc516_ch0_fn_dly_dec_data_chain_dly_int : std_logic ; signal fmc516_ch0_fn_dly_reserved_data_incdec_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch0_cs_dly_fe_dly_int : std_logic_vector(1 downto 0); signal fmc516_ch0_cs_dly_fe_dly_swb : std_logic ; signal fmc516_ch0_cs_dly_fe_dly_swb_delay : std_logic ; signal fmc516_ch0_cs_dly_fe_dly_swb_s0 : std_logic ; signal fmc516_ch0_cs_dly_fe_dly_swb_s1 : std_logic ; signal fmc516_ch0_cs_dly_fe_dly_swb_s2 : std_logic ; signal fmc516_ch0_cs_dly_reserved_fe_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch0_cs_dly_rg_dly_int : std_logic_vector(1 downto 0); signal fmc516_ch0_cs_dly_rg_dly_swb : std_logic ; signal fmc516_ch0_cs_dly_rg_dly_swb_delay : std_logic ; signal fmc516_ch0_cs_dly_rg_dly_swb_s0 : std_logic ; signal fmc516_ch0_cs_dly_rg_dly_swb_s1 : std_logic ; signal fmc516_ch0_cs_dly_rg_dly_swb_s2 : std_logic ; signal fmc516_ch0_cs_dly_reserved_rg_dly_int : std_logic_vector(21 downto 0); signal fmc516_ch1_sta_val_int : std_logic_vector(15 downto 0); signal fmc516_ch1_sta_val_lwb : std_logic ; signal fmc516_ch1_sta_val_lwb_delay : std_logic ; signal fmc516_ch1_sta_val_lwb_in_progress : std_logic ; signal fmc516_ch1_sta_val_lwb_s0 : std_logic ; signal fmc516_ch1_sta_val_lwb_s1 : std_logic ; signal fmc516_ch1_sta_val_lwb_s2 : std_logic ; signal fmc516_ch1_fn_dly_inc_clk_chain_dly_dly0 : std_logic ; signal fmc516_ch1_fn_dly_inc_clk_chain_dly_int : std_logic ; signal fmc516_ch1_fn_dly_dec_clk_chain_dly_dly0 : std_logic ; signal fmc516_ch1_fn_dly_dec_clk_chain_dly_int : std_logic ; signal fmc516_ch1_fn_dly_reserved_clk_incdec_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch1_fn_dly_inc_data_chain_dly_dly0 : std_logic ; signal fmc516_ch1_fn_dly_inc_data_chain_dly_int : std_logic ; signal fmc516_ch1_fn_dly_dec_data_chain_dly_dly0 : std_logic ; signal fmc516_ch1_fn_dly_dec_data_chain_dly_int : std_logic ; signal fmc516_ch1_fn_dly_reserved_data_incdec_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch1_cs_dly_fe_dly_int : std_logic_vector(1 downto 0); signal fmc516_ch1_cs_dly_fe_dly_swb : std_logic ; signal fmc516_ch1_cs_dly_fe_dly_swb_delay : std_logic ; signal fmc516_ch1_cs_dly_fe_dly_swb_s0 : std_logic ; signal fmc516_ch1_cs_dly_fe_dly_swb_s1 : std_logic ; signal fmc516_ch1_cs_dly_fe_dly_swb_s2 : std_logic ; signal fmc516_ch1_cs_dly_reserved_fe_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch1_cs_dly_rg_dly_int : std_logic_vector(1 downto 0); signal fmc516_ch1_cs_dly_rg_dly_swb : std_logic ; signal fmc516_ch1_cs_dly_rg_dly_swb_delay : std_logic ; signal fmc516_ch1_cs_dly_rg_dly_swb_s0 : std_logic ; signal fmc516_ch1_cs_dly_rg_dly_swb_s1 : std_logic ; signal fmc516_ch1_cs_dly_rg_dly_swb_s2 : std_logic ; signal fmc516_ch1_cs_dly_reserved_rg_dly_int : std_logic_vector(21 downto 0); signal fmc516_ch2_sta_val_int : std_logic_vector(15 downto 0); signal fmc516_ch2_sta_val_lwb : std_logic ; signal fmc516_ch2_sta_val_lwb_delay : std_logic ; signal fmc516_ch2_sta_val_lwb_in_progress : std_logic ; signal fmc516_ch2_sta_val_lwb_s0 : std_logic ; signal fmc516_ch2_sta_val_lwb_s1 : std_logic ; signal fmc516_ch2_sta_val_lwb_s2 : std_logic ; signal fmc516_ch2_fn_dly_inc_clk_chain_dly_dly0 : std_logic ; signal fmc516_ch2_fn_dly_inc_clk_chain_dly_int : std_logic ; signal fmc516_ch2_fn_dly_dec_clk_chain_dly_dly0 : std_logic ; signal fmc516_ch2_fn_dly_dec_clk_chain_dly_int : std_logic ; signal fmc516_ch2_fn_dly_reserved_clk_incdec_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch2_fn_dly_inc_data_chain_dly_dly0 : std_logic ; signal fmc516_ch2_fn_dly_inc_data_chain_dly_int : std_logic ; signal fmc516_ch2_fn_dly_dec_data_chain_dly_dly0 : std_logic ; signal fmc516_ch2_fn_dly_dec_data_chain_dly_int : std_logic ; signal fmc516_ch2_fn_dly_reserved_data_incdec_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch2_cs_dly_fe_dly_int : std_logic_vector(1 downto 0); signal fmc516_ch2_cs_dly_fe_dly_swb : std_logic ; signal fmc516_ch2_cs_dly_fe_dly_swb_delay : std_logic ; signal fmc516_ch2_cs_dly_fe_dly_swb_s0 : std_logic ; signal fmc516_ch2_cs_dly_fe_dly_swb_s1 : std_logic ; signal fmc516_ch2_cs_dly_fe_dly_swb_s2 : std_logic ; signal fmc516_ch2_cs_dly_reserved_fe_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch2_cs_dly_rg_dly_int : std_logic_vector(1 downto 0); signal fmc516_ch2_cs_dly_rg_dly_swb : std_logic ; signal fmc516_ch2_cs_dly_rg_dly_swb_delay : std_logic ; signal fmc516_ch2_cs_dly_rg_dly_swb_s0 : std_logic ; signal fmc516_ch2_cs_dly_rg_dly_swb_s1 : std_logic ; signal fmc516_ch2_cs_dly_rg_dly_swb_s2 : std_logic ; signal fmc516_ch2_cs_dly_reserved_rg_dly_int : std_logic_vector(21 downto 0); signal fmc516_ch3_sta_val_int : std_logic_vector(15 downto 0); signal fmc516_ch3_sta_val_lwb : std_logic ; signal fmc516_ch3_sta_val_lwb_delay : std_logic ; signal fmc516_ch3_sta_val_lwb_in_progress : std_logic ; signal fmc516_ch3_sta_val_lwb_s0 : std_logic ; signal fmc516_ch3_sta_val_lwb_s1 : std_logic ; signal fmc516_ch3_sta_val_lwb_s2 : std_logic ; signal fmc516_ch3_fn_dly_inc_clk_chain_dly_dly0 : std_logic ; signal fmc516_ch3_fn_dly_inc_clk_chain_dly_int : std_logic ; signal fmc516_ch3_fn_dly_dec_clk_chain_dly_dly0 : std_logic ; signal fmc516_ch3_fn_dly_dec_clk_chain_dly_int : std_logic ; signal fmc516_ch3_fn_dly_reserved_clk_incdec_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch3_fn_dly_inc_data_chain_dly_dly0 : std_logic ; signal fmc516_ch3_fn_dly_inc_data_chain_dly_int : std_logic ; signal fmc516_ch3_fn_dly_dec_data_chain_dly_dly0 : std_logic ; signal fmc516_ch3_fn_dly_dec_data_chain_dly_int : std_logic ; signal fmc516_ch3_fn_dly_reserved_data_incdec_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch3_cs_dly_fe_dly_int : std_logic_vector(1 downto 0); signal fmc516_ch3_cs_dly_fe_dly_swb : std_logic ; signal fmc516_ch3_cs_dly_fe_dly_swb_delay : std_logic ; signal fmc516_ch3_cs_dly_fe_dly_swb_s0 : std_logic ; signal fmc516_ch3_cs_dly_fe_dly_swb_s1 : std_logic ; signal fmc516_ch3_cs_dly_fe_dly_swb_s2 : std_logic ; signal fmc516_ch3_cs_dly_reserved_fe_dly_int : std_logic_vector(5 downto 0); signal fmc516_ch3_cs_dly_rg_dly_int : std_logic_vector(1 downto 0); signal fmc516_ch3_cs_dly_rg_dly_swb : std_logic ; signal fmc516_ch3_cs_dly_rg_dly_swb_delay : std_logic ; signal fmc516_ch3_cs_dly_rg_dly_swb_s0 : std_logic ; signal fmc516_ch3_cs_dly_rg_dly_swb_s1 : std_logic ; signal fmc516_ch3_cs_dly_rg_dly_swb_s2 : std_logic ; signal fmc516_ch3_cs_dly_reserved_rg_dly_int : std_logic_vector(21 downto 0); signal ack_sreg : std_logic_vector(9 downto 0); signal rddata_reg : std_logic_vector(31 downto 0); signal wrdata_reg : std_logic_vector(31 downto 0); signal bwsel_reg : std_logic_vector(3 downto 0); signal rwaddr_reg : std_logic_vector(4 downto 0); signal ack_in_progress : std_logic ; signal wr_int : std_logic ; signal rd_int : std_logic ; signal allones : std_logic_vector(31 downto 0); signal allzeros : std_logic_vector(31 downto 0); begin -- Some internal signals assignments. For (foreseen) compatibility with other bus standards. wrdata_reg <= wb_dat_i; bwsel_reg <= wb_sel_i; rd_int <= wb_cyc_i and (wb_stb_i and (not wb_we_i)); wr_int <= wb_cyc_i and (wb_stb_i and wb_we_i); allones <= (others => '1'); allzeros <= (others => '0'); -- -- Main register bank access process. process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then ack_sreg <= "0000000000"; ack_in_progress <= '0'; rddata_reg <= "00000000000000000000000000000000"; fmc516_fmc_ctl_test_data_en_int <= '0'; fmc516_fmc_ctl_led_0_int <= '0'; fmc516_fmc_ctl_led_1_int <= '0'; fmc516_fmc_ctl_clk_sel_int <= '0'; fmc516_fmc_ctl_vcxo_out_en_int <= '0'; fmc516_fmc_ctl_reserved_int <= "000000000000000000000000000"; fmc516_trig_cfg_hw_trig_pol_int <= '0'; fmc516_trig_cfg_hw_trig_en_int <= '0'; fmc516_trig_cfg_reserved_int <= "000000000000000000000000000000"; fmc516_adc_ctl_update_clk_dly_int <= '0'; fmc516_adc_ctl_update_data_dly_int <= '0'; fmc516_adc_ctl_rst_adcs_int <= '0'; fmc516_adc_ctl_rst_adcs_int_delay <= '0'; fmc516_adc_ctl_rst_div_adcs_int <= '0'; fmc516_adc_ctl_rst_div_adcs_int_delay <= '0'; fmc516_ch0_sta_val_lwb <= '0'; fmc516_ch0_sta_val_lwb_delay <= '0'; fmc516_ch0_sta_val_lwb_in_progress <= '0'; regs_o.ch0_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch0_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch0_fn_dly_inc_clk_chain_dly_int <= '0'; fmc516_ch0_fn_dly_dec_clk_chain_dly_int <= '0'; fmc516_ch0_fn_dly_reserved_clk_incdec_dly_int <= "000000"; fmc516_ch0_fn_dly_inc_data_chain_dly_int <= '0'; fmc516_ch0_fn_dly_dec_data_chain_dly_int <= '0'; fmc516_ch0_fn_dly_reserved_data_incdec_dly_int <= "000000"; fmc516_ch0_cs_dly_fe_dly_int <= "00"; fmc516_ch0_cs_dly_fe_dly_swb <= '0'; fmc516_ch0_cs_dly_fe_dly_swb_delay <= '0'; fmc516_ch0_cs_dly_reserved_fe_dly_int <= "000000"; fmc516_ch0_cs_dly_rg_dly_int <= "00"; fmc516_ch0_cs_dly_rg_dly_swb <= '0'; fmc516_ch0_cs_dly_rg_dly_swb_delay <= '0'; fmc516_ch0_cs_dly_reserved_rg_dly_int <= "0000000000000000000000"; fmc516_ch1_sta_val_lwb <= '0'; fmc516_ch1_sta_val_lwb_delay <= '0'; fmc516_ch1_sta_val_lwb_in_progress <= '0'; regs_o.ch1_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch1_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch1_fn_dly_inc_clk_chain_dly_int <= '0'; fmc516_ch1_fn_dly_dec_clk_chain_dly_int <= '0'; fmc516_ch1_fn_dly_reserved_clk_incdec_dly_int <= "000000"; fmc516_ch1_fn_dly_inc_data_chain_dly_int <= '0'; fmc516_ch1_fn_dly_dec_data_chain_dly_int <= '0'; fmc516_ch1_fn_dly_reserved_data_incdec_dly_int <= "000000"; fmc516_ch1_cs_dly_fe_dly_int <= "00"; fmc516_ch1_cs_dly_fe_dly_swb <= '0'; fmc516_ch1_cs_dly_fe_dly_swb_delay <= '0'; fmc516_ch1_cs_dly_reserved_fe_dly_int <= "000000"; fmc516_ch1_cs_dly_rg_dly_int <= "00"; fmc516_ch1_cs_dly_rg_dly_swb <= '0'; fmc516_ch1_cs_dly_rg_dly_swb_delay <= '0'; fmc516_ch1_cs_dly_reserved_rg_dly_int <= "0000000000000000000000"; fmc516_ch2_sta_val_lwb <= '0'; fmc516_ch2_sta_val_lwb_delay <= '0'; fmc516_ch2_sta_val_lwb_in_progress <= '0'; regs_o.ch2_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch2_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch2_fn_dly_inc_clk_chain_dly_int <= '0'; fmc516_ch2_fn_dly_dec_clk_chain_dly_int <= '0'; fmc516_ch2_fn_dly_reserved_clk_incdec_dly_int <= "000000"; fmc516_ch2_fn_dly_inc_data_chain_dly_int <= '0'; fmc516_ch2_fn_dly_dec_data_chain_dly_int <= '0'; fmc516_ch2_fn_dly_reserved_data_incdec_dly_int <= "000000"; fmc516_ch2_cs_dly_fe_dly_int <= "00"; fmc516_ch2_cs_dly_fe_dly_swb <= '0'; fmc516_ch2_cs_dly_fe_dly_swb_delay <= '0'; fmc516_ch2_cs_dly_reserved_fe_dly_int <= "000000"; fmc516_ch2_cs_dly_rg_dly_int <= "00"; fmc516_ch2_cs_dly_rg_dly_swb <= '0'; fmc516_ch2_cs_dly_rg_dly_swb_delay <= '0'; fmc516_ch2_cs_dly_reserved_rg_dly_int <= "0000000000000000000000"; fmc516_ch3_sta_val_lwb <= '0'; fmc516_ch3_sta_val_lwb_delay <= '0'; fmc516_ch3_sta_val_lwb_in_progress <= '0'; regs_o.ch3_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch3_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch3_fn_dly_inc_clk_chain_dly_int <= '0'; fmc516_ch3_fn_dly_dec_clk_chain_dly_int <= '0'; fmc516_ch3_fn_dly_reserved_clk_incdec_dly_int <= "000000"; fmc516_ch3_fn_dly_inc_data_chain_dly_int <= '0'; fmc516_ch3_fn_dly_dec_data_chain_dly_int <= '0'; fmc516_ch3_fn_dly_reserved_data_incdec_dly_int <= "000000"; fmc516_ch3_cs_dly_fe_dly_int <= "00"; fmc516_ch3_cs_dly_fe_dly_swb <= '0'; fmc516_ch3_cs_dly_fe_dly_swb_delay <= '0'; fmc516_ch3_cs_dly_reserved_fe_dly_int <= "000000"; fmc516_ch3_cs_dly_rg_dly_int <= "00"; fmc516_ch3_cs_dly_rg_dly_swb <= '0'; fmc516_ch3_cs_dly_rg_dly_swb_delay <= '0'; fmc516_ch3_cs_dly_reserved_rg_dly_int <= "0000000000000000000000"; elsif rising_edge(clk_sys_i) then -- advance the ACK generator shift register ack_sreg(8 downto 0) <= ack_sreg(9 downto 1); ack_sreg(9) <= '0'; if (ack_in_progress = '1') then if (ack_sreg(0) = '1') then fmc516_adc_ctl_update_clk_dly_int <= '0'; fmc516_adc_ctl_update_data_dly_int <= '0'; regs_o.ch0_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch0_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch0_fn_dly_inc_clk_chain_dly_int <= '0'; fmc516_ch0_fn_dly_dec_clk_chain_dly_int <= '0'; fmc516_ch0_fn_dly_inc_data_chain_dly_int <= '0'; fmc516_ch0_fn_dly_dec_data_chain_dly_int <= '0'; regs_o.ch1_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch1_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch1_fn_dly_inc_clk_chain_dly_int <= '0'; fmc516_ch1_fn_dly_dec_clk_chain_dly_int <= '0'; fmc516_ch1_fn_dly_inc_data_chain_dly_int <= '0'; fmc516_ch1_fn_dly_dec_data_chain_dly_int <= '0'; regs_o.ch2_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch2_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch2_fn_dly_inc_clk_chain_dly_int <= '0'; fmc516_ch2_fn_dly_dec_clk_chain_dly_int <= '0'; fmc516_ch2_fn_dly_inc_data_chain_dly_int <= '0'; fmc516_ch2_fn_dly_dec_data_chain_dly_int <= '0'; regs_o.ch3_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch3_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch3_fn_dly_inc_clk_chain_dly_int <= '0'; fmc516_ch3_fn_dly_dec_clk_chain_dly_int <= '0'; fmc516_ch3_fn_dly_inc_data_chain_dly_int <= '0'; fmc516_ch3_fn_dly_dec_data_chain_dly_int <= '0'; ack_in_progress <= '0'; else fmc516_adc_ctl_rst_adcs_int <= fmc516_adc_ctl_rst_adcs_int_delay; fmc516_adc_ctl_rst_adcs_int_delay <= '0'; fmc516_adc_ctl_rst_div_adcs_int <= fmc516_adc_ctl_rst_div_adcs_int_delay; fmc516_adc_ctl_rst_div_adcs_int_delay <= '0'; fmc516_ch0_sta_val_lwb <= fmc516_ch0_sta_val_lwb_delay; fmc516_ch0_sta_val_lwb_delay <= '0'; if ((ack_sreg(1) = '1') and (fmc516_ch0_sta_val_lwb_in_progress = '1')) then rddata_reg(15 downto 0) <= fmc516_ch0_sta_val_int; fmc516_ch0_sta_val_lwb_in_progress <= '0'; end if; regs_o.ch0_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch0_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch0_cs_dly_fe_dly_swb <= fmc516_ch0_cs_dly_fe_dly_swb_delay; fmc516_ch0_cs_dly_fe_dly_swb_delay <= '0'; fmc516_ch0_cs_dly_rg_dly_swb <= fmc516_ch0_cs_dly_rg_dly_swb_delay; fmc516_ch0_cs_dly_rg_dly_swb_delay <= '0'; fmc516_ch1_sta_val_lwb <= fmc516_ch1_sta_val_lwb_delay; fmc516_ch1_sta_val_lwb_delay <= '0'; if ((ack_sreg(1) = '1') and (fmc516_ch1_sta_val_lwb_in_progress = '1')) then rddata_reg(15 downto 0) <= fmc516_ch1_sta_val_int; fmc516_ch1_sta_val_lwb_in_progress <= '0'; end if; regs_o.ch1_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch1_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch1_cs_dly_fe_dly_swb <= fmc516_ch1_cs_dly_fe_dly_swb_delay; fmc516_ch1_cs_dly_fe_dly_swb_delay <= '0'; fmc516_ch1_cs_dly_rg_dly_swb <= fmc516_ch1_cs_dly_rg_dly_swb_delay; fmc516_ch1_cs_dly_rg_dly_swb_delay <= '0'; fmc516_ch2_sta_val_lwb <= fmc516_ch2_sta_val_lwb_delay; fmc516_ch2_sta_val_lwb_delay <= '0'; if ((ack_sreg(1) = '1') and (fmc516_ch2_sta_val_lwb_in_progress = '1')) then rddata_reg(15 downto 0) <= fmc516_ch2_sta_val_int; fmc516_ch2_sta_val_lwb_in_progress <= '0'; end if; regs_o.ch2_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch2_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch2_cs_dly_fe_dly_swb <= fmc516_ch2_cs_dly_fe_dly_swb_delay; fmc516_ch2_cs_dly_fe_dly_swb_delay <= '0'; fmc516_ch2_cs_dly_rg_dly_swb <= fmc516_ch2_cs_dly_rg_dly_swb_delay; fmc516_ch2_cs_dly_rg_dly_swb_delay <= '0'; fmc516_ch3_sta_val_lwb <= fmc516_ch3_sta_val_lwb_delay; fmc516_ch3_sta_val_lwb_delay <= '0'; if ((ack_sreg(1) = '1') and (fmc516_ch3_sta_val_lwb_in_progress = '1')) then rddata_reg(15 downto 0) <= fmc516_ch3_sta_val_int; fmc516_ch3_sta_val_lwb_in_progress <= '0'; end if; regs_o.ch3_fn_dly_clk_chain_dly_load_o <= '0'; regs_o.ch3_fn_dly_data_chain_dly_load_o <= '0'; fmc516_ch3_cs_dly_fe_dly_swb <= fmc516_ch3_cs_dly_fe_dly_swb_delay; fmc516_ch3_cs_dly_fe_dly_swb_delay <= '0'; fmc516_ch3_cs_dly_rg_dly_swb <= fmc516_ch3_cs_dly_rg_dly_swb_delay; fmc516_ch3_cs_dly_rg_dly_swb_delay <= '0'; end if; else if ((wb_cyc_i = '1') and (wb_stb_i = '1')) then case rwaddr_reg(4 downto 0) is when "00000" => if (wb_we_i = '1') then end if; rddata_reg(0) <= regs_i.fmc_sta_lmk_locked_i; rddata_reg(1) <= regs_i.fmc_sta_mmcm_locked_i; rddata_reg(2) <= regs_i.fmc_sta_pwr_good_i; rddata_reg(3) <= regs_i.fmc_sta_prst_i; rddata_reg(31 downto 4) <= regs_i.fmc_sta_reserved_i; ack_sreg(0) <= '1'; ack_in_progress <= '1'; when "00001" => if (wb_we_i = '1') then fmc516_fmc_ctl_test_data_en_int <= wrdata_reg(0); fmc516_fmc_ctl_led_0_int <= wrdata_reg(1); fmc516_fmc_ctl_led_1_int <= wrdata_reg(2); fmc516_fmc_ctl_clk_sel_int <= wrdata_reg(3); fmc516_fmc_ctl_vcxo_out_en_int <= wrdata_reg(4); fmc516_fmc_ctl_reserved_int <= wrdata_reg(31 downto 5); end if; rddata_reg(0) <= fmc516_fmc_ctl_test_data_en_int; rddata_reg(1) <= fmc516_fmc_ctl_led_0_int; rddata_reg(2) <= fmc516_fmc_ctl_led_1_int; rddata_reg(3) <= fmc516_fmc_ctl_clk_sel_int; rddata_reg(4) <= fmc516_fmc_ctl_vcxo_out_en_int; rddata_reg(31 downto 5) <= fmc516_fmc_ctl_reserved_int; ack_sreg(3) <= '1'; ack_in_progress <= '1'; when "00010" => if (wb_we_i = '1') then fmc516_trig_cfg_hw_trig_pol_int <= wrdata_reg(0); fmc516_trig_cfg_hw_trig_en_int <= wrdata_reg(1); fmc516_trig_cfg_reserved_int <= wrdata_reg(31 downto 2); end if; rddata_reg(0) <= fmc516_trig_cfg_hw_trig_pol_int; rddata_reg(1) <= fmc516_trig_cfg_hw_trig_en_int; rddata_reg(31 downto 2) <= fmc516_trig_cfg_reserved_int; ack_sreg(3) <= '1'; ack_in_progress <= '1'; when "00011" => if (wb_we_i = '1') then end if; rddata_reg(3 downto 0) <= regs_i.adc_sta_clk_chains_i; rddata_reg(7 downto 4) <= regs_i.adc_sta_reserved_clk_chains_i; rddata_reg(11 downto 8) <= regs_i.adc_sta_data_chains_i; rddata_reg(15 downto 12) <= regs_i.adc_sta_reserved_data_chains_i; rddata_reg(31 downto 16) <= regs_i.adc_sta_adc_pkt_size_i; ack_sreg(0) <= '1'; ack_in_progress <= '1'; when "00100" => if (wb_we_i = '1') then fmc516_adc_ctl_update_clk_dly_int <= wrdata_reg(0); fmc516_adc_ctl_update_data_dly_int <= wrdata_reg(1); fmc516_adc_ctl_rst_adcs_int <= wrdata_reg(2); fmc516_adc_ctl_rst_adcs_int_delay <= wrdata_reg(2); fmc516_adc_ctl_rst_div_adcs_int <= wrdata_reg(3); fmc516_adc_ctl_rst_div_adcs_int_delay <= wrdata_reg(3); end if; rddata_reg(0) <= '0'; rddata_reg(1) <= '0'; rddata_reg(2) <= '0'; rddata_reg(3) <= '0'; rddata_reg(31 downto 4) <= regs_i.adc_ctl_reserved_i; ack_sreg(4) <= '1'; ack_in_progress <= '1'; when "00101" => if (wb_we_i = '1') then end if; if (wb_we_i = '0') then fmc516_ch0_sta_val_lwb <= '1'; fmc516_ch0_sta_val_lwb_delay <= '1'; fmc516_ch0_sta_val_lwb_in_progress <= '1'; end if; rddata_reg(31 downto 16) <= regs_i.ch0_sta_reserved_i; ack_sreg(5) <= '1'; ack_in_progress <= '1'; when "00110" => if (wb_we_i = '1') then regs_o.ch0_fn_dly_clk_chain_dly_load_o <= '1'; regs_o.ch0_fn_dly_data_chain_dly_load_o <= '1'; fmc516_ch0_fn_dly_inc_clk_chain_dly_int <= wrdata_reg(16); fmc516_ch0_fn_dly_dec_clk_chain_dly_int <= wrdata_reg(17); fmc516_ch0_fn_dly_reserved_clk_incdec_dly_int <= wrdata_reg(23 downto 18); fmc516_ch0_fn_dly_inc_data_chain_dly_int <= wrdata_reg(24); fmc516_ch0_fn_dly_dec_data_chain_dly_int <= wrdata_reg(25); fmc516_ch0_fn_dly_reserved_data_incdec_dly_int <= wrdata_reg(31 downto 26); end if; rddata_reg(4 downto 0) <= regs_i.ch0_fn_dly_clk_chain_dly_i; rddata_reg(7 downto 5) <= regs_i.ch0_fn_dly_reserved_clk_chain_dly_i; rddata_reg(12 downto 8) <= regs_i.ch0_fn_dly_data_chain_dly_i; rddata_reg(15 downto 13) <= regs_i.ch0_fn_dly_reserved_data_chain_dly_i; rddata_reg(16) <= '0'; rddata_reg(17) <= '0'; rddata_reg(23 downto 18) <= fmc516_ch0_fn_dly_reserved_clk_incdec_dly_int; rddata_reg(24) <= '0'; rddata_reg(25) <= '0'; rddata_reg(31 downto 26) <= fmc516_ch0_fn_dly_reserved_data_incdec_dly_int; ack_sreg(2) <= '1'; ack_in_progress <= '1'; when "00111" => if (wb_we_i = '1') then fmc516_ch0_cs_dly_fe_dly_int <= wrdata_reg(1 downto 0); fmc516_ch0_cs_dly_fe_dly_swb <= '1'; fmc516_ch0_cs_dly_fe_dly_swb_delay <= '1'; fmc516_ch0_cs_dly_reserved_fe_dly_int <= wrdata_reg(7 downto 2); fmc516_ch0_cs_dly_rg_dly_int <= wrdata_reg(9 downto 8); fmc516_ch0_cs_dly_rg_dly_swb <= '1'; fmc516_ch0_cs_dly_rg_dly_swb_delay <= '1'; fmc516_ch0_cs_dly_reserved_rg_dly_int <= wrdata_reg(31 downto 10); end if; rddata_reg(1 downto 0) <= fmc516_ch0_cs_dly_fe_dly_int; rddata_reg(7 downto 2) <= fmc516_ch0_cs_dly_reserved_fe_dly_int; rddata_reg(9 downto 8) <= fmc516_ch0_cs_dly_rg_dly_int; rddata_reg(31 downto 10) <= fmc516_ch0_cs_dly_reserved_rg_dly_int; ack_sreg(3) <= '1'; ack_in_progress <= '1'; when "01000" => if (wb_we_i = '1') then end if; if (wb_we_i = '0') then fmc516_ch1_sta_val_lwb <= '1'; fmc516_ch1_sta_val_lwb_delay <= '1'; fmc516_ch1_sta_val_lwb_in_progress <= '1'; end if; rddata_reg(31 downto 16) <= regs_i.ch1_sta_reserved_i; ack_sreg(5) <= '1'; ack_in_progress <= '1'; when "01001" => if (wb_we_i = '1') then regs_o.ch1_fn_dly_clk_chain_dly_load_o <= '1'; regs_o.ch1_fn_dly_data_chain_dly_load_o <= '1'; fmc516_ch1_fn_dly_inc_clk_chain_dly_int <= wrdata_reg(16); fmc516_ch1_fn_dly_dec_clk_chain_dly_int <= wrdata_reg(17); fmc516_ch1_fn_dly_reserved_clk_incdec_dly_int <= wrdata_reg(23 downto 18); fmc516_ch1_fn_dly_inc_data_chain_dly_int <= wrdata_reg(24); fmc516_ch1_fn_dly_dec_data_chain_dly_int <= wrdata_reg(25); fmc516_ch1_fn_dly_reserved_data_incdec_dly_int <= wrdata_reg(31 downto 26); end if; rddata_reg(4 downto 0) <= regs_i.ch1_fn_dly_clk_chain_dly_i; rddata_reg(7 downto 5) <= regs_i.ch1_fn_dly_reserved_clk_chain_dly_i; rddata_reg(12 downto 8) <= regs_i.ch1_fn_dly_data_chain_dly_i; rddata_reg(15 downto 13) <= regs_i.ch1_fn_dly_reserved_data_chain_dly_i; rddata_reg(16) <= '0'; rddata_reg(17) <= '0'; rddata_reg(23 downto 18) <= fmc516_ch1_fn_dly_reserved_clk_incdec_dly_int; rddata_reg(24) <= '0'; rddata_reg(25) <= '0'; rddata_reg(31 downto 26) <= fmc516_ch1_fn_dly_reserved_data_incdec_dly_int; ack_sreg(2) <= '1'; ack_in_progress <= '1'; when "01010" => if (wb_we_i = '1') then fmc516_ch1_cs_dly_fe_dly_int <= wrdata_reg(1 downto 0); fmc516_ch1_cs_dly_fe_dly_swb <= '1'; fmc516_ch1_cs_dly_fe_dly_swb_delay <= '1'; fmc516_ch1_cs_dly_reserved_fe_dly_int <= wrdata_reg(7 downto 2); fmc516_ch1_cs_dly_rg_dly_int <= wrdata_reg(9 downto 8); fmc516_ch1_cs_dly_rg_dly_swb <= '1'; fmc516_ch1_cs_dly_rg_dly_swb_delay <= '1'; fmc516_ch1_cs_dly_reserved_rg_dly_int <= wrdata_reg(31 downto 10); end if; rddata_reg(1 downto 0) <= fmc516_ch1_cs_dly_fe_dly_int; rddata_reg(7 downto 2) <= fmc516_ch1_cs_dly_reserved_fe_dly_int; rddata_reg(9 downto 8) <= fmc516_ch1_cs_dly_rg_dly_int; rddata_reg(31 downto 10) <= fmc516_ch1_cs_dly_reserved_rg_dly_int; ack_sreg(3) <= '1'; ack_in_progress <= '1'; when "01011" => if (wb_we_i = '1') then end if; if (wb_we_i = '0') then fmc516_ch2_sta_val_lwb <= '1'; fmc516_ch2_sta_val_lwb_delay <= '1'; fmc516_ch2_sta_val_lwb_in_progress <= '1'; end if; rddata_reg(31 downto 16) <= regs_i.ch2_sta_reserved_i; ack_sreg(5) <= '1'; ack_in_progress <= '1'; when "01100" => if (wb_we_i = '1') then regs_o.ch2_fn_dly_clk_chain_dly_load_o <= '1'; regs_o.ch2_fn_dly_data_chain_dly_load_o <= '1'; fmc516_ch2_fn_dly_inc_clk_chain_dly_int <= wrdata_reg(16); fmc516_ch2_fn_dly_dec_clk_chain_dly_int <= wrdata_reg(17); fmc516_ch2_fn_dly_reserved_clk_incdec_dly_int <= wrdata_reg(23 downto 18); fmc516_ch2_fn_dly_inc_data_chain_dly_int <= wrdata_reg(24); fmc516_ch2_fn_dly_dec_data_chain_dly_int <= wrdata_reg(25); fmc516_ch2_fn_dly_reserved_data_incdec_dly_int <= wrdata_reg(31 downto 26); end if; rddata_reg(4 downto 0) <= regs_i.ch2_fn_dly_clk_chain_dly_i; rddata_reg(7 downto 5) <= regs_i.ch2_fn_dly_reserved_clk_chain_dly_i; rddata_reg(12 downto 8) <= regs_i.ch2_fn_dly_data_chain_dly_i; rddata_reg(15 downto 13) <= regs_i.ch2_fn_dly_reserved_data_chain_dly_i; rddata_reg(16) <= '0'; rddata_reg(17) <= '0'; rddata_reg(23 downto 18) <= fmc516_ch2_fn_dly_reserved_clk_incdec_dly_int; rddata_reg(24) <= '0'; rddata_reg(25) <= '0'; rddata_reg(31 downto 26) <= fmc516_ch2_fn_dly_reserved_data_incdec_dly_int; ack_sreg(2) <= '1'; ack_in_progress <= '1'; when "01101" => if (wb_we_i = '1') then fmc516_ch2_cs_dly_fe_dly_int <= wrdata_reg(1 downto 0); fmc516_ch2_cs_dly_fe_dly_swb <= '1'; fmc516_ch2_cs_dly_fe_dly_swb_delay <= '1'; fmc516_ch2_cs_dly_reserved_fe_dly_int <= wrdata_reg(7 downto 2); fmc516_ch2_cs_dly_rg_dly_int <= wrdata_reg(9 downto 8); fmc516_ch2_cs_dly_rg_dly_swb <= '1'; fmc516_ch2_cs_dly_rg_dly_swb_delay <= '1'; fmc516_ch2_cs_dly_reserved_rg_dly_int <= wrdata_reg(31 downto 10); end if; rddata_reg(1 downto 0) <= fmc516_ch2_cs_dly_fe_dly_int; rddata_reg(7 downto 2) <= fmc516_ch2_cs_dly_reserved_fe_dly_int; rddata_reg(9 downto 8) <= fmc516_ch2_cs_dly_rg_dly_int; rddata_reg(31 downto 10) <= fmc516_ch2_cs_dly_reserved_rg_dly_int; ack_sreg(3) <= '1'; ack_in_progress <= '1'; when "01110" => if (wb_we_i = '1') then end if; if (wb_we_i = '0') then fmc516_ch3_sta_val_lwb <= '1'; fmc516_ch3_sta_val_lwb_delay <= '1'; fmc516_ch3_sta_val_lwb_in_progress <= '1'; end if; rddata_reg(31 downto 16) <= regs_i.ch3_sta_reserved_i; ack_sreg(5) <= '1'; ack_in_progress <= '1'; when "01111" => if (wb_we_i = '1') then regs_o.ch3_fn_dly_clk_chain_dly_load_o <= '1'; regs_o.ch3_fn_dly_data_chain_dly_load_o <= '1'; fmc516_ch3_fn_dly_inc_clk_chain_dly_int <= wrdata_reg(16); fmc516_ch3_fn_dly_dec_clk_chain_dly_int <= wrdata_reg(17); fmc516_ch3_fn_dly_reserved_clk_incdec_dly_int <= wrdata_reg(23 downto 18); fmc516_ch3_fn_dly_inc_data_chain_dly_int <= wrdata_reg(24); fmc516_ch3_fn_dly_dec_data_chain_dly_int <= wrdata_reg(25); fmc516_ch3_fn_dly_reserved_data_incdec_dly_int <= wrdata_reg(31 downto 26); end if; rddata_reg(4 downto 0) <= regs_i.ch3_fn_dly_clk_chain_dly_i; rddata_reg(7 downto 5) <= regs_i.ch3_fn_dly_reserved_clk_chain_dly_i; rddata_reg(12 downto 8) <= regs_i.ch3_fn_dly_data_chain_dly_i; rddata_reg(15 downto 13) <= regs_i.ch3_fn_dly_reserved_data_chain_dly_i; rddata_reg(16) <= '0'; rddata_reg(17) <= '0'; rddata_reg(23 downto 18) <= fmc516_ch3_fn_dly_reserved_clk_incdec_dly_int; rddata_reg(24) <= '0'; rddata_reg(25) <= '0'; rddata_reg(31 downto 26) <= fmc516_ch3_fn_dly_reserved_data_incdec_dly_int; ack_sreg(2) <= '1'; ack_in_progress <= '1'; when "10000" => if (wb_we_i = '1') then fmc516_ch3_cs_dly_fe_dly_int <= wrdata_reg(1 downto 0); fmc516_ch3_cs_dly_fe_dly_swb <= '1'; fmc516_ch3_cs_dly_fe_dly_swb_delay <= '1'; fmc516_ch3_cs_dly_reserved_fe_dly_int <= wrdata_reg(7 downto 2); fmc516_ch3_cs_dly_rg_dly_int <= wrdata_reg(9 downto 8); fmc516_ch3_cs_dly_rg_dly_swb <= '1'; fmc516_ch3_cs_dly_rg_dly_swb_delay <= '1'; fmc516_ch3_cs_dly_reserved_rg_dly_int <= wrdata_reg(31 downto 10); end if; rddata_reg(1 downto 0) <= fmc516_ch3_cs_dly_fe_dly_int; rddata_reg(7 downto 2) <= fmc516_ch3_cs_dly_reserved_fe_dly_int; rddata_reg(9 downto 8) <= fmc516_ch3_cs_dly_rg_dly_int; rddata_reg(31 downto 10) <= fmc516_ch3_cs_dly_reserved_rg_dly_int; ack_sreg(3) <= '1'; ack_in_progress <= '1'; when others => -- prevent the slave from hanging the bus on invalid address ack_in_progress <= '1'; ack_sreg(0) <= '1'; end case; end if; end if; end if; end process; -- Drive the data output bus wb_dat_o <= rddata_reg; -- LMK (Clock Distribution CI) locked status -- MMCM locked status -- FMC power good status -- FMC board present status -- Reserved -- Enable test data -- synchronizer chain for field : Enable test data (type RW/RO, clk_sys_i <-> fs_clk_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then regs_o.fmc_ctl_test_data_en_o <= '0'; fmc516_fmc_ctl_test_data_en_sync0 <= '0'; fmc516_fmc_ctl_test_data_en_sync1 <= '0'; elsif rising_edge(fs_clk_i) then fmc516_fmc_ctl_test_data_en_sync0 <= fmc516_fmc_ctl_test_data_en_int; fmc516_fmc_ctl_test_data_en_sync1 <= fmc516_fmc_ctl_test_data_en_sync0; regs_o.fmc_ctl_test_data_en_o <= fmc516_fmc_ctl_test_data_en_sync1; end if; end process; -- Manual LED 0 regs_o.fmc_ctl_led_0_o <= fmc516_fmc_ctl_led_0_int; -- Manual LED 1 regs_o.fmc_ctl_led_1_o <= fmc516_fmc_ctl_led_1_int; -- Internal/External clock distribution selection regs_o.fmc_ctl_clk_sel_o <= fmc516_fmc_ctl_clk_sel_int; -- VCXO Ouput enable selection regs_o.fmc_ctl_vcxo_out_en_o <= fmc516_fmc_ctl_vcxo_out_en_int; -- Reserved regs_o.fmc_ctl_reserved_o <= fmc516_fmc_ctl_reserved_int; -- Hardware trigger polarity -- synchronizer chain for field : Hardware trigger polarity (type RW/RO, clk_sys_i <-> fs_clk_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then regs_o.trig_cfg_hw_trig_pol_o <= '0'; fmc516_trig_cfg_hw_trig_pol_sync0 <= '0'; fmc516_trig_cfg_hw_trig_pol_sync1 <= '0'; elsif rising_edge(fs_clk_i) then fmc516_trig_cfg_hw_trig_pol_sync0 <= fmc516_trig_cfg_hw_trig_pol_int; fmc516_trig_cfg_hw_trig_pol_sync1 <= fmc516_trig_cfg_hw_trig_pol_sync0; regs_o.trig_cfg_hw_trig_pol_o <= fmc516_trig_cfg_hw_trig_pol_sync1; end if; end process; -- Hardware trigger enable -- synchronizer chain for field : Hardware trigger enable (type RW/RO, clk_sys_i <-> fs_clk_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then regs_o.trig_cfg_hw_trig_en_o <= '0'; fmc516_trig_cfg_hw_trig_en_sync0 <= '0'; fmc516_trig_cfg_hw_trig_en_sync1 <= '0'; elsif rising_edge(fs_clk_i) then fmc516_trig_cfg_hw_trig_en_sync0 <= fmc516_trig_cfg_hw_trig_en_int; fmc516_trig_cfg_hw_trig_en_sync1 <= fmc516_trig_cfg_hw_trig_en_sync0; regs_o.trig_cfg_hw_trig_en_o <= fmc516_trig_cfg_hw_trig_en_sync1; end if; end process; -- Reserved regs_o.trig_cfg_reserved_o <= fmc516_trig_cfg_reserved_int; -- FMC ADC clock chains -- Reserved -- FMC ADC Data chains -- Reserved -- FMC ADC packet size -- Reset/Update ADC clock chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_adc_ctl_update_clk_dly_dly0 <= '0'; regs_o.adc_ctl_update_clk_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_adc_ctl_update_clk_dly_dly0 <= fmc516_adc_ctl_update_clk_dly_int; regs_o.adc_ctl_update_clk_dly_o <= fmc516_adc_ctl_update_clk_dly_int and (not fmc516_adc_ctl_update_clk_dly_dly0); end if; end process; -- Reset/Update ADC data chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_adc_ctl_update_data_dly_dly0 <= '0'; regs_o.adc_ctl_update_data_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_adc_ctl_update_data_dly_dly0 <= fmc516_adc_ctl_update_data_dly_int; regs_o.adc_ctl_update_data_dly_o <= fmc516_adc_ctl_update_data_dly_int and (not fmc516_adc_ctl_update_data_dly_dly0); end if; end process; -- Reset ADCs process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then regs_o.adc_ctl_rst_adcs_o <= '0'; fmc516_adc_ctl_rst_adcs_sync0 <= '0'; fmc516_adc_ctl_rst_adcs_sync1 <= '0'; fmc516_adc_ctl_rst_adcs_sync2 <= '0'; elsif rising_edge(fs_clk_i) then fmc516_adc_ctl_rst_adcs_sync0 <= fmc516_adc_ctl_rst_adcs_int; fmc516_adc_ctl_rst_adcs_sync1 <= fmc516_adc_ctl_rst_adcs_sync0; fmc516_adc_ctl_rst_adcs_sync2 <= fmc516_adc_ctl_rst_adcs_sync1; regs_o.adc_ctl_rst_adcs_o <= fmc516_adc_ctl_rst_adcs_sync2 and (not fmc516_adc_ctl_rst_adcs_sync1); end if; end process; -- Reset Div ADCs process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then regs_o.adc_ctl_rst_div_adcs_o <= '0'; fmc516_adc_ctl_rst_div_adcs_sync0 <= '0'; fmc516_adc_ctl_rst_div_adcs_sync1 <= '0'; fmc516_adc_ctl_rst_div_adcs_sync2 <= '0'; elsif rising_edge(fs_clk_i) then fmc516_adc_ctl_rst_div_adcs_sync0 <= fmc516_adc_ctl_rst_div_adcs_int; fmc516_adc_ctl_rst_div_adcs_sync1 <= fmc516_adc_ctl_rst_div_adcs_sync0; fmc516_adc_ctl_rst_div_adcs_sync2 <= fmc516_adc_ctl_rst_div_adcs_sync1; regs_o.adc_ctl_rst_div_adcs_o <= fmc516_adc_ctl_rst_div_adcs_sync2 and (not fmc516_adc_ctl_rst_div_adcs_sync1); end if; end process; -- Reserved -- Channel 0 current ADC value -- asynchronous std_logic_vector register : Channel 0 current ADC value (type RO/WO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch0_sta_val_lwb_s0 <= '0'; fmc516_ch0_sta_val_lwb_s1 <= '0'; fmc516_ch0_sta_val_lwb_s2 <= '0'; fmc516_ch0_sta_val_int <= "0000000000000000"; elsif rising_edge(fs_clk_i) then fmc516_ch0_sta_val_lwb_s0 <= fmc516_ch0_sta_val_lwb; fmc516_ch0_sta_val_lwb_s1 <= fmc516_ch0_sta_val_lwb_s0; fmc516_ch0_sta_val_lwb_s2 <= fmc516_ch0_sta_val_lwb_s1; if ((fmc516_ch0_sta_val_lwb_s1 = '1') and (fmc516_ch0_sta_val_lwb_s2 = '0')) then fmc516_ch0_sta_val_int <= regs_i.ch0_sta_val_i; end if; end if; end process; -- Reserved -- ADC clock chain delay regs_o.ch0_fn_dly_clk_chain_dly_o <= wrdata_reg(4 downto 0); -- Reserved -- ADC data chain delay regs_o.ch0_fn_dly_data_chain_dly_o <= wrdata_reg(12 downto 8); -- Reserved -- Increment ADC clock chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch0_fn_dly_inc_clk_chain_dly_dly0 <= '0'; regs_o.ch0_fn_dly_inc_clk_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch0_fn_dly_inc_clk_chain_dly_dly0 <= fmc516_ch0_fn_dly_inc_clk_chain_dly_int; regs_o.ch0_fn_dly_inc_clk_chain_dly_o <= fmc516_ch0_fn_dly_inc_clk_chain_dly_int and (not fmc516_ch0_fn_dly_inc_clk_chain_dly_dly0); end if; end process; -- Decrement ADC clock chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch0_fn_dly_dec_clk_chain_dly_dly0 <= '0'; regs_o.ch0_fn_dly_dec_clk_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch0_fn_dly_dec_clk_chain_dly_dly0 <= fmc516_ch0_fn_dly_dec_clk_chain_dly_int; regs_o.ch0_fn_dly_dec_clk_chain_dly_o <= fmc516_ch0_fn_dly_dec_clk_chain_dly_int and (not fmc516_ch0_fn_dly_dec_clk_chain_dly_dly0); end if; end process; -- Reserved regs_o.ch0_fn_dly_reserved_clk_incdec_dly_o <= fmc516_ch0_fn_dly_reserved_clk_incdec_dly_int; -- Increment ADC data chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch0_fn_dly_inc_data_chain_dly_dly0 <= '0'; regs_o.ch0_fn_dly_inc_data_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch0_fn_dly_inc_data_chain_dly_dly0 <= fmc516_ch0_fn_dly_inc_data_chain_dly_int; regs_o.ch0_fn_dly_inc_data_chain_dly_o <= fmc516_ch0_fn_dly_inc_data_chain_dly_int and (not fmc516_ch0_fn_dly_inc_data_chain_dly_dly0); end if; end process; -- Decrement ADC data chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch0_fn_dly_dec_data_chain_dly_dly0 <= '0'; regs_o.ch0_fn_dly_dec_data_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch0_fn_dly_dec_data_chain_dly_dly0 <= fmc516_ch0_fn_dly_dec_data_chain_dly_int; regs_o.ch0_fn_dly_dec_data_chain_dly_o <= fmc516_ch0_fn_dly_dec_data_chain_dly_int and (not fmc516_ch0_fn_dly_dec_data_chain_dly_dly0); end if; end process; -- Reserved regs_o.ch0_fn_dly_reserved_data_incdec_dly_o <= fmc516_ch0_fn_dly_reserved_data_incdec_dly_int; -- Falling edge data delay -- asynchronous std_logic_vector register : Falling edge data delay (type RW/RO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch0_cs_dly_fe_dly_swb_s0 <= '0'; fmc516_ch0_cs_dly_fe_dly_swb_s1 <= '0'; fmc516_ch0_cs_dly_fe_dly_swb_s2 <= '0'; regs_o.ch0_cs_dly_fe_dly_o <= "00"; elsif rising_edge(fs_clk_i) then fmc516_ch0_cs_dly_fe_dly_swb_s0 <= fmc516_ch0_cs_dly_fe_dly_swb; fmc516_ch0_cs_dly_fe_dly_swb_s1 <= fmc516_ch0_cs_dly_fe_dly_swb_s0; fmc516_ch0_cs_dly_fe_dly_swb_s2 <= fmc516_ch0_cs_dly_fe_dly_swb_s1; if ((fmc516_ch0_cs_dly_fe_dly_swb_s2 = '0') and (fmc516_ch0_cs_dly_fe_dly_swb_s1 = '1')) then regs_o.ch0_cs_dly_fe_dly_o <= fmc516_ch0_cs_dly_fe_dly_int; end if; end if; end process; -- Reserved regs_o.ch0_cs_dly_reserved_fe_dly_o <= fmc516_ch0_cs_dly_reserved_fe_dly_int; -- Regular data delay -- asynchronous std_logic_vector register : Regular data delay (type RW/RO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch0_cs_dly_rg_dly_swb_s0 <= '0'; fmc516_ch0_cs_dly_rg_dly_swb_s1 <= '0'; fmc516_ch0_cs_dly_rg_dly_swb_s2 <= '0'; regs_o.ch0_cs_dly_rg_dly_o <= "00"; elsif rising_edge(fs_clk_i) then fmc516_ch0_cs_dly_rg_dly_swb_s0 <= fmc516_ch0_cs_dly_rg_dly_swb; fmc516_ch0_cs_dly_rg_dly_swb_s1 <= fmc516_ch0_cs_dly_rg_dly_swb_s0; fmc516_ch0_cs_dly_rg_dly_swb_s2 <= fmc516_ch0_cs_dly_rg_dly_swb_s1; if ((fmc516_ch0_cs_dly_rg_dly_swb_s2 = '0') and (fmc516_ch0_cs_dly_rg_dly_swb_s1 = '1')) then regs_o.ch0_cs_dly_rg_dly_o <= fmc516_ch0_cs_dly_rg_dly_int; end if; end if; end process; -- Reserved regs_o.ch0_cs_dly_reserved_rg_dly_o <= fmc516_ch0_cs_dly_reserved_rg_dly_int; -- Channel 1 current ADC value -- asynchronous std_logic_vector register : Channel 1 current ADC value (type RO/WO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch1_sta_val_lwb_s0 <= '0'; fmc516_ch1_sta_val_lwb_s1 <= '0'; fmc516_ch1_sta_val_lwb_s2 <= '0'; fmc516_ch1_sta_val_int <= "0000000000000000"; elsif rising_edge(fs_clk_i) then fmc516_ch1_sta_val_lwb_s0 <= fmc516_ch1_sta_val_lwb; fmc516_ch1_sta_val_lwb_s1 <= fmc516_ch1_sta_val_lwb_s0; fmc516_ch1_sta_val_lwb_s2 <= fmc516_ch1_sta_val_lwb_s1; if ((fmc516_ch1_sta_val_lwb_s1 = '1') and (fmc516_ch1_sta_val_lwb_s2 = '0')) then fmc516_ch1_sta_val_int <= regs_i.ch1_sta_val_i; end if; end if; end process; -- Reserved -- ADC clock chain delay regs_o.ch1_fn_dly_clk_chain_dly_o <= wrdata_reg(4 downto 0); -- Reserved -- ADC data chain delay regs_o.ch1_fn_dly_data_chain_dly_o <= wrdata_reg(12 downto 8); -- Reserved -- Increment ADC clock chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch1_fn_dly_inc_clk_chain_dly_dly0 <= '0'; regs_o.ch1_fn_dly_inc_clk_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch1_fn_dly_inc_clk_chain_dly_dly0 <= fmc516_ch1_fn_dly_inc_clk_chain_dly_int; regs_o.ch1_fn_dly_inc_clk_chain_dly_o <= fmc516_ch1_fn_dly_inc_clk_chain_dly_int and (not fmc516_ch1_fn_dly_inc_clk_chain_dly_dly0); end if; end process; -- Decrement ADC clock chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch1_fn_dly_dec_clk_chain_dly_dly0 <= '0'; regs_o.ch1_fn_dly_dec_clk_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch1_fn_dly_dec_clk_chain_dly_dly0 <= fmc516_ch1_fn_dly_dec_clk_chain_dly_int; regs_o.ch1_fn_dly_dec_clk_chain_dly_o <= fmc516_ch1_fn_dly_dec_clk_chain_dly_int and (not fmc516_ch1_fn_dly_dec_clk_chain_dly_dly0); end if; end process; -- Reserved regs_o.ch1_fn_dly_reserved_clk_incdec_dly_o <= fmc516_ch1_fn_dly_reserved_clk_incdec_dly_int; -- Increment ADC data chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch1_fn_dly_inc_data_chain_dly_dly0 <= '0'; regs_o.ch1_fn_dly_inc_data_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch1_fn_dly_inc_data_chain_dly_dly0 <= fmc516_ch1_fn_dly_inc_data_chain_dly_int; regs_o.ch1_fn_dly_inc_data_chain_dly_o <= fmc516_ch1_fn_dly_inc_data_chain_dly_int and (not fmc516_ch1_fn_dly_inc_data_chain_dly_dly0); end if; end process; -- Decrement ADC data chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch1_fn_dly_dec_data_chain_dly_dly0 <= '0'; regs_o.ch1_fn_dly_dec_data_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch1_fn_dly_dec_data_chain_dly_dly0 <= fmc516_ch1_fn_dly_dec_data_chain_dly_int; regs_o.ch1_fn_dly_dec_data_chain_dly_o <= fmc516_ch1_fn_dly_dec_data_chain_dly_int and (not fmc516_ch1_fn_dly_dec_data_chain_dly_dly0); end if; end process; -- Reserved regs_o.ch1_fn_dly_reserved_data_incdec_dly_o <= fmc516_ch1_fn_dly_reserved_data_incdec_dly_int; -- Falling edge data delay -- asynchronous std_logic_vector register : Falling edge data delay (type RW/RO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch1_cs_dly_fe_dly_swb_s0 <= '0'; fmc516_ch1_cs_dly_fe_dly_swb_s1 <= '0'; fmc516_ch1_cs_dly_fe_dly_swb_s2 <= '0'; regs_o.ch1_cs_dly_fe_dly_o <= "00"; elsif rising_edge(fs_clk_i) then fmc516_ch1_cs_dly_fe_dly_swb_s0 <= fmc516_ch1_cs_dly_fe_dly_swb; fmc516_ch1_cs_dly_fe_dly_swb_s1 <= fmc516_ch1_cs_dly_fe_dly_swb_s0; fmc516_ch1_cs_dly_fe_dly_swb_s2 <= fmc516_ch1_cs_dly_fe_dly_swb_s1; if ((fmc516_ch1_cs_dly_fe_dly_swb_s2 = '0') and (fmc516_ch1_cs_dly_fe_dly_swb_s1 = '1')) then regs_o.ch1_cs_dly_fe_dly_o <= fmc516_ch1_cs_dly_fe_dly_int; end if; end if; end process; -- Reserved regs_o.ch1_cs_dly_reserved_fe_dly_o <= fmc516_ch1_cs_dly_reserved_fe_dly_int; -- Regular data delay -- asynchronous std_logic_vector register : Regular data delay (type RW/RO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch1_cs_dly_rg_dly_swb_s0 <= '0'; fmc516_ch1_cs_dly_rg_dly_swb_s1 <= '0'; fmc516_ch1_cs_dly_rg_dly_swb_s2 <= '0'; regs_o.ch1_cs_dly_rg_dly_o <= "00"; elsif rising_edge(fs_clk_i) then fmc516_ch1_cs_dly_rg_dly_swb_s0 <= fmc516_ch1_cs_dly_rg_dly_swb; fmc516_ch1_cs_dly_rg_dly_swb_s1 <= fmc516_ch1_cs_dly_rg_dly_swb_s0; fmc516_ch1_cs_dly_rg_dly_swb_s2 <= fmc516_ch1_cs_dly_rg_dly_swb_s1; if ((fmc516_ch1_cs_dly_rg_dly_swb_s2 = '0') and (fmc516_ch1_cs_dly_rg_dly_swb_s1 = '1')) then regs_o.ch1_cs_dly_rg_dly_o <= fmc516_ch1_cs_dly_rg_dly_int; end if; end if; end process; -- Reserved regs_o.ch1_cs_dly_reserved_rg_dly_o <= fmc516_ch1_cs_dly_reserved_rg_dly_int; -- Channel 2 current ADC value -- asynchronous std_logic_vector register : Channel 2 current ADC value (type RO/WO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch2_sta_val_lwb_s0 <= '0'; fmc516_ch2_sta_val_lwb_s1 <= '0'; fmc516_ch2_sta_val_lwb_s2 <= '0'; fmc516_ch2_sta_val_int <= "0000000000000000"; elsif rising_edge(fs_clk_i) then fmc516_ch2_sta_val_lwb_s0 <= fmc516_ch2_sta_val_lwb; fmc516_ch2_sta_val_lwb_s1 <= fmc516_ch2_sta_val_lwb_s0; fmc516_ch2_sta_val_lwb_s2 <= fmc516_ch2_sta_val_lwb_s1; if ((fmc516_ch2_sta_val_lwb_s1 = '1') and (fmc516_ch2_sta_val_lwb_s2 = '0')) then fmc516_ch2_sta_val_int <= regs_i.ch2_sta_val_i; end if; end if; end process; -- Reserved -- ADC clock chain delay regs_o.ch2_fn_dly_clk_chain_dly_o <= wrdata_reg(4 downto 0); -- Reserved -- ADC data chain delay regs_o.ch2_fn_dly_data_chain_dly_o <= wrdata_reg(12 downto 8); -- Reserved -- Increment ADC clock chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch2_fn_dly_inc_clk_chain_dly_dly0 <= '0'; regs_o.ch2_fn_dly_inc_clk_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch2_fn_dly_inc_clk_chain_dly_dly0 <= fmc516_ch2_fn_dly_inc_clk_chain_dly_int; regs_o.ch2_fn_dly_inc_clk_chain_dly_o <= fmc516_ch2_fn_dly_inc_clk_chain_dly_int and (not fmc516_ch2_fn_dly_inc_clk_chain_dly_dly0); end if; end process; -- Decrement ADC clock chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch2_fn_dly_dec_clk_chain_dly_dly0 <= '0'; regs_o.ch2_fn_dly_dec_clk_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch2_fn_dly_dec_clk_chain_dly_dly0 <= fmc516_ch2_fn_dly_dec_clk_chain_dly_int; regs_o.ch2_fn_dly_dec_clk_chain_dly_o <= fmc516_ch2_fn_dly_dec_clk_chain_dly_int and (not fmc516_ch2_fn_dly_dec_clk_chain_dly_dly0); end if; end process; -- Reserved regs_o.ch2_fn_dly_reserved_clk_incdec_dly_o <= fmc516_ch2_fn_dly_reserved_clk_incdec_dly_int; -- Increment ADC data chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch2_fn_dly_inc_data_chain_dly_dly0 <= '0'; regs_o.ch2_fn_dly_inc_data_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch2_fn_dly_inc_data_chain_dly_dly0 <= fmc516_ch2_fn_dly_inc_data_chain_dly_int; regs_o.ch2_fn_dly_inc_data_chain_dly_o <= fmc516_ch2_fn_dly_inc_data_chain_dly_int and (not fmc516_ch2_fn_dly_inc_data_chain_dly_dly0); end if; end process; -- Decrement ADC data chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch2_fn_dly_dec_data_chain_dly_dly0 <= '0'; regs_o.ch2_fn_dly_dec_data_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch2_fn_dly_dec_data_chain_dly_dly0 <= fmc516_ch2_fn_dly_dec_data_chain_dly_int; regs_o.ch2_fn_dly_dec_data_chain_dly_o <= fmc516_ch2_fn_dly_dec_data_chain_dly_int and (not fmc516_ch2_fn_dly_dec_data_chain_dly_dly0); end if; end process; -- Reserved regs_o.ch2_fn_dly_reserved_data_incdec_dly_o <= fmc516_ch2_fn_dly_reserved_data_incdec_dly_int; -- Falling edge data delay -- asynchronous std_logic_vector register : Falling edge data delay (type RW/RO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch2_cs_dly_fe_dly_swb_s0 <= '0'; fmc516_ch2_cs_dly_fe_dly_swb_s1 <= '0'; fmc516_ch2_cs_dly_fe_dly_swb_s2 <= '0'; regs_o.ch2_cs_dly_fe_dly_o <= "00"; elsif rising_edge(fs_clk_i) then fmc516_ch2_cs_dly_fe_dly_swb_s0 <= fmc516_ch2_cs_dly_fe_dly_swb; fmc516_ch2_cs_dly_fe_dly_swb_s1 <= fmc516_ch2_cs_dly_fe_dly_swb_s0; fmc516_ch2_cs_dly_fe_dly_swb_s2 <= fmc516_ch2_cs_dly_fe_dly_swb_s1; if ((fmc516_ch2_cs_dly_fe_dly_swb_s2 = '0') and (fmc516_ch2_cs_dly_fe_dly_swb_s1 = '1')) then regs_o.ch2_cs_dly_fe_dly_o <= fmc516_ch2_cs_dly_fe_dly_int; end if; end if; end process; -- Reserved regs_o.ch2_cs_dly_reserved_fe_dly_o <= fmc516_ch2_cs_dly_reserved_fe_dly_int; -- Regular data delay -- asynchronous std_logic_vector register : Regular data delay (type RW/RO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch2_cs_dly_rg_dly_swb_s0 <= '0'; fmc516_ch2_cs_dly_rg_dly_swb_s1 <= '0'; fmc516_ch2_cs_dly_rg_dly_swb_s2 <= '0'; regs_o.ch2_cs_dly_rg_dly_o <= "00"; elsif rising_edge(fs_clk_i) then fmc516_ch2_cs_dly_rg_dly_swb_s0 <= fmc516_ch2_cs_dly_rg_dly_swb; fmc516_ch2_cs_dly_rg_dly_swb_s1 <= fmc516_ch2_cs_dly_rg_dly_swb_s0; fmc516_ch2_cs_dly_rg_dly_swb_s2 <= fmc516_ch2_cs_dly_rg_dly_swb_s1; if ((fmc516_ch2_cs_dly_rg_dly_swb_s2 = '0') and (fmc516_ch2_cs_dly_rg_dly_swb_s1 = '1')) then regs_o.ch2_cs_dly_rg_dly_o <= fmc516_ch2_cs_dly_rg_dly_int; end if; end if; end process; -- Reserved regs_o.ch2_cs_dly_reserved_rg_dly_o <= fmc516_ch2_cs_dly_reserved_rg_dly_int; -- Channel 3 current ADC value -- asynchronous std_logic_vector register : Channel 3 current ADC value (type RO/WO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch3_sta_val_lwb_s0 <= '0'; fmc516_ch3_sta_val_lwb_s1 <= '0'; fmc516_ch3_sta_val_lwb_s2 <= '0'; fmc516_ch3_sta_val_int <= "0000000000000000"; elsif rising_edge(fs_clk_i) then fmc516_ch3_sta_val_lwb_s0 <= fmc516_ch3_sta_val_lwb; fmc516_ch3_sta_val_lwb_s1 <= fmc516_ch3_sta_val_lwb_s0; fmc516_ch3_sta_val_lwb_s2 <= fmc516_ch3_sta_val_lwb_s1; if ((fmc516_ch3_sta_val_lwb_s1 = '1') and (fmc516_ch3_sta_val_lwb_s2 = '0')) then fmc516_ch3_sta_val_int <= regs_i.ch3_sta_val_i; end if; end if; end process; -- Reserved -- ADC clock chain delay regs_o.ch3_fn_dly_clk_chain_dly_o <= wrdata_reg(4 downto 0); -- Reserved -- ADC data chain delay regs_o.ch3_fn_dly_data_chain_dly_o <= wrdata_reg(12 downto 8); -- Reserved -- Increment ADC clock chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch3_fn_dly_inc_clk_chain_dly_dly0 <= '0'; regs_o.ch3_fn_dly_inc_clk_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch3_fn_dly_inc_clk_chain_dly_dly0 <= fmc516_ch3_fn_dly_inc_clk_chain_dly_int; regs_o.ch3_fn_dly_inc_clk_chain_dly_o <= fmc516_ch3_fn_dly_inc_clk_chain_dly_int and (not fmc516_ch3_fn_dly_inc_clk_chain_dly_dly0); end if; end process; -- Decrement ADC clock chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch3_fn_dly_dec_clk_chain_dly_dly0 <= '0'; regs_o.ch3_fn_dly_dec_clk_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch3_fn_dly_dec_clk_chain_dly_dly0 <= fmc516_ch3_fn_dly_dec_clk_chain_dly_int; regs_o.ch3_fn_dly_dec_clk_chain_dly_o <= fmc516_ch3_fn_dly_dec_clk_chain_dly_int and (not fmc516_ch3_fn_dly_dec_clk_chain_dly_dly0); end if; end process; -- Reserved regs_o.ch3_fn_dly_reserved_clk_incdec_dly_o <= fmc516_ch3_fn_dly_reserved_clk_incdec_dly_int; -- Increment ADC data chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch3_fn_dly_inc_data_chain_dly_dly0 <= '0'; regs_o.ch3_fn_dly_inc_data_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch3_fn_dly_inc_data_chain_dly_dly0 <= fmc516_ch3_fn_dly_inc_data_chain_dly_int; regs_o.ch3_fn_dly_inc_data_chain_dly_o <= fmc516_ch3_fn_dly_inc_data_chain_dly_int and (not fmc516_ch3_fn_dly_inc_data_chain_dly_dly0); end if; end process; -- Decrement ADC data chains delay process (clk_sys_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch3_fn_dly_dec_data_chain_dly_dly0 <= '0'; regs_o.ch3_fn_dly_dec_data_chain_dly_o <= '0'; elsif rising_edge(clk_sys_i) then fmc516_ch3_fn_dly_dec_data_chain_dly_dly0 <= fmc516_ch3_fn_dly_dec_data_chain_dly_int; regs_o.ch3_fn_dly_dec_data_chain_dly_o <= fmc516_ch3_fn_dly_dec_data_chain_dly_int and (not fmc516_ch3_fn_dly_dec_data_chain_dly_dly0); end if; end process; -- Reserved regs_o.ch3_fn_dly_reserved_data_incdec_dly_o <= fmc516_ch3_fn_dly_reserved_data_incdec_dly_int; -- Falling edge data delay -- asynchronous std_logic_vector register : Falling edge data delay (type RW/RO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch3_cs_dly_fe_dly_swb_s0 <= '0'; fmc516_ch3_cs_dly_fe_dly_swb_s1 <= '0'; fmc516_ch3_cs_dly_fe_dly_swb_s2 <= '0'; regs_o.ch3_cs_dly_fe_dly_o <= "00"; elsif rising_edge(fs_clk_i) then fmc516_ch3_cs_dly_fe_dly_swb_s0 <= fmc516_ch3_cs_dly_fe_dly_swb; fmc516_ch3_cs_dly_fe_dly_swb_s1 <= fmc516_ch3_cs_dly_fe_dly_swb_s0; fmc516_ch3_cs_dly_fe_dly_swb_s2 <= fmc516_ch3_cs_dly_fe_dly_swb_s1; if ((fmc516_ch3_cs_dly_fe_dly_swb_s2 = '0') and (fmc516_ch3_cs_dly_fe_dly_swb_s1 = '1')) then regs_o.ch3_cs_dly_fe_dly_o <= fmc516_ch3_cs_dly_fe_dly_int; end if; end if; end process; -- Reserved regs_o.ch3_cs_dly_reserved_fe_dly_o <= fmc516_ch3_cs_dly_reserved_fe_dly_int; -- Regular data delay -- asynchronous std_logic_vector register : Regular data delay (type RW/RO, fs_clk_i <-> clk_sys_i) process (fs_clk_i, rst_n_i) begin if (rst_n_i = '0') then fmc516_ch3_cs_dly_rg_dly_swb_s0 <= '0'; fmc516_ch3_cs_dly_rg_dly_swb_s1 <= '0'; fmc516_ch3_cs_dly_rg_dly_swb_s2 <= '0'; regs_o.ch3_cs_dly_rg_dly_o <= "00"; elsif rising_edge(fs_clk_i) then fmc516_ch3_cs_dly_rg_dly_swb_s0 <= fmc516_ch3_cs_dly_rg_dly_swb; fmc516_ch3_cs_dly_rg_dly_swb_s1 <= fmc516_ch3_cs_dly_rg_dly_swb_s0; fmc516_ch3_cs_dly_rg_dly_swb_s2 <= fmc516_ch3_cs_dly_rg_dly_swb_s1; if ((fmc516_ch3_cs_dly_rg_dly_swb_s2 = '0') and (fmc516_ch3_cs_dly_rg_dly_swb_s1 = '1')) then regs_o.ch3_cs_dly_rg_dly_o <= fmc516_ch3_cs_dly_rg_dly_int; end if; end if; end process; -- Reserved regs_o.ch3_cs_dly_reserved_rg_dly_o <= fmc516_ch3_cs_dly_reserved_rg_dly_int; rwaddr_reg <= wb_adr_i; wb_stall_o <= (not ack_sreg(0)) and (wb_stb_i and wb_cyc_i); -- ACK signal generation. Just pass the LSB of ACK counter. wb_ack_o <= ack_sreg(0); end syn;
-- -- FIFO -- -- Author(s): -- * Rodrigo A. Melo -- -- Copyright (c) 2017-2019 Authors and INTI -- Distributed under the BSD 3-Clause License -- -- Description: -- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; library FPGALIB; use FPGALIB.MEMS.all; use FPGALIB.Numeric.all; use FPGALIB.Sync.all; --! A FIFO which could be configured as synchronous or asynchronous. --! In synchronous mode, the clock in both sides, write and read, must be the --! same. In asynchronous mode, the clocks can be unrelated and so extra --! resources for CDC are employed. --! There are full, almost full and overflow indications in the Write side and --! valid, empty, almost empty and underflow indications in the Read side. --! The almost empty and full indications can be configured by generics, as --! the offset to reach empty and full respectively. entity FIFO is generic ( DWIDTH : positive:=8; --! Data width (bits) DEPTH : positive:=8; --! Buffer memory depth (even) OUTREG : boolean :=FALSE; --! Optional Output Register AFULLOFFSET : positive:=1; --! Almost FULL OFFSET AEMPTYOFFSET : positive:=1; --! Almost EMPTY OFFSET ASYNC : boolean :=TRUE --! Asynchronous FIFO ); port ( -- write side wclk_i : in std_logic; --! Write Clock wrst_i : in std_logic; --! Write Reset wen_i : in std_logic; --! Write Enable data_i : in std_logic_vector(DWIDTH-1 downto 0); --! Data Input full_o : out std_logic; --! Full Flag afull_o : out std_logic; --! Almost Full Flag overflow_o : out std_logic; --! Overflow Flag -- read side rclk_i : in std_logic; --! Read Clock rrst_i : in std_logic; --! Read Reset ren_i : in std_logic; --! Read enable data_o : out std_logic_vector(DWIDTH-1 downto 0); --! Data Output empty_o : out std_logic; --! Empty flag aempty_o : out std_logic; --! Almost Empty flag underflow_o : out std_logic; --! Underflow Flag valid_o : out std_logic --! Read Valid ); end entity FIFO; --! @brief Architecture definition of the FIFO. architecture RTL of FIFO is ------------------------------------------------------------------------------------------------ -- Constants ------------------------------------------------------------------------------------------------ constant EVEN_DEPTH : positive := DEPTH + (DEPTH rem 2); -- To ensure only even values constant AWIDTH : positive := clog2(EVEN_DEPTH); -- Address width in bits constant DIFF_DEPTH : natural := 2**AWIDTH-EVEN_DEPTH; ------------------------------------------------------------------------------------------------ -- Signals ------------------------------------------------------------------------------------------------ signal rst : std_logic; signal wen, ren : std_logic; signal full, full_r : std_logic; signal empty, empty_r : std_logic; signal wr_addr, rd_addr : std_logic_vector(AWIDTH-1 downto 0); signal valid_r : std_logic_vector(1 downto 0):=(others => '0'); -- Extra bit used for empty and full generation signal wr_ptr_r, wr_ptr, rd_in_wr_ptr : unsigned(AWIDTH downto 0):=(others => '0'); signal rd_ptr_r, rd_ptr, wr_in_rd_ptr : unsigned(AWIDTH downto 0):=(others => '0'); -- For asynchronous version signal wr_bin, rd_in_wr_bin : unsigned(AWIDTH downto 0); signal rd_bin, wr_in_rd_bin : unsigned(AWIDTH downto 0); ------------------------------------------------------------------------------------------------ -- Functions ------------------------------------------------------------------------------------------------ function next_ptr(ena : std_logic; ptr: unsigned) return unsigned is variable ret : unsigned(ptr'range); begin if ena='1' and ptr(AWIDTH-1 downto 0)=EVEN_DEPTH-1 then ret := (not(ptr(AWIDTH)), others => '0'); elsif ena='1' then ret := ptr + 1; else ret := ptr; end if; return ret; end next_ptr; function diff_ptr(wr_ptr, rd_ptr : unsigned) return unsigned is variable status : std_logic_vector(1 downto 0); variable wr_aux, rd_aux : unsigned(wr_ptr'range); begin status := wr_ptr(AWIDTH)&rd_ptr(AWIDTH); case status is when "00" | "11" => return wr_ptr - rd_ptr; when "10" => return wr_ptr - DIFF_DEPTH - rd_ptr; when "01" => wr_aux := not(wr_ptr(AWIDTH))&wr_ptr(AWIDTH-1 downto 0); rd_aux := not(rd_ptr(AWIDTH))&rd_ptr(AWIDTH-1 downto 0); return wr_aux - DIFF_DEPTH - rd_aux; when others => wr_aux := (others => '0'); end case; return wr_aux; end diff_ptr; begin rst <= wrst_i or rrst_i; i_memory: SimpleDualPortRAM generic map ( AWIDTH => AWIDTH, DWIDTH => DWIDTH, DEPTH => EVEN_DEPTH, OUTREG => OUTREG ) port map ( clk1_i => wclk_i, clk2_i => rclk_i, wen1_i => wen, addr1_i => wr_addr, addr2_i => rd_addr, data1_i => data_i, data2_o => data_o ); g_sync: if not(ASYNC) generate rd_in_wr_ptr <= rd_ptr_r; wr_in_rd_ptr <= wr_ptr_r; end generate g_sync; g_async: if ASYNC generate ----------------------------------- -- From read to write side (CDC) -- ----------------------------------- rd_bin <= rd_ptr_r + DIFF_DEPTH when rd_ptr_r(AWIDTH)='0' else rd_ptr_r; i_sync_rd2wr: gray_sync generic map(WIDTH => AWIDTH+1, DEPTH => 2) port map(clk_i => wclk_i, data_i => rd_bin, data_o => rd_in_wr_bin); rd_in_wr_ptr <= rd_in_wr_bin - DIFF_DEPTH when rd_in_wr_bin(AWIDTH)='0' else rd_in_wr_bin; ----------------------------------- -- From write to read side (CDC) -- ----------------------------------- wr_bin <= wr_ptr_r + DIFF_DEPTH when wr_ptr_r(AWIDTH)='0' else wr_ptr_r; i_sync_wr2rd: gray_sync generic map(WIDTH => AWIDTH+1, DEPTH => 2) port map(clk_i => rclk_i, data_i => wr_bin, data_o => wr_in_rd_bin); wr_in_rd_ptr <= wr_in_rd_bin - DIFF_DEPTH when wr_in_rd_bin(AWIDTH)='0' else wr_in_rd_bin; end generate g_async; ------------------------------------------------------------------------------------------------ -- Write Side ------------------------------------------------------------------------------------------------ wr_addr <= std_logic_vector(wr_ptr_r(AWIDTH-1 downto 0)); wen <= '1' when wen_i='1' and full_r/='1' else '0'; p_write: process(wclk_i) begin if rising_edge(wclk_i) then full_r <= '0'; if rst='1' then wr_ptr_r <= (others => '0'); else wr_ptr_r <= wr_ptr; full_r <= full; end if; end if; end process p_write; wr_ptr <= next_ptr(wen, wr_ptr_r); full <= '1' when diff_ptr(wr_ptr, rd_in_wr_ptr) = EVEN_DEPTH else '0'; full_o <= full; afull_o <= '1' when diff_ptr(wr_ptr, rd_in_wr_ptr) >= EVEN_DEPTH-AFULLOFFSET else '0'; overflow_o <= '1' when wen_i='1' and full_r='1' else '0'; ------------------------------------------------------------------------------------------------ -- Read Side ------------------------------------------------------------------------------------------------ rd_addr <= std_logic_vector(rd_ptr_r(AWIDTH-1 downto 0)); ren <= '1' when ren_i='1' and empty_r/='1' else '0'; p_read: process(rclk_i) begin if rising_edge(rclk_i) then empty_r <= '1'; valid_r(0) <= ren; valid_r(1) <= valid_r(0); if rst='1' then rd_ptr_r <= (others => '0'); valid_r <= (others => '0'); else rd_ptr_r <= rd_ptr; empty_r <= empty; end if; end if; end process p_read; rd_ptr <= next_ptr(ren, rd_ptr_r); empty <= '1' when diff_ptr(wr_in_rd_ptr, rd_ptr) = 0 else '0'; empty_o <= empty; aempty_o <= '1' when diff_ptr(wr_in_rd_ptr, rd_ptr) <= AEMPTYOFFSET else '0'; underflow_o <= '1' when ren_i='1' and empty_r='1' else '0'; valid_o <= valid_r(1) when OUTREG else valid_r(0); end architecture RTL;
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; library work; use work.zpupkg.all; use work.zpu_config.all; use work.wishbone_pkg.all; package zpu_top_pkg is component zpu_wb_bridge is port ( -- Native ZPU interface clk : in std_logic; areset : in std_logic; mem_req : in std_logic; mem_we : in std_logic; mem_ack : out std_logic; mem_read : out std_logic_vector(wordSize-1 downto 0); mem_write : in std_logic_vector(wordSize-1 downto 0); out_mem_addr : in std_logic_vector(maxAddrBitIncIO downto 0); mem_writeMask : in std_logic_vector(wordBytes-1 downto 0); -- Wishbone from ZPU zpu_wb_i : in wishbone_bus_out; zpu_wb_o : out wishbone_bus_in); end component; component zpu_system is generic( simulate : boolean := false); port ( areset : in std_logic; cpu_clk : in std_logic; -- ZPU Control signals enable : in std_logic; interrupt : in std_logic; zpu_status : out std_logic_vector(63 downto 0); -- wishbone interfaces zpu_wb_i : in wishbone_bus_out; zpu_wb_o : out wishbone_bus_in); end component; end zpu_top_pkg;
-------------------------------------------------------------------------------- -- **** -- T80(c) core. Attempt to finish all undocumented features and provide -- accurate timings. -- Version 350. -- Copyright (c) 2018 Sorgelig -- Test passed: ZEXDOC, ZEXALL, Z80Full(*), Z80memptr -- (*) Currently only SCF and CCF instructions aren't passed X/Y flags check as -- correct implementation is still unclear. -- -- **** -- T80(b) core. In an effort to merge and maintain bug fixes .... -- -- Ver 303 add undocumented DDCB and FDCB opcodes by TobiFlex 20.04.2010 -- Ver 301 parity flag is just parity for 8080, also overflow for Z80, by Sean Riddle -- Ver 300 started tidyup. -- -- MikeJ March 2005 -- Latest version from www.fpgaarcade.com (original www.opencores.org) -- -- **** -- Z80 compatible microprocessor core -- -- Version : 0250 -- Copyright (c) 2001-2002 Daniel Wallner ([email protected]) -- All rights reserved -- -- Redistribution and use in source and synthezised forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- -- Redistributions in synthesized form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- -- Neither the name of the author nor the names of other contributors may -- be used to endorse or promote products derived from this software without -- specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. -- -- Please report bugs to the author, but before you do so, please -- make sure that this is not a derivative work and that -- you have the latest version of this file. -- -- The latest version of this file can be found at: -- http://www.opencores.org/cvsweb.shtml/t80/ -- -- Limitations : -- -- File history : -- -- 0208 : First complete release -- 0210 : Fixed wait and halt -- 0211 : Fixed Refresh addition and IM 1 -- 0214 : Fixed mostly flags, only the block instructions now fail the zex regression test -- 0232 : Removed refresh address output for Mode > 1 and added DJNZ M1_n fix by Mike Johnson -- 0235 : Added clock enable and IM 2 fix by Mike Johnson -- 0237 : Changed 8080 I/O address output, added IntE output -- 0238 : Fixed (IX/IY+d) timing and 16 bit ADC and SBC zero flag -- 0240 : Added interrupt ack fix by Mike Johnson, changed (IX/IY+d) timing and changed flags in GB mode -- 0242 : Added I/O wait, fixed refresh address, moved some registers to RAM -- 0247 : Fixed bus req/ack cycle -- 0250 : Added R800 Multiplier by TobiFlex 2017.10.15 -- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use IEEE.STD_LOGIC_UNSIGNED.all; use work.T80_Pack.all; entity T80 is generic( Mode : integer := 0; -- 0 => Z80, 1 => Fast Z80, 2 => 8080, 3 => GB IOWait : integer := 0; -- 0 => Single cycle I/O, 1 => Std I/O cycle Flag_C : integer := 0; Flag_N : integer := 1; Flag_P : integer := 2; Flag_X : integer := 3; Flag_H : integer := 4; Flag_Y : integer := 5; Flag_Z : integer := 6; Flag_S : integer := 7 ); port( RESET_n : in std_logic; CLK_n : in std_logic; CEN : in std_logic; WAIT_n : in std_logic; INT_n : in std_logic; NMI_n : in std_logic; BUSRQ_n : in std_logic; M1_n : out std_logic; IORQ : out std_logic; NoRead : out std_logic; Write : out std_logic; RFSH_n : out std_logic; HALT_n : out std_logic; BUSAK_n : out std_logic; A : out std_logic_vector(15 downto 0); DInst : in std_logic_vector(7 downto 0); DI : in std_logic_vector(7 downto 0); DO : out std_logic_vector(7 downto 0); MC : out std_logic_vector(2 downto 0); TS : out std_logic_vector(2 downto 0); IntCycle_n : out std_logic; NMICycle_n : out std_logic; IntE : out std_logic; Stop : out std_logic; R800_mode : in std_logic := '0'; out0 : in std_logic := '0'; -- 0 => OUT(C),0, 1 => OUT(C),255 REG : out std_logic_vector(211 downto 0); -- IFF2, IFF1, IM, IY, HL', DE', BC', IX, HL, DE, BC, PC, SP, R, I, F', A', F, A DIRSet : in std_logic := '0'; DIR : in std_logic_vector(211 downto 0) := (others => '0') -- IFF2, IFF1, IM, IY, HL', DE', BC', IX, HL, DE, BC, PC, SP, R, I, F', A', F, A ); end T80; architecture rtl of T80 is -- Registers signal ACC, F : std_logic_vector(7 downto 0); signal Ap, Fp : std_logic_vector(7 downto 0); signal I : std_logic_vector(7 downto 0); signal R : unsigned(7 downto 0); signal SP, PC : unsigned(15 downto 0); signal RegDIH : std_logic_vector(7 downto 0); signal RegDIL : std_logic_vector(7 downto 0); signal RegBusA : std_logic_vector(15 downto 0); signal RegBusB : std_logic_vector(15 downto 0); signal RegBusC : std_logic_vector(15 downto 0); signal RegAddrA_r : std_logic_vector(2 downto 0); signal RegAddrA : std_logic_vector(2 downto 0); signal RegAddrB_r : std_logic_vector(2 downto 0); signal RegAddrB : std_logic_vector(2 downto 0); signal RegAddrC : std_logic_vector(2 downto 0); signal RegWEH : std_logic; signal RegWEL : std_logic; signal Alternate : std_logic; -- Help Registers signal WZ : std_logic_vector(15 downto 0); -- MEMPTR register signal TmpAddr2 : std_logic_vector(15 downto 0); -- Temporary address register signal IR : std_logic_vector(7 downto 0); -- Instruction register signal ISet : std_logic_vector(1 downto 0); -- Instruction set selector signal RegBusA_r : std_logic_vector(15 downto 0); signal MULU_Prod32 : std_logic_vector(31 downto 0); signal MULU_tmp : std_logic_vector(31 downto 0); signal MULU_Fakt1 : std_logic_vector(15 downto 0); signal ID16 : signed(15 downto 0); signal Save_Mux : std_logic_vector(7 downto 0); signal TState : unsigned(2 downto 0); signal MCycle : std_logic_vector(2 downto 0); signal IntE_FF1 : std_logic; signal IntE_FF2 : std_logic; signal Halt_FF : std_logic; signal BusReq_s : std_logic := '0'; signal BusAck : std_logic := '0'; signal ClkEn : std_logic; signal NMI_s : std_logic; signal IStatus : std_logic_vector(1 downto 0); signal DI_Reg : std_logic_vector(7 downto 0); signal T_Res : std_logic; signal XY_State : std_logic_vector(1 downto 0); signal Pre_XY_F_M : std_logic_vector(2 downto 0); signal NextIs_XY_Fetch : std_logic; signal XY_Ind : std_logic; signal No_BTR : std_logic; signal BTR_r : std_logic; signal Auto_Wait : std_logic; signal Auto_Wait_t1 : std_logic; signal Auto_Wait_t2 : std_logic; signal IncDecZ : std_logic; -- ALU signals signal BusB : std_logic_vector(7 downto 0); signal BusA : std_logic_vector(7 downto 0); signal ALU_Q : std_logic_vector(7 downto 0); signal F_Out : std_logic_vector(7 downto 0); -- Registered micro code outputs signal Read_To_Reg_r : std_logic_vector(4 downto 0); signal Arith16_r : std_logic; signal Z16_r : std_logic; signal ALU_Op_r : std_logic_vector(3 downto 0); signal Save_ALU_r : std_logic; signal PreserveC_r : std_logic; signal MCycles : std_logic_vector(2 downto 0); -- Micro code outputs signal MCycles_d : std_logic_vector(2 downto 0); signal TStates : std_logic_vector(2 downto 0); signal IntCycle : std_logic; signal NMICycle : std_logic; signal Inc_PC : std_logic; signal Inc_WZ : std_logic; signal IncDec_16 : std_logic_vector(3 downto 0); signal Prefix : std_logic_vector(1 downto 0); signal Read_To_Acc : std_logic; signal Read_To_Reg : std_logic; signal Set_BusB_To : std_logic_vector(3 downto 0); signal Set_BusA_To : std_logic_vector(3 downto 0); signal ALU_Op : std_logic_vector(3 downto 0); signal Save_ALU : std_logic; signal Rot_Akku : std_logic; signal PreserveC : std_logic; signal Arith16 : std_logic; signal Set_Addr_To : std_logic_vector(2 downto 0); signal Jump : std_logic; signal JumpE : std_logic; signal JumpXY : std_logic; signal Call : std_logic; signal RstP : std_logic; signal LDZ : std_logic; signal LDW : std_logic; signal LDSPHL : std_logic; signal LDHLSP : std_logic; signal ADDSPdd : std_logic; signal IORQ_i : std_logic; signal Special_LD : std_logic_vector(2 downto 0); signal ExchangeDH : std_logic; signal ExchangeRp : std_logic; signal ExchangeAF : std_logic; signal ExchangeRS : std_logic; signal I_DJNZ : std_logic; signal I_CPL : std_logic; signal I_CCF : std_logic; signal I_SCF : std_logic; signal I_RETN : std_logic; signal I_BT : std_logic; signal I_BC : std_logic; signal I_BTR : std_logic; signal I_RLD : std_logic; signal I_RRD : std_logic; signal I_RXDD : std_logic; signal I_INRC : std_logic; signal I_MULUB : std_logic; signal I_MULU : std_logic; signal SetWZ : std_logic_vector(1 downto 0); signal SetDI : std_logic; signal SetEI : std_logic; signal IMode : std_logic_vector(1 downto 0); signal Halt : std_logic; signal XYbit_undoc : std_logic; signal No_PC : std_logic; signal DOR : std_logic_vector(127 downto 0); begin REG <= IntE_FF2 & IntE_FF1 & IStatus & DOR & std_logic_vector(PC) & std_logic_vector(SP) & std_logic_vector(R) & I & Fp & Ap & F & ACC when Alternate = '0' else IntE_FF2 & IntE_FF1 & IStatus & DOR(127 downto 112) & DOR(47 downto 0) & DOR(63 downto 48) & DOR(111 downto 64) & std_logic_vector(PC) & std_logic_vector(SP) & std_logic_vector(R) & I & Fp & Ap & F & ACC; mcode : T80_MCode generic map( Mode => Mode, Flag_C => Flag_C, Flag_N => Flag_N, Flag_P => Flag_P, Flag_X => Flag_X, Flag_H => Flag_H, Flag_Y => Flag_Y, Flag_Z => Flag_Z, Flag_S => Flag_S) port map( IR => IR, ISet => ISet, MCycle => MCycle, F => F, NMICycle => NMICycle, IntCycle => IntCycle, XY_State => XY_State, MCycles => MCycles_d, TStates => TStates, Prefix => Prefix, Inc_PC => Inc_PC, Inc_WZ => Inc_WZ, IncDec_16 => IncDec_16, Read_To_Acc => Read_To_Acc, Read_To_Reg => Read_To_Reg, Set_BusB_To => Set_BusB_To, Set_BusA_To => Set_BusA_To, ALU_Op => ALU_Op, Save_ALU => Save_ALU, Rot_Akku => Rot_Akku, PreserveC => PreserveC, Arith16 => Arith16, Set_Addr_To => Set_Addr_To, IORQ => IORQ_i, Jump => Jump, JumpE => JumpE, JumpXY => JumpXY, Call => Call, RstP => RstP, LDZ => LDZ, LDW => LDW, LDSPHL => LDSPHL, LDHLSP => LDHLSP, ADDSPdd => ADDSPdd, Special_LD => Special_LD, ExchangeDH => ExchangeDH, ExchangeRp => ExchangeRp, ExchangeAF => ExchangeAF, ExchangeRS => ExchangeRS, I_DJNZ => I_DJNZ, I_CPL => I_CPL, I_CCF => I_CCF, I_SCF => I_SCF, I_RETN => I_RETN, I_BT => I_BT, I_BC => I_BC, I_BTR => I_BTR, I_RLD => I_RLD, I_RRD => I_RRD, I_INRC => I_INRC, I_MULUB => I_MULUB, I_MULU => I_MULU, SetWZ => SetWZ, SetDI => SetDI, SetEI => SetEI, IMode => IMode, Halt => Halt, NoRead => NoRead, Write => Write, R800_mode => R800_mode, No_PC => No_PC, XYbit_undoc => XYbit_undoc); alu : T80_ALU generic map( Mode => Mode, Flag_C => Flag_C, Flag_N => Flag_N, Flag_P => Flag_P, Flag_X => Flag_X, Flag_H => Flag_H, Flag_Y => Flag_Y, Flag_Z => Flag_Z, Flag_S => Flag_S) port map( Arith16 => Arith16_r, Z16 => Z16_r, WZ => WZ, XY_State=> XY_State, ALU_Op => ALU_Op_r, Rot_Akku => Rot_Akku, IR => IR(5 downto 0), ISet => ISet, BusA => BusA, BusB => BusB, F_In => F, Q => ALU_Q, F_Out => F_Out); ClkEn <= CEN and not BusAck; T_Res <= '1' when TState = unsigned(TStates) else '0'; NextIs_XY_Fetch <= '1' when XY_State /= "00" and XY_Ind = '0' and ((Set_Addr_To = aXY) or (MCycle = "001" and IR = "11001011") or (MCycle = "001" and IR = "00110110")) else '0'; Save_Mux <= BusB when ExchangeRp = '1' else DI_Reg when Save_ALU_r = '0' else ALU_Q; process (RESET_n, CLK_n) variable n : std_logic_vector(7 downto 0); variable ioq : std_logic_vector(8 downto 0); variable temp_c : unsigned(8 downto 0); variable temp_h : unsigned(4 downto 0); begin if RESET_n = '0' then PC <= (others => '0'); -- Program Counter A <= (others => '0'); WZ <= (others => '0'); IR <= "00000000"; ISet <= "00"; XY_State <= "00"; IStatus <= "00"; MCycles <= "000"; DO <= "00000000"; ACC <= (others => '1'); F <= (others => '1'); if Mode = 3 then ACC <= (others => '0'); F <= "11110000"; end if; Ap <= (others => '1'); Fp <= (others => '1'); I <= (others => '0'); R <= (others => '0'); SP <= (others => '1'); Alternate <= '0'; Read_To_Reg_r <= "00000"; Arith16_r <= '0'; BTR_r <= '0'; Z16_r <= '0'; ALU_Op_r <= "0000"; Save_ALU_r <= '0'; PreserveC_r <= '0'; XY_Ind <= '0'; I_RXDD <= '0'; elsif rising_edge(CLK_n) then if DIRSet = '1' then ACC <= DIR( 7 downto 0); F <= DIR(15 downto 8); Ap <= DIR(23 downto 16); Fp <= DIR(31 downto 24); I <= DIR(39 downto 32); R <= unsigned(DIR(47 downto 40)); SP <= unsigned(DIR(63 downto 48)); PC <= unsigned(DIR(79 downto 64)); A <= DIR(79 downto 64); IStatus <= DIR(209 downto 208); elsif ClkEn = '1' then ALU_Op_r <= "0000"; Save_ALU_r <= '0'; Read_To_Reg_r <= "00000"; MCycles <= MCycles_d; if LDHLSP = '1' and MCycle = "011" and TState = 1 then temp_c := unsigned('0'&SP(7 downto 0))+unsigned('0'&Save_Mux); temp_h := unsigned('0'&SP(3 downto 0))+unsigned('0'&Save_Mux(3 downto 0)); F(Flag_Z) <= '0'; F(Flag_N) <= '0'; F(Flag_H) <= temp_h(4); F(Flag_C) <= temp_c(8); end if; if ADDSPdd = '1' and TState = 1 then temp_c := unsigned('0'&SP(7 downto 0))+unsigned('0'&Save_Mux); temp_h := unsigned('0'&SP(3 downto 0))+unsigned('0'&Save_Mux(3 downto 0)); F(Flag_Z) <= '0'; F(Flag_N) <= '0'; F(Flag_H) <= temp_h(4); F(Flag_C) <= temp_c(8); end if; if Mode = 3 then IStatus <= "10"; elsif IMode /= "11" then IStatus <= IMode; end if; Arith16_r <= Arith16; PreserveC_r <= PreserveC; if ISet = "10" and ALU_OP(2) = '0' and ALU_OP(0) = '1' and MCycle = "011" then Z16_r <= '1'; else Z16_r <= '0'; end if; if MCycle = "001" and TState(2) = '0' then -- MCycle = 1 and TState = 1, 2, or 3 if TState = 2 and Wait_n = '1' then if Mode < 2 then A(7 downto 0) <= std_logic_vector(R); A(15 downto 8) <= I; R(6 downto 0) <= R(6 downto 0) + 1; end if; if Jump = '0' and Call = '0' and NMICycle = '0' and IntCycle = '0' and not (Halt_FF = '1' or Halt = '1') then PC <= PC + 1; end if; if IntCycle = '1' and IStatus = "01" then IR <= "11111111"; elsif Halt_FF = '1' or (IntCycle = '1' and IStatus = "10") or NMICycle = '1' then IR <= "00000000"; else IR <= DInst; end if; if Mode <= 1 and IntCycle = '1' and IStatus = "10" then -- IM2 vector address low byte from bus WZ(7 downto 0) <= DInst; end if; ISet <= "00"; if Prefix /= "00" then if Prefix = "11" then if IR(5) = '1' then XY_State <= "10"; else XY_State <= "01"; end if; else if Prefix = "10" then XY_State <= "00"; XY_Ind <= '0'; end if; ISet <= Prefix; end if; else XY_State <= "00"; XY_Ind <= '0'; end if; end if; else -- either (MCycle > 1) OR (MCycle = 1 AND TState > 3) if MCycle = "110" then XY_Ind <= '1'; if Prefix = "01" then ISet <= "01"; end if; end if; if T_Res = '1' then BTR_r <= (I_BT or I_BC or I_BTR) and not No_BTR; if Jump = '1' then A(15 downto 8) <= DI_Reg; A(7 downto 0) <= WZ(7 downto 0); PC(15 downto 8) <= unsigned(DI_Reg); PC(7 downto 0) <= unsigned(WZ(7 downto 0)); elsif JumpXY = '1' then A <= RegBusC; PC <= unsigned(RegBusC); elsif Call = '1' or RstP = '1' then A <= WZ; PC <= unsigned(WZ); elsif MCycle = MCycles and NMICycle = '1' then A <= "0000000001100110"; PC <= "0000000001100110"; elsif ((Mode /= 3 and MCycle = "011") or (Mode = 3 and MCycle = "100")) and IntCycle = '1' and IStatus = "10" then A(15 downto 8) <= I; A(7 downto 0) <= WZ(7 downto 0); PC(15 downto 8) <= unsigned(I); PC(7 downto 0) <= unsigned(WZ(7 downto 0)); else case Set_Addr_To is when aXY => if XY_State = "00" then A <= RegBusC; else if NextIs_XY_Fetch = '1' then A <= std_logic_vector(PC); else A <= WZ; end if; end if; when aIOA => if Mode = 3 then -- Memory map I/O on GBZ80 A(15 downto 8) <= (others => '1'); elsif Mode = 2 then -- Duplicate I/O address on 8080 A(15 downto 8) <= DI_Reg; else A(15 downto 8) <= ACC; end if; A(7 downto 0) <= DI_Reg; WZ <= (ACC & DI_Reg) + "1"; when aSP => A <= std_logic_vector(SP); when aBC => if Mode = 3 and IORQ_i = '1' then -- Memory map I/O on GBZ80 A(15 downto 8) <= (others => '1'); A(7 downto 0) <= RegBusC(7 downto 0); else A <= RegBusC; if SetWZ = "01" then WZ <= RegBusC + "1"; end if; if SetWZ = "10" then WZ(7 downto 0) <= RegBusC(7 downto 0) + "1"; WZ(15 downto 8) <= ACC; end if; end if; when aDE => A <= RegBusC; if SetWZ = "10" then WZ(7 downto 0) <= RegBusC(7 downto 0) + "1"; WZ(15 downto 8) <= ACC; end if; when aZI => if Inc_WZ = '1' then A <= std_logic_vector(unsigned(WZ) + 1); else A(15 downto 8) <= DI_Reg; A(7 downto 0) <= WZ(7 downto 0); if SetWZ = "10" then WZ(7 downto 0) <= WZ(7 downto 0) + "1"; WZ(15 downto 8) <= ACC; end if; end if; when others => if ISet = "10" and IR(7 downto 4) = x"B" and IR(2 downto 1) = "01" and MCycle = 3 and No_BTR = '0' then -- INIR, INDR, OTIR, OTDR A <= RegBusA_r; elsif No_PC = '0' or No_BTR = '1' or (I_DJNZ = '1' and IncDecZ = '1') or Mode > 1 then A <= std_logic_vector(PC); end if; end case; end if; if SetWZ = "11" then WZ <= std_logic_vector(ID16); end if; Save_ALU_r <= Save_ALU; ALU_Op_r <= ALU_Op; if Mode = 3 then if I_CPL = '1' then -- CPL ACC <= not ACC; F(Flag_H) <= '1'; F(Flag_N) <= '1'; end if; if I_CCF = '1' then -- CCF F(Flag_C) <= not F(Flag_C); F(Flag_H) <= '0'; F(Flag_N) <= '0'; end if; if I_SCF = '1' then -- SCF F(Flag_C) <= '1'; F(Flag_H) <= '0'; F(Flag_N) <= '0'; end if; else if I_CPL = '1' then -- CPL ACC <= not ACC; F(Flag_Y) <= not ACC(5); F(Flag_H) <= '1'; F(Flag_X) <= not ACC(3); F(Flag_N) <= '1'; end if; if I_CCF = '1' then -- CCF F(Flag_C) <= not F(Flag_C); F(Flag_Y) <= ACC(5); F(Flag_H) <= F(Flag_C); F(Flag_X) <= ACC(3); F(Flag_N) <= '0'; end if; if I_SCF = '1' then -- SCF F(Flag_C) <= '1'; F(Flag_Y) <= ACC(5); F(Flag_H) <= '0'; F(Flag_X) <= ACC(3); F(Flag_N) <= '0'; end if; end if; end if; if (TState = 2 and I_BTR = '1' and IR(0) = '1') or (TState = 1 and I_BTR = '1' and IR(0) = '0') then ioq := ('0' & DI_Reg) + ('0' & std_logic_vector(ID16(7 downto 0))); F(Flag_N) <= DI_Reg(7); F(Flag_C) <= ioq(8); F(Flag_H) <= ioq(8); ioq := (ioq and ('0'&x"07")) xor ('0'&BusA); F(Flag_P) <= not (ioq(0) xor ioq(1) xor ioq(2) xor ioq(3) xor ioq(4) xor ioq(5) xor ioq(6) xor ioq(7)); end if; if TState = 2 and Wait_n = '1' then if ISet = "01" and MCycle = "111" then IR <= DInst; end if; if JumpE = '1' then PC <= unsigned(signed(PC) + signed(DI_Reg)); WZ <= std_logic_vector(signed(PC) + signed(DI_Reg)); elsif Inc_PC = '1' then PC <= PC + 1; end if; if BTR_r = '1' then PC <= PC - 2; end if; if RstP = '1' then WZ <= (others =>'0'); WZ(5 downto 3) <= IR(5 downto 3); end if; end if; if TState = 3 and MCycle = "110" then WZ <= std_logic_vector(signed(RegBusC) + signed(DI_Reg)); end if; if MCycle = "011" and TState = 4 and No_BTR = '0' then if I_BT = '1' or I_BC = '1' then WZ <= std_logic_vector(PC)-"1"; end if; end if; if (TState = 2 and Wait_n = '1') or (TState = 4 and MCycle = "001") then if IncDec_16(2 downto 0) = "111" then if IncDec_16(3) = '1' then SP <= SP - 1; else SP <= SP + 1; end if; end if; end if; if ADDSPdd = '1' and TState = 2 then WZ <= std_logic_vector(SP); SP <= unsigned(signed(SP)+signed(Save_Mux)); end if; if LDSPHL = '1' then SP <= unsigned(RegBusC); end if; if ExchangeAF = '1' then Ap <= ACC; ACC <= Ap; Fp <= F; F <= Fp; end if; if ExchangeRS = '1' then Alternate <= not Alternate; end if; end if; if TState = 3 then if LDZ = '1' then WZ(7 downto 0) <= DI_Reg; end if; if LDW = '1' then WZ(15 downto 8) <= DI_Reg; end if; if Special_LD(2) = '1' then case Special_LD(1 downto 0) is when "00" => ACC <= I; F(Flag_P) <= IntE_FF2; F(Flag_S) <= I(7); if I = x"00" then F(Flag_Z) <= '1'; else F(Flag_Z) <= '0'; end if; F(Flag_Y) <= I(5); F(Flag_H) <= '0'; F(Flag_X) <= I(3); F(Flag_N) <= '0'; when "01" => ACC <= std_logic_vector(R); F(Flag_P) <= IntE_FF2; F(Flag_S) <= R(7); if R = x"00" then F(Flag_Z) <= '1'; else F(Flag_Z) <= '0'; end if; F(Flag_Y) <= R(5); F(Flag_H) <= '0'; F(Flag_X) <= R(3); F(Flag_N) <= '0'; when "10" => I <= ACC; when others => R <= unsigned(ACC); end case; end if; end if; if (I_DJNZ = '0' and Save_ALU_r = '1') or ALU_Op_r = "1001" then if Mode = 3 then F(6) <= F_Out(6); F(5) <= F_Out(5); F(7) <= F_Out(7); if PreserveC_r = '0' then F(4) <= F_Out(4); end if; else F(7 downto 1) <= F_Out(7 downto 1); if PreserveC_r = '0' then F(Flag_C) <= F_Out(0); end if; end if; end if; if T_Res = '1' and I_INRC = '1' then F(Flag_H) <= '0'; F(Flag_N) <= '0'; F(Flag_X) <= DI_Reg(3); F(Flag_Y) <= DI_Reg(5); if DI_Reg(7 downto 0) = "00000000" then F(Flag_Z) <= '1'; else F(Flag_Z) <= '0'; end if; F(Flag_S) <= DI_Reg(7); F(Flag_P) <= not (DI_Reg(0) xor DI_Reg(1) xor DI_Reg(2) xor DI_Reg(3) xor DI_Reg(4) xor DI_Reg(5) xor DI_Reg(6) xor DI_Reg(7)); end if; if TState = 1 and Auto_Wait_t1 = '0' then -- Keep D0 from M3 for RLD/RRD (Sorgelig) I_RXDD <= I_RLD or I_RRD; if I_RXDD='0' then DO <= BusB; end if; if I_RLD = '1' then DO(3 downto 0) <= BusA(3 downto 0); DO(7 downto 4) <= BusB(3 downto 0); end if; if I_RRD = '1' then DO(3 downto 0) <= BusB(7 downto 4); DO(7 downto 4) <= BusA(3 downto 0); end if; end if; if T_Res = '1' then Read_To_Reg_r(3 downto 0) <= Set_BusA_To; Read_To_Reg_r(4) <= Read_To_Reg; if Read_To_Acc = '1' then Read_To_Reg_r(3 downto 0) <= "0111"; Read_To_Reg_r(4) <= '1'; end if; end if; if TState = 1 and I_BT = '1' then F(Flag_X) <= ALU_Q(3); F(Flag_Y) <= ALU_Q(1); F(Flag_H) <= '0'; F(Flag_N) <= '0'; end if; if TState = 1 and I_BC = '1' then n := ALU_Q - ("0000000" & F_Out(Flag_H)); F(Flag_X) <= n(3); F(Flag_Y) <= n(1); end if; if I_BC = '1' or I_BT = '1' then F(Flag_P) <= IncDecZ; end if; if (TState = 1 and Save_ALU_r = '0' and Auto_Wait_t1 = '0') or (Save_ALU_r = '1' and ALU_OP_r /= "0111") then case Read_To_Reg_r is when "10111" => ACC <= Save_Mux; when "10110" => DO <= Save_Mux; when "11000" => SP(7 downto 0) <= unsigned(Save_Mux); when "11001" => SP(15 downto 8) <= unsigned(Save_Mux); when "11011" => if Mode = 3 then F(7 downto 4) <= Save_Mux(7 downto 4); F(3 downto 0) <= "0000"; -- bit 3 to 0 always return 0 else F <= Save_Mux; end if; when others => end case; if XYbit_undoc='1' then DO <= ALU_Q; end if; end if; end if; end if; end process; --------------------------------------------------------------------------- -- -- Multiply -- --------------------------------------------------------------------------- process (CLK_n, ACC, RegBusB, MULU_tmp, MULU_Fakt1, MULU_Prod32) begin MULU_tmp(31 downto 12) <= std_logic_vector((unsigned(MULU_Fakt1)*unsigned(MULU_Prod32(3 downto 0)))+unsigned("0000"&MULU_Prod32(31 downto 16))); MULU_tmp(11 downto 0) <= MULU_Prod32(15 downto 4); if rising_edge(CLK_n) then if ClkEn = '1' then if T_Res='1' then if I_MULUB='1' then MULU_Prod32(7 downto 0) <= ACC; MULU_Prod32(15 downto 8) <= "--------"; MULU_Prod32(31 downto 16) <= X"0000"; MULU_Fakt1(7 downto 0) <= "00000000"; if Set_BusB_To(0) = '1' then MULU_Fakt1(15 downto 8) <= RegBusB(7 downto 0); else MULU_Fakt1(15 downto 8) <= RegBusB(15 downto 8); end if; else MULU_Prod32(15 downto 0) <= RegBusA; MULU_Prod32(31 downto 16) <= X"0000"; MULU_Fakt1 <= RegBusB; end if; else MULU_Prod32 <= MULU_tmp; end if; end if; end if; end process; --------------------------------------------------------------------------- -- -- BC('), DE('), HL('), IX and IY -- --------------------------------------------------------------------------- process (CLK_n) begin if rising_edge(CLK_n) then if ClkEn = '1' then -- Bus A / Write RegAddrA_r <= Alternate & Set_BusA_To(2 downto 1); if XY_Ind = '0' and XY_State /= "00" and Set_BusA_To(2 downto 1) = "10" then RegAddrA_r <= XY_State(1) & "11"; end if; -- Bus B RegAddrB_r <= Alternate & Set_BusB_To(2 downto 1); if XY_Ind = '0' and XY_State /= "00" and Set_BusB_To(2 downto 1) = "10" then RegAddrB_r <= XY_State(1) & "11"; end if; -- Address from register RegAddrC <= Alternate & Set_Addr_To(1 downto 0); -- Jump (HL), LD SP,HL if (JumpXY = '1' or LDSPHL = '1') then RegAddrC <= Alternate & "10"; end if; if ((JumpXY = '1' or LDSPHL = '1') and XY_State /= "00") or (MCycle = "110") then RegAddrC <= XY_State(1) & "11"; end if; if I_DJNZ = '1' and Save_ALU_r = '1' and Mode < 2 then IncDecZ <= F_Out(Flag_Z); end if; if (TState = 2 or (TState = 3 and MCycle = "001")) and IncDec_16(2 downto 0) = "100" then if ID16 = 0 then IncDecZ <= '0'; else IncDecZ <= '1'; end if; end if; RegBusA_r <= RegBusA; end if; end if; end process; RegAddrA <= -- 16 bit increment/decrement Alternate & IncDec_16(1 downto 0) when (TState = 2 or (TState = 3 and MCycle = "001" and IncDec_16(2) = '1')) and XY_State = "00" else XY_State(1) & "11" when (TState = 2 or (TState = 3 and MCycle = "001" and IncDec_16(2) = '1')) and IncDec_16(1 downto 0) = "10" else -- EX HL,DL Alternate & "10" when ExchangeDH = '1' and TState = 3 else Alternate & "01" when (ExchangeDH = '1' or I_MULU = '1') and TState = 4 else -- LDHLSP "010" when LDHLSP = '1' and TState = 4 else -- Bus A / Write RegAddrA_r; RegAddrB <= -- EX HL,DL Alternate & "01" when ExchangeDH = '1' and TState = 3 else -- Bus B RegAddrB_r; ID16 <= signed(RegBusA) - 1 when IncDec_16(3) = '1' else signed(RegBusA) + 1; process (Save_ALU_r, Auto_Wait_t1, ALU_OP_r, Read_To_Reg_r, I_MULU, T_Res, ExchangeDH, IncDec_16, MCycle, TState, Wait_n, LDHLSP) begin RegWEH <= '0'; RegWEL <= '0'; if (TState = 1 and Save_ALU_r = '0' and Auto_Wait_t1 = '0') or (Save_ALU_r = '1' and ALU_OP_r /= "0111") then case Read_To_Reg_r is when "10000" | "10001" | "10010" | "10011" | "10100" | "10101" => RegWEH <= not Read_To_Reg_r(0); RegWEL <= Read_To_Reg_r(0); when others => end case; end if; if I_MULU = '1' and (T_Res = '1' or TState = 4) then -- TState = 4 DE write RegWEH <= '1'; RegWEL <= '1'; end if; if ExchangeDH = '1' and (TState = 3 or TState = 4) then RegWEH <= '1'; RegWEL <= '1'; end if; if LDHLSP = '1' and MCycle = "010" and TState = 4 then RegWEH <= '1'; RegWEL <= '1'; end if; if IncDec_16(2) = '1' and ((TState = 2 and Wait_n = '1' and MCycle /= "001") or (TState = 3 and MCycle = "001")) then case IncDec_16(1 downto 0) is when "00" | "01" | "10" => RegWEH <= '1'; RegWEL <= '1'; when others => end case; end if; end process; TmpAddr2 <= std_logic_vector(unsigned(signed(SP) + signed(Save_Mux))); process (Save_Mux, RegBusB, RegBusA_r, ID16, I_MULU, MULU_Prod32, MULU_tmp, T_Res, ExchangeDH, IncDec_16, MCycle, TState, Wait_n, LDHLSP, TmpAddr2) begin RegDIH <= Save_Mux; RegDIL <= Save_Mux; if I_MULU = '1' then if T_Res = '1' then RegDIH <= MULU_Prod32(31 downto 24); RegDIL <= MULU_Prod32(23 downto 16); else RegDIH <= MULU_tmp(15 downto 8); -- TState = 4 DE write RegDIL <= MULU_tmp(7 downto 0); end if; end if; if LDHLSP = '1' and MCycle = "010" and TState = 4 then RegDIH <= TmpAddr2(15 downto 8); RegDIL <= TmpAddr2(7 downto 0); end if; if ExchangeDH = '1' and TState = 3 then RegDIH <= RegBusB(15 downto 8); RegDIL <= RegBusB(7 downto 0); end if; if ExchangeDH = '1' and TState = 4 then RegDIH <= RegBusA_r(15 downto 8); RegDIL <= RegBusA_r(7 downto 0); end if; if IncDec_16(2) = '1' and ((TState = 2 and MCycle /= "001") or (TState = 3 and MCycle = "001")) then RegDIH <= std_logic_vector(ID16(15 downto 8)); RegDIL <= std_logic_vector(ID16(7 downto 0)); end if; end process; Regs : T80_Reg port map( Clk => CLK_n, CEN => ClkEn, WEH => RegWEH, WEL => RegWEL, AddrA => RegAddrA, AddrB => RegAddrB, AddrC => RegAddrC, DIH => RegDIH, DIL => RegDIL, DOAH => RegBusA(15 downto 8), DOAL => RegBusA(7 downto 0), DOBH => RegBusB(15 downto 8), DOBL => RegBusB(7 downto 0), DOCH => RegBusC(15 downto 8), DOCL => RegBusC(7 downto 0), DOR => DOR, DIRSet => DIRSet, DIR => DIR(207 downto 80)); --------------------------------------------------------------------------- -- -- Buses -- --------------------------------------------------------------------------- process (CLK_n) begin if rising_edge(CLK_n) then if ClkEn = '1' then case Set_BusB_To is when "0111" => BusB <= ACC; when "0000" | "0001" | "0010" | "0011" | "0100" | "0101" => if Set_BusB_To(0) = '1' then BusB <= RegBusB(7 downto 0); else BusB <= RegBusB(15 downto 8); end if; when "0110" => BusB <= DI_Reg; when "1000" => BusB <= std_logic_vector(SP(7 downto 0)); when "1001" => BusB <= std_logic_vector(SP(15 downto 8)); when "1010" => BusB <= "00000001"; when "1011" => BusB <= F; when "1100" => BusB <= std_logic_vector(PC(7 downto 0)); when "1101" => BusB <= std_logic_vector(PC(15 downto 8)); when "1110" => if IR = x"71" and out0 = '1' then BusB <= "11111111"; else BusB <= "00000000"; end if; when others => BusB <= "--------"; end case; case Set_BusA_To is when "0111" => BusA <= ACC; when "0000" | "0001" | "0010" | "0011" | "0100" | "0101" => if Set_BusA_To(0) = '1' then BusA <= RegBusA(7 downto 0); else BusA <= RegBusA(15 downto 8); end if; when "0110" => BusA <= DI_Reg; when "1000" => BusA <= std_logic_vector(SP(7 downto 0)); when "1001" => BusA <= std_logic_vector(SP(15 downto 8)); when "1010" => BusA <= "00000000"; when others => BusA <= "--------"; end case; if XYbit_undoc='1' then BusA <= DI_Reg; BusB <= DI_Reg; end if; end if; end if; end process; --------------------------------------------------------------------------- -- -- Generate external control signals -- --------------------------------------------------------------------------- process (RESET_n,CLK_n) begin if RESET_n = '0' then RFSH_n <= '1'; elsif rising_edge(CLK_n) then if DIRSet = '0' and CEN = '1' then if MCycle = "001" and ((TState = 2 and Wait_n = '1') or TState = 3) then RFSH_n <= '0'; else RFSH_n <= '1'; end if; end if; end if; end process; MC <= std_logic_vector(MCycle); TS <= std_logic_vector(TState); DI_Reg <= DI; HALT_n <= not Halt_FF; BUSAK_n <= not (BusAck and RESET_n); IntCycle_n <= not IntCycle; NMICycle_n <= not NMICycle; IntE <= IntE_FF1; IORQ <= IORQ_i; Stop <= I_DJNZ; ------------------------------------------------------------------------- -- -- Main state machine -- ------------------------------------------------------------------------- process (RESET_n, CLK_n) variable OldNMI_n : std_logic; begin if RESET_n = '0' then MCycle <= "001"; TState <= "000"; Pre_XY_F_M <= "000"; Halt_FF <= '0'; --BusAck <= '0'; NMICycle <= '0'; IntCycle <= '0'; IntE_FF1 <= '0'; IntE_FF2 <= '0'; No_BTR <= '0'; Auto_Wait_t1 <= '0'; Auto_Wait_t2 <= '0'; M1_n <= '1'; --BusReq_s <= '0'; NMI_s <= '0'; elsif rising_edge(CLK_n) then if DIRSet = '1' then IntE_FF2 <= DIR(211); IntE_FF1 <= DIR(210); else if NMI_n = '0' and OldNMI_n = '1' then NMI_s <= '1'; end if; OldNMI_n := NMI_n; if CEN = '1' then BusReq_s <= not BUSRQ_n; Auto_Wait_t2 <= Auto_Wait_t1; if T_Res = '1' then Auto_Wait_t1 <= '0'; Auto_Wait_t2 <= '0'; else Auto_Wait_t1 <= Auto_Wait or IORQ_i; end if; No_BTR <= (I_BT and (not IR(4) or not F(Flag_P))) or (I_BC and (not IR(4) or F(Flag_Z) or not F(Flag_P))) or (I_BTR and (not IR(4) or F(Flag_Z))); if TState = 2 then if SetEI = '1' then IntE_FF1 <= '1'; IntE_FF2 <= '1'; end if; if I_RETN = '1' then IntE_FF1 <= IntE_FF2; end if; end if; if TState = 3 then if SetDI = '1' then IntE_FF1 <= '0'; IntE_FF2 <= '0'; end if; end if; if IntCycle = '1' or NMICycle = '1' then Halt_FF <= '0'; end if; if MCycle = "001" and TState = 2 and Wait_n = '1' then M1_n <= '1'; end if; if BusReq_s = '1' and BusAck = '1' then else BusAck <= '0'; if TState = 2 and Wait_n = '0' then elsif T_Res = '1' then if Halt = '1' and ( not(Mode = 3 and INT_n = '0' and IntE_FF1 = '0')) then -- halt bug when Mode = 3 , INT_n = '0' and IME=0 Halt_FF <= '1'; end if; if BusReq_s = '1' then BusAck <= '1'; else TState <= "001"; if (IntCycle = '1' and Mode = 3) then -- GB: read interrupt at MCycle 3 if (MCycle = "010") then M1_n <= '0'; else M1_n <= '1'; end if; end if; if NextIs_XY_Fetch = '1' then MCycle <= "110"; Pre_XY_F_M <= MCycle; if IR = "00110110" and Mode = 0 then Pre_XY_F_M <= "010"; end if; elsif (MCycle = "111") or (MCycle = "110" and Mode = 1 and ISet /= "01") then MCycle <= std_logic_vector(unsigned(Pre_XY_F_M) + 1); elsif (MCycle = MCycles) or No_BTR = '1' or (MCycle = "010" and I_DJNZ = '1' and IncDecZ = '1') then M1_n <= '0'; MCycle <= "001"; IntCycle <= '0'; NMICycle <= '0'; if NMI_s = '1' and Prefix = "00" then NMI_s <= '0'; NMICycle <= '1'; IntE_FF1 <= '0'; elsif IntE_FF1 = '1' and INT_n='0' and Prefix = "00" and SetEI = '0' then IntCycle <= '1'; IntE_FF1 <= '0'; IntE_FF2 <= '0'; elsif (Halt_FF = '1' and INT_n = '0' and Mode = 3) then Halt_FF <= '0'; end if; else MCycle <= std_logic_vector(unsigned(MCycle) + 1); end if; end if; else if (Auto_Wait = '1' and Auto_Wait_t2 = '0') nor (IOWait = 1 and IORQ_i = '1' and Auto_Wait_t1 = '0') then TState <= TState + 1; end if; end if; end if; if TState = 0 then M1_n <= '0'; end if; end if; end if; end if; end process; Auto_Wait <= '1' when IntCycle = '1' and MCycle = "001" else '0'; end;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc1275.vhd,v 1.2 2001-10-26 16:30:08 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c08s04b00x00p04n01i01275ent IS END c08s04b00x00p04n01i01275ent; ARCHITECTURE c08s04b00x00p04n01i01275arch OF c08s04b00x00p04n01i01275ent IS signal S1,S2,S3 : integer ; BEGIN TESTING: PROCESS BEGIN S1 > S2 <= S3; assert FALSE report "***FAILED TEST: c08s04b00x00p04n01i01275 - Relational expressions are not allowed on the left-hand side of a signal assignment." severity ERROR; wait; END PROCESS TESTING; END c08s04b00x00p04n01i01275arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc1275.vhd,v 1.2 2001-10-26 16:30:08 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c08s04b00x00p04n01i01275ent IS END c08s04b00x00p04n01i01275ent; ARCHITECTURE c08s04b00x00p04n01i01275arch OF c08s04b00x00p04n01i01275ent IS signal S1,S2,S3 : integer ; BEGIN TESTING: PROCESS BEGIN S1 > S2 <= S3; assert FALSE report "***FAILED TEST: c08s04b00x00p04n01i01275 - Relational expressions are not allowed on the left-hand side of a signal assignment." severity ERROR; wait; END PROCESS TESTING; END c08s04b00x00p04n01i01275arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc1275.vhd,v 1.2 2001-10-26 16:30:08 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c08s04b00x00p04n01i01275ent IS END c08s04b00x00p04n01i01275ent; ARCHITECTURE c08s04b00x00p04n01i01275arch OF c08s04b00x00p04n01i01275ent IS signal S1,S2,S3 : integer ; BEGIN TESTING: PROCESS BEGIN S1 > S2 <= S3; assert FALSE report "***FAILED TEST: c08s04b00x00p04n01i01275 - Relational expressions are not allowed on the left-hand side of a signal assignment." severity ERROR; wait; END PROCESS TESTING; END c08s04b00x00p04n01i01275arch;
library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity LogicalAND_2x16 is Port ( input_A, input_B: in STD_LOGIC_VECTOR (15 downto 0); output : out STD_LOGIC_VECTOR (15 downto 0)); end LogicalAND_2x16; architecture skeleton of LogicalAND_2x16 is begin output <= input_A AND input_B; end skeleton;
architecture RTL of ENTITY_NAME is begin process begin SEL_LABEL : with some expression select ? some target <= transport some expression when some choice | some other choice | some other other choice, some expression when some choice, some expression when some choice | some other choice; SEL_LABEL : with some expression select ? some target <= some expression when some choice | some other choice | some other other choice, some expression when some choice, some expression when some choice | some other choice; SEL_LABEL : with some expression select some target <= transport some expression when some choice | some other choice | some other other choice, some expression when some choice, some expression when some choice | some other choice; SEL_LABEL : with some expression select ? some target <= transport some expression when some choice; with some expression select ? some target <= some expression when some choice | some other choice | some other other choice, some expression when some choice, some expression when some choice | some other choice; with some expression select ? some target <= some expression after 10 ns when some choice | some other choice | some other other choice, null when some choice, null after 20 ns when some choice | some other choice, some expression after 10 ns, some other expression after 20 ns, some last expression when some choice | some other choice, unaffected when some last choice; end process; end architecture RTL;
-- This file is not intended for synthesis, is is present so that simulators -- see a complete view of the system. -- You may use the entity declaration from this file as the basis for a -- component declaration in a VHDL file instantiating this entity. library IEEE; use IEEE.std_logic_1164.all; use IEEE.NUMERIC_STD.all; entity Gray_Processing is port ( Avalon_ST_Sink_data : in std_logic_vector(24-1 downto 0); Avalon_ST_Sink_endofpacket : in std_logic; Avalon_ST_Sink_ready : out std_logic; Avalon_ST_Sink_startofpacket : in std_logic; Avalon_ST_Sink_valid : in std_logic; Avalon_ST_Source_data : out std_logic_vector(24-1 downto 0); Avalon_ST_Source_endofpacket : out std_logic; Avalon_ST_Source_ready : in std_logic; Avalon_ST_Source_startofpacket : out std_logic; Avalon_ST_Source_valid : out std_logic; Clock : in std_logic; aclr : in std_logic ); end entity Gray_Processing; architecture rtl of Gray_Processing is component Gray_Processing_GN is port ( Avalon_ST_Sink_data : in std_logic_vector(24-1 downto 0); Avalon_ST_Sink_endofpacket : in std_logic; Avalon_ST_Sink_ready : out std_logic; Avalon_ST_Sink_startofpacket : in std_logic; Avalon_ST_Sink_valid : in std_logic; Avalon_ST_Source_data : out std_logic_vector(24-1 downto 0); Avalon_ST_Source_endofpacket : out std_logic; Avalon_ST_Source_ready : in std_logic; Avalon_ST_Source_startofpacket : out std_logic; Avalon_ST_Source_valid : out std_logic; Clock : in std_logic; aclr : in std_logic ); end component Gray_Processing_GN; begin Gray_Processing_GN_0: if true generate inst_Gray_Processing_GN_0: Gray_Processing_GN port map(Avalon_ST_Sink_data => Avalon_ST_Sink_data, Avalon_ST_Sink_endofpacket => Avalon_ST_Sink_endofpacket, Avalon_ST_Sink_ready => Avalon_ST_Sink_ready, Avalon_ST_Sink_startofpacket => Avalon_ST_Sink_startofpacket, Avalon_ST_Sink_valid => Avalon_ST_Sink_valid, Avalon_ST_Source_data => Avalon_ST_Source_data, Avalon_ST_Source_endofpacket => Avalon_ST_Source_endofpacket, Avalon_ST_Source_ready => Avalon_ST_Source_ready, Avalon_ST_Source_startofpacket => Avalon_ST_Source_startofpacket, Avalon_ST_Source_valid => Avalon_ST_Source_valid, Clock => Clock, aclr => aclr); end generate; end architecture rtl;
-- This file is not intended for synthesis, is is present so that simulators -- see a complete view of the system. -- You may use the entity declaration from this file as the basis for a -- component declaration in a VHDL file instantiating this entity. library IEEE; use IEEE.std_logic_1164.all; use IEEE.NUMERIC_STD.all; entity Gray_Processing is port ( Avalon_ST_Sink_data : in std_logic_vector(24-1 downto 0); Avalon_ST_Sink_endofpacket : in std_logic; Avalon_ST_Sink_ready : out std_logic; Avalon_ST_Sink_startofpacket : in std_logic; Avalon_ST_Sink_valid : in std_logic; Avalon_ST_Source_data : out std_logic_vector(24-1 downto 0); Avalon_ST_Source_endofpacket : out std_logic; Avalon_ST_Source_ready : in std_logic; Avalon_ST_Source_startofpacket : out std_logic; Avalon_ST_Source_valid : out std_logic; Clock : in std_logic; aclr : in std_logic ); end entity Gray_Processing; architecture rtl of Gray_Processing is component Gray_Processing_GN is port ( Avalon_ST_Sink_data : in std_logic_vector(24-1 downto 0); Avalon_ST_Sink_endofpacket : in std_logic; Avalon_ST_Sink_ready : out std_logic; Avalon_ST_Sink_startofpacket : in std_logic; Avalon_ST_Sink_valid : in std_logic; Avalon_ST_Source_data : out std_logic_vector(24-1 downto 0); Avalon_ST_Source_endofpacket : out std_logic; Avalon_ST_Source_ready : in std_logic; Avalon_ST_Source_startofpacket : out std_logic; Avalon_ST_Source_valid : out std_logic; Clock : in std_logic; aclr : in std_logic ); end component Gray_Processing_GN; begin Gray_Processing_GN_0: if true generate inst_Gray_Processing_GN_0: Gray_Processing_GN port map(Avalon_ST_Sink_data => Avalon_ST_Sink_data, Avalon_ST_Sink_endofpacket => Avalon_ST_Sink_endofpacket, Avalon_ST_Sink_ready => Avalon_ST_Sink_ready, Avalon_ST_Sink_startofpacket => Avalon_ST_Sink_startofpacket, Avalon_ST_Sink_valid => Avalon_ST_Sink_valid, Avalon_ST_Source_data => Avalon_ST_Source_data, Avalon_ST_Source_endofpacket => Avalon_ST_Source_endofpacket, Avalon_ST_Source_ready => Avalon_ST_Source_ready, Avalon_ST_Source_startofpacket => Avalon_ST_Source_startofpacket, Avalon_ST_Source_valid => Avalon_ST_Source_valid, Clock => Clock, aclr => aclr); end generate; end architecture rtl;
-- The CPU, only the stateless parts library ieee; use ieee.std_logic_1164.all; use work.arch_defs.all; use work.memory_map.all; -- We keep keep all state (registers, memory) out of the CPU -- This allows for testbenches that can instantiate them internally -- and check whether everything works as expected entity cpu is generic(PC_ADD : natural := 4; SINGLE_ADDRESS_SPACE : boolean := true); port( clk : in std_logic; rst : in std_logic; -- Register File readreg1, readreg2 : out reg_t; writereg: out reg_t; regWriteData: out word_t; regReadData1, regReadData2 : in word_t; regwrite : out std_logic; -- Memory top_addr : out addr_t; top_dout : in word_t; top_din : out word_t; top_size : out ctrl_memwidth_t; top_wr : out ctrl_t; -- Debug info instruction : out instruction_t ); end; architecture struct of cpu is component Pipeliner is port( clk, rst : in std_logic; ID_en, IF_en, EX_en, MEM_en, MEM_read, WB_en : out std_logic; Instruction_done : out std_logic ); end component; component PipeReg is generic (BITS : natural := 32); port( data : in std_logic_vector(BITS-1 downto 0); enable : in std_logic; -- load/enable. clr : in std_logic; -- async. clear. clk : in std_logic; -- clock. output : out std_logic_vector(BITS-1 downto 0) -- output. ); end component; component CtrlReg is port( data : in std_logic; enable : in std_logic; -- load/enable. clr : in std_logic; -- async. clear. clk : in std_logic; -- clock. output : out std_logic ); end component; component AluOpReg is port( data : in alu_op_t; enable : in std_logic; -- load/enable. clr : in std_logic; -- async. clear. clk : in std_logic; -- clock. output : out alu_op_t ); end component; component MUX is generic (BITS : natural := 32); port ( sel: in ctrl_t; input0 : in std_logic_vector(BITS-1 downto 0); input1 : in std_logic_vector(BITS-1 downto 0); output : out std_logic_vector(BITS-1 downto 0) ); end component; component MUX1bit is port ( sel: in ctrl_t; input0 : in std_logic; input1 : in std_logic; output : out std_logic ); end component; component InstructionFetch is generic(PC_ADD : natural := PC_ADD; SINGLE_ADDRESS_SPACE : boolean := SINGLE_ADDRESS_SPACE); port ( clk : in std_logic; rst : in std_logic; new_pc : in addr_t; pc_plus_4 : out addr_t; instr : out instruction_t; -- outbound to top level module top_addr : out addr_t; top_dout : in word_t; top_din : out word_t; top_size : out ctrl_memwidth_t; top_wr : out ctrl_t ); end component; component InstructionDecode is port( instr : in instruction_t; pc_plus_4 : in addr_t; jump_addr : out addr_t; regwrite, link, jumpreg, jumpdirect, branch : out ctrl_t; memread, memwrite : out ctrl_memwidth_t; memtoreg, memsex : out ctrl_t; shift, alusrc : out ctrl_t; aluop : out alu_op_t; readreg1, readreg2, writereg : out reg_t; zeroxed, sexed : out word_t; clk : in std_logic; rst : in std_logic); end component; component Execute is port ( pc_plus_4 : in addr_t; regReadData1, regReadData2 : in word_t; branch_addr : out addr_t; branch_in : in ctrl_t; shift_in, alusrc_in : in ctrl_t; aluop_in : in alu_op_t; zeroxed, sexed : in word_t; takeBranch : out ctrl_t; AluResult : out word_t; clk : in std_logic; rst : in std_logic ); end component; component MemoryAccess is port( -- inbound Address_in : in addr_t; WriteData_in : in word_t; ReadData_in : out word_t; MemRead_in, MemWrite_in : in ctrl_memwidth_t; MemSex_in : in std_logic; clk : in std_logic; -- outbound to top level module top_addr : out addr_t; top_dout : in word_t; top_din : out word_t; top_size : out ctrl_memwidth_t; top_wr : out ctrl_t); end component; component WriteBack is port( Link, JumpReg, JumpDir, MemToReg, TakeBranch : in ctrl_t; pc_plus_4, branch_addr, jump_addr: in addr_t; aluResult, memReadData, regReadData1 : in word_t; regWriteData : out word_t; new_pc : out addr_t); end component; signal IF_en : std_logic := '0'; signal ID_en : std_logic := '0'; signal EX_en : std_logic := '0'; signal MEM_en : std_logic := '0'; signal MEM_read : std_logic := '0'; signal WB_en : std_logic := '0'; signal Instruction_done : std_logic := '0'; signal regwrite_no_wb : std_logic := '0'; signal regwrite_pre_reg : ctrl_t; signal Link, JumpReg, JumpDir, Branch, MemToReg, Shift, ALUSrc, MemSex : ctrl_t; signal Link_pre_reg, JumpReg_pre_reg, JumpDir_pre_reg, Branch_pre_reg, MemToReg_pre_reg, Shift_pre_reg, ALUSrc_pre_reg, MemSex_pre_reg : ctrl_t; signal TakeBranch, TakeBranch_pre_reg : ctrl_t; signal MemRead, MemWrite : ctrl_memwidth_t; signal MemRead_pre_reg, MemWrite_pre_reg : ctrl_memwidth_t; signal memReadData, memReadData_pre_reg : word_t; signal new_pc, new_pc_pre_reg : addr_t := BOOT_ADDR; signal pc_plus_4, pc_plus_4_pre_reg, jump_addr, jump_addr_pre_reg, branch_addr : addr_t; signal instr, instr_pre_reg : instruction_t; signal zeroxed, sexed, zeroxed_pre_reg, sexed_pre_reg, aluResult, aluResult_pre_reg: word_t; signal readreg1_pre_reg, readreg2_pre_reg, writereg_pre_reg : reg_t; signal regwritedata_pre_reg : word_t; signal aluop : alu_op_t; signal aluop_slv : natural; -- debug only; signal aluop_pre_reg : alu_op_t; signal selMEM : ctrl_t := '0'; signal top_addr_mem, top_addr_if : addr_t; signal top_din_mem, top_din_if : word_t; signal top_size_mem, top_size_if : ctrl_memwidth_t; signal top_wr_mem, top_wr_if : ctrl_t; begin aluop_slv <= alu_op_t'pos(aluop); if1: InstructionFetch generic map (PC_ADD => PC_ADD) port map( clk => clk, rst => rst, new_pc => new_pc, pc_plus_4 => pc_plus_4_pre_reg, instr => instr_pre_reg, top_addr => top_addr_if, top_dout => top_dout, top_din => top_din_if, top_size => top_size_if, top_wr => top_wr_if ); regwrite <= WB_en and regwrite_no_wb; new_pc_reg: PipeReg generic map(32) port map ( data => new_pc_pre_reg, enable => WB_en, clr => rst, clk => clk, output => new_pc ); pc_plus_4_reg: PipeReg generic map(32) port map ( data => pc_plus_4_pre_reg, enable => IF_en, clr => rst, clk => clk, output => pc_plus_4 ); instr_reg: PipeReg generic map(32) port map ( data => instr_pre_reg, enable => IF_en, clr => rst, clk => clk, output => instr ); instruction <= instr; id1: InstructionDecode port map( instr => instr, pc_plus_4 => pc_plus_4, jump_addr => jump_addr_pre_reg, regwrite => regwrite_pre_reg, link => link_pre_reg, jumpreg => jumpreg_pre_reg, jumpdirect => jumpDir_pre_reg, branch => Branch_pre_reg, memread => memRead_pre_reg, memwrite => memWrite_pre_reg, memtoreg => memToReg_pre_reg, memsex => memSex_pre_reg, shift => shift_pre_reg, alusrc => aluSrc_pre_reg, aluop => aluOp_pre_reg, readreg1 => readReg1_pre_reg, readreg2 => readReg2_pre_reg, writeReg => writeReg_pre_reg, zeroxed => zeroxed_pre_reg, sexed => sexed_pre_reg, clk => clk, rst => rst ); readreg1_reg: PipeReg generic map(5) port map ( data => readreg1_pre_reg, enable => ID_en, clr => rst, clk => clk, output => readreg1 ); readreg2_reg: PipeReg generic map(5) port map ( data => readreg2_pre_reg, enable => ID_en, clr => rst, clk => clk, output => readreg2 ); writereg_reg: PipeReg generic map(5) port map ( data => writereg_pre_reg, enable => ID_en, clr => rst, clk => clk, output => writereg ); pipeliner1: pipeliner port map ( clk => clk, rst => rst, IF_en => IF_en, ID_en => ID_en, EX_en => EX_en, MEM_en => MEM_en, MEM_read => MEM_read, WB_en => WB_en, Instruction_done => Instruction_done ); ctrlvec_regwrite_reg : CtrlReg port map (data => regwrite_pre_reg, enable => ID_en, clr => rst, clk => clk, output => regwrite_no_wb); --ctrlvec_regdst_reg : CtrlReg port map (data => regdst_pre_reg, enable => ID_en, clr => rst, clk => clk, output => regdst); ctrlvec_link_reg : CtrlReg port map (data => link_pre_reg, enable => ID_en, clr => rst, clk => clk, output => link); ctrlvec_jumpreg_reg : CtrlReg port map (data => jumpreg_pre_reg, enable => ID_en, clr => rst, clk => clk, output => jumpreg); ctrlvec_jumpdirect_reg : CtrlReg port map (data => jumpdir_pre_reg, enable => ID_en, clr => rst, clk => clk, output => jumpdir); ctrlvec_branch_reg : CtrlReg port map (data => branch_pre_reg, enable => ID_en, clr => rst, clk => clk, output => branch); ctrlvec_memread_reg : PipeReg generic map(2) port map (data => memread_pre_reg, enable => ID_en, clr => rst, clk => clk, output => memread); ctrlvec_memtoreg_reg : CtrlReg port map (data => memtoreg_pre_reg, enable => ID_en, clr => rst, clk => clk, output => memtoreg); ctrlvec_memsex_reg : CtrlReg port map (data => memsex_pre_reg, enable => ID_en, clr => rst, clk => clk, output => memsex); ctrlvec_memwrite_reg : PipeReg generic map (2) port map (data => memwrite_pre_reg, enable => ID_en, clr => rst, clk => clk, output => memwrite); ctrlvec_shift_reg : CtrlReg port map (data => shift_pre_reg, enable => ID_en, clr => rst, clk => clk, output => shift); ctrlvec_alusrc_reg : CtrlReg port map (data => alusrc_pre_reg, enable => ID_en, clr => rst, clk => clk, output => alusrc); ctrlvec_aluop_reg : AluOpReg port map (data => aluop_pre_reg, enable => ID_en, clr => rst, clk => clk, output => aluop); jump_addr_reg: PipeReg generic map(32) port map ( data => jump_addr_pre_reg, enable => ID_en, clr => rst, clk => clk, output => jump_addr ); zeroxed_reg: PipeReg generic map(32) port map ( data => zeroxed_pre_reg, enable => ID_en, clr => rst, clk => clk, output => zeroxed ); sexed_reg: PipeReg generic map(32) port map ( data => sexed_pre_reg, enable => ID_en, clr => rst, clk => clk, output => sexed ); ex1: Execute port map( pc_plus_4 => pc_plus_4, regReadData1 => regReadData1, regReadData2 => regReadData2, branch_addr => branch_addr, branch_in => Branch, shift_in => shift, alusrc_in => ALUSrc, aluop_in => ALUOp, zeroxed => zeroxed, sexed => sexed, takeBranch => takeBranch_pre_reg, ALUResult => ALUResult_pre_reg, clk => clk, rst => rst ); takeBranch_reg: CtrlReg port map ( data =>takeBranch_pre_reg, enable => EX_en, clr => rst, clk => clk, output => takeBranch ); aluResult_reg: PipeReg generic map(32) port map ( data => aluResult_pre_reg, enable => EX_en, clr => rst, clk => clk, output => aluResult ); process (clk) begin if rising_edge(clk) and (EX_en = '1' or WB_en = '1') then selMEM <= not selMEM; end if; end process; addrMux: MUX port map(sel=>selMEM,input0=>top_addr_if,input1=>top_addr_mem,output=>top_addr); dinMux: MUX port map(sel=>selMEM,input0=>top_din_if, input1=>top_din_mem,output=>top_din); sizeMux: MUX generic map(2) port map(sel=>selMEM,input0=>top_size_if,input1=>top_size_mem,output=>top_size); wrMux: MUX1bit port map(sel=>selMEM,input0=>top_wr_if, input1=>top_wr_mem,output=>top_wr); ma1: memoryAccess port map( -- inbound Address_in => AluResult, WriteData_in => regReadData2, ReadData_in => memReadData_pre_reg, MemRead_in => memRead, MemWrite_in => memWrite, MemSex_in => MemSex, clk => clk, -- outbound to top level module top_addr => top_addr_mem, top_dout => top_dout, top_din => top_din_mem, top_size => top_size_mem, top_wr => top_wr_mem); memReadData_reg: PipeReg generic map (32) port map ( data => memReadData_pre_reg, enable => MEM_en, clr => rst, clk => clk, output => memReadData ); -- TODO: Remove this? regWrite_data_reg: PipeReg generic map(32) port map ( data => regwritedata_pre_reg, enable => '1', clr => rst, clk => clk, output => regwritedata ); wb1: WriteBack port map( Link => Link, JumpReg => JumpReg, JumpDir => JumpDir, MemToReg => MemToReg, TakeBranch => TakeBranch, pc_plus_4 => pc_plus_4, branch_addr => branch_addr, jump_addr => jump_addr, aluResult => aluResult, memReadData => memReadData, regReadData1 => regReadData1, regWriteData => regWriteData_pre_reg, new_pc => new_pc_pre_reg); end struct;
------------------------------------------------------------------------------ -- This file is a part of the GRLIB VHDL IP LIBRARY -- Copyright (C) 2003 - 2008, Gaisler Research -- Copyright (C) 2008 - 2014, Aeroflex Gaisler -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ----------------------------------------------------------------------------- -- Entity: grspw_codec_gen -- File: grspw_codec_gen.vhd -- Author: Marko Isomaki - Aeroflex Gaisler -- Description: Generic wrapper for SpaceWire encoder-decoder ------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; library grlib; use grlib.stdlib.all; library techmap; use techmap.gencomp.all; library spw; use spw.spwcomp.all; entity grspw_codec_gen is generic( ports : integer range 1 to 2 := 1; input_type : integer range 0 to 3 := 0; output_type : integer range 0 to 2 := 0; rxtx_sameclk : integer range 0 to 1 := 0; fifosize : integer range 16 to 2048 := 64; tech : integer; scantest : integer range 0 to 1 := 0; techfifo : integer range 0 to 1 := 0; ft : integer range 0 to 2 := 0 ); port( rst : in std_ulogic; clk : in std_ulogic; rxclk0 : in std_ulogic; rxclk1 : in std_ulogic; txclk : in std_ulogic; txclkn : in std_ulogic; testen : in std_ulogic; testrst : in std_ulogic; --spw in d : in std_logic_vector(3 downto 0); dv : in std_logic_vector(3 downto 0); dconnect : in std_logic_vector(3 downto 0); --spw out do : out std_logic_vector(3 downto 0); so : out std_logic_vector(3 downto 0); --link fsm linkdisabled : in std_ulogic; linkstart : in std_ulogic; autostart : in std_ulogic; portsel : in std_ulogic; noportforce : in std_ulogic; rdivisor : in std_logic_vector(7 downto 0); idivisor : in std_logic_vector(7 downto 0); state : out std_logic_vector(2 downto 0); actport : out std_ulogic; dconnecterr : out std_ulogic; crederr : out std_ulogic; escerr : out std_ulogic; parerr : out std_ulogic; --rx iface rxicharav : out std_ulogic; rxicharcnt : out std_logic_vector(11 downto 0); rxichar : out std_logic_vector(8 downto 0); rxiread : in std_ulogic; rxififorst : in std_ulogic; --tx iface txicharcnt : out std_logic_vector(11 downto 0); txifull : out std_ulogic; txiempty : out std_ulogic; txiwrite : in std_ulogic; txichar : in std_logic_vector(8 downto 0); txififorst : in std_ulogic; txififorstact: out std_ulogic; --time iface tickin : in std_ulogic; timein : in std_logic_vector(7 downto 0); tickin_done : out std_ulogic; tickout : out std_ulogic; timeout : out std_logic_vector(7 downto 0); --misc merror : out std_ulogic ); end entity; architecture rtl of grspw_codec_gen is constant fabits : integer := log2(fifosize/4)+2; signal rxrenable : std_ulogic; signal rxraddress : std_logic_vector(10 downto 0); signal rxwrite : std_ulogic; signal rxwdata : std_logic_vector(9 downto 0); signal rxwaddress : std_logic_vector(10 downto 0); signal rxrdata : std_logic_vector(9 downto 0); signal rxerror : std_logic_vector(1 downto 0); signal rxaccess : std_ulogic; signal txrenable : std_ulogic; signal txraddress : std_logic_vector(10 downto 0); signal txwrite : std_ulogic; signal txwdata : std_logic_vector(8 downto 0); signal txwaddress : std_logic_vector(10 downto 0); signal txrdata : std_logic_vector(8 downto 0); signal txerror : std_logic_vector(1 downto 0); signal txaccess : std_ulogic; signal testin : std_logic_vector(3 downto 0); begin testin <= testen & "000"; core : grspw_codec_core generic map( ports => ports, input_type => input_type, output_type => output_type, rxtx_sameclk => rxtx_sameclk, fifosize => fifosize, tech => tech, scantest => scantest ) port map( rst => rst, clk => clk, rxclk0 => rxclk0, rxclk1 => rxclk1, txclk => txclk, txclkn => txclkn, testen => testen, testrst => testrst, --spw in d => d, dv => dv, dconnect => dconnect, --spw out do => do, so => so, --link fsm linkdisabled => linkdisabled, linkstart => linkstart, autostart => autostart, portsel => portsel, noportforce => noportforce, rdivisor => rdivisor, idivisor => idivisor, state => state, actport => actport, dconnecterr => dconnecterr, crederr => crederr, escerr => escerr, parerr => parerr, --rx fifo signals rxrenable => rxrenable, rxraddress => rxraddress, rxwrite => rxwrite, rxwdata => rxwdata, rxwaddress => rxwaddress, rxrdata => rxrdata, rxaccess => rxaccess, --rx iface rxicharav => rxicharav, rxicharcnt => rxicharcnt, rxichar => rxichar, rxiread => rxiread, rxififorst => rxififorst, --tx fifo signals txrenable => txrenable, txraddress => txraddress, txwrite => txwrite, txwdata => txwdata, txwaddress => txwaddress, txrdata => txrdata, txaccess => txaccess, --tx iface txicharcnt => txicharcnt, txifull => txifull, txiempty => txiempty, txiwrite => txiwrite, txichar => txichar, txififorst => txififorst, txififorstact => txififorstact, --time iface tickin => tickin, timein => timein, tickin_done => tickin_done, tickout => tickout, timeout => timeout ); ft0 : if ft = 0 generate merror <= '0'; end generate; ft1 : if ft /= 0 generate merror <= (orv(rxerror) and rxaccess) or (orv(txerror) and txaccess); end generate; --receiver nchar FIFO rx_ram : syncram_2pft generic map(tech*techfifo, fabits, 10, 0, 0, ft*techfifo) port map(clk, rxrenable, rxraddress(fabits-1 downto 0), rxrdata, clk, rxwrite, rxwaddress(fabits-1 downto 0), rxwdata, rxerror, testin); --transmitter nchar FIFO tx_ram : syncram_2pft generic map(tech*techfifo, fabits, 9, 0, 0, ft*techfifo) port map(clk, txrenable, txraddress(fabits-1 downto 0), txrdata, clk, txwrite, txwaddress(fabits-1 downto 0), txwdata, txerror, testin); end architecture;
-------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 15:15:53 02/04/2014 -- Design Name: -- Module Name: E:/EE4321-VHDL/Project-1/testBench.vhd -- Project Name: Project-1 -- Target Device: -- Tool versions: -- Description: -- -- VHDL Test Bench Created by ISE for module: bcd_xs3 -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- -- Notes: -- This testbench has been automatically generated using types std_logic and -- std_logic_vector for the ports of the unit under test. Xilinx recommends -- that these types always be used for the top-level I/O of a design in order -- to guarantee that the testbench will bind correctly to the post-implementation -- simulation model. -------------------------------------------------------------------------------- LIBRARY ieee; USE ieee.std_logic_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --USE ieee.numeric_std.ALL; ENTITY testBench IS END testBench; ARCHITECTURE behavior OF testBench IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT bcd_xs3 PORT( X : IN std_logic_vector(3 downto 0); Y : OUT std_logic_vector(3 downto 0) ); END COMPONENT; --Inputs --signal X : std_logic_vector := "0000"; --signal X2 : std_logic := '0'; --signal X1 : std_logic := '0'; --signal X0 : std_logic := '0'; --Outputs --signal Y : std_logic_vector; --signal Y2 : std_logic; --signal Y1 : std_logic; --signal Y0 : std_logic; -- No clocks detected in port list. Replace <clock> below with -- appropriate port name --constant <clock>_period : time := 10 ns; BEGIN -- Instantiate the Unit Under Test (UUT) uut: bcd_xs3 PORT MAP ( --X(3) => X(3), --X(2) => X(2), --X(1) => X(1), --X(0) => X(0), --Y(3) => Y(3), --Y(2) => Y(2), --Y(1) => Y(1), --Y(0) => Y(0) X => X, Y => Y ); -- Clock process definitions --<clock>_process :process --begin --<clock> <= '0'; --wait for <clock>_period/2; --<clock> <= '1'; --wait for <clock>_period/2; --end process; -- Stimulus process stim_proc: process begin -- hold reset state for 100 ns. wait for 10 ns; --wait for <clock>_period*10; -- insert stimulus here --X3 <= '1'; --X2 <= '0'; --X1 <= '0'; --X0 <= '1'; X <= "0000"; wait for 10 ns; assert Y = "0011" report "X = 0000 gives wrong answer" severity Error; end process; END;
-- Test shared variables in -2008 with --relax=shared entity shared4 is end entity; architecture test of shared4 is shared variable x : natural; begin g0: for i in 1 to 10 generate begin p1: process is begin for i in 1 to 1000 loop x := x + 1; -- Racy! end loop; wait; end process; end generate; p2: process is begin wait for 1 ns; assert x = 10 * 1000; -- May fail multithreaded sim wait; end process; end architecture;
-- (c) Copyright 2012 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not a license and does not grant any -- rights to the materials distributed herewith. Except as -- otherwise provided in a valid license issued to you by -- Xilinx, and to the maximum extent permitted by applicable -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and -- (2) Xilinx shall not be liable (whether in contract or tort, -- including negligence, or under any other theory of -- liability) for any loss or damage of any kind or nature -- related to, arising under or in connection with these -- materials, including for any direct, or any indirect, -- special, incidental, or consequential loss or damage -- (including loss of data, profits, goodwill, or any type of -- loss or damage suffered as a result of any action brought -- by a third party) even if such damage or loss was -- reasonably foreseeable or Xilinx had been advised of the -- possibility of the same. -- -- CRITICAL APPLICATIONS -- Xilinx products are not designed or intended to be fail- -- safe, or for use in any application requiring fail-safe -- performance, such as life-support or safety devices or -- systems, Class III medical devices, nuclear facilities, -- applications related to the deployment of airbags, or any -- other applications that could lead to death, personal -- injury, or severe property or environmental damage -- (individually and collectively, "Critical -- Applications"). Customer assumes the sole risk and -- liability of any use of Xilinx products in Critical -- Applications, subject only to applicable laws and -- regulations governing limitations on product liability. -- -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS -- PART OF THIS FILE AT ALL TIMES. ------------------------------------------------------------ ------------------------------------------------------------------------------- -- Filename: axi_dma_mm2s_mngr.vhd -- Description: This entity is the top level entity for the AXI DMA MM2S -- manager. -- -- VHDL-Standard: VHDL'93 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.std_logic_misc.all; library unisim; use unisim.vcomponents.all; library axi_dma_v7_1_10; use axi_dma_v7_1_10.axi_dma_pkg.all; ------------------------------------------------------------------------------- entity axi_dma_mm2s_mngr is generic( C_PRMRY_IS_ACLK_ASYNC : integer range 0 to 1 := 0; -- Primary MM2S/S2MM sync/async mode -- 0 = synchronous mode - all clocks are synchronous -- 1 = asynchronous mode - Primary data path channels (MM2S and S2MM) -- run asynchronous to AXI Lite, DMA Control, -- and SG. C_PRMY_CMDFIFO_DEPTH : integer range 1 to 16 := 1; -- Depth of DataMover command FIFO ----------------------------------------------------------------------- -- Scatter Gather Parameters ----------------------------------------------------------------------- C_INCLUDE_SG : integer range 0 to 1 := 1; -- Include or Exclude the Scatter Gather Engine -- 0 = Exclude SG Engine - Enables Simple DMA Mode -- 1 = Include SG Engine - Enables Scatter Gather Mode C_SG_INCLUDE_STSCNTRL_STRM : integer range 0 to 1 := 1; -- Include or Exclude AXI Status and AXI Control Streams -- 0 = Exclude Status and Control Streams -- 1 = Include Status and Control Streams C_SG_INCLUDE_DESC_QUEUE : integer range 0 to 1 := 0; -- Include or Exclude Scatter Gather Descriptor Queuing -- 0 = Exclude SG Descriptor Queuing -- 1 = Include SG Descriptor Queuing C_SG_LENGTH_WIDTH : integer range 8 to 23 := 14; -- Descriptor Buffer Length, Transferred Bytes, and Status Stream -- Rx Length Width. Indicates the least significant valid bits of -- descriptor buffer length, transferred bytes, or Rx Length value -- in the status word coincident with tlast. C_M_AXI_SG_ADDR_WIDTH : integer range 32 to 64 := 32; -- Master AXI Memory Map Address Width for Scatter Gather R/W Port C_M_AXIS_SG_TDATA_WIDTH : integer range 32 to 32 := 32; -- AXI Master Stream in for descriptor fetch C_S_AXIS_UPDPTR_TDATA_WIDTH : integer range 32 to 32 := 32; -- 32 Update Status Bits C_S_AXIS_UPDSTS_TDATA_WIDTH : integer range 33 to 33 := 33; -- 1 IOC bit + 32 Update Status Bits C_M_AXIS_MM2S_CNTRL_TDATA_WIDTH : integer range 32 to 32 := 32; -- Master AXI Control Stream Data Width ----------------------------------------------------------------------- -- Memory Map to Stream (MM2S) Parameters ----------------------------------------------------------------------- C_INCLUDE_MM2S : integer range 0 to 1 := 1; -- Include or exclude MM2S primary data path -- 0 = Exclude MM2S primary data path -- 1 = Include MM2S primary data path C_M_AXI_MM2S_ADDR_WIDTH : integer range 32 to 64 := 32; -- Master AXI Memory Map Address Width for MM2S Read Port C_ENABLE_MULTI_CHANNEL : integer range 0 to 1 := 0; C_MICRO_DMA : integer range 0 to 1 := 0; C_FAMILY : string := "virtex7" -- Target FPGA Device Family ); port ( -- Secondary Clock and Reset m_axi_sg_aclk : in std_logic ; -- m_axi_sg_aresetn : in std_logic ; -- -- -- Primary Clock and Reset -- axi_prmry_aclk : in std_logic ; -- p_reset_n : in std_logic ; -- -- soft_reset : in std_logic ; -- -- -- MM2S Control and Status -- mm2s_run_stop : in std_logic ; -- mm2s_keyhole : in std_logic ; mm2s_halted : in std_logic ; -- mm2s_ftch_idle : in std_logic ; -- mm2s_updt_idle : in std_logic ; -- mm2s_ftch_err_early : in std_logic ; -- mm2s_ftch_stale_desc : in std_logic ; -- mm2s_tailpntr_enble : in std_logic ; -- mm2s_halt : in std_logic ; -- mm2s_halt_cmplt : in std_logic ; -- mm2s_halted_clr : out std_logic ; -- mm2s_halted_set : out std_logic ; -- mm2s_idle_set : out std_logic ; -- mm2s_idle_clr : out std_logic ; -- mm2s_new_curdesc : out std_logic_vector -- (C_M_AXI_SG_ADDR_WIDTH-1 downto 0); -- mm2s_new_curdesc_wren : out std_logic ; -- mm2s_stop : out std_logic ; -- mm2s_desc_flush : out std_logic ; -- cntrl_strm_stop : out std_logic ; mm2s_all_idle : out std_logic ; -- -- mm2s_error : out std_logic ; -- s2mm_error : in std_logic ; -- -- Simple DMA Mode Signals mm2s_sa : in std_logic_vector -- (C_M_AXI_MM2S_ADDR_WIDTH-1 downto 0); -- mm2s_length_wren : in std_logic ; -- mm2s_length : in std_logic_vector -- (C_SG_LENGTH_WIDTH-1 downto 0) ; -- mm2s_smple_done : out std_logic ; -- mm2s_interr_set : out std_logic ; -- mm2s_slverr_set : out std_logic ; -- mm2s_decerr_set : out std_logic ; -- m_axis_mm2s_aclk : in std_logic; mm2s_strm_tlast : in std_logic; mm2s_strm_tready : in std_logic; mm2s_axis_info : out std_logic_vector (13 downto 0); -- -- SG MM2S Descriptor Fetch AXI Stream In -- m_axis_mm2s_ftch_tdata : in std_logic_vector -- (C_M_AXIS_SG_TDATA_WIDTH-1 downto 0); -- m_axis_mm2s_ftch_tvalid : in std_logic ; -- m_axis_mm2s_ftch_tready : out std_logic ; -- m_axis_mm2s_ftch_tlast : in std_logic ; -- m_axis_mm2s_ftch_tdata_new : in std_logic_vector -- (96+31*0+(0+2)*(C_M_AXI_SG_ADDR_WIDTH-32) downto 0); -- m_axis_mm2s_ftch_tdata_mcdma_new : in std_logic_vector -- (63 downto 0); -- m_axis_mm2s_ftch_tvalid_new : in std_logic ; -- m_axis_ftch1_desc_available : in std_logic; -- -- SG MM2S Descriptor Update AXI Stream Out -- s_axis_mm2s_updtptr_tdata : out std_logic_vector -- (C_M_AXI_SG_ADDR_WIDTH-1 downto 0); -- s_axis_mm2s_updtptr_tvalid : out std_logic ; -- s_axis_mm2s_updtptr_tready : in std_logic ; -- s_axis_mm2s_updtptr_tlast : out std_logic ; -- -- s_axis_mm2s_updtsts_tdata : out std_logic_vector -- (C_S_AXIS_UPDSTS_TDATA_WIDTH-1 downto 0); -- s_axis_mm2s_updtsts_tvalid : out std_logic ; -- s_axis_mm2s_updtsts_tready : in std_logic ; -- s_axis_mm2s_updtsts_tlast : out std_logic ; -- -- -- User Command Interface Ports (AXI Stream) -- s_axis_mm2s_cmd_tvalid : out std_logic ; -- s_axis_mm2s_cmd_tready : in std_logic ; -- s_axis_mm2s_cmd_tdata : out std_logic_vector -- ((C_M_AXI_MM2S_ADDR_WIDTH-32+2*32+CMD_BASE_WIDTH+46)-1 downto 0);-- -- -- User Status Interface Ports (AXI Stream) -- m_axis_mm2s_sts_tvalid : in std_logic ; -- m_axis_mm2s_sts_tready : out std_logic ; -- m_axis_mm2s_sts_tdata : in std_logic_vector(7 downto 0) ; -- m_axis_mm2s_sts_tkeep : in std_logic_vector(0 downto 0) ; -- mm2s_err : in std_logic ; -- -- ftch_error : in std_logic ; -- updt_error : in std_logic ; -- -- -- Memory Map to Stream Control Stream Interface -- m_axis_mm2s_cntrl_tdata : out std_logic_vector -- (C_M_AXIS_MM2S_CNTRL_TDATA_WIDTH-1 downto 0); -- m_axis_mm2s_cntrl_tkeep : out std_logic_vector -- ((C_M_AXIS_MM2S_CNTRL_TDATA_WIDTH/8)-1 downto 0); -- m_axis_mm2s_cntrl_tvalid : out std_logic ; -- m_axis_mm2s_cntrl_tready : in std_logic ; -- m_axis_mm2s_cntrl_tlast : out std_logic -- ); end axi_dma_mm2s_mngr; ------------------------------------------------------------------------------- -- Architecture ------------------------------------------------------------------------------- architecture implementation of axi_dma_mm2s_mngr is attribute DowngradeIPIdentifiedWarnings: string; attribute DowngradeIPIdentifiedWarnings of implementation : architecture is "yes"; ------------------------------------------------------------------------------- -- Functions ------------------------------------------------------------------------------- -- No Functions Declared ------------------------------------------------------------------------------- -- Constants Declarations ------------------------------------------------------------------------------- -- No Constants Declared ------------------------------------------------------------------------------- -- Signal / Type Declarations ------------------------------------------------------------------------------- -- Primary DataMover Command signals signal mm2s_cmnd_wr : std_logic := '0'; signal mm2s_cmnd_data : std_logic_vector ((C_M_AXI_MM2S_ADDR_WIDTH-32+2*32+CMD_BASE_WIDTH+46)-1 downto 0) := (others => '0'); signal mm2s_cmnd_pending : std_logic := '0'; -- Primary DataMover Status signals signal mm2s_done : std_logic := '0'; signal mm2s_stop_i : std_logic := '0'; signal mm2s_interr : std_logic := '0'; signal mm2s_slverr : std_logic := '0'; signal mm2s_decerr : std_logic := '0'; signal mm2s_tag : std_logic_vector(3 downto 0) := (others => '0'); signal dma_mm2s_error : std_logic := '0'; signal soft_reset_d1 : std_logic := '0'; signal soft_reset_d2 : std_logic := '0'; signal soft_reset_re : std_logic := '0'; signal mm2s_error_i : std_logic := '0'; --signal cntrl_strm_stop : std_logic := '0'; signal mm2s_halted_set_i : std_logic := '0'; signal mm2s_sts_received_clr : std_logic := '0'; signal mm2s_sts_received : std_logic := '0'; signal mm2s_cmnd_idle : std_logic := '0'; signal mm2s_sts_idle : std_logic := '0'; -- Scatter Gather Interface signals signal desc_fetch_req : std_logic := '0'; signal desc_fetch_done : std_logic := '0'; signal desc_fetch_done_del : std_logic := '0'; signal desc_update_req : std_logic := '0'; signal desc_update_done : std_logic := '0'; signal desc_available : std_logic := '0'; signal packet_in_progress : std_logic := '0'; signal mm2s_desc_baddress : std_logic_vector(C_M_AXI_MM2S_ADDR_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_blength : std_logic_vector(BUFFER_LENGTH_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_blength_v : std_logic_vector(BUFFER_LENGTH_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_blength_s : std_logic_vector(BUFFER_LENGTH_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_eof : std_logic := '0'; signal mm2s_desc_sof : std_logic := '0'; signal mm2s_desc_cmplt : std_logic := '0'; signal mm2s_desc_info : std_logic_vector(C_M_AXIS_SG_TDATA_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_app0 : std_logic_vector(C_M_AXIS_SG_TDATA_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_app1 : std_logic_vector(C_M_AXIS_SG_TDATA_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_app2 : std_logic_vector(C_M_AXIS_SG_TDATA_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_app3 : std_logic_vector(C_M_AXIS_SG_TDATA_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_app4 : std_logic_vector(C_M_AXIS_SG_TDATA_WIDTH-1 downto 0) := (others => '0'); signal mm2s_desc_info_int : std_logic_vector(13 downto 0) := (others => '0'); signal mm2s_strm_tlast_int : std_logic; signal rd_en_hold, rd_en_hold_int : std_logic; -- Control Stream Fifo write signals signal cntrlstrm_fifo_wren : std_logic := '0'; signal cntrlstrm_fifo_full : std_logic := '0'; signal cntrlstrm_fifo_din : std_logic_vector(C_M_AXIS_MM2S_CNTRL_TDATA_WIDTH downto 0) := (others => '0'); signal info_fifo_full : std_logic; signal info_fifo_empty : std_logic; signal updt_pending : std_logic := '0'; signal mm2s_cmnd_wr_1 : std_logic := '0'; signal fifo_rst : std_logic; signal fifo_empty : std_logic; signal fifo_empty_first : std_logic; signal fifo_empty_first1 : std_logic; signal first_read_pulse : std_logic; signal fifo_read : std_logic; ------------------------------------------------------------------------------- -- Begin architecture logic ------------------------------------------------------------------------------- begin ------------------------------------------------------------------------------- -- Include MM2S State Machine and support logic ------------------------------------------------------------------------------- GEN_MM2S_DMA_CONTROL : if C_INCLUDE_MM2S = 1 generate begin -- Pass out to register module mm2s_halted_set <= mm2s_halted_set_i; ------------------------------------------------------------------------------- -- Graceful shut down logic ------------------------------------------------------------------------------- -- Error from DataMover (DMAIntErr, DMADecErr, or DMASlvErr) or SG Update error -- or SG Fetch error, or Stale Descriptor Error mm2s_error_i <= dma_mm2s_error -- Primary data mover reports error or updt_error -- SG Update engine reports error or ftch_error -- SG Fetch engine reports error or mm2s_ftch_err_early -- SG Fetch engine reports early error on mm2s or mm2s_ftch_stale_desc; -- SG Fetch stale descriptor error -- pass out to shut down s2mm mm2s_error <= mm2s_error_i; -- Clear run/stop and stop state machines due to errors or soft reset -- Error based on datamover error report or sg update error or sg fetch error -- SG update error and fetch error included because need to shut down, no way -- to update descriptors on sg update error and on fetch error descriptor -- data is corrupt therefor do not want to issue the xfer command to primary datamover --CR#566306 status for both mm2s and s2mm datamover are masked during shutdown therefore -- need to stop all processes regardless of the source of the error. -- mm2s_stop_i <= mm2s_error -- Error -- or soft_reset; -- Soft Reset issued mm2s_stop_i <= mm2s_error_i -- Error on MM2S or s2mm_error -- Error on S2MM or soft_reset; -- Soft Reset issued -- Reg stop out REG_STOP_OUT : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then mm2s_stop <= '0'; else mm2s_stop <= mm2s_stop_i; end if; end if; end process REG_STOP_OUT; -- Generate DMA Controller For Scatter Gather Mode GEN_SCATTER_GATHER_MODE : if C_INCLUDE_SG = 1 generate begin -- Not Used in SG Mode (Errors are imbedded in updated descriptor and -- generate error after descriptor update is complete) mm2s_interr_set <= '0'; mm2s_slverr_set <= '0'; mm2s_decerr_set <= '0'; mm2s_smple_done <= '0'; mm2s_cmnd_wr_1 <= m_axis_mm2s_ftch_tvalid_new; --------------------------------------------------------------------------- -- MM2S Primary DMA Controller State Machine --------------------------------------------------------------------------- I_MM2S_SM : entity axi_dma_v7_1_10.axi_dma_mm2s_sm generic map( C_M_AXI_MM2S_ADDR_WIDTH => C_M_AXI_MM2S_ADDR_WIDTH , C_SG_LENGTH_WIDTH => C_SG_LENGTH_WIDTH , C_SG_INCLUDE_DESC_QUEUE => C_SG_INCLUDE_DESC_QUEUE , C_PRMY_CMDFIFO_DEPTH => C_PRMY_CMDFIFO_DEPTH , C_ENABLE_MULTI_CHANNEL => C_ENABLE_MULTI_CHANNEL ) port map( m_axi_sg_aclk => m_axi_sg_aclk , m_axi_sg_aresetn => m_axi_sg_aresetn , -- Channel 1 Control and Status mm2s_run_stop => mm2s_run_stop , mm2s_keyhole => mm2s_keyhole , mm2s_ftch_idle => mm2s_ftch_idle , mm2s_cmnd_idle => mm2s_cmnd_idle , mm2s_sts_idle => mm2s_sts_idle , mm2s_stop => mm2s_stop_i , mm2s_desc_flush => mm2s_desc_flush , -- MM2S Descriptor Fetch Request (from mm2s_sm) desc_available => desc_available , desc_fetch_req => desc_fetch_req , desc_fetch_done => desc_fetch_done , desc_update_done => desc_update_done , updt_pending => updt_pending , packet_in_progress => packet_in_progress , -- DataMover Command mm2s_cmnd_wr => open, --mm2s_cmnd_wr_1 , mm2s_cmnd_data => mm2s_cmnd_data , mm2s_cmnd_pending => mm2s_cmnd_pending , -- Descriptor Fields mm2s_cache_info => mm2s_desc_info , mm2s_desc_baddress => mm2s_desc_baddress , mm2s_desc_blength => mm2s_desc_blength , mm2s_desc_blength_v => mm2s_desc_blength_v , mm2s_desc_blength_s => mm2s_desc_blength_s , mm2s_desc_eof => mm2s_desc_eof , mm2s_desc_sof => mm2s_desc_sof ); --------------------------------------------------------------------------- -- MM2S Scatter Gather State Machine --------------------------------------------------------------------------- I_MM2S_SG_IF : entity axi_dma_v7_1_10.axi_dma_mm2s_sg_if generic map( ------------------------------------------------------------------- -- Scatter Gather Parameters ------------------------------------------------------------------- C_PRMRY_IS_ACLK_ASYNC => C_PRMRY_IS_ACLK_ASYNC , C_SG_INCLUDE_DESC_QUEUE => C_SG_INCLUDE_DESC_QUEUE , C_SG_INCLUDE_STSCNTRL_STRM => C_SG_INCLUDE_STSCNTRL_STRM , C_M_AXIS_SG_TDATA_WIDTH => C_M_AXIS_SG_TDATA_WIDTH , C_S_AXIS_UPDPTR_TDATA_WIDTH => C_S_AXIS_UPDPTR_TDATA_WIDTH , C_S_AXIS_UPDSTS_TDATA_WIDTH => C_S_AXIS_UPDSTS_TDATA_WIDTH , C_M_AXI_SG_ADDR_WIDTH => C_M_AXI_SG_ADDR_WIDTH , C_M_AXI_MM2S_ADDR_WIDTH => C_M_AXI_MM2S_ADDR_WIDTH , C_M_AXIS_MM2S_CNTRL_TDATA_WIDTH => C_M_AXIS_MM2S_CNTRL_TDATA_WIDTH, C_ENABLE_MULTI_CHANNEL => C_ENABLE_MULTI_CHANNEL , C_MICRO_DMA => C_MICRO_DMA, C_FAMILY => C_FAMILY ) port map( m_axi_sg_aclk => m_axi_sg_aclk , m_axi_sg_aresetn => m_axi_sg_aresetn , -- SG MM2S Descriptor Fetch AXI Stream In m_axis_mm2s_ftch_tdata => m_axis_mm2s_ftch_tdata , m_axis_mm2s_ftch_tvalid => m_axis_mm2s_ftch_tvalid , m_axis_mm2s_ftch_tready => m_axis_mm2s_ftch_tready , m_axis_mm2s_ftch_tlast => m_axis_mm2s_ftch_tlast , m_axis_mm2s_ftch_tdata_new => m_axis_mm2s_ftch_tdata_new , m_axis_mm2s_ftch_tdata_mcdma_new => m_axis_mm2s_ftch_tdata_mcdma_new , m_axis_mm2s_ftch_tvalid_new => m_axis_mm2s_ftch_tvalid_new , m_axis_ftch1_desc_available => m_axis_ftch1_desc_available , -- SG MM2S Descriptor Update AXI Stream Out s_axis_mm2s_updtptr_tdata => s_axis_mm2s_updtptr_tdata , s_axis_mm2s_updtptr_tvalid => s_axis_mm2s_updtptr_tvalid , s_axis_mm2s_updtptr_tready => s_axis_mm2s_updtptr_tready , s_axis_mm2s_updtptr_tlast => s_axis_mm2s_updtptr_tlast , s_axis_mm2s_updtsts_tdata => s_axis_mm2s_updtsts_tdata , s_axis_mm2s_updtsts_tvalid => s_axis_mm2s_updtsts_tvalid , s_axis_mm2s_updtsts_tready => s_axis_mm2s_updtsts_tready , s_axis_mm2s_updtsts_tlast => s_axis_mm2s_updtsts_tlast , -- MM2S Descriptor Fetch Request (from mm2s_sm) desc_available => desc_available , desc_fetch_req => desc_fetch_req , desc_fetch_done => desc_fetch_done , updt_pending => updt_pending , packet_in_progress => packet_in_progress , -- MM2S Descriptor Update Request desc_update_done => desc_update_done , mm2s_ftch_stale_desc => mm2s_ftch_stale_desc , mm2s_sts_received_clr => mm2s_sts_received_clr , mm2s_sts_received => mm2s_sts_received , mm2s_desc_cmplt => mm2s_desc_cmplt , mm2s_done => mm2s_done , mm2s_interr => mm2s_interr , mm2s_slverr => mm2s_slverr , mm2s_decerr => mm2s_decerr , mm2s_tag => mm2s_tag , mm2s_halt => mm2s_halt , -- CR566306 -- Control Stream Output cntrlstrm_fifo_wren => cntrlstrm_fifo_wren , cntrlstrm_fifo_full => cntrlstrm_fifo_full , cntrlstrm_fifo_din => cntrlstrm_fifo_din , -- MM2S Descriptor Field Output mm2s_new_curdesc => mm2s_new_curdesc , mm2s_new_curdesc_wren => mm2s_new_curdesc_wren , mm2s_desc_baddress => mm2s_desc_baddress , mm2s_desc_blength => mm2s_desc_blength , mm2s_desc_blength_v => mm2s_desc_blength_v , mm2s_desc_blength_s => mm2s_desc_blength_s , mm2s_desc_info => mm2s_desc_info , mm2s_desc_eof => mm2s_desc_eof , mm2s_desc_sof => mm2s_desc_sof , mm2s_desc_app0 => mm2s_desc_app0 , mm2s_desc_app1 => mm2s_desc_app1 , mm2s_desc_app2 => mm2s_desc_app2 , mm2s_desc_app3 => mm2s_desc_app3 , mm2s_desc_app4 => mm2s_desc_app4 ); cntrlstrm_fifo_full <= '0'; end generate GEN_SCATTER_GATHER_MODE; -- Generate DMA Controller for Simple DMA Mode GEN_SIMPLE_DMA_MODE : if C_INCLUDE_SG = 0 generate begin -- Scatter Gather signals not used in Simple DMA Mode m_axis_mm2s_ftch_tready <= '0'; s_axis_mm2s_updtptr_tdata <= (others => '0'); s_axis_mm2s_updtptr_tvalid <= '0'; s_axis_mm2s_updtptr_tlast <= '0'; s_axis_mm2s_updtsts_tdata <= (others => '0'); s_axis_mm2s_updtsts_tvalid <= '0'; s_axis_mm2s_updtsts_tlast <= '0'; desc_available <= '0'; desc_fetch_done <= '0'; packet_in_progress <= '0'; desc_update_done <= '0'; cntrlstrm_fifo_wren <= '0'; cntrlstrm_fifo_din <= (others => '0'); mm2s_new_curdesc <= (others => '0'); mm2s_new_curdesc_wren <= '0'; mm2s_desc_baddress <= (others => '0'); mm2s_desc_blength <= (others => '0'); mm2s_desc_blength_v <= (others => '0'); mm2s_desc_blength_s <= (others => '0'); mm2s_desc_eof <= '0'; mm2s_desc_sof <= '0'; mm2s_desc_cmplt <= '0'; mm2s_desc_app0 <= (others => '0'); mm2s_desc_app1 <= (others => '0'); mm2s_desc_app2 <= (others => '0'); mm2s_desc_app3 <= (others => '0'); mm2s_desc_app4 <= (others => '0'); desc_fetch_req <= '0'; -- Simple DMA State Machine I_MM2S_SMPL_SM : entity axi_dma_v7_1_10.axi_dma_smple_sm generic map( C_M_AXI_ADDR_WIDTH => C_M_AXI_MM2S_ADDR_WIDTH , C_SG_LENGTH_WIDTH => C_SG_LENGTH_WIDTH, C_MICRO_DMA => C_MICRO_DMA ) port map( m_axi_sg_aclk => m_axi_sg_aclk , m_axi_sg_aresetn => m_axi_sg_aresetn , -- Channel 1 Control and Status run_stop => mm2s_run_stop , keyhole => mm2s_keyhole , stop => mm2s_stop_i , cmnd_idle => mm2s_cmnd_idle , sts_idle => mm2s_sts_idle , -- DataMover Status sts_received => mm2s_sts_received , sts_received_clr => mm2s_sts_received_clr , -- DataMover Command cmnd_wr => mm2s_cmnd_wr_1 , cmnd_data => mm2s_cmnd_data , cmnd_pending => mm2s_cmnd_pending , -- Trasnfer Qualifiers xfer_length_wren => mm2s_length_wren , xfer_address => mm2s_sa , xfer_length => mm2s_length ); -- Pass Done/Error Status out to DMASR mm2s_interr_set <= mm2s_interr; mm2s_slverr_set <= mm2s_slverr; mm2s_decerr_set <= mm2s_decerr; -- S2MM Simple DMA Transfer Done - used to assert IOC bit in DMASR. -- Receive clear when not shutting down mm2s_smple_done <= mm2s_sts_received_clr when mm2s_stop_i = '0' -- Else halt set prior to halted being set else mm2s_halted_set_i when mm2s_halted = '0' else '0'; end generate GEN_SIMPLE_DMA_MODE; ------------------------------------------------------------------------------- -- MM2S Primary DataMover command status interface ------------------------------------------------------------------------------- I_MM2S_CMDSTS : entity axi_dma_v7_1_10.axi_dma_mm2s_cmdsts_if generic map( C_M_AXI_MM2S_ADDR_WIDTH => C_M_AXI_MM2S_ADDR_WIDTH, C_ENABLE_MULTI_CHANNEL => C_ENABLE_MULTI_CHANNEL, C_ENABLE_QUEUE => C_SG_INCLUDE_DESC_QUEUE ) port map( m_axi_sg_aclk => m_axi_sg_aclk , m_axi_sg_aresetn => m_axi_sg_aresetn , -- Fetch command write interface from mm2s sm mm2s_cmnd_wr => mm2s_cmnd_wr_1 , mm2s_cmnd_data => mm2s_cmnd_data , mm2s_cmnd_pending => mm2s_cmnd_pending , mm2s_sts_received_clr => mm2s_sts_received_clr , mm2s_sts_received => mm2s_sts_received , mm2s_tailpntr_enble => mm2s_tailpntr_enble , mm2s_desc_cmplt => mm2s_desc_cmplt , -- User Command Interface Ports (AXI Stream) s_axis_mm2s_cmd_tvalid => s_axis_mm2s_cmd_tvalid , s_axis_mm2s_cmd_tready => s_axis_mm2s_cmd_tready , s_axis_mm2s_cmd_tdata => s_axis_mm2s_cmd_tdata , -- User Status Interface Ports (AXI Stream) m_axis_mm2s_sts_tvalid => m_axis_mm2s_sts_tvalid , m_axis_mm2s_sts_tready => m_axis_mm2s_sts_tready , m_axis_mm2s_sts_tdata => m_axis_mm2s_sts_tdata , m_axis_mm2s_sts_tkeep => m_axis_mm2s_sts_tkeep , -- MM2S Primary DataMover Status mm2s_err => mm2s_err , mm2s_done => mm2s_done , mm2s_error => dma_mm2s_error , mm2s_interr => mm2s_interr , mm2s_slverr => mm2s_slverr , mm2s_decerr => mm2s_decerr , mm2s_tag => mm2s_tag ); --------------------------------------------------------------------------- -- Halt / Idle Status Manager --------------------------------------------------------------------------- I_MM2S_STS_MNGR : entity axi_dma_v7_1_10.axi_dma_mm2s_sts_mngr generic map( C_PRMRY_IS_ACLK_ASYNC => C_PRMRY_IS_ACLK_ASYNC ) port map( m_axi_sg_aclk => m_axi_sg_aclk , m_axi_sg_aresetn => m_axi_sg_aresetn , -- dma control and sg engine status signals mm2s_run_stop => mm2s_run_stop , mm2s_ftch_idle => mm2s_ftch_idle , mm2s_updt_idle => mm2s_updt_idle , mm2s_cmnd_idle => mm2s_cmnd_idle , mm2s_sts_idle => mm2s_sts_idle , -- stop and halt control/status mm2s_stop => mm2s_stop_i , mm2s_halt_cmplt => mm2s_halt_cmplt , -- system state and control mm2s_all_idle => mm2s_all_idle , mm2s_halted_clr => mm2s_halted_clr , mm2s_halted_set => mm2s_halted_set_i , mm2s_idle_set => mm2s_idle_set , mm2s_idle_clr => mm2s_idle_clr ); -- MM2S Control Stream Included GEN_CNTRL_STREAM : if C_SG_INCLUDE_STSCNTRL_STRM = 1 and C_INCLUDE_SG = 1 generate begin -- Register soft reset to create rising edge pulse to use for shut down. -- soft_reset from DMACR does not clear until after all reset processes -- are done. This causes stop to assert too long causing issue with -- status stream skid buffer. REG_SFT_RST : process(m_axi_sg_aclk) begin if(m_axi_sg_aclk'EVENT and m_axi_sg_aclk = '1')then if(m_axi_sg_aresetn = '0')then soft_reset_d1 <= '0'; soft_reset_d2 <= '0'; else soft_reset_d1 <= soft_reset; soft_reset_d2 <= soft_reset_d1; end if; end if; end process REG_SFT_RST; -- Rising edge soft reset pulse soft_reset_re <= soft_reset_d1 and not soft_reset_d2; -- Control Stream module stop requires rising edge of soft reset to -- shut down due to DMACR.SoftReset does not deassert on internal hard reset -- It clears after therefore do not want to issue another stop to cntrl strm -- skid buffer. cntrl_strm_stop <= mm2s_error_i -- Error or soft_reset_re; -- Soft Reset issued -- Control stream interface -- I_MM2S_CNTRL_STREAM : entity axi_dma_v7_1_10.axi_dma_mm2s_cntrl_strm -- generic map( -- C_PRMRY_IS_ACLK_ASYNC => C_PRMRY_IS_ACLK_ASYNC , -- C_PRMY_CMDFIFO_DEPTH => C_PRMY_CMDFIFO_DEPTH , -- C_M_AXIS_MM2S_CNTRL_TDATA_WIDTH => C_M_AXIS_MM2S_CNTRL_TDATA_WIDTH , -- C_FAMILY => C_FAMILY -- ) -- port map( -- -- Secondary clock / reset -- m_axi_sg_aclk => m_axi_sg_aclk , -- m_axi_sg_aresetn => m_axi_sg_aresetn , -- -- -- Primary clock / reset -- axi_prmry_aclk => axi_prmry_aclk , -- p_reset_n => p_reset_n , -- -- -- MM2S Error -- mm2s_stop => cntrl_strm_stop , -- -- -- Control Stream input ---- cntrlstrm_fifo_wren => cntrlstrm_fifo_wren , -- cntrlstrm_fifo_full => cntrlstrm_fifo_full , -- cntrlstrm_fifo_din => cntrlstrm_fifo_din , -- -- -- Memory Map to Stream Control Stream Interface -- m_axis_mm2s_cntrl_tdata => m_axis_mm2s_cntrl_tdata , -- m_axis_mm2s_cntrl_tkeep => m_axis_mm2s_cntrl_tkeep , -- m_axis_mm2s_cntrl_tvalid => m_axis_mm2s_cntrl_tvalid , -- m_axis_mm2s_cntrl_tready => m_axis_mm2s_cntrl_tready , -- m_axis_mm2s_cntrl_tlast => m_axis_mm2s_cntrl_tlast -- -- ); end generate GEN_CNTRL_STREAM; -- MM2S Control Stream Excluded GEN_NO_CNTRL_STREAM : if C_SG_INCLUDE_STSCNTRL_STRM = 0 or C_INCLUDE_SG = 0 generate begin soft_reset_d1 <= '0'; soft_reset_d2 <= '0'; soft_reset_re <= '0'; cntrl_strm_stop <= '0'; end generate GEN_NO_CNTRL_STREAM; m_axis_mm2s_cntrl_tdata <= (others => '0'); m_axis_mm2s_cntrl_tkeep <= (others => '0'); m_axis_mm2s_cntrl_tvalid <= '0'; m_axis_mm2s_cntrl_tlast <= '0'; end generate GEN_MM2S_DMA_CONTROL; ------------------------------------------------------------------------------- -- Exclude MM2S State Machine and support logic ------------------------------------------------------------------------------- GEN_NO_MM2S_DMA_CONTROL : if C_INCLUDE_MM2S = 0 generate begin m_axis_mm2s_ftch_tready <= '0'; s_axis_mm2s_updtptr_tdata <= (others =>'0'); s_axis_mm2s_updtptr_tvalid <= '0'; s_axis_mm2s_updtptr_tlast <= '0'; s_axis_mm2s_updtsts_tdata <= (others =>'0'); s_axis_mm2s_updtsts_tvalid <= '0'; s_axis_mm2s_updtsts_tlast <= '0'; mm2s_new_curdesc <= (others =>'0'); mm2s_new_curdesc_wren <= '0'; s_axis_mm2s_cmd_tvalid <= '0'; s_axis_mm2s_cmd_tdata <= (others =>'0'); m_axis_mm2s_sts_tready <= '0'; mm2s_halted_clr <= '0'; mm2s_halted_set <= '0'; mm2s_idle_set <= '0'; mm2s_idle_clr <= '0'; m_axis_mm2s_cntrl_tdata <= (others => '0'); m_axis_mm2s_cntrl_tkeep <= (others => '0'); m_axis_mm2s_cntrl_tvalid <= '0'; m_axis_mm2s_cntrl_tlast <= '0'; mm2s_stop <= '0'; mm2s_desc_flush <= '0'; mm2s_all_idle <= '1'; mm2s_error <= '0'; -- CR#570587 mm2s_interr_set <= '0'; mm2s_slverr_set <= '0'; mm2s_decerr_set <= '0'; mm2s_smple_done <= '0'; cntrl_strm_stop <= '0'; end generate GEN_NO_MM2S_DMA_CONTROL; TDEST_FIFO : if (C_ENABLE_MULTI_CHANNEL = 1) generate process (m_axi_sg_aclk) begin if (m_axi_sg_aclk'event and m_axi_sg_aclk = '1') then if (m_axi_sg_aresetn = '0') then desc_fetch_done_del <= '0'; else --if (m_axi_sg_aclk'event and m_axi_sg_aclk = '1') then desc_fetch_done_del <= desc_fetch_done; end if; end if; end process; process (m_axis_mm2s_aclk) begin if (m_axis_mm2s_aclk'event and m_axis_mm2s_aclk = '1') then if (m_axi_sg_aresetn = '0') then fifo_empty <= '0'; else fifo_empty <= info_fifo_empty; end if; end if; end process; process (m_axis_mm2s_aclk) begin if (m_axis_mm2s_aclk'event and m_axis_mm2s_aclk = '1') then if (m_axi_sg_aresetn = '0') then fifo_empty_first <= '0'; fifo_empty_first1 <= '0'; else if (fifo_empty_first = '0' and (info_fifo_empty = '0' and fifo_empty = '1')) then fifo_empty_first <= '1'; end if; fifo_empty_first1 <= fifo_empty_first; end if; end if; end process; first_read_pulse <= fifo_empty_first and (not fifo_empty_first1); fifo_read <= first_read_pulse or rd_en_hold; mm2s_desc_info_int <= mm2s_desc_info (19 downto 16) & mm2s_desc_info (12 downto 8) & mm2s_desc_info (4 downto 0); -- mm2s_strm_tlast_int <= mm2s_strm_tlast and (not info_fifo_empty); -- process (m_axis_mm2s_aclk) -- begin -- if (m_axis_mm2s_aclk'event and m_axis_mm2s_aclk = '1') then -- if (p_reset_n = '0') then -- rd_en_hold <= '0'; -- rd_en_hold_int <= '0'; -- else -- if (rd_en_hold = '1') then -- rd_en_hold <= '0'; -- elsif (info_fifo_empty = '0' and mm2s_strm_tlast = '1' and mm2s_strm_tready = '1') then -- rd_en_hold <= '1'; -- rd_en_hold_int <= '0'; -- else -- rd_en_hold <= rd_en_hold; -- rd_en_hold_int <= rd_en_hold_int; -- end if; -- end if; -- end if; -- end process; process (m_axis_mm2s_aclk) begin if (m_axis_mm2s_aclk'event and m_axis_mm2s_aclk = '1') then if (p_reset_n = '0') then rd_en_hold <= '0'; rd_en_hold_int <= '0'; else if (info_fifo_empty = '1' and mm2s_strm_tlast = '1' and mm2s_strm_tready = '1') then rd_en_hold <= '1'; rd_en_hold_int <= '0'; elsif (info_fifo_empty = '0') then rd_en_hold <= mm2s_strm_tlast and mm2s_strm_tready; rd_en_hold_int <= rd_en_hold; else rd_en_hold <= rd_en_hold; rd_en_hold_int <= rd_en_hold_int; end if; end if; end if; end process; fifo_rst <= not (m_axi_sg_aresetn); -- Following FIFO is used to store the Tuser, Tid and xCache info I_INFO_FIFO : entity axi_dma_v7_1_10.axi_dma_afifo_autord generic map( C_DWIDTH => 14, C_DEPTH => 31 , C_CNT_WIDTH => 5 , C_USE_BLKMEM => 0, C_USE_AUTORD => 1, C_PRMRY_IS_ACLK_ASYNC => C_PRMRY_IS_ACLK_ASYNC , C_FAMILY => C_FAMILY ) port map( -- Inputs AFIFO_Ainit => fifo_rst , AFIFO_Wr_clk => m_axi_sg_aclk , AFIFO_Wr_en => desc_fetch_done_del , AFIFO_Din => mm2s_desc_info_int , AFIFO_Rd_clk => m_axis_mm2s_aclk , AFIFO_Rd_en => rd_en_hold_int, --fifo_read, --mm2s_strm_tlast_int , AFIFO_Clr_Rd_Data_Valid => '0' , -- Outputs AFIFO_DValid => open , AFIFO_Dout => mm2s_axis_info , AFIFO_Full => info_fifo_full , AFIFO_Empty => info_fifo_empty , AFIFO_Almost_full => open , AFIFO_Almost_empty => open , AFIFO_Wr_count => open , AFIFO_Rd_count => open , AFIFO_Corr_Rd_count => open , AFIFO_Corr_Rd_count_minus1 => open , AFIFO_Rd_ack => open ); end generate TDEST_FIFO; NO_TDEST_FIFO : if (C_ENABLE_MULTI_CHANNEL = 0) generate mm2s_axis_info <= (others => '0'); end generate NO_TDEST_FIFO; end implementation;
--------------------------------------------------------------------------- -- Copyright 2010 Lawrence Wilkinson [email protected] -- -- This file is part of LJW2030, a VHDL implementation of the IBM -- System/360 Model 30. -- -- LJW2030 is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- LJW2030 is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with LJW2030 . If not, see <http://www.gnu.org/licenses/>. -- --------------------------------------------------------------------------- -- -- File: cpu.vhd -- Creation Date: 22:15:23 2010-06-30 -- Description: -- Top level of the CPU proper, combining all the various modules -- including Processor, Storage, Multiplexor and (eventually) Selector(s) -- Page references like "5-01A" refer to the IBM Maintenance Diagram Manual (MDM) -- for the 360/30 R25-5103-1 -- References like "02AE6" refer to coordinate "E6" on page "5-02A" -- Logic references like "AB3D5" refer to card "D5" in board "B3" in gate "A" -- Gate A is the main logic gate, B is the second (optional) logic gate, -- C is the core storage and X is the CCROS unit -- -- Revision History: -- Revision 1.0 2010-07-09 -- Initial Release -- -- --------------------------------------------------------------------------- library IEEE; library UNISIM; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; USE work.Buses_package.all; use UNISIM.vcomponents.all; use work.all; entity cpu is Port ( WX_IND : OUT std_logic_vector(0 to 12); W_IND_P : OUT std_logic; X_IND_P : OUT std_logic; IND_SALS : OUT SALS_Bus; IND_EX,IND_CY_MATCH,IND_ALLOW_WR,IND_1050_INTRV,IND_1050_REQ,IND_MPX,IND_SEL_CHNL : OUT STD_LOGIC; IND_MSDR : OUT STD_LOGIC_VECTOR(0 to 7); IND_MSDR_P : OUT STD_LOGIC; IND_OPNL_IN : OUT STD_LOGIC; IND_ADDR_IN : OUT STD_LOGIC; IND_STATUS_IN : OUT STD_LOGIC; IND_SERV_IN : OUT STD_LOGIC; IND_SEL_OUT : OUT STD_LOGIC; IND_ADDR_OUT : OUT STD_LOGIC; IND_CMMD_OUT : OUT STD_LOGIC; IND_SERV_OUT : OUT STD_LOGIC; IND_SUPPR_OUT : OUT STD_LOGIC; IND_FO : OUT STD_LOGIC_VECTOR(0 to 7); IND_FO_P: OUT STD_LOGIC; IND_A : OUT STD_LOGIC_VECTOR(0 to 8); IND_B : OUT STD_LOGIC_VECTOR(0 to 8); IND_ALU : OUT STD_LOGIC_VECTOR(0 to 8); IND_M : OUT STD_LOGIC_VECTOR(0 to 8); IND_N : OUT STD_LOGIC_VECTOR(0 to 8); IND_MAIN_STG : OUT STD_LOGIC; IND_LOC_STG : OUT STD_LOGIC; IND_COMP_MODE : OUT STD_LOGIC; IND_CHK_A_REG : OUT STD_LOGIC; IND_CHK_B_REG : OUT STD_LOGIC; IND_CHK_STOR_ADDR : OUT STD_LOGIC; IND_CHK_CTRL_REG : OUT STD_LOGIC; IND_CHK_ROS_SALS : OUT STD_LOGIC; IND_CHK_ROS_ADDR : OUT STD_LOGIC; IND_CHK_STOR_DATA : OUT STD_LOGIC; IND_CHK_ALU : OUT STD_LOGIC; IND_SYST : OUT STD_LOGIC; IND_MAN : OUT STD_LOGIC; IND_WAIT : OUT STD_LOGIC; IND_TEST : OUT STD_LOGIC; IND_LOAD : OUT STD_LOGIC; SW_START,SW_LOAD,SW_SET_IC,SW_STOP,SW_POWER_OFF : IN std_logic; SW_INH_CF_STOP,SW_PROC,SW_SCAN : IN std_logic; SW_SINGLE_CYCLE,SW_INSTRUCTION_STEP,SW_RATE_SW_PROCESS : IN std_logic; SW_LAMP_TEST,SW_DSPLY,SW_STORE,SW_SYS_RST : IN STD_LOGIC; SW_CHK_RST,SW_ROAR_RST,SW_CHK_RESTART,SW_DIAGNOSTIC : IN STD_LOGIC; SW_CHK_STOP,SW_CHK_SW_PROCESS,SW_CHK_SW_DISABLE,SW_ROAR_RESTT_STOR_BYPASS : IN STD_LOGIC; SW_ROAR_RESTT,SW_ROAR_RESTT_WITHOUT_RST,SW_EARLY_ROAR_STOP,SW_ROAR_STOP : IN STD_LOGIC; SW_ROAR_SYNC,SW_ADDR_COMP_PROC,SW_SAR_DLYD_STOP,SW_SAR_STOP,SW_SAR_RESTART : IN STD_LOGIC; SW_INTRP_TIMER, SW_CONS_INTRP : IN STD_LOGIC; SW_A,SW_B,SW_C,SW_D,SW_F,SW_G,SW_H,SW_J : IN STD_LOGIC_VECTOR(0 to 3); SW_AP,SW_BP,SW_CP,SW_DP,SW_FP,SW_GP,SW_HP,SW_JP : IN STD_LOGIC; E_SW : E_SW_BUS_Type; -- External MPX connections MPX_BUS_O : OUT STD_LOGIC_VECTOR(0 to 8); MPX_BUS_I : IN STD_LOGIC_VECTOR(0 to 8); MPX_TAGS_O : OUT MPX_TAGS_OUT; MPX_TAGS_I : IN MPX_TAGS_IN; -- Storage (RAM) interface StorageIn : IN STORAGE_IN_INTERFACE; StorageOut : OUT STORAGE_OUT_INTERFACE; -- PCH_CONN_ENTRY : IN PCH_CONN; RDR_1_CONN_EXIT : OUT RDR_CONN; n1050_CONTROL : OUT CONN_1050; -- Hardware Serial Port serialInput : in Serial_Input_Lines; serialOutput : out Serial_Output_Lines; DEBUG : INOUT DEBUG_BUS; USE_MAN_DECODER_PWR : OUT STD_LOGIC; Clock1ms : IN STD_LOGIC; N60_CY_TIMER_PULSE : IN STD_LOGIC; M_CONV_OSC : OUT STD_LOGIC; SwSlow : in std_logic; clk : in std_logic); end cpu; architecture FMD of cpu is -- Outputs from UDC1 (5-01 through 5-05) signal sSALS : SALS_Bus; signal CTRL : CTRL_REG; signal T1,T2,T3,T4 : std_logic; signal SEL_T1, SEL_T3, SEL_T4 : std_logic; signal P1,P2,P3,P4 : std_logic; signal A_BUS1, B_BUS : std_logic_vector(0 to 8); signal CLOCK_START : std_logic; signal CLOCK_ON : std_logic; signal STORE_S_REG_RST : std_logic; -- 03DC2 signal CTRL_REG_RST : std_logic; -- 01CB2 signal TO_KEY_SW : std_logic; signal METERING_OUT : std_logic; signal GT_1050_TAGS : std_logic; signal GT_1050_BUS : std_logic; signal SET_IND_ROSAR : STD_LOGIC; signal GT_LOCAL_STORAGE : STD_LOGIC; signal GT_T_REG_TO_MN : STD_LOGIC; signal GT_CK_TO_MN : STD_LOGIC; signal N_STACK_MEM_SELECT : STD_LOGIC; signal WX_CHK : STD_LOGIC; -- Outputs from UDC2 (5-06 through 5-09C) signal Z_BUS,R : std_logic_vector(0 to 8); signal MN : std_logic_vector(0 to 15); signal CLOCK_OFF : std_logic; signal A_REG_PC : std_logic; signal MN_PC : std_logic; signal Z0_BUS_0 : std_logic; signal Z_0 : std_logic; signal N_CTRL_N : std_logic; signal ALU_CHK_LCH : std_logic; signal SELECT_CPU_BUMP : std_logic; signal sMPX_BUS_O : std_logic_vector(0 to 8); signal P_1050_SEL_OUT : STD_LOGIC; signal P_1050_SEL_IN : STD_LOGIC; signal n1050_REQ_IN : STD_LOGIC; signal n1050_CE_MODE : STD_LOGIC; signal MPX_OPN_LT_GATE : STD_LOGIC; signal ADDR_OUT : STD_LOGIC; -- Outputs from UDC3 (5-10A through 5-14D) signal A_BUS3 : STD_LOGIC_VECTOR(0 to 8); signal SEL_WR_CALL : STD_LOGIC := '0'; signal SX1_SHARE_CYCLE : STD_LOGIC := '0'; signal SX2_SHARE_CYCLE : STD_LOGIC := '0'; signal SEL_AUX_WR_CALL : STD_LOGIC := '0'; signal SEL_AUX_RD_CALL : STD_LOGIC := '0'; signal SEL_CONV_OSC : STD_LOGIC; signal SEL_BASIC_CLOCK_OFF : STD_LOGIC; signal SEL_SHARE_HOLD : STD_LOGIC := '0'; signal SEL_SHARE_CYCLE : STD_LOGIC := '0'; signal SEL_CHNL_DATA_XFER : STD_LOGIC := '0'; signal SEL_ROS_REQ : STD_LOGIC := '0'; signal SEL_READ_CALL : STD_LOGIC := '0'; signal SEL_RD_WR_CTRL : STD_LOGIC := '0'; signal SEL_RD_CALL_TO_STP : STD_LOGIC := '0'; signal SEL_CC_ROS_REQ : STD_LOGIC := '0'; signal MAN_DSPLY_GUV_HUV : STD_LOGIC := '0'; signal HSMPX_TRAP : STD_LOGIC := '0'; signal n1050_SEL_O : STD_LOGIC; signal n1050_INSTALLED : STD_LOGIC; signal n1050_OP_IN : STD_LOGIC; -- Inputs to UDC3 signal SEL_DATA_READY : STD_LOGIC; signal SEL_CHNL_CPU_CLOCK_STOP : STD_LOGIC; signal RST_SEL_CHNL_DIAG_LCHS : STD_LOGIC; signal LOAD_REQ_LCH : STD_LOGIC; signal USE_GR_OR_HR : STD_LOGIC; signal SX_CHAIN_PULSE_1 : STD_LOGIC; signal CHK_RST_SW : STD_LOGIC; signal S : std_logic_vector(0 to 7); signal sM_CONV_OSC,P_CONV_OSC,M_CONV_OSC_2 : std_logic; signal MACH_RST_2A,MACH_RST_2B,MACH_RST_3, MACH_RST_6 : std_logic; signal CARRY_0 : STD_LOGIC; signal COMPLEMENT,NTRUE : STD_LOGIC; signal FT0,FT1,FT2,FT3,FT5,FT6,FT7 : STD_LOGIC; signal M_ASSM_BUS1, N_ASSM_BUS1 : STD_LOGIC_VECTOR(0 to 8); signal M_ASSM_BUS2, N_ASSM_BUS2 : STD_LOGIC_VECTOR(0 to 8); signal M_ASSM_BUS3, N_ASSM_BUS3 : STD_LOGIC_VECTOR(0 to 8); signal N1050_INTRV_REQ : STD_LOGIC := '0'; signal TT6_POS_ATTN : STD_LOGIC := '0'; -- signal FT2_MPX_OPNL : STD_LOGIC := '0'; signal MPX_METERING_IN,METER_IN_SX1,METER_IN_SX2 : STD_LOGIC; signal KEY_SW : STD_LOGIC; signal GT_SWS_TO_WX_PWR : STD_LOGIC; signal GT_MAN_SET_MN : STD_LOGIC; signal EXT_TRAP_MASK_ON : STD_LOGIC; signal MANUAL_STORE,MAN_STOR_OR_DSPLY : STD_LOGIC; signal RECYCLE_RST : STD_LOGIC; signal T_REQUEST : STD_LOGIC := '0'; signal MACH_RST_SET_LCH : STD_LOGIC; signal RST_LOAD : STD_LOGIC; signal CARRY_0_LCHD,CARRY_1_LCHD : STD_LOGIC; signal ALU_CHK : STD_LOGIC; signal CTRL_N,N_CTRL_LM : STD_LOGIC; signal SX1_RD_CYCLE,SX2_RD_CYCLE : STD_LOGIC; signal SX1_WR_CYCLE,SX2_WR_CYCLE : STD_LOGIC; signal GT_DETECTORS_TO_HR : STD_LOGIC; signal CPU_RD_PWR : STD_LOGIC; signal XH,XL,XXH : STD_LOGIC; signal SET_FW : STD_LOGIC; signal keyboard_data : STD_LOGIC_VECTOR(7 downto 0); signal keyboard_error : STD_LOGIC; signal USE_MANUAL_DECODER : STD_LOGIC; signal sUSE_MAN_DECODER_PWR : STD_LOGIC; signal LOCAL_STORAGE_CP, MAIN_STORAGE_CP : STD_LOGIC; signal STACK_RD_WR_CONTROL : STD_LOGIC; signal H_REG_5_PWR : STD_LOGIC; signal FORCE_M_REG_123 : STD_LOGIC; signal N_SEL_SHARE_HOLD : STD_LOGIC; signal GK,HK : STD_LOGIC_VECTOR(0 to 3); signal PROT_LOC_CPU_OR_MPX : STD_LOGIC; signal PROT_LOC_SEL_CHNL : STD_LOGIC; signal EARLY_M_REG_0 : STD_LOGIC; signal ODD : STD_LOGIC; -- 06B to 04A signal SUPPR_A_REG_CHK : STD_LOGIC; signal STATUS_IN_LCHD : STD_LOGIC; signal M_REG_0 : STD_LOGIC; signal SYS_RST_PRIORITY_LCH : STD_LOGIC; signal STORE_R : STD_LOGIC; signal SAL_PC : STD_LOGIC; signal R_REG_PC : STD_LOGIC; signal N2ND_ERROR_STOP : STD_LOGIC; signal MEM_WRAP : STD_LOGIC; signal MACH_RST_PROT : STD_LOGIC; signal MACH_RST_MPX : STD_LOGIC; signal GM_WM_DETECTED : STD_LOGIC; signal FIRST_MACH_CHK_REQ : STD_LOGIC; signal FIRST_MACH_CHK : STD_LOGIC; signal DECIMAL : STD_LOGIC; signal INTRODUCE_ALU_CHK : STD_LOGIC; signal SERV_IN_LCHD, ADDR_IN_LCHD, OPNL_IN_LCHD : STD_LOGIC; signal MPX_SHARE_REQ, MPX_INTERRUPT : STD_LOGIC; signal CS_DECODE_X001 : STD_LOGIC; signal SX1_INTERRUPT, SX2_INTERRUPT : STD_LOGIC; signal SX_1_GATE, SX_2_GATE : STD_LOGIC; signal SX_1_R_W_CTRL, SX_2_R_W_CTRL : STD_LOGIC; signal SX_2_BUMP_SW_GT : STD_LOGIC; -- signal FT3_MPX_SHARE_REQ : STD_LOGIC; signal CONNECT : STD_LOGIC; signal P_8F_DETECTED : STD_LOGIC; signal BASIC_CS0 : STD_LOGIC; signal USE_R : STD_LOGIC; signal ANY_MACH_CHK : STD_LOGIC; signal USE_MAIN_MEMORY, USE_LOCAL_MAIN_MEMORY : STD_LOGIC; signal ALLOW_PROTECT : STD_LOGIC; signal USE_BASIC_CA_DECO, USE_ALT_CA_DECODER : STD_LOGIC; signal ALLOW_PC_SALS : STD_LOGIC; signal SUPPR_MACH_CHK_TRAP : STD_LOGIC; signal N1401_MODE : STD_LOGIC; signal MEM_PROTECT_REQUEST : STD_LOGIC; signal MANUAL_DISPLAY : STD_LOGIC; signal MAIN_STORAGE : STD_LOGIC; signal MACH_RST_SET_LCH_DLY : STD_LOGIC; signal MACH_RST_SW : STD_LOGIC; signal MACH_CHK_RST : STD_LOGIC; signal MACH_CHK_PULSE : STD_LOGIC; signal GT_D_REG_TO_A_BUS : STD_LOGIC; signal GT_CA_TO_W_REG : STD_LOGIC; signal DATA_READY : STD_LOGIC; signal CTRL_REG_CHK : STD_LOGIC; signal CPU_WRITE_IN_R_REG : STD_LOGIC; signal CPU_SET_ALLOW_WR_LCH : STD_LOGIC; signal ANY_PRIORITY_LCH : STD_LOGIC; signal ALLOW_WRITE_DLYD : STD_LOGIC; signal ALLOW_WRITE : STD_LOGIC; signal STORE_HR : STD_LOGIC; signal STORE_GR : STD_LOGIC; signal SEL_R_W_CTRL : STD_LOGIC; signal SEL_CHNL_CHK : STD_LOGIC; signal HR_REG_0_7, GR_REG_0_7 : STD_LOGIC_VECTOR(0 to 7); signal STORE_BITS : STD_LOGIC_VECTOR(0 to 8); -- 8 is P signal HR_REG_P_BIT : STD_LOGIC; signal GR_REG_P_BIT : STD_LOGIC; signal GT_DETECTORS_TO_GR : STD_LOGIC; signal EVEN_HR_0_7_BITS, EVEN_GR_0_7_BITS : STD_LOGIC; signal CHANNEL_RD_CALL : STD_LOGIC; signal MPX_ROS_LCH : STD_LOGIC; signal CK_SAL_P_BIT_TO_MPX : STD_LOGIC; signal STG_MEM_SEL : STD_LOGIC; signal GATED_CA_BITS : STD_LOGIC_VECTOR(0 to 3); signal CLOCK_START_LCH : STD_LOGIC; signal LOAD_IND : STD_LOGIC; signal CLOCK_OUT : STD_LOGIC; signal READ_ECHO_1, READ_ECHO_2, WRITE_ECHO_1, WRITE_ECHO_2 : STD_LOGIC; signal DIAGNOSTIC_SW : STD_LOGIC; signal A_BUS, sFI : STD_LOGIC_VECTOR(0 to 8); begin firstBit: entity udc1 (FMD) port map ( SALS => sSALS, CTRL => CTRL, WX_IND => WX_IND, X_IND_P => X_IND_P, W_IND_P => W_IND_P, A_BUS => A_BUS1, B_BUS => B_BUS, Z_BUS => Z_BUS, MPX_BUS => sFI, S => S, R => R, MN => MN, M_ASSM_BUS => M_ASSM_BUS1, N_ASSM_BUS => N_ASSM_BUS1, SW_START => SW_START, SW_LOAD => SW_LOAD, SW_SET_IC => SW_SET_IC, SW_STOP => SW_STOP, SW_INH_CF_STOP => SW_INH_CF_STOP, SW_PROC => SW_PROC, SW_SCAN => SW_SCAN, SW_SINGLE_CYCLE => SW_SINGLE_CYCLE, SW_INSTRUCTION_STEP => SW_INSTRUCTION_STEP, SW_RATE_SW_PROCESS => SW_RATE_SW_PROCESS, SW_PWR_OFF => SW_POWER_OFF, SW_LAMP_TEST => SW_LAMP_TEST, SW_DSPLY => SW_DSPLY, SW_STORE => SW_STORE, SW_SYS_RST => SW_SYS_RST, SW_CHK_RST => SW_CHK_RST, SW_ROAR_RST => SW_ROAR_RST, SW_CHK_RESTART => SW_CHK_RESTART, SW_DIAGNOSTIC => SW_DIAGNOSTIC, SW_CHK_STOP => SW_CHK_STOP, SW_CHK_SW_PROCESS => SW_CHK_SW_PROCESS, SW_CHK_SW_DISABLE => SW_CHK_SW_DISABLE, SW_ROAR_RESTT_STOR_BYPASS => SW_ROAR_RESTT_STOR_BYPASS, SW_ROAR_RESTT => SW_ROAR_RESTT, SW_ROAR_RESTT_WITHOUT_RST => SW_ROAR_RESTT_WITHOUT_RST, SW_EARLY_ROAR_STOP => SW_EARLY_ROAR_STOP, SW_ROAR_STOP => SW_ROAR_STOP, SW_ROAR_SYNC => SW_ROAR_SYNC, SW_ADDR_COMP_PROC => SW_ADDR_COMP_PROC, SW_SAR_DLYD_STOP => SW_SAR_DLYD_STOP, SW_SAR_STOP => SW_SAR_STOP, SW_SAR_RESTART => SW_SAR_RESTART, SW_INTRP_TIMER => SW_INTRP_TIMER, SW_CONS_INTRP => SW_CONS_INTRP, SW_A => SW_A,SW_B => SW_B,SW_C => SW_C,SW_D => SW_D, SW_F => SW_F,SW_G => SW_G,SW_H => SW_H,SW_J => SW_J, SW_AP => SW_AP,SW_BP => SW_BP,SW_CP => SW_CP,SW_DP => SW_DP, SW_FP => SW_FP,SW_GP => SW_GP,SW_HP => SW_HP,SW_JP => SW_JP, TO_KEY_SW => TO_KEY_SW, E_SW => E_SW, -- Main E switch bus IND_SYST => IND_SYST, IND_MAN => IND_MAN, IND_WAIT => IND_WAIT, IND_TEST => IND_TEST, IND_LOAD => IND_LOAD, IND_EX => IND_EX, IND_CY_MATCH => IND_CY_MATCH, IND_ALLOW_WR => IND_ALLOW_WR, IND_1050_INTRV => IND_1050_INTRV, IND_1050_REQ => IND_1050_REQ, IND_MPX => IND_MPX, IND_SEL_CHNL => IND_SEL_CHNL, IND_MSDR => IND_MSDR, IND_MSDR_P => IND_MSDR_P, CARRY_0 => CARRY_0, CARRY_0_LCHD => CARRY_0_LCHD, CARRY_1_LCHD => CARRY_1_LCHD, COMPLEMENT => COMPLEMENT, NTRUE => NTRUE, MPX_METERING_IN => MPX_METERING_IN, CLOCK_OUT => CLOCK_OUT, METERING_OUT => METERING_OUT, METER_IN_SX1 => METER_IN_SX1, METER_IN_SX2 => METER_IN_SX2, KEY_SW => KEY_SW, N60_CY_TIMER_PULSE => N60_CY_TIMER_PULSE, N1050_INTRV_REQ => N1050_INTRV_REQ, GT_1050_TAGS => GT_1050_TAGS, GT_1050_BUS => GT_1050_BUS, TT6_POS_ATTN => TT6_POS_ATTN, FT2_MPX_OPNL => FT2, EXT_TRAP_MASK_ON => EXT_TRAP_MASK_ON, FT0 => FT0, FT1 => FT1, FT2 => FT2, FT3 => FT3, FT5 => FT5, FT6 => FT6, FT7 => FT7, MANUAL_STORE => MANUAL_STORE, RECYCLE_RST => RECYCLE_RST, ALU_CHK => ALU_CHK, CTRL_N => CTRL_N, N_CTRL_N => N_CTRL_N, N_CTRL_LM => N_CTRL_LM, STORE_S_REG_RST => STORE_S_REG_RST, MAIN_STORAGE_CP => MAIN_STORAGE_CP, LOCAL_STORAGE_CP => LOCAL_STORAGE_CP, SET_IND_ROSAR => SET_IND_ROSAR, USE_MAN_DECODER_PWR => sUSE_MAN_DECODER_PWR, N_STACK_MEM_SELECT => N_STACK_MEM_SELECT, STACK_RD_WR_CONTROL => STACK_RD_WR_CONTROL, H_REG_5_PWR => H_REG_5_PWR, FORCE_M_REG_123 => FORCE_M_REG_123, GT_LOCAL_STORAGE => GT_LOCAL_STORAGE, GT_T_TO_MN_REG => GT_T_REG_TO_MN, GT_CK_TO_MN_REG => GT_CK_TO_MN, SX1_SHARE_CYCLE => SX1_SHARE_CYCLE, SX2_SHARE_CYCLE => SX2_SHARE_CYCLE, PROT_LOC_CPU_OR_MPX => PROT_LOC_CPU_OR_MPX, WX_CHK => WX_CHK, EARLY_M_REG_0 => EARLY_M_REG_0, ODD => ODD, XH => XH, XL => XL, XXH => XXH, SUPPR_A_REG_CHK => SUPPR_A_REG_CHK, STATUS_IN_LCHD => STATUS_IN_LCHD, M_REG_0 => M_REG_0, SYS_RST_PRIORITY_LCH => SYS_RST_PRIORITY_LCH, STORE_R => STORE_R, SAL_PC => SAL_PC, R_REG_PC => R_REG_PC, RST_LOAD => RST_LOAD, N2ND_ERROR_STOP => N2ND_ERROR_STOP, MEM_WRAP => MEM_WRAP, MACH_RST_PROT => MACH_RST_PROT, MACH_RST_MPX => MACH_RST_MPX, MACH_RST_2A => MACH_RST_2A, MACH_RST_2B => MACH_RST_2B, MACH_RST_3 => MACH_RST_3, MACH_RST_6 => MACH_RST_6, GM_WM_DETECTED => GM_WM_DETECTED, FIRST_MACH_CHK_REQ => FIRST_MACH_CHK_REQ, FIRST_MACH_CHK => FIRST_MACH_CHK, DECIMAL => DECIMAL, INTRODUCE_ALU_CHK => INTRODUCE_ALU_CHK, SERV_IN_LCHD => SERV_IN_LCHD, ADDR_IN_LCHD => ADDR_IN_LCHD, OPNL_IN_LCHD => OPNL_IN_LCHD, MPX_SHARE_REQ => MPX_SHARE_REQ, MPX_INTERRUPT => MPX_INTERRUPT, CS_DECODE_X001 => CS_DECODE_X001, CLOCK_OFF => CLOCK_OFF, CONNECT => CONNECT, P_8F_DETECTED => P_8F_DETECTED, BASIC_CS0 => BASIC_CS0, ANY_MACH_CHK => ANY_MACH_CHK, ALU_CHK_LCH => ALU_CHK_LCH, ALLOW_PROTECT => ALLOW_PROTECT, ALLOW_PC_SALS => ALLOW_PC_SALS, USE_R => USE_R, USE_BASIC_CA_DECODER => USE_BASIC_CA_DECO, USE_ALT_CA_DECODER => USE_ALT_CA_DECODER, SUPPR_MACH_CHK_TRAP => SUPPR_MACH_CHK_TRAP, SEL_DATA_READY => SEL_DATA_READY, N1401_MODE => N1401_MODE, STG_MEM_SEL => STG_MEM_SEL, MEM_PROT_REQUEST => MEM_PROTECT_REQUEST, MANUAL_DISPLAY => MANUAL_DISPLAY, MAIN_STORAGE => MAIN_STORAGE, MACH_RST_SET_LCH_DLY => MACH_RST_SET_LCH_DLY, MACH_RST_SET_LCH => MACH_RST_SET_LCH, MACH_CHK_RST => MACH_CHK_RST, MACH_CHK_PULSE => MACH_CHK_PULSE, GT_D_REG_TO_A_BUS => GT_D_REG_TO_A_BUS, GT_CA_TO_W_REG => GT_CA_TO_W_REG, DATA_READY => DATA_READY, CTRL_REG_CHK => CTRL_REG_CHK, CPU_WRITE_IN_R_REG => CPU_WRITE_IN_R_REG, CPU_SET_ALLOW_WR_LCH => CPU_SET_ALLOW_WR_LCH, ANY_PRIORITY_LCH => ANY_PRIORITY_LCH, ALLOW_WRITE => ALLOW_WRITE, ALLOW_WRITE_DLYD => ALLOW_WRITE_DLYD, GT_MAN_SET_MN => GT_MAN_SET_MN, MPX_ROS_LCH => MPX_ROS_LCH, CTRL_REG_RST => CTRL_REG_RST, CK_SAL_P_BIT_TO_MPX => CK_SAL_P_BIT_TO_MPX, CHANNEL_RD_CALL => CHANNEL_RD_CALL, GTD_CA_BITS => GATED_CA_BITS, Z0_BUS_0 => Z0_BUS_0, Z_0 => Z_0, USE_MANUAL_DECODER => USE_MANUAL_DECODER, USE_MAIN_MEMORY => USE_MAIN_MEMORY, USE_LOC_MAIN_MEM => USE_LOCAL_MAIN_MEMORY, SELECT_CPU_BUMP => SELECT_CPU_BUMP, MAN_STOR_OR_DSPLY => MAN_STOR_OR_DSPLY, GT_SWS_TO_WX_PWR => GT_SWS_TO_WX_PWR, CPU_RD_PWR => CPU_RD_PWR, LOAD_IND => LOAD_IND, SET_FW => SET_FW, MACH_RST_SW => MACH_RST_SW, LOAD_REQ_LCH => LOAD_REQ_LCH, USE_GR_OR_HR => USE_GR_OR_HR, SX_CHAIN_PULSE_1 => SX_CHAIN_PULSE_1, CHK_RST_SW => CHK_RST_SW, DIAGNOSTIC_SW => DIAGNOSTIC_SW, MAN_DSPLY_GUV_HUV => MAN_DSPLY_GUV_HUV, HSMPX_TRAP => HSMPX_TRAP, READ_ECHO_1 => READ_ECHO_1, READ_ECHO_2 => READ_ECHO_2, WRITE_ECHO_1 => WRITE_ECHO_1, WRITE_ECHO_2 => WRITE_ECHO_2, SX_1_R_W_CTRL => SX_1_R_W_CTRL, SX_2_R_W_CTRL => SX_2_R_W_CTRL, SX_2_BUMP_SW_GT => SX_2_BUMP_SW_GT, SEL_WR_CALL => SEL_WR_CALL, SEL_AUX_WR_CALL => SEL_AUX_WR_CALL, SEL_AUX_RD_CALL => SEL_AUX_RD_CALL, SEL_T1 => SEL_T1, SEL_T4 => SEL_T4, SEL_CONV_OSC => SEL_CONV_OSC, SEL_BASIC_CLOCK_OFF => SEL_BASIC_CLOCK_OFF, SEL_SHARE_HOLD => SEL_SHARE_HOLD, SEL_SHARE_CYCLE => SEL_SHARE_CYCLE, SEL_CHNL_DATA_XFER => SEL_CHNL_DATA_XFER, SEL_ROS_REQ => SEL_ROS_REQ, SEL_READ_CALL => SEL_READ_CALL, SEL_RD_WR_CTRL => SEL_RD_WR_CTRL, SEL_RD_CALL_TO_STP => SEL_RD_CALL_TO_STP, SEL_CHNL_CPU_CLOCK_STOP => SEL_CHNL_CPU_CLOCK_STOP, RST_SEL_CHNL_DIAG_LCHS => RST_SEL_CHNL_DIAG_LCHS, SEL_CC_ROS_REQ => SEL_CC_ROS_REQ, SX1_INTERRUPT => SX1_INTERRUPT, SX2_INTERRUPT => SX2_INTERRUPT, SX_1_GATE => SX_1_GATE, SX_2_GATE => SX_2_GATE, CLOCK_ON => CLOCK_ON, M_CONV_OSC => sM_CONV_OSC, P_CONV_OSC => P_CONV_OSC, M_CONV_OSC_2 => M_CONV_OSC_2, CLOCK_START => CLOCK_START, CLOCK_START_LCH => CLOCK_START_LCH, -- UDC1 Debug stuff DEBUG => DEBUG, -- End of Debug stuff T1 => T1, T2 => T2, T3 => T3, T4 => T4, P1 => P1, P4 => P4, CLK => CLK ); IND_SALS <= sSALS when SW_LAMP_TEST='0' else ( SALS_PN => '1', SALS_CN => "111111", SALS_PS => '1', SALS_PA => '1', SALS_CH => "1111", SALS_CL => "1111", SALS_CM => "111", SALS_CU => "11", SALS_CA => "1111", SALS_CB => "11", SALS_CK => "1111", SALS_PK => '1', SALS_PC => '1', SALS_CD => "1111", SALS_CF => "111", SALS_CG => "11", SALS_CV => "11", SALS_CC => "111", SALS_CS => "1111", SALS_AA => '1', SALS_SA => '1', SALS_AK => '1'); USE_MAN_DECODER_PWR <= sUSE_MAN_DECODER_PWR; secondBit: entity udc2 (FMD) port map ( SALS => sSALS, CTRL => CTRL, A_BUS1 => A_BUS, B_BUS => B_BUS, Z_BUS => Z_BUS, E_BUS => E_SW, M_ASSM_BUS => M_ASSM_BUS2, N_ASSM_BUS => N_ASSM_BUS2, S => S, R => R, MN => MN, Sw_Slow => SwSlow, CLOCK_START => CLOCK_START, MACH_RST_3 => MACH_RST_3, MACH_RST_6 => MACH_RST_6, MANUAL_STORE => MANUAL_STORE, RECYCLE_RST => RECYCLE_RST, CLOCK_IN => clk, M_CONV_OSC => sM_CONV_OSC, P_CONV_OSC => P_CONV_OSC, M_CONV_OSC_2 => M_CONV_OSC_2, CLOCK_ON => CLOCK_ON, LAMP_TEST => SW_LAMP_TEST, MAN_STOR_OR_DSPLY => MAN_STOR_OR_DSPLY, MACH_RST_SET_LCH => MACH_RST_SET_LCH, DIAG_SW => DIAGNOSTIC_SW, CHK_SW_PROC_SW => SW_CHK_SW_PROCESS, ROS_SCAN => SW_SCAN, GT_SWS_TO_WX_PWR => GT_SWS_TO_WX_PWR, RST_LOAD => RST_LOAD, SYSTEM_RST_PRIORITY_LCH => SYS_RST_PRIORITY_LCH, CARRY_0_LATCHED => CARRY_0_LCHD, CARRY_1_LCHD => CARRY_1_LCHD, ALU_CHK => ALU_CHK, NTRUE => NTRUE, COMPLEMENT => COMPLEMENT, P_CTRL_N => CTRL_N, N_CTRL_LM => N_CTRL_LM, SX1_RD_CYCLE => SX1_RD_CYCLE, SX2_RD_CYCLE => SX2_RD_CYCLE, SX1_WR_CYCLE => SX1_WR_CYCLE, SX2_WR_CYCLE => SX2_WR_CYCLE, SX1_SHARE_CYCLE => SX1_SHARE_CYCLE, SX2_SHARE_CYCLE => SX2_SHARE_CYCLE, CPU_RD_PWR => CPU_RD_PWR, GT_MAN_SET_MN => GT_MAN_SET_MN, CHNL_RD_CALL => CHANNEL_RD_CALL, XH => XH, XL => XL, XXH => XXH, MAN_STOR_PWR => MANUAL_STORE, STORE_S_REG_RST => STORE_S_REG_RST, E_SW_SEL_S => E_SW.S_SEL, CTRL_REG_RST => CTRL_REG_RST, CLOCK_OFF => CLOCK_OFF, A_REG_PC => A_REG_PC, Z0_BUS_0 => Z0_BUS_0, Z_0 => Z_0, P_CONNECT => CONNECT, N_CTRL_N => N_CTRL_N, ALU_CHK_LCH => ALU_CHK_LCH, MN_PC => MN_PC, SET_IND_ROSAR => SET_IND_ROSAR, N_STACK_MEMORY_SELECT => N_STACK_MEM_SELECT, STACK_RD_WR_CONTROL => STACK_RD_WR_CONTROL, H_REG_5_PWR => H_REG_5_PWR, FORCE_M_REG_123 => FORCE_M_REG_123, GT_LOCAL_STORAGE => GT_LOCAL_STORAGE, GT_T_REG_TO_MN => GT_T_REG_TO_MN, -- from 05B GT_CK_TO_MN => GT_CK_TO_MN, MAIN_STG_CP_1 => MAIN_STORAGE_CP, N_STACK_MEM_SELECT => N_STACK_MEM_SELECT, SEL_CPU_BUMP => SELECT_CPU_BUMP, PROTECT_LOC_CPU_OR_MPX => PROT_LOC_CPU_OR_MPX, PROTECT_LOC_SEL_CHNL => PROT_LOC_SEL_CHNL, WX_CHK => WX_CHK, EARLY_M0 => EARLY_M_REG_0, ODD => ODD, SUPPR_A_REG_CHK => SUPPR_A_REG_CHK, STATUS_IN_LCHD => STATUS_IN_LCHD, STORE_R => STORE_R, SALS_PC => SAL_PC, R_REG_PC => R_REG_PC, N2ND_ERROR_STOP => N2ND_ERROR_STOP, MEM_WRAP => MEM_WRAP, USE_R => USE_R, USE_MAIN_MEM => USE_MAIN_MEMORY, USE_LOC_MAIN_MEM => USE_LOCAL_MAIN_MEMORY, USE_BASIC_CA_DECO => USE_BASIC_CA_DECO, USE_ALT_CA_DECODER => USE_ALT_CA_DECODER, SUPPR_MACH_CHK_TRAP => SUPPR_MACH_CHK_TRAP, SEL_DATA_READY => SEL_DATA_READY, N1401_MODE => N1401_MODE, STG_MEM_SELECT => STG_MEM_SEL, MEM_PROT_REQUEST => MEM_PROTECT_REQUEST, MANUAL_DISPLAY => MANUAL_DISPLAY, MAIN_STG => MAIN_STORAGE, MACH_RST_SW => MACH_RST_SW, MACH_RST_SET_LCH_DLY => MACH_RST_SET_LCH_DLY, MACH_CHK_RST => MACH_CHK_RST, MACH_CHK_PULSE => MACH_CHK_PULSE, LOCAL_STG => LOCAL_STORAGE_CP, GT_D_REG_TO_A_BUS => GT_D_REG_TO_A_BUS, GT_CA_TO_W_REG => GT_CA_TO_W_REG, DATA_READY => DATA_READY, CTRL_REG_CHK => CTRL_REG_CHK, CPU_WR_IN_R_REG => CPU_WRITE_IN_R_REG, CPU_SET_ALLOW_WR_LCH => CPU_SET_ALLOW_WR_LCH, ANY_PRIORITY_LCH => ANY_PRIORITY_LCH, ALLOW_WRITE_DLYD => ALLOW_WRITE_DLYD, ALLOW_WRITE => ALLOW_WRITE, T_REQUEST => T_REQUEST, P_8F_DETECTED => P_8F_DETECTED, CHK_SW_DISABLE => SW_CHK_SW_DISABLE, USE_MANUAL_DECODER => USE_MANUAL_DECODER, GATED_CA_BITS => GATED_CA_BITS, FIRST_MACH_CHK_REQ => FIRST_MACH_CHK_REQ, FIRST_MACH_CHK => FIRST_MACH_CHK, EXT_TRAP_MASK_ON => EXT_TRAP_MASK_ON, MACH_RST_2A => MACH_RST_2A, MACH_RST_2B => MACH_RST_2B, BASIC_CS0 => BASIC_CS0, ANY_MACH_CHK => ANY_MACH_CHK, ALLOW_PC_SALS => ALLOW_PC_SALS, CARRY_0 => CARRY_0, ALLOW_PROTECT => ALLOW_PROTECT, CS_DECODE_X001 => CS_DECODE_X001, DECIMAL => DECIMAL, M_REG_0 => M_REG_0, MACH_RST_PROT => MACH_RST_PROT, INTRODUCE_ALU_CHK => INTRODUCE_ALU_CHK, MPX_ROS_LCH => MPX_ROS_LCH, FT7 => FT7, FT6 => FT6, FT5 => FT5, FT2 => FT2, FT0 => FT0, FT3 => FT3, MPX_INTERRUPT => MPX_INTERRUPT, MPX_METERING_IN => MPX_METERING_IN, STORE_BITS => STORE_BITS, READ_ECHO_1 => READ_ECHO_1, READ_ECHO_2 => READ_ECHO_2, WRITE_ECHO_1 => WRITE_ECHO_1, WRITE_ECHO_2 => WRITE_ECHO_2, SERV_IN_LCHD => SERV_IN_LCHD, ADDR_IN_LCHD => ADDR_IN_LCHD, OPNL_IN_LCHD => OPNL_IN_LCHD, MACH_RST_MPX => MACH_RST_MPX, SET_FW => SET_FW, MPX_SHARE_REQ => MPX_SHARE_REQ, LOAD_IND => LOAD_IND, CLOCK_OUT => CLOCK_OUT, METERING_OUT => METERING_OUT, -- Signals from UDC3 N_SEL_SHARE_HOLD => N_SEL_SHARE_HOLD, -- from 12D GK => GK, -- from 11B HK => HK, -- from 13B STORE_HR => STORE_HR, STORE_GR => STORE_GR, SEL_SHARE_CYCLE => SEL_SHARE_CYCLE, SEL_R_W_CTRL => SEL_R_W_CTRL, SEL_CHNL_CHK => SEL_CHNL_CHK, HR_REG_0_7 => HR_REG_0_7, GR_REG_0_7 => GR_REG_0_7, HR_REG_P_BIT => HR_REG_P_BIT, GR_REG_P_BIT => GR_REG_P_BIT, GT_HSMPX_INTO_R_REG => '0', DR_CORR_P_BIT => '0', GT_DETECTORS_TO_HR => GT_DETECTORS_TO_HR, GT_DETECTORS_TO_GR => GT_DETECTORS_TO_GR, EVEN_HR_0_7_BITS => EVEN_HR_0_7_BITS, EVEN_GR_0_7_BITS => EVEN_GR_0_7_BITS, ADDR_OUT => ADDR_OUT, -- Indicators IND_OPNL_IN => IND_OPNL_IN, IND_ADDR_IN => IND_ADDR_IN, IND_STATUS_IN => IND_STATUS_IN, IND_SERV_IN => IND_SERV_IN, IND_SEL_OUT => IND_SEL_OUT, IND_ADDR_OUT => IND_ADDR_OUT, IND_CMMD_OUT => IND_CMMD_OUT, IND_SERV_OUT => IND_SERV_OUT, IND_SUPPR_OUT => IND_SUPPR_OUT, IND_FO => IND_FO, IND_FO_P => IND_FO_P, IND_A => IND_A, IND_B => IND_B, IND_ALU => IND_ALU, IND_M => IND_M, IND_N => IND_N, IND_MAIN_STG => IND_MAIN_STG, IND_LOC_STG => IND_LOC_STG, IND_COMP_MODE => IND_COMP_MODE, IND_CHK_A_REG => IND_CHK_A_REG, IND_CHK_B_REG => IND_CHK_B_REG, IND_CHK_STOR_ADDR => IND_CHK_STOR_ADDR, IND_CHK_CTRL_REG => IND_CHK_CTRL_REG, IND_CHK_ROS_SALS => IND_CHK_ROS_SALS, IND_CHK_ROS_ADDR => IND_CHK_ROS_ADDR, IND_CHK_STOR_DATA => IND_CHK_STOR_DATA, IND_CHK_ALU => IND_CHK_ALU, -- Selector & Mpx channels MPX_BUS_O => sMPX_BUS_O, MPX_BUS_I => MPX_BUS_I, MPX_TAGS_O => MPX_TAGS_O, MPX_TAGS_I => MPX_TAGS_I, FI => sFI, MPX_OPN_LT_GATE => MPX_OPN_LT_GATE, n1050_SEL_O => n1050_SEL_O, P_1050_SEL_OUT => P_1050_SEL_OUT, P_1050_SEL_IN => P_1050_SEL_IN, n1050_INSTALLED => n1050_INSTALLED, n1050_REQ_IN => n1050_REQ_IN, n1050_OP_IN => n1050_OP_IN, n1050_CE_MODE => n1050_CE_MODE, StorageIn => StorageIn, StorageOut => StorageOut, -- UDC2 Debug stuff DEBUG => open, SEL_T1 => SEL_T1, T1 => T1, T2 => T2, T3 => T3, T4 => T4, P1 => P1, P2 => P2, P3 => P3, P4 => P4, SEL_T3 => SEL_T3, Clk => Clk ); thirdBit : entity udc3 (FMD) port map ( -- Inputs E_SW_SEL_BUS => E_SW, USE_MANUAL_DECODER => USE_MANUAL_DECODER, USE_ALT_CA_DECODER => USE_ALT_CA_DECODER, USE_BASIC_CA_DECO => USE_BASIC_CA_DECO, GTD_CA_BITS => GATED_CA_BITS, Z_BUS => Z_BUS, GT_1050_TAGS_OUT => GT_1050_TAGS, GT_1050_BUS_OUT => GT_1050_BUS, -- PCH_CONN_ENTRY => PCH_CONN_ENTRY, P_1050_SEL_OUT => P_1050_SEL_OUT, P_1050_SEL_IN => P_1050_SEL_IN, n1050_OP_IN => n1050_OP_IN, SUPPRESS_OUT => FT0, CK_SAL_P_BIT => CK_SAL_P_BIT_TO_MPX, MPX_OPN_LT_GATE => MPX_OPN_LT_GATE, RECYCLE_RESET => RECYCLE_RST, -- Outputs A_BUS => A_BUS3, M_ASSM_BUS => M_ASSM_BUS3, N_ASSM_BUS => N_ASSM_BUS3, T_REQUEST => T_REQUEST, -- RDR_1_CONN_EXIT => RDR_1_CONN_EXIT, -- n1050_CONTROL => n1050_CONTROL, N1050_INTRV_REQ => N1050_INTRV_REQ, TT6_POS_ATTN => TT6_POS_ATTN, n1050_SEL_O => n1050_SEL_O, n1050_INSTALLED => n1050_INSTALLED, n1050_REQ_IN => n1050_REQ_IN, n1050_CE_MODE => n1050_CE_MODE, ADDR_OUT => ADDR_OUT, SerialInput => SerialInput, SerialOutput => SerialOutput, -- Clocks clk => clk, Clock1ms => Clock1ms, Clock60Hz => N60_CY_TIMER_PULSE, -- UDC3 debug DEBUG => open, T1 => T1, T2 => T2, T3 => T3, T4 => T4, P1 => P1, P2 => P2, P3 => P3, P4 => P4 ); M_CONV_OSC <= sM_CONV_OSC; -- Temporary substitutes for UDC3 SEL_CONV_OSC <= P_CONV_OSC; -- 12A SEL_BASIC_CLOCK_OFF <= not CLOCK_ON and not CLOCK_START_LCH; -- 12A -- Combining buses M_ASSM_BUS2 <= M_ASSM_BUS1 or M_ASSM_BUS3; N_ASSM_BUS2 <= N_ASSM_BUS1 or N_ASSM_BUS3; A_BUS <= A_BUS1 and A_BUS3; end FMD;
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: ch_05_tb_05_12.vhd,v 1.2 2001-10-26 16:29:34 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- entity in_pad is port ( i : in bit; z : out bit ); end entity in_pad; entity reg32 is port ( en : in bit; clk : in bit; d : in bit_vector(31 downto 0); q : out bit_vector(31 downto 0) ); end entity reg32; entity adder is port ( a, b : in bit_vector(31 downto 0); y : out bit_vector(31 downto 0); c : out bit ); end entity adder; entity filter is end entity filter;
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: ch_05_tb_05_12.vhd,v 1.2 2001-10-26 16:29:34 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- entity in_pad is port ( i : in bit; z : out bit ); end entity in_pad; entity reg32 is port ( en : in bit; clk : in bit; d : in bit_vector(31 downto 0); q : out bit_vector(31 downto 0) ); end entity reg32; entity adder is port ( a, b : in bit_vector(31 downto 0); y : out bit_vector(31 downto 0); c : out bit ); end entity adder; entity filter is end entity filter;
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: ch_05_tb_05_12.vhd,v 1.2 2001-10-26 16:29:34 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- entity in_pad is port ( i : in bit; z : out bit ); end entity in_pad; entity reg32 is port ( en : in bit; clk : in bit; d : in bit_vector(31 downto 0); q : out bit_vector(31 downto 0) ); end entity reg32; entity adder is port ( a, b : in bit_vector(31 downto 0); y : out bit_vector(31 downto 0); c : out bit ); end entity adder; entity filter is end entity filter;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc622.vhd,v 1.3 2001-10-29 02:12:45 paw Exp $ -- $Revision: 1.3 $ -- -- --------------------------------------------------------------------- -- **************************** -- -- Ported to VHDL 93 by port93.pl - Tue Nov 5 16:37:45 1996 -- -- **************************** -- ENTITY c03s04b01x00p01n01i00622ent IS END c03s04b01x00p01n01i00622ent; ARCHITECTURE c03s04b01x00p01n01i00622arch OF c03s04b01x00p01n01i00622ent IS constant C4 : positive := 3 ; type positive_vector is array (natural range <>) of positive; subtype positive_vector_st is positive_vector(0 to 15); type positive_vector_st_file is file of positive_vector_st; constant C27 : positive_vector_st := (others => C4); BEGIN TESTING: PROCESS file filein : positive_vector_st_file open write_mode is "iofile.30"; BEGIN for i in 1 to 100 loop write(filein, C27); end loop; assert FALSE report "***PASSED TEST: c03s04b01x00p01n01i00622 - The output file will be verified by test s010268.vhd." severity NOTE; wait; END PROCESS TESTING; END c03s04b01x00p01n01i00622arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc622.vhd,v 1.3 2001-10-29 02:12:45 paw Exp $ -- $Revision: 1.3 $ -- -- --------------------------------------------------------------------- -- **************************** -- -- Ported to VHDL 93 by port93.pl - Tue Nov 5 16:37:45 1996 -- -- **************************** -- ENTITY c03s04b01x00p01n01i00622ent IS END c03s04b01x00p01n01i00622ent; ARCHITECTURE c03s04b01x00p01n01i00622arch OF c03s04b01x00p01n01i00622ent IS constant C4 : positive := 3 ; type positive_vector is array (natural range <>) of positive; subtype positive_vector_st is positive_vector(0 to 15); type positive_vector_st_file is file of positive_vector_st; constant C27 : positive_vector_st := (others => C4); BEGIN TESTING: PROCESS file filein : positive_vector_st_file open write_mode is "iofile.30"; BEGIN for i in 1 to 100 loop write(filein, C27); end loop; assert FALSE report "***PASSED TEST: c03s04b01x00p01n01i00622 - The output file will be verified by test s010268.vhd." severity NOTE; wait; END PROCESS TESTING; END c03s04b01x00p01n01i00622arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc622.vhd,v 1.3 2001-10-29 02:12:45 paw Exp $ -- $Revision: 1.3 $ -- -- --------------------------------------------------------------------- -- **************************** -- -- Ported to VHDL 93 by port93.pl - Tue Nov 5 16:37:45 1996 -- -- **************************** -- ENTITY c03s04b01x00p01n01i00622ent IS END c03s04b01x00p01n01i00622ent; ARCHITECTURE c03s04b01x00p01n01i00622arch OF c03s04b01x00p01n01i00622ent IS constant C4 : positive := 3 ; type positive_vector is array (natural range <>) of positive; subtype positive_vector_st is positive_vector(0 to 15); type positive_vector_st_file is file of positive_vector_st; constant C27 : positive_vector_st := (others => C4); BEGIN TESTING: PROCESS file filein : positive_vector_st_file open write_mode is "iofile.30"; BEGIN for i in 1 to 100 loop write(filein, C27); end loop; assert FALSE report "***PASSED TEST: c03s04b01x00p01n01i00622 - The output file will be verified by test s010268.vhd." severity NOTE; wait; END PROCESS TESTING; END c03s04b01x00p01n01i00622arch;
--***************************************************************************** -- -- Micron Semiconductor Products, Inc. -- -- Copyright 1997, Micron Semiconductor Products, Inc. -- All rights reserved. -- --***************************************************************************** -- pragma translate_off library ieee; use ieee.std_logic_1164.ALL; use std.textio.all; PACKAGE mti_pkg IS FUNCTION To_StdLogic (s : BIT) RETURN STD_LOGIC; FUNCTION TO_INTEGER (input : STD_LOGIC) RETURN INTEGER; FUNCTION TO_INTEGER (input : BIT_VECTOR) RETURN INTEGER; FUNCTION TO_INTEGER (input : STD_LOGIC_VECTOR) RETURN INTEGER; PROCEDURE TO_BITVECTOR (VARIABLE input : IN INTEGER; VARIABLE output : OUT BIT_VECTOR); END mti_pkg; PACKAGE BODY mti_pkg IS -- Convert BIT to STD_LOGIC FUNCTION To_StdLogic (s : BIT) RETURN STD_LOGIC IS BEGIN CASE s IS WHEN '0' => RETURN ('0'); WHEN '1' => RETURN ('1'); WHEN OTHERS => RETURN ('0'); END CASE; END; -- Convert STD_LOGIC to INTEGER FUNCTION TO_INTEGER (input : STD_LOGIC) RETURN INTEGER IS VARIABLE result : INTEGER := 0; VARIABLE weight : INTEGER := 1; BEGIN IF input = '1' THEN result := weight; ELSE result := 0; -- if unknowns, default to logic 0 END IF; RETURN result; END TO_INTEGER; -- Convert BIT_VECTOR to INTEGER FUNCTION TO_INTEGER (input : BIT_VECTOR) RETURN INTEGER IS VARIABLE result : INTEGER := 0; VARIABLE weight : INTEGER := 1; BEGIN FOR i IN input'LOW TO input'HIGH LOOP IF input(i) = '1' THEN result := result + weight; ELSE result := result + 0; -- if unknowns, default to logic 0 END IF; weight := weight * 2; END LOOP; RETURN result; END TO_INTEGER; -- Convert STD_LOGIC_VECTOR to INTEGER FUNCTION TO_INTEGER (input : STD_LOGIC_VECTOR) RETURN INTEGER IS VARIABLE result : INTEGER := 0; VARIABLE weight : INTEGER := 1; BEGIN FOR i IN input'LOW TO input'HIGH LOOP IF input(i) = '1' THEN result := result + weight; ELSE result := result + 0; -- if unknowns, default to logic 0 END IF; weight := weight * 2; END LOOP; RETURN result; END TO_INTEGER; -- Conver INTEGER to BIT_VECTOR PROCEDURE TO_BITVECTOR (VARIABLE input : IN INTEGER; VARIABLE output : OUT BIT_VECTOR) IS VARIABLE work,offset,outputlen,j : INTEGER := 0; BEGIN --length of vector IF output'LENGTH > 32 THEN --' outputlen := 32; offset := output'LENGTH - 32; --' IF input >= 0 THEN FOR i IN offset-1 DOWNTO 0 LOOP output(output'HIGH - i) := '0'; --' END LOOP; ELSE FOR i IN offset-1 DOWNTO 0 LOOP output(output'HIGH - i) := '1'; --' END LOOP; END IF; ELSE outputlen := output'LENGTH; --' END IF; --positive value IF (input >= 0) THEN work := input; j := outputlen - 1; FOR i IN 1 to 32 LOOP IF j >= 0 then IF (work MOD 2) = 0 THEN output(output'HIGH-j-offset) := '0'; --' ELSE output(output'HIGH-j-offset) := '1'; --' END IF; END IF; work := work / 2; j := j - 1; END LOOP; IF outputlen = 32 THEN output(output'HIGH) := '0'; --' END IF; --negative value ELSE work := (-input) - 1; j := outputlen - 1; FOR i IN 1 TO 32 LOOP IF j>= 0 THEN IF (work MOD 2) = 0 THEN output(output'HIGH-j-offset) := '1'; --' ELSE output(output'HIGH-j-offset) := '0'; --' END IF; END IF; work := work / 2; j := j - 1; END LOOP; IF outputlen = 32 THEN output(output'HIGH) := '1'; --' END IF; END IF; END TO_BITVECTOR; END mti_pkg; ----------------------------------------------------------------------------------------- -- -- File Name: MT48LC16M16A2.VHD -- Version: 0.0g -- Date: June 29th, 2000 -- Model: Behavioral -- Simulator: Model Technology (PC version 5.3 PE) -- -- Dependencies: None -- -- Author: Son P. Huynh -- Email: [email protected] -- Phone: (208) 368-3825 -- Company: Micron Technology, Inc. -- Part Number: MT48LC16M16A2 (4Mb x 16 x 4 Banks) -- -- Description: Micron 256Mb SDRAM -- -- Limitation: - Doesn't check for 4096-cycle refresh --' -- -- Note: - Set simulator resolution to "ps" accuracy -- -- Disclaimer: THESE DESIGNS ARE PROVIDED "AS IS" WITH NO WARRANTY -- WHATSOEVER AND MICRON SPECIFICALLY DISCLAIMS ANY -- IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR -- A PARTICULAR PURPOSE, OR AGAINST INFRINGEMENT. -- -- Copyright (c) 1998 Micron Semiconductor Products, Inc. -- All rights researved -- -- Rev Author Phone Date Changes -- ---- ---------------------------- ---------- ------------------------------------- -- 0.0g Son Huynh 208-368-3825 06/29/2000 Add Load/Dump memory array -- Micron Technology Inc. Modify tWR + tRAS timing check -- -- 0.0f Son Huynh 208-368-3825 07/08/1999 Fix tWR = 1 Clk + 7.5 ns (Auto) -- Micron Technology Inc. Fix tWR = 15 ns (Manual) -- Fix tRP (Autoprecharge to AutoRefresh) -- -- 0.0c Son P. Huynh 208-368-3825 04/08/1999 Fix tWR + tRP in Write with AP -- Micron Technology Inc. Fix tRC check in Load Mode Register -- -- 0.0b Son P. Huynh 208-368-3825 01/06/1998 Derive from 64Mb SDRAM model -- Micron Technology Inc. -- ----------------------------------------------------------------------------------------- LIBRARY STD; USE STD.TEXTIO.ALL; LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; LIBRARY WORK; USE WORK.MTI_PKG.ALL; use std.textio.all; library grlib; use grlib.stdlib.all; library gaisler; use gaisler.sim.all; ENTITY mt48lc16m16a2 IS GENERIC ( -- Timing Parameters for -75 (PC133) and CAS Latency = 2 tAC : TIME := 6.0 ns; tHZ : TIME := 7.0 ns; tOH : TIME := 2.7 ns; tMRD : INTEGER := 2; -- 2 Clk Cycles tRAS : TIME := 44.0 ns; tRC : TIME := 66.0 ns; tRCD : TIME := 20.0 ns; tRP : TIME := 20.0 ns; tRRD : TIME := 15.0 ns; tWRa : TIME := 7.5 ns; -- A2 Version - Auto precharge mode only (1 Clk + 7.5 ns) tWRp : TIME := 15.0 ns; -- A2 Version - Precharge mode only (15 ns) tAH : TIME := 0.8 ns; tAS : TIME := 1.5 ns; tCH : TIME := 2.5 ns; tCL : TIME := 2.5 ns; tCK : TIME := 10.0 ns; tDH : TIME := 0.8 ns; tDS : TIME := 1.5 ns; tCKH : TIME := 0.8 ns; tCKS : TIME := 1.5 ns; tCMH : TIME := 0.8 ns; tCMS : TIME := 1.5 ns; addr_bits : INTEGER := 13; data_bits : INTEGER := 16; col_bits : INTEGER := 9; index : INTEGER := 0; fname : string := "sdram.srec" -- File to read from ); PORT ( Dq : INOUT STD_LOGIC_VECTOR (data_bits - 1 DOWNTO 0) := (OTHERS => 'Z'); Addr : IN STD_LOGIC_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); Ba : IN STD_LOGIC_VECTOR := "00"; Clk : IN STD_LOGIC := '0'; Cke : IN STD_LOGIC := '1'; Cs_n : IN STD_LOGIC := '1'; Ras_n : IN STD_LOGIC := '1'; Cas_n : IN STD_LOGIC := '1'; We_n : IN STD_LOGIC := '1'; Dqm : IN STD_LOGIC_VECTOR (1 DOWNTO 0) := "00" ); END mt48lc16m16a2; ARCHITECTURE behave OF mt48lc16m16a2 IS TYPE State IS (ACT, A_REF, BST, LMR, NOP, PRECH, READ, READ_A, WRITE, WRITE_A, LOAD_FILE, DUMP_FILE); TYPE Array4xI IS ARRAY (3 DOWNTO 0) OF INTEGER; TYPE Array4xT IS ARRAY (3 DOWNTO 0) OF TIME; TYPE Array4xB IS ARRAY (3 DOWNTO 0) OF BIT; TYPE Array4x2BV IS ARRAY (3 DOWNTO 0) OF BIT_VECTOR (1 DOWNTO 0); TYPE Array4xCBV IS ARRAY (4 DOWNTO 0) OF BIT_VECTOR (Col_bits - 1 DOWNTO 0); TYPE Array_state IS ARRAY (4 DOWNTO 0) OF State; SIGNAL Operation : State := NOP; SIGNAL Mode_reg : BIT_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); SIGNAL Active_enable, Aref_enable, Burst_term : BIT := '0'; SIGNAL Mode_reg_enable, Prech_enable, Read_enable, Write_enable : BIT := '0'; SIGNAL Burst_length_1, Burst_length_2, Burst_length_4, Burst_length_8 : BIT := '0'; SIGNAL Cas_latency_2, Cas_latency_3 : BIT := '0'; SIGNAL Ras_in, Cas_in, We_in : BIT := '0'; SIGNAL Write_burst_mode : BIT := '0'; SIGNAL RAS_clk, Sys_clk, CkeZ : BIT := '0'; -- Checking internal wires SIGNAL Pre_chk : BIT_VECTOR (3 DOWNTO 0) := "0000"; SIGNAL Act_chk : BIT_VECTOR (3 DOWNTO 0) := "0000"; SIGNAL Dq_in_chk, Dq_out_chk : BIT := '0'; SIGNAL Bank_chk : BIT_VECTOR (1 DOWNTO 0) := "00"; SIGNAL Row_chk : BIT_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); SIGNAL Col_chk : BIT_VECTOR (col_bits - 1 DOWNTO 0) := (OTHERS => '0'); BEGIN -- CS# Decode WITH Cs_n SELECT Cas_in <= TO_BIT (Cas_n, '1') WHEN '0', '1' WHEN '1', '1' WHEN OTHERS; WITH Cs_n SELECT Ras_in <= TO_BIT (Ras_n, '1') WHEN '0', '1' WHEN '1', '1' WHEN OTHERS; WITH Cs_n SELECT We_in <= TO_BIT (We_n, '1') WHEN '0', '1' WHEN '1', '1' WHEN OTHERS; -- Commands Decode Active_enable <= NOT(Ras_in) AND Cas_in AND We_in; Aref_enable <= NOT(Ras_in) AND NOT(Cas_in) AND We_in; Burst_term <= Ras_in AND Cas_in AND NOT(We_in); Mode_reg_enable <= NOT(Ras_in) AND NOT(Cas_in) AND NOT(We_in); Prech_enable <= NOT(Ras_in) AND Cas_in AND NOT(We_in); Read_enable <= Ras_in AND NOT(Cas_in) AND We_in; Write_enable <= Ras_in AND NOT(Cas_in) AND NOT(We_in); -- Burst Length Decode Burst_length_1 <= NOT(Mode_reg(2)) AND NOT(Mode_reg(1)) AND NOT(Mode_reg(0)); Burst_length_2 <= NOT(Mode_reg(2)) AND NOT(Mode_reg(1)) AND Mode_reg(0); Burst_length_4 <= NOT(Mode_reg(2)) AND Mode_reg(1) AND NOT(Mode_reg(0)); Burst_length_8 <= NOT(Mode_reg(2)) AND Mode_reg(1) AND Mode_reg(0); -- CAS Latency Decode Cas_latency_2 <= NOT(Mode_reg(6)) AND Mode_reg(5) AND NOT(Mode_reg(4)); Cas_latency_3 <= NOT(Mode_reg(6)) AND Mode_reg(5) AND Mode_reg(4); -- Write Burst Mode Write_burst_mode <= Mode_reg(9); -- RAS Clock for checking tWR and tRP PROCESS variable Clk0, Clk1 : integer := 0; begin RAS_clk <= '1'; wait for 0.5 ns; RAS_clk <= '0'; wait for 0.5 ns; if Clk0 > 100 or Clk1 > 100 then wait; else if Clk = '1' and Cke = '1' then Clk0 := 0; Clk1 := Clk1 + 1; elsif Clk = '0' and Cke = '1' then Clk0 := Clk0 + 1; Clk1 := 0; end if; end if; END PROCESS; -- System Clock int_clk : PROCESS (Clk) begin IF Clk'LAST_VALUE = '0' AND Clk = '1' THEN --' CkeZ <= TO_BIT(Cke, '1'); END IF; Sys_clk <= CkeZ AND TO_BIT(Clk, '0'); END PROCESS; state_register : PROCESS -- NOTE: The extra bits in RAM_TYPE is for checking memory access. A logic 1 means -- the location is in use. This will be checked when doing memory DUMP. TYPE ram_type IS ARRAY (2**col_bits - 1 DOWNTO 0) OF BIT_VECTOR (data_bits DOWNTO 0); TYPE ram_pntr IS ACCESS ram_type; TYPE ram_stor IS ARRAY (2**addr_bits - 1 DOWNTO 0) OF ram_pntr; VARIABLE Bank0 : ram_stor; VARIABLE Bank1 : ram_stor; VARIABLE Bank2 : ram_stor; VARIABLE Bank3 : ram_stor; VARIABLE Row_index, Col_index : INTEGER := 0; VARIABLE Dq_temp : BIT_VECTOR (data_bits DOWNTO 0) := (OTHERS => '0'); VARIABLE Col_addr : Array4xCBV; VARIABLE Bank_addr : Array4x2BV; VARIABLE Dqm_reg0, Dqm_reg1 : BIT_VECTOR (1 DOWNTO 0) := "00"; VARIABLE Bank, Previous_bank : BIT_VECTOR (1 DOWNTO 0) := "00"; VARIABLE B0_row_addr, B1_row_addr, B2_row_addr, B3_row_addr : BIT_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); VARIABLE Col_brst : BIT_VECTOR (col_bits - 1 DOWNTO 0) := (OTHERS => '0'); VARIABLE Row : BIT_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); VARIABLE Col : BIT_VECTOR (col_bits - 1 DOWNTO 0) := (OTHERS => '0'); VARIABLE Burst_counter : INTEGER := 0; VARIABLE Command : Array_state; VARIABLE Bank_precharge : Array4x2BV; VARIABLE A10_precharge : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE Auto_precharge : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE Read_precharge : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE Write_precharge : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE RW_interrupt_read : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE RW_interrupt_write : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE RW_interrupt_bank : BIT_VECTOR (1 DOWNTO 0) := "00"; VARIABLE Count_time : Array4xT := (0 ns & 0 ns & 0 ns & 0 ns); VARIABLE Count_precharge : Array4xI := (0 & 0 & 0 & 0); VARIABLE Data_in_enable, Data_out_enable : BIT := '0'; VARIABLE Pc_b0, Pc_b1, Pc_b2, Pc_b3 : BIT := '0'; VARIABLE Act_b0, Act_b1, Act_b2, Act_b3 : BIT := '0'; -- Timing Check VARIABLE MRD_chk : INTEGER := 0; VARIABLE WR_counter : Array4xI := (0 & 0 & 0 & 0); VARIABLE WR_time : Array4xT := (0 ns & 0 ns & 0 ns & 0 ns); VARIABLE WR_chkp : Array4xT := (0 ns & 0 ns & 0 ns & 0 ns); VARIABLE RC_chk, RRD_chk : TIME := 0 ns; VARIABLE RAS_chk0, RAS_chk1, RAS_chk2, RAS_chk3 : TIME := 0 ns; VARIABLE RCD_chk0, RCD_chk1, RCD_chk2, RCD_chk3 : TIME := 0 ns; VARIABLE RP_chk0, RP_chk1, RP_chk2, RP_chk3 : TIME := 0 ns; -- Load and Dumb variables FILE file_load : TEXT open read_mode is fname; -- Data load FILE file_dump : TEXT open write_mode is "dumpdata.txt"; -- Data dump VARIABLE bank_load : bit_vector ( 1 DOWNTO 0); VARIABLE rows_load : BIT_VECTOR (12 DOWNTO 0); VARIABLE cols_load : BIT_VECTOR ( 8 DOWNTO 0); VARIABLE data_load : BIT_VECTOR (15 DOWNTO 0); VARIABLE i, j : INTEGER; VARIABLE good_load : BOOLEAN; VARIABLE l : LINE; variable load : std_logic := '1'; variable dump : std_logic := '0'; variable ch : character; variable rectype : bit_vector(3 downto 0); variable recaddr : bit_vector(31 downto 0); variable reclen : bit_vector(7 downto 0); variable recdata : bit_vector(0 to 16*8-1); -- Initialize empty rows PROCEDURE Init_mem (Bank : bit_vector (1 DOWNTO 0); Row_index : INTEGER) IS VARIABLE i, j : INTEGER := 0; BEGIN IF Bank = "00" THEN IF Bank0 (Row_index) = NULL THEN -- Check to see if row empty Bank0 (Row_index) := NEW ram_type; -- Open new row for access FOR i IN (2**col_bits - 1) DOWNTO 0 LOOP -- Filled row with zeros FOR j IN (data_bits) DOWNTO 0 LOOP Bank0 (Row_index) (i) (j) := '0'; END LOOP; END LOOP; END IF; ELSIF Bank = "01" THEN IF Bank1 (Row_index) = NULL THEN Bank1 (Row_index) := NEW ram_type; FOR i IN (2**col_bits - 1) DOWNTO 0 LOOP FOR j IN (data_bits) DOWNTO 0 LOOP Bank1 (Row_index) (i) (j) := '0'; END LOOP; END LOOP; END IF; ELSIF Bank = "10" THEN IF Bank2 (Row_index) = NULL THEN Bank2 (Row_index) := NEW ram_type; FOR i IN (2**col_bits - 1) DOWNTO 0 LOOP FOR j IN (data_bits) DOWNTO 0 LOOP Bank2 (Row_index) (i) (j) := '0'; END LOOP; END LOOP; END IF; ELSIF Bank = "11" THEN IF Bank3 (Row_index) = NULL THEN Bank3 (Row_index) := NEW ram_type; FOR i IN (2**col_bits - 1) DOWNTO 0 LOOP FOR j IN (data_bits) DOWNTO 0 LOOP Bank3 (Row_index) (i) (j) := '0'; END LOOP; END LOOP; END IF; END IF; END; -- Burst Counter PROCEDURE Burst_decode IS VARIABLE Col_int : INTEGER := 0; VARIABLE Col_vec, Col_temp : BIT_VECTOR (col_bits - 1 DOWNTO 0) := (OTHERS => '0'); BEGIN -- Advance Burst Counter Burst_counter := Burst_counter + 1; -- Burst Type IF Mode_reg (3) = '0' THEN Col_int := TO_INTEGER(Col); Col_int := Col_int + 1; TO_BITVECTOR (Col_int, Col_temp); ELSIF Mode_reg (3) = '1' THEN TO_BITVECTOR (Burst_counter, Col_vec); Col_temp (2) := Col_vec (2) XOR Col_brst (2); Col_temp (1) := Col_vec (1) XOR Col_brst (1); Col_temp (0) := Col_vec (0) XOR Col_brst (0); END IF; -- Burst Length IF Burst_length_2 = '1' THEN Col (0) := Col_temp (0); ELSIF Burst_length_4 = '1' THEN Col (1 DOWNTO 0) := Col_temp (1 DOWNTO 0); ELSIF Burst_length_8 = '1' THEN Col (2 DOWNTO 0) := Col_temp (2 DOWNTO 0); ELSE Col := Col_temp; END IF; -- Burst Read Single Write IF Write_burst_mode = '1' AND Data_in_enable = '1' THEN Data_in_enable := '0'; END IF; -- Data counter IF Burst_length_1 = '1' THEN IF Burst_counter >= 1 THEN IF Data_in_enable = '1' THEN Data_in_enable := '0'; ELSIF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; ELSIF Burst_length_2 = '1' THEN IF Burst_counter >= 2 THEN IF Data_in_enable = '1' THEN Data_in_enable := '0'; ELSIF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; ELSIF Burst_length_4 = '1' THEN IF Burst_counter >= 4 THEN IF Data_in_enable = '1' THEN Data_in_enable := '0'; ELSIF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; ELSIF Burst_length_8 = '1' THEN IF Burst_counter >= 8 THEN IF Data_in_enable = '1' THEN Data_in_enable := '0'; ELSIF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; END IF; END; BEGIN WAIT ON Sys_clk, RAS_clk; IF Sys_clk'event AND Sys_clk = '1' AND Load = '0' AND Dump = '0' THEN --' -- Internal Command Pipeline Command(0) := Command(1); Command(1) := Command(2); Command(2) := Command(3); Command(3) := NOP; Col_addr(0) := Col_addr(1); Col_addr(1) := Col_addr(2); Col_addr(2) := Col_addr(3); Col_addr(3) := (OTHERS => '0'); Bank_addr(0) := Bank_addr(1); Bank_addr(1) := Bank_addr(2); Bank_addr(2) := Bank_addr(3); Bank_addr(3) := "00"; Bank_precharge(0) := Bank_precharge(1); Bank_precharge(1) := Bank_precharge(2); Bank_precharge(2) := Bank_precharge(3); Bank_precharge(3) := "00"; A10_precharge(0) := A10_precharge(1); A10_precharge(1) := A10_precharge(2); A10_precharge(2) := A10_precharge(3); A10_precharge(3) := '0'; -- Operation Decode (Optional for showing current command on posedge clock / debug feature) IF Active_enable = '1' THEN Operation <= ACT; ELSIF Aref_enable = '1' THEN Operation <= A_REF; ELSIF Burst_term = '1' THEN Operation <= BST; ELSIF Mode_reg_enable = '1' THEN Operation <= LMR; ELSIF Prech_enable = '1' THEN Operation <= PRECH; ELSIF Read_enable = '1' THEN IF Addr(10) = '0' THEN Operation <= READ; ELSE Operation <= READ_A; END IF; ELSIF Write_enable = '1' THEN IF Addr(10) = '0' THEN Operation <= WRITE; ELSE Operation <= WRITE_A; END IF; ELSE Operation <= NOP; END IF; -- Dqm pipeline for Read Dqm_reg0 := Dqm_reg1; Dqm_reg1 := TO_BITVECTOR(Dqm); -- Read or Write with Auto Precharge Counter IF Auto_precharge (0) = '1' THEN Count_precharge (0) := Count_precharge (0) + 1; END IF; IF Auto_precharge (1) = '1' THEN Count_precharge (1) := Count_precharge (1) + 1; END IF; IF Auto_precharge (2) = '1' THEN Count_precharge (2) := Count_precharge (2) + 1; END IF; IF Auto_precharge (3) = '1' THEN Count_precharge (3) := Count_precharge (3) + 1; END IF; -- Auto Precharge Timer for tWR if (Burst_length_1 = '1' OR Write_burst_mode = '1') then if (Count_precharge(0) = 1) then Count_time(0) := NOW; end if; if (Count_precharge(1) = 1) then Count_time(1) := NOW; end if; if (Count_precharge(2) = 1) then Count_time(2) := NOW; end if; if (Count_precharge(3) = 1) then Count_time(3) := NOW; end if; elsif (Burst_length_2 = '1') then if (Count_precharge(0) = 2) then Count_time(0) := NOW; end if; if (Count_precharge(1) = 2) then Count_time(1) := NOW; end if; if (Count_precharge(2) = 2) then Count_time(2) := NOW; end if; if (Count_precharge(3) = 2) then Count_time(3) := NOW; end if; elsif (Burst_length_4 = '1') then if (Count_precharge(0) = 4) then Count_time(0) := NOW; end if; if (Count_precharge(1) = 4) then Count_time(1) := NOW; end if; if (Count_precharge(2) = 4) then Count_time(2) := NOW; end if; if (Count_precharge(3) = 4) then Count_time(3) := NOW; end if; elsif (Burst_length_8 = '1') then if (Count_precharge(0) = 8) then Count_time(0) := NOW; end if; if (Count_precharge(1) = 8) then Count_time(1) := NOW; end if; if (Count_precharge(2) = 8) then Count_time(2) := NOW; end if; if (Count_precharge(3) = 8) then Count_time(3) := NOW; end if; end if; -- tMRD Counter MRD_chk := MRD_chk + 1; -- tWR Counter WR_counter(0) := WR_counter(0) + 1; WR_counter(1) := WR_counter(1) + 1; WR_counter(2) := WR_counter(2) + 1; WR_counter(3) := WR_counter(3) + 1; -- Auto Refresh IF Aref_enable = '1' THEN -- Auto Refresh to Auto Refresh ASSERT (NOW - RC_chk >= tRC) REPORT "tRC violation during Auto Refresh" SEVERITY WARNING; -- Precharge to Auto Refresh ASSERT (NOW - RP_chk0 >= tRP OR NOW - RP_chk1 >= tRP OR NOW - RP_chk2 >= tRP OR NOW - RP_chk3 >= tRP) REPORT "tRP violation during Auto Refresh" SEVERITY WARNING; -- All banks must be idle before refresh IF (Pc_b3 ='0' OR Pc_b2 = '0' OR Pc_b1 ='0' OR Pc_b0 = '0') THEN ASSERT (FALSE) REPORT "All banks must be Precharge before Auto Refresh" SEVERITY WARNING; END IF; -- Record current tRC time RC_chk := NOW; END IF; -- Load Mode Register IF Mode_reg_enable = '1' THEN Mode_reg <= TO_BITVECTOR (Addr); IF (Pc_b3 ='0' OR Pc_b2 = '0' OR Pc_b1 ='0' OR Pc_b0 = '0') THEN ASSERT (FALSE) REPORT "All bank must be Precharge before Load Mode Register" SEVERITY WARNING; END IF; -- REF to LMR ASSERT (NOW - RC_chk >= tRC) REPORT "tRC violation during Load Mode Register" SEVERITY WARNING; -- LMR to LMR ASSERT (MRD_chk >= tMRD) REPORT "tMRD violation during Load Mode Register" SEVERITY WARNING; -- Record current tMRD time MRD_chk := 0; END IF; -- Active Block (latch Bank and Row Address) IF Active_enable = '1' THEN IF Ba = "00" AND Pc_b0 = '1' THEN Act_b0 := '1'; Pc_b0 := '0'; B0_row_addr := TO_BITVECTOR (Addr); RCD_chk0 := NOW; RAS_chk0 := NOW; -- Precharge to Active Bank 0 ASSERT (NOW - RP_chk0 >= tRP) REPORT "tRP violation during Activate Bank 0" SEVERITY WARNING; ELSIF Ba = "01" AND Pc_b1 = '1' THEN Act_b1 := '1'; Pc_b1 := '0'; B1_row_addr := TO_BITVECTOR (Addr); RCD_chk1 := NOW; RAS_chk1 := NOW; -- Precharge to Active Bank 1 ASSERT (NOW - RP_chk1 >= tRP) REPORT "tRP violation during Activate Bank 1" SEVERITY WARNING; ELSIF Ba = "10" AND Pc_b2 = '1' THEN Act_b2 := '1'; Pc_b2 := '0'; B2_row_addr := TO_BITVECTOR (Addr); RCD_chk2 := NOW; RAS_chk2 := NOW; -- Precharge to Active Bank 2 ASSERT (NOW - RP_chk2 >= tRP) REPORT "tRP violation during Activate Bank 2" SEVERITY WARNING; ELSIF Ba = "11" AND Pc_b3 = '1' THEN Act_b3 := '1'; Pc_b3 := '0'; B3_row_addr := TO_BITVECTOR (Addr); RCD_chk3 := NOW; RAS_chk3 := NOW; -- Precharge to Active Bank 3 ASSERT (NOW - RP_chk3 >= tRP) REPORT "tRP violation during Activate Bank 3" SEVERITY WARNING; ELSIF Ba = "00" AND Pc_b0 = '0' THEN ASSERT (FALSE) REPORT "Bank 0 is not Precharged" SEVERITY WARNING; ELSIF Ba = "01" AND Pc_b1 = '0' THEN ASSERT (FALSE) REPORT "Bank 1 is not Precharged" SEVERITY WARNING; ELSIF Ba = "10" AND Pc_b2 = '0' THEN ASSERT (FALSE) REPORT "Bank 2 is not Precharged" SEVERITY WARNING; ELSIF Ba = "11" AND Pc_b3 = '0' THEN ASSERT (FALSE) REPORT "Bank 3 is not Precharged" SEVERITY WARNING; END IF; -- Active Bank A to Active Bank B IF ((Previous_bank /= TO_BITVECTOR (Ba)) AND (NOW - RRD_chk < tRRD)) THEN ASSERT (FALSE) REPORT "tRRD violation during Activate" SEVERITY WARNING; END IF; -- LMR to ACT ASSERT (MRD_chk >= tMRD) REPORT "tMRD violation during Activate" SEVERITY WARNING; -- AutoRefresh to Activate ASSERT (NOW - RC_chk >= tRC) REPORT "tRC violation during Activate" SEVERITY WARNING; -- Record variable for checking violation RRD_chk := NOW; Previous_bank := TO_BITVECTOR (Ba); END IF; -- Precharge Block IF Prech_enable = '1' THEN IF Addr(10) = '1' THEN Pc_b0 := '1'; Pc_b1 := '1'; Pc_b2 := '1'; Pc_b3 := '1'; Act_b0 := '0'; Act_b1 := '0'; Act_b2 := '0'; Act_b3 := '0'; RP_chk0 := NOW; RP_chk1 := NOW; RP_chk2 := NOW; RP_chk3 := NOW; -- Activate to Precharge all banks ASSERT ((NOW - RAS_chk0 >= tRAS) OR (NOW - RAS_chk1 >= tRAS)) REPORT "tRAS violation during Precharge all banks" SEVERITY WARNING; -- tWR violation check for Write IF ((NOW - WR_chkp(0) < tWRp) OR (NOW - WR_chkp(1) < tWRp) OR (NOW - WR_chkp(2) < tWRp) OR (NOW - WR_chkp(3) < tWRp)) THEN ASSERT (FALSE) REPORT "tWR violation during Precharge ALL banks" SEVERITY WARNING; END IF; ELSIF Addr(10) = '0' THEN IF Ba = "00" THEN Pc_b0 := '1'; Act_b0 := '0'; RP_chk0 := NOW; -- Activate to Precharge bank 0 ASSERT (NOW - RAS_chk0 >= tRAS) REPORT "tRAS violation during Precharge bank 0" SEVERITY WARNING; ELSIF Ba = "01" THEN Pc_b1 := '1'; Act_b1 := '0'; RP_chk1 := NOW; -- Activate to Precharge bank 1 ASSERT (NOW - RAS_chk1 >= tRAS) REPORT "tRAS violation during Precharge bank 1" SEVERITY WARNING; ELSIF Ba = "10" THEN Pc_b2 := '1'; Act_b2 := '0'; RP_chk2 := NOW; -- Activate to Precharge bank 2 ASSERT (NOW - RAS_chk2 >= tRAS) REPORT "tRAS violation during Precharge bank 2" SEVERITY WARNING; ELSIF Ba = "11" THEN Pc_b3 := '1'; Act_b3 := '0'; RP_chk3 := NOW; -- Activate to Precharge bank 3 ASSERT (NOW - RAS_chk3 >= tRAS) REPORT "tRAS violation during Precharge bank 3" SEVERITY WARNING; END IF; -- tWR violation check for Write ASSERT (NOW - WR_chkp(TO_INTEGER(Ba)) >= tWRp) REPORT "tWR violation during Precharge" SEVERITY WARNING; END IF; -- Terminate a Write Immediately (if same bank or all banks) IF (Data_in_enable = '1' AND (Bank = TO_BITVECTOR(Ba) OR Addr(10) = '1')) THEN Data_in_enable := '0'; END IF; -- Precharge Command Pipeline for READ IF CAS_latency_3 = '1' THEN Command(2) := PRECH; Bank_precharge(2) := TO_BITVECTOR (Ba); A10_precharge(2) := TO_BIT(Addr(10)); ELSIF CAS_latency_2 = '1' THEN Command(1) := PRECH; Bank_precharge(1) := TO_BITVECTOR (Ba); A10_precharge(1) := TO_BIT(Addr(10)); END IF; END IF; -- Burst Terminate IF Burst_term = '1' THEN -- Terminate a Write immediately IF Data_in_enable = '1' THEN Data_in_enable := '0'; END IF; -- Terminate a Read depend on CAS Latency IF CAS_latency_3 = '1' THEN Command(2) := BST; ELSIF CAS_latency_2 = '1' THEN Command(1) := BST; END IF; END IF; -- Read, Write, Column Latch IF Read_enable = '1' OR Write_enable = '1' THEN -- Check to see if bank is open (ACT) for Read or Write IF ((Ba="00" AND Pc_b0='1') OR (Ba="01" AND Pc_b1='1') OR (Ba="10" AND Pc_b2='1') OR (Ba="11" AND Pc_b3='1')) THEN ASSERT (FALSE) REPORT "Cannot Read or Write - Bank is not Activated" SEVERITY WARNING; END IF; -- Activate to Read or Write IF Ba = "00" THEN ASSERT (NOW - RCD_chk0 >= tRCD) REPORT "tRCD violation during Read or Write to Bank 0" SEVERITY WARNING; ELSIF Ba = "01" THEN ASSERT (NOW - RCD_chk1 >= tRCD) REPORT "tRCD violation during Read or Write to Bank 1" SEVERITY WARNING; ELSIF Ba = "10" THEN ASSERT (NOW - RCD_chk2 >= tRCD) REPORT "tRCD violation during Read or Write to Bank 2" SEVERITY WARNING; ELSIF Ba = "11" THEN ASSERT (NOW - RCD_chk3 >= tRCD) REPORT "tRCD violation during Read or Write to Bank 3" SEVERITY WARNING; END IF; -- Read Command IF Read_enable = '1' THEN -- CAS Latency Pipeline IF Cas_latency_3 = '1' THEN IF Addr(10) = '1' THEN Command(2) := READ_A; ELSE Command(2) := READ; END IF; Col_addr (2) := TO_BITVECTOR (Addr(col_bits - 1 DOWNTO 0)); Bank_addr (2) := TO_BITVECTOR (Ba); ELSIF Cas_latency_2 = '1' THEN IF Addr(10) = '1' THEN Command(1) := READ_A; ELSE Command(1) := READ; END IF; Col_addr (1) := TO_BITVECTOR (Addr(col_bits - 1 DOWNTO 0)); Bank_addr (1) := TO_BITVECTOR (Ba); END IF; -- Read intterupt a Write (terminate Write immediately) IF Data_in_enable = '1' THEN Data_in_enable := '0'; END IF; -- Write Command ELSIF Write_enable = '1' THEN IF Addr(10) = '1' THEN Command(0) := WRITE_A; ELSE Command(0) := WRITE; END IF; Col_addr (0) := TO_BITVECTOR (Addr(col_bits - 1 DOWNTO 0)); Bank_addr (0) := TO_BITVECTOR (Ba); -- Write intterupt a Write (terminate Write immediately) IF Data_in_enable = '1' THEN Data_in_enable := '0'; END IF; -- Write interrupt a Read (terminate Read immediately) IF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; -- Interrupt a Write with Auto Precharge IF Auto_precharge(TO_INTEGER(RW_Interrupt_Bank)) = '1' AND Write_precharge(TO_INTEGER(RW_Interrupt_Bank)) = '1' THEN RW_interrupt_write(TO_INTEGER(RW_Interrupt_Bank)) := '1'; END IF; -- Interrupt a Read with Auto Precharge IF Auto_precharge(TO_INTEGER(RW_Interrupt_Bank)) = '1' AND Read_precharge(TO_INTEGER(RW_Interrupt_Bank)) = '1' THEN RW_interrupt_read(TO_INTEGER(RW_Interrupt_Bank)) := '1'; END IF; -- Read or Write with Auto Precharge IF Addr(10) = '1' THEN Auto_precharge (TO_INTEGER(Ba)) := '1'; Count_precharge (TO_INTEGER(Ba)) := 0; RW_Interrupt_Bank := TO_BitVector(Ba); IF Read_enable = '1' THEN Read_precharge (TO_INTEGER(Ba)) := '1'; ELSIF Write_enable = '1' THEN Write_precharge (TO_INTEGER(Ba)) := '1'; END IF; END IF; END IF; -- Read with AutoPrecharge Calculation -- The device start internal precharge when: -- 1. BL/2 cycles after command -- and 2. Meet tRAS requirement -- or 3. Interrupt by a Read or Write (with or without Auto Precharge) IF ((Auto_precharge(0) = '1') AND (Read_precharge(0) = '1')) THEN IF (((NOW - RAS_chk0 >= tRAS) AND ((Burst_length_1 = '1' AND Count_precharge(0) >= 1) OR (Burst_length_2 = '1' AND Count_precharge(0) >= 2) OR (Burst_length_4 = '1' AND Count_precharge(0) >= 4) OR (Burst_length_8 = '1' AND Count_precharge(0) >= 8))) OR (RW_interrupt_read(0) = '1')) THEN Pc_b0 := '1'; Act_b0 := '0'; RP_chk0 := NOW; Auto_precharge(0) := '0'; Read_precharge(0) := '0'; RW_interrupt_read(0) := '0'; END IF; END IF; IF ((Auto_precharge(1) = '1') AND (Read_precharge(1) = '1')) THEN IF (((NOW - RAS_chk1 >= tRAS) AND ((Burst_length_1 = '1' AND Count_precharge(1) >= 1) OR (Burst_length_2 = '1' AND Count_precharge(1) >= 2) OR (Burst_length_4 = '1' AND Count_precharge(1) >= 4) OR (Burst_length_8 = '1' AND Count_precharge(1) >= 8))) OR (RW_interrupt_read(1) = '1')) THEN Pc_b1 := '1'; Act_b1 := '0'; RP_chk1 := NOW; Auto_precharge(1) := '0'; Read_precharge(1) := '0'; RW_interrupt_read(1) := '0'; END IF; END IF; IF ((Auto_precharge(2) = '1') AND (Read_precharge(2) = '1')) THEN IF (((NOW - RAS_chk2 >= tRAS) AND ((Burst_length_1 = '1' AND Count_precharge(2) >= 1) OR (Burst_length_2 = '1' AND Count_precharge(2) >= 2) OR (Burst_length_4 = '1' AND Count_precharge(2) >= 4) OR (Burst_length_8 = '1' AND Count_precharge(2) >= 8))) OR (RW_interrupt_read(2) = '1')) THEN Pc_b2 := '1'; Act_b2 := '0'; RP_chk2 := NOW; Auto_precharge(2) := '0'; Read_precharge(2) := '0'; RW_interrupt_read(2) := '0'; END IF; END IF; IF ((Auto_precharge(3) = '1') AND (Read_precharge(3) = '1')) THEN IF (((NOW - RAS_chk3 >= tRAS) AND ((Burst_length_1 = '1' AND Count_precharge(3) >= 1) OR (Burst_length_2 = '1' AND Count_precharge(3) >= 2) OR (Burst_length_4 = '1' AND Count_precharge(3) >= 4) OR (Burst_length_8 = '1' AND Count_precharge(3) >= 8))) OR (RW_interrupt_read(3) = '1')) THEN Pc_b3 := '1'; Act_b3 := '0'; RP_chk3 := NOW; Auto_precharge(3) := '0'; Read_precharge(3) := '0'; RW_interrupt_read(3) := '0'; END IF; END IF; -- Internal Precharge or Bst IF Command(0) = PRECH THEN -- PRECH terminate a read if same bank or all banks IF Bank_precharge(0) = Bank OR A10_precharge(0) = '1' THEN IF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; ELSIF Command(0) = BST THEN -- BST terminate a read regardless of bank IF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; IF Data_out_enable = '0' THEN Dq <= TRANSPORT (OTHERS => 'Z') AFTER tOH; END IF; -- Detect Read or Write Command IF Command(0) = READ OR Command(0) = READ_A THEN Bank := Bank_addr (0); Col := Col_addr (0); Col_brst := Col_addr (0); IF Bank_addr (0) = "00" THEN Row := B0_row_addr; ELSIF Bank_addr (0) = "01" THEN Row := B1_row_addr; ELSIF Bank_addr (0) = "10" THEN Row := B2_row_addr; ELSE Row := B3_row_addr; END IF; Burst_counter := 0; Data_in_enable := '0'; Data_out_enable := '1'; ELSIF Command(0) = WRITE OR Command(0) = WRITE_A THEN Bank := Bank_addr(0); Col := Col_addr(0); Col_brst := Col_addr(0); IF Bank_addr (0) = "00" THEN Row := B0_row_addr; ELSIF Bank_addr (0) = "01" THEN Row := B1_row_addr; ELSIF Bank_addr (0) = "10" THEN Row := B2_row_addr; ELSE Row := B3_row_addr; END IF; Burst_counter := 0; Data_in_enable := '1'; Data_out_enable := '0'; END IF; -- DQ (Driver / Receiver) Row_index := TO_INTEGER (Row); Col_index := TO_INTEGER (Col); IF Data_in_enable = '1' THEN IF Dqm /= "11" THEN Init_mem (Bank, Row_index); IF Bank = "00" THEN Dq_temp := Bank0 (Row_index) (Col_index); IF Dqm = "01" THEN Dq_temp (15 DOWNTO 8) := TO_BITVECTOR (Dq (15 DOWNTO 8)); ELSIF Dqm = "10" THEN Dq_temp (7 DOWNTO 0) := TO_BITVECTOR (Dq (7 DOWNTO 0)); ELSE Dq_temp (15 DOWNTO 0) := TO_BITVECTOR (Dq (15 DOWNTO 0)); END IF; Bank0 (Row_index) (Col_index) := ('1' & Dq_temp(data_bits - 1 DOWNTO 0)); ELSIF Bank = "01" THEN Dq_temp := Bank1 (Row_index) (Col_index); IF Dqm = "01" THEN Dq_temp (15 DOWNTO 8) := TO_BITVECTOR (Dq (15 DOWNTO 8)); ELSIF Dqm = "10" THEN Dq_temp (7 DOWNTO 0) := TO_BITVECTOR (Dq (7 DOWNTO 0)); ELSE Dq_temp (15 DOWNTO 0) := TO_BITVECTOR (Dq (15 DOWNTO 0)); END IF; Bank1 (Row_index) (Col_index) := ('1' & Dq_temp(data_bits - 1 DOWNTO 0)); ELSIF Bank = "10" THEN Dq_temp := Bank2 (Row_index) (Col_index); IF Dqm = "01" THEN Dq_temp (15 DOWNTO 8) := TO_BITVECTOR (Dq (15 DOWNTO 8)); ELSIF Dqm = "10" THEN Dq_temp (7 DOWNTO 0) := TO_BITVECTOR (Dq (7 DOWNTO 0)); ELSE Dq_temp (15 DOWNTO 0) := TO_BITVECTOR (Dq (15 DOWNTO 0)); END IF; Bank2 (Row_index) (Col_index) := ('1' & Dq_temp(data_bits - 1 DOWNTO 0)); ELSIF Bank = "11" THEN Dq_temp := Bank3 (Row_index) (Col_index); IF Dqm = "01" THEN Dq_temp (15 DOWNTO 8) := TO_BITVECTOR (Dq (15 DOWNTO 8)); ELSIF Dqm = "10" THEN Dq_temp (7 DOWNTO 0) := TO_BITVECTOR (Dq (7 DOWNTO 0)); ELSE Dq_temp (15 DOWNTO 0) := TO_BITVECTOR (Dq (15 DOWNTO 0)); END IF; Bank3 (Row_index) (Col_index) := ('1' & Dq_temp(data_bits - 1 DOWNTO 0)); END IF; WR_chkp(TO_INTEGER(Bank)) := NOW; WR_counter(TO_INTEGER(Bank)) := 0; END IF; Burst_decode; ELSIF Data_out_enable = '1' THEN IF Dqm_reg0 /= "11" THEN Init_mem (Bank, Row_index); IF Bank = "00" THEN Dq_temp := Bank0 (Row_index) (Col_index); IF Dqm_reg0 = "00" THEN Dq (15 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 0)) AFTER tAC; ELSIF Dqm_reg0 = "01" THEN Dq (15 DOWNTO 8) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 8)) AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; ELSIF Dqm_reg0 = "10" THEN Dq (15 DOWNTO 8) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (7 DOWNTO 0)) AFTER tAC; END IF; ELSIF Bank = "01" THEN Dq_temp := Bank1 (Row_index) (Col_index); IF Dqm_reg0 = "00" THEN Dq (15 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 0)) AFTER tAC; ELSIF Dqm_reg0 = "01" THEN Dq (15 DOWNTO 8) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 8)) AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; ELSIF Dqm_reg0 = "10" THEN Dq (15 DOWNTO 8) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (7 DOWNTO 0)) AFTER tAC; END IF; ELSIF Bank = "10" THEN Dq_temp := Bank2 (Row_index) (Col_index); IF Dqm_reg0 = "00" THEN Dq (15 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 0)) AFTER tAC; ELSIF Dqm_reg0 = "01" THEN Dq (15 DOWNTO 8) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 8)) AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; ELSIF Dqm_reg0 = "10" THEN Dq (15 DOWNTO 8) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (7 DOWNTO 0)) AFTER tAC; END IF; ELSIF Bank = "11" THEN Dq_temp := Bank3 (Row_index) (Col_index); IF Dqm_reg0 = "00" THEN Dq (15 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 0)) AFTER tAC; ELSIF Dqm_reg0 = "01" THEN Dq (15 DOWNTO 8) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 8)) AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; ELSIF Dqm_reg0 = "10" THEN Dq (15 DOWNTO 8) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (7 DOWNTO 0)) AFTER tAC; END IF; END IF; ELSE Dq <= TRANSPORT (OTHERS => 'Z') AFTER tHZ; END IF; Burst_decode; END IF; ELSIF Sys_clk'event AND Sys_clk = '1' AND Load = '1' AND Dump = '0' THEN --' Operation <= LOAD_FILE; load := '0'; -- ASSERT (FALSE) REPORT "Reading memory array from file. This operation may take several minutes. Please wait..." -- SEVERITY NOTE; WHILE NOT endfile(file_load) LOOP readline(file_load, l); read(l, ch); if (ch /= 'S') or (ch /= 's') then hexread(l, rectype); hexread(l, reclen); recaddr := (others => '0'); case rectype is when "0001" => hexread(l, recaddr(15 downto 0)); when "0010" => hexread(l, recaddr(23 downto 0)); when "0011" => hexread(l, recaddr); recaddr(31 downto 24) := (others => '0'); when others => next; end case; if true then hexread(l, recdata); Bank_Load := recaddr(25 downto 24); Rows_Load := recaddr(23 downto 11); Cols_Load := recaddr(10 downto 2); Init_Mem (Bank_Load, To_Integer(Rows_Load)); IF Bank_Load = "00" THEN for i in 0 to 3 loop Bank0 (To_Integer(Rows_Load)) (To_Integer(Cols_Load)+i) := ('1' & recdata(i*32+index to i*32+index+15)); end loop; ELSIF Bank_Load = "01" THEN for i in 0 to 3 loop Bank1 (To_Integer(Rows_Load)) (To_Integer(Cols_Load)+i) := ('1' & recdata(i*32+index to i*32+index+15)); end loop; ELSIF Bank_Load = "10" THEN for i in 0 to 3 loop Bank2 (To_Integer(Rows_Load)) (To_Integer(Cols_Load)+i) := ('1' & recdata(i*32+index to i*32+index+15)); end loop; ELSIF Bank_Load = "11" THEN for i in 0 to 3 loop Bank3 (To_Integer(Rows_Load)) (To_Integer(Cols_Load)+i) := ('1' & recdata(i*32+index to i*32+index+15)); end loop; END IF; END IF; END IF; END LOOP; ELSIF Sys_clk'event AND Sys_clk = '1' AND Load = '0' AND Dump = '1' THEN --' Operation <= DUMP_FILE; ASSERT (FALSE) REPORT "Writing memory array to file. This operation may take several minutes. Please wait..." SEVERITY NOTE; WRITE (l, string'("# Micron Technology, Inc. (FILE DUMP / MEMORY DUMP)")); --' WRITELINE (file_dump, l); WRITE (l, string'("# BA ROWS COLS DQ")); --' WRITELINE (file_dump, l); WRITE (l, string'("# -- ------------- --------- ----------------")); --' WRITELINE (file_dump, l); -- Dumping Bank 0 FOR i IN 0 TO 2**addr_bits -1 LOOP -- Check if ROW is NULL IF Bank0 (i) /= NULL THEN For j IN 0 TO 2**col_bits - 1 LOOP -- Check if COL is NULL NEXT WHEN Bank0 (i) (j) (data_bits) = '0'; WRITE (l, string'("00"), right, 4); --' WRITE (l, To_BitVector(Conv_Std_Logic_Vector(i, addr_bits)), right, addr_bits+1); WRITE (l, To_BitVector(Conv_std_Logic_Vector(j, col_bits)), right, col_bits+1); WRITE (l, Bank0 (i) (j) (data_bits -1 DOWNTO 0), right, data_bits+1); WRITELINE (file_dump, l); END LOOP; END IF; END LOOP; -- Dumping Bank 1 FOR i IN 0 TO 2**addr_bits -1 LOOP -- Check if ROW is NULL IF Bank1 (i) /= NULL THEN For j IN 0 TO 2**col_bits - 1 LOOP -- Check if COL is NULL NEXT WHEN Bank1 (i) (j) (data_bits) = '0'; WRITE (l, string'("01"), right, 4); --' WRITE (l, To_BitVector(Conv_Std_Logic_Vector(i, addr_bits)), right, addr_bits+1); WRITE (l, To_BitVector(Conv_std_Logic_Vector(j, col_bits)), right, col_bits+1); WRITE (l, Bank1 (i) (j) (data_bits -1 DOWNTO 0), right, data_bits+1); WRITELINE (file_dump, l); END LOOP; END IF; END LOOP; -- Dumping Bank 2 FOR i IN 0 TO 2**addr_bits -1 LOOP -- Check if ROW is NULL IF Bank2 (i) /= NULL THEN For j IN 0 TO 2**col_bits - 1 LOOP -- Check if COL is NULL NEXT WHEN Bank2 (i) (j) (data_bits) = '0'; WRITE (l, string'("10"), right, 4); --' WRITE (l, To_BitVector(Conv_Std_Logic_Vector(i, addr_bits)), right, addr_bits+1); WRITE (l, To_BitVector(Conv_std_Logic_Vector(j, col_bits)), right, col_bits+1); WRITE (l, Bank2 (i) (j) (data_bits -1 DOWNTO 0), right, data_bits+1); WRITELINE (file_dump, l); END LOOP; END IF; END LOOP; -- Dumping Bank 3 FOR i IN 0 TO 2**addr_bits -1 LOOP -- Check if ROW is NULL IF Bank3 (i) /= NULL THEN For j IN 0 TO 2**col_bits - 1 LOOP -- Check if COL is NULL NEXT WHEN Bank3 (i) (j) (data_bits) = '0'; WRITE (l, string'("11"), right, 4); --' WRITE (l, To_BitVector(Conv_Std_Logic_Vector(i, addr_bits)), right, addr_bits+1); WRITE (l, To_BitVector(Conv_std_Logic_Vector(j, col_bits)), right, col_bits+1); WRITE (l, Bank3 (i) (j) (data_bits -1 DOWNTO 0), right, data_bits+1); WRITELINE (file_dump, l); END LOOP; END IF; END LOOP; END IF; -- Write with AutoPrecharge Calculation -- The device start internal precharge when: -- 1. tWR cycles after command -- and 2. Meet tRAS requirement -- or 3. Interrupt by a Read or Write (with or without Auto Precharge) IF ((Auto_precharge(0) = '1') AND (Write_precharge(0) = '1')) THEN IF (((NOW - RAS_chk0 >= tRAS) AND (((Burst_length_1 = '1' OR Write_burst_mode = '1' ) AND Count_precharge(0) >= 1 AND NOW - Count_time(0) >= tWRa) OR (Burst_length_2 = '1' AND Count_precharge(0) >= 2 AND NOW - Count_time(0) >= tWRa) OR (Burst_length_4 = '1' AND Count_precharge(0) >= 4 AND NOW - Count_time(0) >= tWRa) OR (Burst_length_8 = '1' AND Count_precharge(0) >= 8 AND NOW - Count_time(0) >= tWRa))) OR (RW_interrupt_write(0) = '1' AND WR_counter(0) >= 1 AND NOW - WR_time(0) >= tWRa)) THEN Auto_precharge(0) := '0'; Write_precharge(0) := '0'; RW_interrupt_write(0) := '0'; Pc_b0 := '1'; Act_b0 := '0'; RP_chk0 := NOW; ASSERT FALSE REPORT "Start Internal Precharge Bank 0" SEVERITY NOTE; END IF; END IF; IF ((Auto_precharge(1) = '1') AND (Write_precharge(1) = '1')) THEN IF (((NOW - RAS_chk1 >= tRAS) AND (((Burst_length_1 = '1' OR Write_burst_mode = '1' ) AND Count_precharge(1) >= 1 AND NOW - Count_time(1) >= tWRa) OR (Burst_length_2 = '1' AND Count_precharge(1) >= 2 AND NOW - Count_time(1) >= tWRa) OR (Burst_length_4 = '1' AND Count_precharge(1) >= 4 AND NOW - Count_time(1) >= tWRa) OR (Burst_length_8 = '1' AND Count_precharge(1) >= 8 AND NOW - Count_time(1) >= tWRa))) OR (RW_interrupt_write(1) = '1' AND WR_counter(1) >= 1 AND NOW - WR_time(1) >= tWRa)) THEN Auto_precharge(1) := '0'; Write_precharge(1) := '0'; RW_interrupt_write(1) := '0'; Pc_b1 := '1'; Act_b1 := '0'; RP_chk1 := NOW; END IF; END IF; IF ((Auto_precharge(2) = '1') AND (Write_precharge(2) = '1')) THEN IF (((NOW - RAS_chk2 >= tRAS) AND (((Burst_length_1 = '1' OR Write_burst_mode = '1' ) AND Count_precharge(2) >= 1 AND NOW - Count_time(2) >= tWRa) OR (Burst_length_2 = '1' AND Count_precharge(2) >= 2 AND NOW - Count_time(2) >= tWRa) OR (Burst_length_4 = '1' AND Count_precharge(2) >= 4 AND NOW - Count_time(2) >= tWRa) OR (Burst_length_8 = '1' AND Count_precharge(2) >= 8 AND NOW - Count_time(2) >= tWRa))) OR (RW_interrupt_write(2) = '1' AND WR_counter(2) >= 1 AND NOW - WR_time(2) >= tWRa)) THEN Auto_precharge(2) := '0'; Write_precharge(2) := '0'; RW_interrupt_write(2) := '0'; Pc_b2 := '1'; Act_b2 := '0'; RP_chk2 := NOW; END IF; END IF; IF ((Auto_precharge(3) = '1') AND (Write_precharge(3) = '1')) THEN IF (((NOW - RAS_chk3 >= tRAS) AND (((Burst_length_1 = '1' OR Write_burst_mode = '1' ) AND Count_precharge(3) >= 1 AND NOW - Count_time(3) >= tWRa) OR (Burst_length_2 = '1' AND Count_precharge(3) >= 2 AND NOW - Count_time(3) >= tWRa) OR (Burst_length_4 = '1' AND Count_precharge(3) >= 4 AND NOW - Count_time(3) >= tWRa) OR (Burst_length_8 = '1' AND Count_precharge(3) >= 8 AND NOW - Count_time(3) >= tWRa))) OR (RW_interrupt_write(0) = '1' AND WR_counter(0) >= 1 AND NOW - WR_time(3) >= tWRa)) THEN Auto_precharge(3) := '0'; Write_precharge(3) := '0'; RW_interrupt_write(3) := '0'; Pc_b3 := '1'; Act_b3 := '0'; RP_chk3 := NOW; END IF; END IF; -- Checking internal wires (Optional for debug purpose) Pre_chk (0) <= Pc_b0; Pre_chk (1) <= Pc_b1; Pre_chk (2) <= Pc_b2; Pre_chk (3) <= Pc_b3; Act_chk (0) <= Act_b0; Act_chk (1) <= Act_b1; Act_chk (2) <= Act_b2; Act_chk (3) <= Act_b3; Dq_in_chk <= Data_in_enable; Dq_out_chk <= Data_out_enable; Bank_chk <= Bank; Row_chk <= Row; Col_chk <= Col; END PROCESS; -- Clock timing checks -- Clock_check : PROCESS -- VARIABLE Clk_low, Clk_high : TIME := 0 ns; -- BEGIN -- WAIT ON Clk; -- IF (Clk = '1' AND NOW >= 10 ns) THEN -- ASSERT (NOW - Clk_low >= tCL) -- REPORT "tCL violation" -- SEVERITY WARNING; -- ASSERT (NOW - Clk_high >= tCK) -- REPORT "tCK violation" -- SEVERITY WARNING; -- Clk_high := NOW; -- ELSIF (Clk = '0' AND NOW /= 0 ns) THEN -- ASSERT (NOW - Clk_high >= tCH) -- REPORT "tCH violation" -- SEVERITY WARNING; -- Clk_low := NOW; -- END IF; -- END PROCESS; -- Setup timing checks Setup_check : PROCESS BEGIN wait; WAIT ON Clk; IF Clk = '1' THEN ASSERT(Cke'LAST_EVENT >= tCKS) --' REPORT "CKE Setup time violation -- tCKS" SEVERITY WARNING; ASSERT(Cs_n'LAST_EVENT >= tCMS) --' REPORT "CS# Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(Cas_n'LAST_EVENT >= tCMS) --' REPORT "CAS# Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(Ras_n'LAST_EVENT >= tCMS) --' REPORT "RAS# Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(We_n'LAST_EVENT >= tCMS) --' REPORT "WE# Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(Dqm'LAST_EVENT >= tCMS) --' REPORT "Dqm Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(Addr'LAST_EVENT >= tAS) --' REPORT "ADDR Setup time violation -- tAS" SEVERITY WARNING; ASSERT(Ba'LAST_EVENT >= tAS) --' REPORT "BA Setup time violation -- tAS" SEVERITY WARNING; ASSERT(Dq'LAST_EVENT >= tDS) --' REPORT "Dq Setup time violation -- tDS" SEVERITY WARNING; END IF; END PROCESS; -- Hold timing checks Hold_check : PROCESS BEGIN wait; WAIT ON Clk'DELAYED (tCKH), Clk'DELAYED (tCMH), Clk'DELAYED (tAH), Clk'DELAYED (tDH); IF Clk'DELAYED (tCKH) = '1' THEN --' ASSERT(Cke'LAST_EVENT > tCKH) --' REPORT "CKE Hold time violation -- tCKH" SEVERITY WARNING; END IF; IF Clk'DELAYED (tCMH) = '1' THEN --' ASSERT(Cs_n'LAST_EVENT > tCMH) --' REPORT "CS# Hold time violation -- tCMH" SEVERITY WARNING; ASSERT(Cas_n'LAST_EVENT > tCMH) --' REPORT "CAS# Hold time violation -- tCMH" SEVERITY WARNING; ASSERT(Ras_n'LAST_EVENT > tCMH) --' REPORT "RAS# Hold time violation -- tCMH" SEVERITY WARNING; ASSERT(We_n'LAST_EVENT > tCMH) --' REPORT "WE# Hold time violation -- tCMH" SEVERITY WARNING; ASSERT(Dqm'LAST_EVENT > tCMH) --' REPORT "Dqm Hold time violation -- tCMH" SEVERITY WARNING; END IF; IF Clk'DELAYED (tAH) = '1' THEN --' ASSERT(Addr'LAST_EVENT > tAH) --' REPORT "ADDR Hold time violation -- tAH" SEVERITY WARNING; ASSERT(Ba'LAST_EVENT > tAH) --' REPORT "BA Hold time violation -- tAH" SEVERITY WARNING; END IF; IF Clk'DELAYED (tDH) = '1' THEN --' ASSERT(Dq'LAST_EVENT > tDH) --' REPORT "Dq Hold time violation -- tDH" SEVERITY WARNING; END IF; END PROCESS; END behave; -- pragma translate_on
--***************************************************************************** -- -- Micron Semiconductor Products, Inc. -- -- Copyright 1997, Micron Semiconductor Products, Inc. -- All rights reserved. -- --***************************************************************************** -- pragma translate_off library ieee; use ieee.std_logic_1164.ALL; use std.textio.all; PACKAGE mti_pkg IS FUNCTION To_StdLogic (s : BIT) RETURN STD_LOGIC; FUNCTION TO_INTEGER (input : STD_LOGIC) RETURN INTEGER; FUNCTION TO_INTEGER (input : BIT_VECTOR) RETURN INTEGER; FUNCTION TO_INTEGER (input : STD_LOGIC_VECTOR) RETURN INTEGER; PROCEDURE TO_BITVECTOR (VARIABLE input : IN INTEGER; VARIABLE output : OUT BIT_VECTOR); END mti_pkg; PACKAGE BODY mti_pkg IS -- Convert BIT to STD_LOGIC FUNCTION To_StdLogic (s : BIT) RETURN STD_LOGIC IS BEGIN CASE s IS WHEN '0' => RETURN ('0'); WHEN '1' => RETURN ('1'); WHEN OTHERS => RETURN ('0'); END CASE; END; -- Convert STD_LOGIC to INTEGER FUNCTION TO_INTEGER (input : STD_LOGIC) RETURN INTEGER IS VARIABLE result : INTEGER := 0; VARIABLE weight : INTEGER := 1; BEGIN IF input = '1' THEN result := weight; ELSE result := 0; -- if unknowns, default to logic 0 END IF; RETURN result; END TO_INTEGER; -- Convert BIT_VECTOR to INTEGER FUNCTION TO_INTEGER (input : BIT_VECTOR) RETURN INTEGER IS VARIABLE result : INTEGER := 0; VARIABLE weight : INTEGER := 1; BEGIN FOR i IN input'LOW TO input'HIGH LOOP IF input(i) = '1' THEN result := result + weight; ELSE result := result + 0; -- if unknowns, default to logic 0 END IF; weight := weight * 2; END LOOP; RETURN result; END TO_INTEGER; -- Convert STD_LOGIC_VECTOR to INTEGER FUNCTION TO_INTEGER (input : STD_LOGIC_VECTOR) RETURN INTEGER IS VARIABLE result : INTEGER := 0; VARIABLE weight : INTEGER := 1; BEGIN FOR i IN input'LOW TO input'HIGH LOOP IF input(i) = '1' THEN result := result + weight; ELSE result := result + 0; -- if unknowns, default to logic 0 END IF; weight := weight * 2; END LOOP; RETURN result; END TO_INTEGER; -- Conver INTEGER to BIT_VECTOR PROCEDURE TO_BITVECTOR (VARIABLE input : IN INTEGER; VARIABLE output : OUT BIT_VECTOR) IS VARIABLE work,offset,outputlen,j : INTEGER := 0; BEGIN --length of vector IF output'LENGTH > 32 THEN --' outputlen := 32; offset := output'LENGTH - 32; --' IF input >= 0 THEN FOR i IN offset-1 DOWNTO 0 LOOP output(output'HIGH - i) := '0'; --' END LOOP; ELSE FOR i IN offset-1 DOWNTO 0 LOOP output(output'HIGH - i) := '1'; --' END LOOP; END IF; ELSE outputlen := output'LENGTH; --' END IF; --positive value IF (input >= 0) THEN work := input; j := outputlen - 1; FOR i IN 1 to 32 LOOP IF j >= 0 then IF (work MOD 2) = 0 THEN output(output'HIGH-j-offset) := '0'; --' ELSE output(output'HIGH-j-offset) := '1'; --' END IF; END IF; work := work / 2; j := j - 1; END LOOP; IF outputlen = 32 THEN output(output'HIGH) := '0'; --' END IF; --negative value ELSE work := (-input) - 1; j := outputlen - 1; FOR i IN 1 TO 32 LOOP IF j>= 0 THEN IF (work MOD 2) = 0 THEN output(output'HIGH-j-offset) := '1'; --' ELSE output(output'HIGH-j-offset) := '0'; --' END IF; END IF; work := work / 2; j := j - 1; END LOOP; IF outputlen = 32 THEN output(output'HIGH) := '1'; --' END IF; END IF; END TO_BITVECTOR; END mti_pkg; ----------------------------------------------------------------------------------------- -- -- File Name: MT48LC16M16A2.VHD -- Version: 0.0g -- Date: June 29th, 2000 -- Model: Behavioral -- Simulator: Model Technology (PC version 5.3 PE) -- -- Dependencies: None -- -- Author: Son P. Huynh -- Email: [email protected] -- Phone: (208) 368-3825 -- Company: Micron Technology, Inc. -- Part Number: MT48LC16M16A2 (4Mb x 16 x 4 Banks) -- -- Description: Micron 256Mb SDRAM -- -- Limitation: - Doesn't check for 4096-cycle refresh --' -- -- Note: - Set simulator resolution to "ps" accuracy -- -- Disclaimer: THESE DESIGNS ARE PROVIDED "AS IS" WITH NO WARRANTY -- WHATSOEVER AND MICRON SPECIFICALLY DISCLAIMS ANY -- IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR -- A PARTICULAR PURPOSE, OR AGAINST INFRINGEMENT. -- -- Copyright (c) 1998 Micron Semiconductor Products, Inc. -- All rights researved -- -- Rev Author Phone Date Changes -- ---- ---------------------------- ---------- ------------------------------------- -- 0.0g Son Huynh 208-368-3825 06/29/2000 Add Load/Dump memory array -- Micron Technology Inc. Modify tWR + tRAS timing check -- -- 0.0f Son Huynh 208-368-3825 07/08/1999 Fix tWR = 1 Clk + 7.5 ns (Auto) -- Micron Technology Inc. Fix tWR = 15 ns (Manual) -- Fix tRP (Autoprecharge to AutoRefresh) -- -- 0.0c Son P. Huynh 208-368-3825 04/08/1999 Fix tWR + tRP in Write with AP -- Micron Technology Inc. Fix tRC check in Load Mode Register -- -- 0.0b Son P. Huynh 208-368-3825 01/06/1998 Derive from 64Mb SDRAM model -- Micron Technology Inc. -- ----------------------------------------------------------------------------------------- LIBRARY STD; USE STD.TEXTIO.ALL; LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; LIBRARY WORK; USE WORK.MTI_PKG.ALL; use std.textio.all; library grlib; use grlib.stdlib.all; library gaisler; use gaisler.sim.all; ENTITY mt48lc16m16a2 IS GENERIC ( -- Timing Parameters for -75 (PC133) and CAS Latency = 2 tAC : TIME := 6.0 ns; tHZ : TIME := 7.0 ns; tOH : TIME := 2.7 ns; tMRD : INTEGER := 2; -- 2 Clk Cycles tRAS : TIME := 44.0 ns; tRC : TIME := 66.0 ns; tRCD : TIME := 20.0 ns; tRP : TIME := 20.0 ns; tRRD : TIME := 15.0 ns; tWRa : TIME := 7.5 ns; -- A2 Version - Auto precharge mode only (1 Clk + 7.5 ns) tWRp : TIME := 15.0 ns; -- A2 Version - Precharge mode only (15 ns) tAH : TIME := 0.8 ns; tAS : TIME := 1.5 ns; tCH : TIME := 2.5 ns; tCL : TIME := 2.5 ns; tCK : TIME := 10.0 ns; tDH : TIME := 0.8 ns; tDS : TIME := 1.5 ns; tCKH : TIME := 0.8 ns; tCKS : TIME := 1.5 ns; tCMH : TIME := 0.8 ns; tCMS : TIME := 1.5 ns; addr_bits : INTEGER := 13; data_bits : INTEGER := 16; col_bits : INTEGER := 9; index : INTEGER := 0; fname : string := "sdram.srec" -- File to read from ); PORT ( Dq : INOUT STD_LOGIC_VECTOR (data_bits - 1 DOWNTO 0) := (OTHERS => 'Z'); Addr : IN STD_LOGIC_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); Ba : IN STD_LOGIC_VECTOR := "00"; Clk : IN STD_LOGIC := '0'; Cke : IN STD_LOGIC := '1'; Cs_n : IN STD_LOGIC := '1'; Ras_n : IN STD_LOGIC := '1'; Cas_n : IN STD_LOGIC := '1'; We_n : IN STD_LOGIC := '1'; Dqm : IN STD_LOGIC_VECTOR (1 DOWNTO 0) := "00" ); END mt48lc16m16a2; ARCHITECTURE behave OF mt48lc16m16a2 IS TYPE State IS (ACT, A_REF, BST, LMR, NOP, PRECH, READ, READ_A, WRITE, WRITE_A, LOAD_FILE, DUMP_FILE); TYPE Array4xI IS ARRAY (3 DOWNTO 0) OF INTEGER; TYPE Array4xT IS ARRAY (3 DOWNTO 0) OF TIME; TYPE Array4xB IS ARRAY (3 DOWNTO 0) OF BIT; TYPE Array4x2BV IS ARRAY (3 DOWNTO 0) OF BIT_VECTOR (1 DOWNTO 0); TYPE Array4xCBV IS ARRAY (4 DOWNTO 0) OF BIT_VECTOR (Col_bits - 1 DOWNTO 0); TYPE Array_state IS ARRAY (4 DOWNTO 0) OF State; SIGNAL Operation : State := NOP; SIGNAL Mode_reg : BIT_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); SIGNAL Active_enable, Aref_enable, Burst_term : BIT := '0'; SIGNAL Mode_reg_enable, Prech_enable, Read_enable, Write_enable : BIT := '0'; SIGNAL Burst_length_1, Burst_length_2, Burst_length_4, Burst_length_8 : BIT := '0'; SIGNAL Cas_latency_2, Cas_latency_3 : BIT := '0'; SIGNAL Ras_in, Cas_in, We_in : BIT := '0'; SIGNAL Write_burst_mode : BIT := '0'; SIGNAL RAS_clk, Sys_clk, CkeZ : BIT := '0'; -- Checking internal wires SIGNAL Pre_chk : BIT_VECTOR (3 DOWNTO 0) := "0000"; SIGNAL Act_chk : BIT_VECTOR (3 DOWNTO 0) := "0000"; SIGNAL Dq_in_chk, Dq_out_chk : BIT := '0'; SIGNAL Bank_chk : BIT_VECTOR (1 DOWNTO 0) := "00"; SIGNAL Row_chk : BIT_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); SIGNAL Col_chk : BIT_VECTOR (col_bits - 1 DOWNTO 0) := (OTHERS => '0'); BEGIN -- CS# Decode WITH Cs_n SELECT Cas_in <= TO_BIT (Cas_n, '1') WHEN '0', '1' WHEN '1', '1' WHEN OTHERS; WITH Cs_n SELECT Ras_in <= TO_BIT (Ras_n, '1') WHEN '0', '1' WHEN '1', '1' WHEN OTHERS; WITH Cs_n SELECT We_in <= TO_BIT (We_n, '1') WHEN '0', '1' WHEN '1', '1' WHEN OTHERS; -- Commands Decode Active_enable <= NOT(Ras_in) AND Cas_in AND We_in; Aref_enable <= NOT(Ras_in) AND NOT(Cas_in) AND We_in; Burst_term <= Ras_in AND Cas_in AND NOT(We_in); Mode_reg_enable <= NOT(Ras_in) AND NOT(Cas_in) AND NOT(We_in); Prech_enable <= NOT(Ras_in) AND Cas_in AND NOT(We_in); Read_enable <= Ras_in AND NOT(Cas_in) AND We_in; Write_enable <= Ras_in AND NOT(Cas_in) AND NOT(We_in); -- Burst Length Decode Burst_length_1 <= NOT(Mode_reg(2)) AND NOT(Mode_reg(1)) AND NOT(Mode_reg(0)); Burst_length_2 <= NOT(Mode_reg(2)) AND NOT(Mode_reg(1)) AND Mode_reg(0); Burst_length_4 <= NOT(Mode_reg(2)) AND Mode_reg(1) AND NOT(Mode_reg(0)); Burst_length_8 <= NOT(Mode_reg(2)) AND Mode_reg(1) AND Mode_reg(0); -- CAS Latency Decode Cas_latency_2 <= NOT(Mode_reg(6)) AND Mode_reg(5) AND NOT(Mode_reg(4)); Cas_latency_3 <= NOT(Mode_reg(6)) AND Mode_reg(5) AND Mode_reg(4); -- Write Burst Mode Write_burst_mode <= Mode_reg(9); -- RAS Clock for checking tWR and tRP PROCESS variable Clk0, Clk1 : integer := 0; begin RAS_clk <= '1'; wait for 0.5 ns; RAS_clk <= '0'; wait for 0.5 ns; if Clk0 > 100 or Clk1 > 100 then wait; else if Clk = '1' and Cke = '1' then Clk0 := 0; Clk1 := Clk1 + 1; elsif Clk = '0' and Cke = '1' then Clk0 := Clk0 + 1; Clk1 := 0; end if; end if; END PROCESS; -- System Clock int_clk : PROCESS (Clk) begin IF Clk'LAST_VALUE = '0' AND Clk = '1' THEN --' CkeZ <= TO_BIT(Cke, '1'); END IF; Sys_clk <= CkeZ AND TO_BIT(Clk, '0'); END PROCESS; state_register : PROCESS -- NOTE: The extra bits in RAM_TYPE is for checking memory access. A logic 1 means -- the location is in use. This will be checked when doing memory DUMP. TYPE ram_type IS ARRAY (2**col_bits - 1 DOWNTO 0) OF BIT_VECTOR (data_bits DOWNTO 0); TYPE ram_pntr IS ACCESS ram_type; TYPE ram_stor IS ARRAY (2**addr_bits - 1 DOWNTO 0) OF ram_pntr; VARIABLE Bank0 : ram_stor; VARIABLE Bank1 : ram_stor; VARIABLE Bank2 : ram_stor; VARIABLE Bank3 : ram_stor; VARIABLE Row_index, Col_index : INTEGER := 0; VARIABLE Dq_temp : BIT_VECTOR (data_bits DOWNTO 0) := (OTHERS => '0'); VARIABLE Col_addr : Array4xCBV; VARIABLE Bank_addr : Array4x2BV; VARIABLE Dqm_reg0, Dqm_reg1 : BIT_VECTOR (1 DOWNTO 0) := "00"; VARIABLE Bank, Previous_bank : BIT_VECTOR (1 DOWNTO 0) := "00"; VARIABLE B0_row_addr, B1_row_addr, B2_row_addr, B3_row_addr : BIT_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); VARIABLE Col_brst : BIT_VECTOR (col_bits - 1 DOWNTO 0) := (OTHERS => '0'); VARIABLE Row : BIT_VECTOR (addr_bits - 1 DOWNTO 0) := (OTHERS => '0'); VARIABLE Col : BIT_VECTOR (col_bits - 1 DOWNTO 0) := (OTHERS => '0'); VARIABLE Burst_counter : INTEGER := 0; VARIABLE Command : Array_state; VARIABLE Bank_precharge : Array4x2BV; VARIABLE A10_precharge : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE Auto_precharge : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE Read_precharge : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE Write_precharge : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE RW_interrupt_read : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE RW_interrupt_write : Array4xB := ('0' & '0' & '0' & '0'); VARIABLE RW_interrupt_bank : BIT_VECTOR (1 DOWNTO 0) := "00"; VARIABLE Count_time : Array4xT := (0 ns & 0 ns & 0 ns & 0 ns); VARIABLE Count_precharge : Array4xI := (0 & 0 & 0 & 0); VARIABLE Data_in_enable, Data_out_enable : BIT := '0'; VARIABLE Pc_b0, Pc_b1, Pc_b2, Pc_b3 : BIT := '0'; VARIABLE Act_b0, Act_b1, Act_b2, Act_b3 : BIT := '0'; -- Timing Check VARIABLE MRD_chk : INTEGER := 0; VARIABLE WR_counter : Array4xI := (0 & 0 & 0 & 0); VARIABLE WR_time : Array4xT := (0 ns & 0 ns & 0 ns & 0 ns); VARIABLE WR_chkp : Array4xT := (0 ns & 0 ns & 0 ns & 0 ns); VARIABLE RC_chk, RRD_chk : TIME := 0 ns; VARIABLE RAS_chk0, RAS_chk1, RAS_chk2, RAS_chk3 : TIME := 0 ns; VARIABLE RCD_chk0, RCD_chk1, RCD_chk2, RCD_chk3 : TIME := 0 ns; VARIABLE RP_chk0, RP_chk1, RP_chk2, RP_chk3 : TIME := 0 ns; -- Load and Dumb variables FILE file_load : TEXT open read_mode is fname; -- Data load FILE file_dump : TEXT open write_mode is "dumpdata.txt"; -- Data dump VARIABLE bank_load : bit_vector ( 1 DOWNTO 0); VARIABLE rows_load : BIT_VECTOR (12 DOWNTO 0); VARIABLE cols_load : BIT_VECTOR ( 8 DOWNTO 0); VARIABLE data_load : BIT_VECTOR (15 DOWNTO 0); VARIABLE i, j : INTEGER; VARIABLE good_load : BOOLEAN; VARIABLE l : LINE; variable load : std_logic := '1'; variable dump : std_logic := '0'; variable ch : character; variable rectype : bit_vector(3 downto 0); variable recaddr : bit_vector(31 downto 0); variable reclen : bit_vector(7 downto 0); variable recdata : bit_vector(0 to 16*8-1); -- Initialize empty rows PROCEDURE Init_mem (Bank : bit_vector (1 DOWNTO 0); Row_index : INTEGER) IS VARIABLE i, j : INTEGER := 0; BEGIN IF Bank = "00" THEN IF Bank0 (Row_index) = NULL THEN -- Check to see if row empty Bank0 (Row_index) := NEW ram_type; -- Open new row for access FOR i IN (2**col_bits - 1) DOWNTO 0 LOOP -- Filled row with zeros FOR j IN (data_bits) DOWNTO 0 LOOP Bank0 (Row_index) (i) (j) := '0'; END LOOP; END LOOP; END IF; ELSIF Bank = "01" THEN IF Bank1 (Row_index) = NULL THEN Bank1 (Row_index) := NEW ram_type; FOR i IN (2**col_bits - 1) DOWNTO 0 LOOP FOR j IN (data_bits) DOWNTO 0 LOOP Bank1 (Row_index) (i) (j) := '0'; END LOOP; END LOOP; END IF; ELSIF Bank = "10" THEN IF Bank2 (Row_index) = NULL THEN Bank2 (Row_index) := NEW ram_type; FOR i IN (2**col_bits - 1) DOWNTO 0 LOOP FOR j IN (data_bits) DOWNTO 0 LOOP Bank2 (Row_index) (i) (j) := '0'; END LOOP; END LOOP; END IF; ELSIF Bank = "11" THEN IF Bank3 (Row_index) = NULL THEN Bank3 (Row_index) := NEW ram_type; FOR i IN (2**col_bits - 1) DOWNTO 0 LOOP FOR j IN (data_bits) DOWNTO 0 LOOP Bank3 (Row_index) (i) (j) := '0'; END LOOP; END LOOP; END IF; END IF; END; -- Burst Counter PROCEDURE Burst_decode IS VARIABLE Col_int : INTEGER := 0; VARIABLE Col_vec, Col_temp : BIT_VECTOR (col_bits - 1 DOWNTO 0) := (OTHERS => '0'); BEGIN -- Advance Burst Counter Burst_counter := Burst_counter + 1; -- Burst Type IF Mode_reg (3) = '0' THEN Col_int := TO_INTEGER(Col); Col_int := Col_int + 1; TO_BITVECTOR (Col_int, Col_temp); ELSIF Mode_reg (3) = '1' THEN TO_BITVECTOR (Burst_counter, Col_vec); Col_temp (2) := Col_vec (2) XOR Col_brst (2); Col_temp (1) := Col_vec (1) XOR Col_brst (1); Col_temp (0) := Col_vec (0) XOR Col_brst (0); END IF; -- Burst Length IF Burst_length_2 = '1' THEN Col (0) := Col_temp (0); ELSIF Burst_length_4 = '1' THEN Col (1 DOWNTO 0) := Col_temp (1 DOWNTO 0); ELSIF Burst_length_8 = '1' THEN Col (2 DOWNTO 0) := Col_temp (2 DOWNTO 0); ELSE Col := Col_temp; END IF; -- Burst Read Single Write IF Write_burst_mode = '1' AND Data_in_enable = '1' THEN Data_in_enable := '0'; END IF; -- Data counter IF Burst_length_1 = '1' THEN IF Burst_counter >= 1 THEN IF Data_in_enable = '1' THEN Data_in_enable := '0'; ELSIF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; ELSIF Burst_length_2 = '1' THEN IF Burst_counter >= 2 THEN IF Data_in_enable = '1' THEN Data_in_enable := '0'; ELSIF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; ELSIF Burst_length_4 = '1' THEN IF Burst_counter >= 4 THEN IF Data_in_enable = '1' THEN Data_in_enable := '0'; ELSIF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; ELSIF Burst_length_8 = '1' THEN IF Burst_counter >= 8 THEN IF Data_in_enable = '1' THEN Data_in_enable := '0'; ELSIF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; END IF; END; BEGIN WAIT ON Sys_clk, RAS_clk; IF Sys_clk'event AND Sys_clk = '1' AND Load = '0' AND Dump = '0' THEN --' -- Internal Command Pipeline Command(0) := Command(1); Command(1) := Command(2); Command(2) := Command(3); Command(3) := NOP; Col_addr(0) := Col_addr(1); Col_addr(1) := Col_addr(2); Col_addr(2) := Col_addr(3); Col_addr(3) := (OTHERS => '0'); Bank_addr(0) := Bank_addr(1); Bank_addr(1) := Bank_addr(2); Bank_addr(2) := Bank_addr(3); Bank_addr(3) := "00"; Bank_precharge(0) := Bank_precharge(1); Bank_precharge(1) := Bank_precharge(2); Bank_precharge(2) := Bank_precharge(3); Bank_precharge(3) := "00"; A10_precharge(0) := A10_precharge(1); A10_precharge(1) := A10_precharge(2); A10_precharge(2) := A10_precharge(3); A10_precharge(3) := '0'; -- Operation Decode (Optional for showing current command on posedge clock / debug feature) IF Active_enable = '1' THEN Operation <= ACT; ELSIF Aref_enable = '1' THEN Operation <= A_REF; ELSIF Burst_term = '1' THEN Operation <= BST; ELSIF Mode_reg_enable = '1' THEN Operation <= LMR; ELSIF Prech_enable = '1' THEN Operation <= PRECH; ELSIF Read_enable = '1' THEN IF Addr(10) = '0' THEN Operation <= READ; ELSE Operation <= READ_A; END IF; ELSIF Write_enable = '1' THEN IF Addr(10) = '0' THEN Operation <= WRITE; ELSE Operation <= WRITE_A; END IF; ELSE Operation <= NOP; END IF; -- Dqm pipeline for Read Dqm_reg0 := Dqm_reg1; Dqm_reg1 := TO_BITVECTOR(Dqm); -- Read or Write with Auto Precharge Counter IF Auto_precharge (0) = '1' THEN Count_precharge (0) := Count_precharge (0) + 1; END IF; IF Auto_precharge (1) = '1' THEN Count_precharge (1) := Count_precharge (1) + 1; END IF; IF Auto_precharge (2) = '1' THEN Count_precharge (2) := Count_precharge (2) + 1; END IF; IF Auto_precharge (3) = '1' THEN Count_precharge (3) := Count_precharge (3) + 1; END IF; -- Auto Precharge Timer for tWR if (Burst_length_1 = '1' OR Write_burst_mode = '1') then if (Count_precharge(0) = 1) then Count_time(0) := NOW; end if; if (Count_precharge(1) = 1) then Count_time(1) := NOW; end if; if (Count_precharge(2) = 1) then Count_time(2) := NOW; end if; if (Count_precharge(3) = 1) then Count_time(3) := NOW; end if; elsif (Burst_length_2 = '1') then if (Count_precharge(0) = 2) then Count_time(0) := NOW; end if; if (Count_precharge(1) = 2) then Count_time(1) := NOW; end if; if (Count_precharge(2) = 2) then Count_time(2) := NOW; end if; if (Count_precharge(3) = 2) then Count_time(3) := NOW; end if; elsif (Burst_length_4 = '1') then if (Count_precharge(0) = 4) then Count_time(0) := NOW; end if; if (Count_precharge(1) = 4) then Count_time(1) := NOW; end if; if (Count_precharge(2) = 4) then Count_time(2) := NOW; end if; if (Count_precharge(3) = 4) then Count_time(3) := NOW; end if; elsif (Burst_length_8 = '1') then if (Count_precharge(0) = 8) then Count_time(0) := NOW; end if; if (Count_precharge(1) = 8) then Count_time(1) := NOW; end if; if (Count_precharge(2) = 8) then Count_time(2) := NOW; end if; if (Count_precharge(3) = 8) then Count_time(3) := NOW; end if; end if; -- tMRD Counter MRD_chk := MRD_chk + 1; -- tWR Counter WR_counter(0) := WR_counter(0) + 1; WR_counter(1) := WR_counter(1) + 1; WR_counter(2) := WR_counter(2) + 1; WR_counter(3) := WR_counter(3) + 1; -- Auto Refresh IF Aref_enable = '1' THEN -- Auto Refresh to Auto Refresh ASSERT (NOW - RC_chk >= tRC) REPORT "tRC violation during Auto Refresh" SEVERITY WARNING; -- Precharge to Auto Refresh ASSERT (NOW - RP_chk0 >= tRP OR NOW - RP_chk1 >= tRP OR NOW - RP_chk2 >= tRP OR NOW - RP_chk3 >= tRP) REPORT "tRP violation during Auto Refresh" SEVERITY WARNING; -- All banks must be idle before refresh IF (Pc_b3 ='0' OR Pc_b2 = '0' OR Pc_b1 ='0' OR Pc_b0 = '0') THEN ASSERT (FALSE) REPORT "All banks must be Precharge before Auto Refresh" SEVERITY WARNING; END IF; -- Record current tRC time RC_chk := NOW; END IF; -- Load Mode Register IF Mode_reg_enable = '1' THEN Mode_reg <= TO_BITVECTOR (Addr); IF (Pc_b3 ='0' OR Pc_b2 = '0' OR Pc_b1 ='0' OR Pc_b0 = '0') THEN ASSERT (FALSE) REPORT "All bank must be Precharge before Load Mode Register" SEVERITY WARNING; END IF; -- REF to LMR ASSERT (NOW - RC_chk >= tRC) REPORT "tRC violation during Load Mode Register" SEVERITY WARNING; -- LMR to LMR ASSERT (MRD_chk >= tMRD) REPORT "tMRD violation during Load Mode Register" SEVERITY WARNING; -- Record current tMRD time MRD_chk := 0; END IF; -- Active Block (latch Bank and Row Address) IF Active_enable = '1' THEN IF Ba = "00" AND Pc_b0 = '1' THEN Act_b0 := '1'; Pc_b0 := '0'; B0_row_addr := TO_BITVECTOR (Addr); RCD_chk0 := NOW; RAS_chk0 := NOW; -- Precharge to Active Bank 0 ASSERT (NOW - RP_chk0 >= tRP) REPORT "tRP violation during Activate Bank 0" SEVERITY WARNING; ELSIF Ba = "01" AND Pc_b1 = '1' THEN Act_b1 := '1'; Pc_b1 := '0'; B1_row_addr := TO_BITVECTOR (Addr); RCD_chk1 := NOW; RAS_chk1 := NOW; -- Precharge to Active Bank 1 ASSERT (NOW - RP_chk1 >= tRP) REPORT "tRP violation during Activate Bank 1" SEVERITY WARNING; ELSIF Ba = "10" AND Pc_b2 = '1' THEN Act_b2 := '1'; Pc_b2 := '0'; B2_row_addr := TO_BITVECTOR (Addr); RCD_chk2 := NOW; RAS_chk2 := NOW; -- Precharge to Active Bank 2 ASSERT (NOW - RP_chk2 >= tRP) REPORT "tRP violation during Activate Bank 2" SEVERITY WARNING; ELSIF Ba = "11" AND Pc_b3 = '1' THEN Act_b3 := '1'; Pc_b3 := '0'; B3_row_addr := TO_BITVECTOR (Addr); RCD_chk3 := NOW; RAS_chk3 := NOW; -- Precharge to Active Bank 3 ASSERT (NOW - RP_chk3 >= tRP) REPORT "tRP violation during Activate Bank 3" SEVERITY WARNING; ELSIF Ba = "00" AND Pc_b0 = '0' THEN ASSERT (FALSE) REPORT "Bank 0 is not Precharged" SEVERITY WARNING; ELSIF Ba = "01" AND Pc_b1 = '0' THEN ASSERT (FALSE) REPORT "Bank 1 is not Precharged" SEVERITY WARNING; ELSIF Ba = "10" AND Pc_b2 = '0' THEN ASSERT (FALSE) REPORT "Bank 2 is not Precharged" SEVERITY WARNING; ELSIF Ba = "11" AND Pc_b3 = '0' THEN ASSERT (FALSE) REPORT "Bank 3 is not Precharged" SEVERITY WARNING; END IF; -- Active Bank A to Active Bank B IF ((Previous_bank /= TO_BITVECTOR (Ba)) AND (NOW - RRD_chk < tRRD)) THEN ASSERT (FALSE) REPORT "tRRD violation during Activate" SEVERITY WARNING; END IF; -- LMR to ACT ASSERT (MRD_chk >= tMRD) REPORT "tMRD violation during Activate" SEVERITY WARNING; -- AutoRefresh to Activate ASSERT (NOW - RC_chk >= tRC) REPORT "tRC violation during Activate" SEVERITY WARNING; -- Record variable for checking violation RRD_chk := NOW; Previous_bank := TO_BITVECTOR (Ba); END IF; -- Precharge Block IF Prech_enable = '1' THEN IF Addr(10) = '1' THEN Pc_b0 := '1'; Pc_b1 := '1'; Pc_b2 := '1'; Pc_b3 := '1'; Act_b0 := '0'; Act_b1 := '0'; Act_b2 := '0'; Act_b3 := '0'; RP_chk0 := NOW; RP_chk1 := NOW; RP_chk2 := NOW; RP_chk3 := NOW; -- Activate to Precharge all banks ASSERT ((NOW - RAS_chk0 >= tRAS) OR (NOW - RAS_chk1 >= tRAS)) REPORT "tRAS violation during Precharge all banks" SEVERITY WARNING; -- tWR violation check for Write IF ((NOW - WR_chkp(0) < tWRp) OR (NOW - WR_chkp(1) < tWRp) OR (NOW - WR_chkp(2) < tWRp) OR (NOW - WR_chkp(3) < tWRp)) THEN ASSERT (FALSE) REPORT "tWR violation during Precharge ALL banks" SEVERITY WARNING; END IF; ELSIF Addr(10) = '0' THEN IF Ba = "00" THEN Pc_b0 := '1'; Act_b0 := '0'; RP_chk0 := NOW; -- Activate to Precharge bank 0 ASSERT (NOW - RAS_chk0 >= tRAS) REPORT "tRAS violation during Precharge bank 0" SEVERITY WARNING; ELSIF Ba = "01" THEN Pc_b1 := '1'; Act_b1 := '0'; RP_chk1 := NOW; -- Activate to Precharge bank 1 ASSERT (NOW - RAS_chk1 >= tRAS) REPORT "tRAS violation during Precharge bank 1" SEVERITY WARNING; ELSIF Ba = "10" THEN Pc_b2 := '1'; Act_b2 := '0'; RP_chk2 := NOW; -- Activate to Precharge bank 2 ASSERT (NOW - RAS_chk2 >= tRAS) REPORT "tRAS violation during Precharge bank 2" SEVERITY WARNING; ELSIF Ba = "11" THEN Pc_b3 := '1'; Act_b3 := '0'; RP_chk3 := NOW; -- Activate to Precharge bank 3 ASSERT (NOW - RAS_chk3 >= tRAS) REPORT "tRAS violation during Precharge bank 3" SEVERITY WARNING; END IF; -- tWR violation check for Write ASSERT (NOW - WR_chkp(TO_INTEGER(Ba)) >= tWRp) REPORT "tWR violation during Precharge" SEVERITY WARNING; END IF; -- Terminate a Write Immediately (if same bank or all banks) IF (Data_in_enable = '1' AND (Bank = TO_BITVECTOR(Ba) OR Addr(10) = '1')) THEN Data_in_enable := '0'; END IF; -- Precharge Command Pipeline for READ IF CAS_latency_3 = '1' THEN Command(2) := PRECH; Bank_precharge(2) := TO_BITVECTOR (Ba); A10_precharge(2) := TO_BIT(Addr(10)); ELSIF CAS_latency_2 = '1' THEN Command(1) := PRECH; Bank_precharge(1) := TO_BITVECTOR (Ba); A10_precharge(1) := TO_BIT(Addr(10)); END IF; END IF; -- Burst Terminate IF Burst_term = '1' THEN -- Terminate a Write immediately IF Data_in_enable = '1' THEN Data_in_enable := '0'; END IF; -- Terminate a Read depend on CAS Latency IF CAS_latency_3 = '1' THEN Command(2) := BST; ELSIF CAS_latency_2 = '1' THEN Command(1) := BST; END IF; END IF; -- Read, Write, Column Latch IF Read_enable = '1' OR Write_enable = '1' THEN -- Check to see if bank is open (ACT) for Read or Write IF ((Ba="00" AND Pc_b0='1') OR (Ba="01" AND Pc_b1='1') OR (Ba="10" AND Pc_b2='1') OR (Ba="11" AND Pc_b3='1')) THEN ASSERT (FALSE) REPORT "Cannot Read or Write - Bank is not Activated" SEVERITY WARNING; END IF; -- Activate to Read or Write IF Ba = "00" THEN ASSERT (NOW - RCD_chk0 >= tRCD) REPORT "tRCD violation during Read or Write to Bank 0" SEVERITY WARNING; ELSIF Ba = "01" THEN ASSERT (NOW - RCD_chk1 >= tRCD) REPORT "tRCD violation during Read or Write to Bank 1" SEVERITY WARNING; ELSIF Ba = "10" THEN ASSERT (NOW - RCD_chk2 >= tRCD) REPORT "tRCD violation during Read or Write to Bank 2" SEVERITY WARNING; ELSIF Ba = "11" THEN ASSERT (NOW - RCD_chk3 >= tRCD) REPORT "tRCD violation during Read or Write to Bank 3" SEVERITY WARNING; END IF; -- Read Command IF Read_enable = '1' THEN -- CAS Latency Pipeline IF Cas_latency_3 = '1' THEN IF Addr(10) = '1' THEN Command(2) := READ_A; ELSE Command(2) := READ; END IF; Col_addr (2) := TO_BITVECTOR (Addr(col_bits - 1 DOWNTO 0)); Bank_addr (2) := TO_BITVECTOR (Ba); ELSIF Cas_latency_2 = '1' THEN IF Addr(10) = '1' THEN Command(1) := READ_A; ELSE Command(1) := READ; END IF; Col_addr (1) := TO_BITVECTOR (Addr(col_bits - 1 DOWNTO 0)); Bank_addr (1) := TO_BITVECTOR (Ba); END IF; -- Read intterupt a Write (terminate Write immediately) IF Data_in_enable = '1' THEN Data_in_enable := '0'; END IF; -- Write Command ELSIF Write_enable = '1' THEN IF Addr(10) = '1' THEN Command(0) := WRITE_A; ELSE Command(0) := WRITE; END IF; Col_addr (0) := TO_BITVECTOR (Addr(col_bits - 1 DOWNTO 0)); Bank_addr (0) := TO_BITVECTOR (Ba); -- Write intterupt a Write (terminate Write immediately) IF Data_in_enable = '1' THEN Data_in_enable := '0'; END IF; -- Write interrupt a Read (terminate Read immediately) IF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; -- Interrupt a Write with Auto Precharge IF Auto_precharge(TO_INTEGER(RW_Interrupt_Bank)) = '1' AND Write_precharge(TO_INTEGER(RW_Interrupt_Bank)) = '1' THEN RW_interrupt_write(TO_INTEGER(RW_Interrupt_Bank)) := '1'; END IF; -- Interrupt a Read with Auto Precharge IF Auto_precharge(TO_INTEGER(RW_Interrupt_Bank)) = '1' AND Read_precharge(TO_INTEGER(RW_Interrupt_Bank)) = '1' THEN RW_interrupt_read(TO_INTEGER(RW_Interrupt_Bank)) := '1'; END IF; -- Read or Write with Auto Precharge IF Addr(10) = '1' THEN Auto_precharge (TO_INTEGER(Ba)) := '1'; Count_precharge (TO_INTEGER(Ba)) := 0; RW_Interrupt_Bank := TO_BitVector(Ba); IF Read_enable = '1' THEN Read_precharge (TO_INTEGER(Ba)) := '1'; ELSIF Write_enable = '1' THEN Write_precharge (TO_INTEGER(Ba)) := '1'; END IF; END IF; END IF; -- Read with AutoPrecharge Calculation -- The device start internal precharge when: -- 1. BL/2 cycles after command -- and 2. Meet tRAS requirement -- or 3. Interrupt by a Read or Write (with or without Auto Precharge) IF ((Auto_precharge(0) = '1') AND (Read_precharge(0) = '1')) THEN IF (((NOW - RAS_chk0 >= tRAS) AND ((Burst_length_1 = '1' AND Count_precharge(0) >= 1) OR (Burst_length_2 = '1' AND Count_precharge(0) >= 2) OR (Burst_length_4 = '1' AND Count_precharge(0) >= 4) OR (Burst_length_8 = '1' AND Count_precharge(0) >= 8))) OR (RW_interrupt_read(0) = '1')) THEN Pc_b0 := '1'; Act_b0 := '0'; RP_chk0 := NOW; Auto_precharge(0) := '0'; Read_precharge(0) := '0'; RW_interrupt_read(0) := '0'; END IF; END IF; IF ((Auto_precharge(1) = '1') AND (Read_precharge(1) = '1')) THEN IF (((NOW - RAS_chk1 >= tRAS) AND ((Burst_length_1 = '1' AND Count_precharge(1) >= 1) OR (Burst_length_2 = '1' AND Count_precharge(1) >= 2) OR (Burst_length_4 = '1' AND Count_precharge(1) >= 4) OR (Burst_length_8 = '1' AND Count_precharge(1) >= 8))) OR (RW_interrupt_read(1) = '1')) THEN Pc_b1 := '1'; Act_b1 := '0'; RP_chk1 := NOW; Auto_precharge(1) := '0'; Read_precharge(1) := '0'; RW_interrupt_read(1) := '0'; END IF; END IF; IF ((Auto_precharge(2) = '1') AND (Read_precharge(2) = '1')) THEN IF (((NOW - RAS_chk2 >= tRAS) AND ((Burst_length_1 = '1' AND Count_precharge(2) >= 1) OR (Burst_length_2 = '1' AND Count_precharge(2) >= 2) OR (Burst_length_4 = '1' AND Count_precharge(2) >= 4) OR (Burst_length_8 = '1' AND Count_precharge(2) >= 8))) OR (RW_interrupt_read(2) = '1')) THEN Pc_b2 := '1'; Act_b2 := '0'; RP_chk2 := NOW; Auto_precharge(2) := '0'; Read_precharge(2) := '0'; RW_interrupt_read(2) := '0'; END IF; END IF; IF ((Auto_precharge(3) = '1') AND (Read_precharge(3) = '1')) THEN IF (((NOW - RAS_chk3 >= tRAS) AND ((Burst_length_1 = '1' AND Count_precharge(3) >= 1) OR (Burst_length_2 = '1' AND Count_precharge(3) >= 2) OR (Burst_length_4 = '1' AND Count_precharge(3) >= 4) OR (Burst_length_8 = '1' AND Count_precharge(3) >= 8))) OR (RW_interrupt_read(3) = '1')) THEN Pc_b3 := '1'; Act_b3 := '0'; RP_chk3 := NOW; Auto_precharge(3) := '0'; Read_precharge(3) := '0'; RW_interrupt_read(3) := '0'; END IF; END IF; -- Internal Precharge or Bst IF Command(0) = PRECH THEN -- PRECH terminate a read if same bank or all banks IF Bank_precharge(0) = Bank OR A10_precharge(0) = '1' THEN IF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; ELSIF Command(0) = BST THEN -- BST terminate a read regardless of bank IF Data_out_enable = '1' THEN Data_out_enable := '0'; END IF; END IF; IF Data_out_enable = '0' THEN Dq <= TRANSPORT (OTHERS => 'Z') AFTER tOH; END IF; -- Detect Read or Write Command IF Command(0) = READ OR Command(0) = READ_A THEN Bank := Bank_addr (0); Col := Col_addr (0); Col_brst := Col_addr (0); IF Bank_addr (0) = "00" THEN Row := B0_row_addr; ELSIF Bank_addr (0) = "01" THEN Row := B1_row_addr; ELSIF Bank_addr (0) = "10" THEN Row := B2_row_addr; ELSE Row := B3_row_addr; END IF; Burst_counter := 0; Data_in_enable := '0'; Data_out_enable := '1'; ELSIF Command(0) = WRITE OR Command(0) = WRITE_A THEN Bank := Bank_addr(0); Col := Col_addr(0); Col_brst := Col_addr(0); IF Bank_addr (0) = "00" THEN Row := B0_row_addr; ELSIF Bank_addr (0) = "01" THEN Row := B1_row_addr; ELSIF Bank_addr (0) = "10" THEN Row := B2_row_addr; ELSE Row := B3_row_addr; END IF; Burst_counter := 0; Data_in_enable := '1'; Data_out_enable := '0'; END IF; -- DQ (Driver / Receiver) Row_index := TO_INTEGER (Row); Col_index := TO_INTEGER (Col); IF Data_in_enable = '1' THEN IF Dqm /= "11" THEN Init_mem (Bank, Row_index); IF Bank = "00" THEN Dq_temp := Bank0 (Row_index) (Col_index); IF Dqm = "01" THEN Dq_temp (15 DOWNTO 8) := TO_BITVECTOR (Dq (15 DOWNTO 8)); ELSIF Dqm = "10" THEN Dq_temp (7 DOWNTO 0) := TO_BITVECTOR (Dq (7 DOWNTO 0)); ELSE Dq_temp (15 DOWNTO 0) := TO_BITVECTOR (Dq (15 DOWNTO 0)); END IF; Bank0 (Row_index) (Col_index) := ('1' & Dq_temp(data_bits - 1 DOWNTO 0)); ELSIF Bank = "01" THEN Dq_temp := Bank1 (Row_index) (Col_index); IF Dqm = "01" THEN Dq_temp (15 DOWNTO 8) := TO_BITVECTOR (Dq (15 DOWNTO 8)); ELSIF Dqm = "10" THEN Dq_temp (7 DOWNTO 0) := TO_BITVECTOR (Dq (7 DOWNTO 0)); ELSE Dq_temp (15 DOWNTO 0) := TO_BITVECTOR (Dq (15 DOWNTO 0)); END IF; Bank1 (Row_index) (Col_index) := ('1' & Dq_temp(data_bits - 1 DOWNTO 0)); ELSIF Bank = "10" THEN Dq_temp := Bank2 (Row_index) (Col_index); IF Dqm = "01" THEN Dq_temp (15 DOWNTO 8) := TO_BITVECTOR (Dq (15 DOWNTO 8)); ELSIF Dqm = "10" THEN Dq_temp (7 DOWNTO 0) := TO_BITVECTOR (Dq (7 DOWNTO 0)); ELSE Dq_temp (15 DOWNTO 0) := TO_BITVECTOR (Dq (15 DOWNTO 0)); END IF; Bank2 (Row_index) (Col_index) := ('1' & Dq_temp(data_bits - 1 DOWNTO 0)); ELSIF Bank = "11" THEN Dq_temp := Bank3 (Row_index) (Col_index); IF Dqm = "01" THEN Dq_temp (15 DOWNTO 8) := TO_BITVECTOR (Dq (15 DOWNTO 8)); ELSIF Dqm = "10" THEN Dq_temp (7 DOWNTO 0) := TO_BITVECTOR (Dq (7 DOWNTO 0)); ELSE Dq_temp (15 DOWNTO 0) := TO_BITVECTOR (Dq (15 DOWNTO 0)); END IF; Bank3 (Row_index) (Col_index) := ('1' & Dq_temp(data_bits - 1 DOWNTO 0)); END IF; WR_chkp(TO_INTEGER(Bank)) := NOW; WR_counter(TO_INTEGER(Bank)) := 0; END IF; Burst_decode; ELSIF Data_out_enable = '1' THEN IF Dqm_reg0 /= "11" THEN Init_mem (Bank, Row_index); IF Bank = "00" THEN Dq_temp := Bank0 (Row_index) (Col_index); IF Dqm_reg0 = "00" THEN Dq (15 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 0)) AFTER tAC; ELSIF Dqm_reg0 = "01" THEN Dq (15 DOWNTO 8) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 8)) AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; ELSIF Dqm_reg0 = "10" THEN Dq (15 DOWNTO 8) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (7 DOWNTO 0)) AFTER tAC; END IF; ELSIF Bank = "01" THEN Dq_temp := Bank1 (Row_index) (Col_index); IF Dqm_reg0 = "00" THEN Dq (15 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 0)) AFTER tAC; ELSIF Dqm_reg0 = "01" THEN Dq (15 DOWNTO 8) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 8)) AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; ELSIF Dqm_reg0 = "10" THEN Dq (15 DOWNTO 8) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (7 DOWNTO 0)) AFTER tAC; END IF; ELSIF Bank = "10" THEN Dq_temp := Bank2 (Row_index) (Col_index); IF Dqm_reg0 = "00" THEN Dq (15 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 0)) AFTER tAC; ELSIF Dqm_reg0 = "01" THEN Dq (15 DOWNTO 8) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 8)) AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; ELSIF Dqm_reg0 = "10" THEN Dq (15 DOWNTO 8) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (7 DOWNTO 0)) AFTER tAC; END IF; ELSIF Bank = "11" THEN Dq_temp := Bank3 (Row_index) (Col_index); IF Dqm_reg0 = "00" THEN Dq (15 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 0)) AFTER tAC; ELSIF Dqm_reg0 = "01" THEN Dq (15 DOWNTO 8) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (15 DOWNTO 8)) AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; ELSIF Dqm_reg0 = "10" THEN Dq (15 DOWNTO 8) <= TRANSPORT (OTHERS => 'Z') AFTER tAC; Dq (7 DOWNTO 0) <= TRANSPORT TO_STDLOGICVECTOR (Dq_temp (7 DOWNTO 0)) AFTER tAC; END IF; END IF; ELSE Dq <= TRANSPORT (OTHERS => 'Z') AFTER tHZ; END IF; Burst_decode; END IF; ELSIF Sys_clk'event AND Sys_clk = '1' AND Load = '1' AND Dump = '0' THEN --' Operation <= LOAD_FILE; load := '0'; -- ASSERT (FALSE) REPORT "Reading memory array from file. This operation may take several minutes. Please wait..." -- SEVERITY NOTE; WHILE NOT endfile(file_load) LOOP readline(file_load, l); read(l, ch); if (ch /= 'S') or (ch /= 's') then hexread(l, rectype); hexread(l, reclen); recaddr := (others => '0'); case rectype is when "0001" => hexread(l, recaddr(15 downto 0)); when "0010" => hexread(l, recaddr(23 downto 0)); when "0011" => hexread(l, recaddr); recaddr(31 downto 24) := (others => '0'); when others => next; end case; if true then hexread(l, recdata); Bank_Load := recaddr(25 downto 24); Rows_Load := recaddr(23 downto 11); Cols_Load := recaddr(10 downto 2); Init_Mem (Bank_Load, To_Integer(Rows_Load)); IF Bank_Load = "00" THEN for i in 0 to 3 loop Bank0 (To_Integer(Rows_Load)) (To_Integer(Cols_Load)+i) := ('1' & recdata(i*32+index to i*32+index+15)); end loop; ELSIF Bank_Load = "01" THEN for i in 0 to 3 loop Bank1 (To_Integer(Rows_Load)) (To_Integer(Cols_Load)+i) := ('1' & recdata(i*32+index to i*32+index+15)); end loop; ELSIF Bank_Load = "10" THEN for i in 0 to 3 loop Bank2 (To_Integer(Rows_Load)) (To_Integer(Cols_Load)+i) := ('1' & recdata(i*32+index to i*32+index+15)); end loop; ELSIF Bank_Load = "11" THEN for i in 0 to 3 loop Bank3 (To_Integer(Rows_Load)) (To_Integer(Cols_Load)+i) := ('1' & recdata(i*32+index to i*32+index+15)); end loop; END IF; END IF; END IF; END LOOP; ELSIF Sys_clk'event AND Sys_clk = '1' AND Load = '0' AND Dump = '1' THEN --' Operation <= DUMP_FILE; ASSERT (FALSE) REPORT "Writing memory array to file. This operation may take several minutes. Please wait..." SEVERITY NOTE; WRITE (l, string'("# Micron Technology, Inc. (FILE DUMP / MEMORY DUMP)")); --' WRITELINE (file_dump, l); WRITE (l, string'("# BA ROWS COLS DQ")); --' WRITELINE (file_dump, l); WRITE (l, string'("# -- ------------- --------- ----------------")); --' WRITELINE (file_dump, l); -- Dumping Bank 0 FOR i IN 0 TO 2**addr_bits -1 LOOP -- Check if ROW is NULL IF Bank0 (i) /= NULL THEN For j IN 0 TO 2**col_bits - 1 LOOP -- Check if COL is NULL NEXT WHEN Bank0 (i) (j) (data_bits) = '0'; WRITE (l, string'("00"), right, 4); --' WRITE (l, To_BitVector(Conv_Std_Logic_Vector(i, addr_bits)), right, addr_bits+1); WRITE (l, To_BitVector(Conv_std_Logic_Vector(j, col_bits)), right, col_bits+1); WRITE (l, Bank0 (i) (j) (data_bits -1 DOWNTO 0), right, data_bits+1); WRITELINE (file_dump, l); END LOOP; END IF; END LOOP; -- Dumping Bank 1 FOR i IN 0 TO 2**addr_bits -1 LOOP -- Check if ROW is NULL IF Bank1 (i) /= NULL THEN For j IN 0 TO 2**col_bits - 1 LOOP -- Check if COL is NULL NEXT WHEN Bank1 (i) (j) (data_bits) = '0'; WRITE (l, string'("01"), right, 4); --' WRITE (l, To_BitVector(Conv_Std_Logic_Vector(i, addr_bits)), right, addr_bits+1); WRITE (l, To_BitVector(Conv_std_Logic_Vector(j, col_bits)), right, col_bits+1); WRITE (l, Bank1 (i) (j) (data_bits -1 DOWNTO 0), right, data_bits+1); WRITELINE (file_dump, l); END LOOP; END IF; END LOOP; -- Dumping Bank 2 FOR i IN 0 TO 2**addr_bits -1 LOOP -- Check if ROW is NULL IF Bank2 (i) /= NULL THEN For j IN 0 TO 2**col_bits - 1 LOOP -- Check if COL is NULL NEXT WHEN Bank2 (i) (j) (data_bits) = '0'; WRITE (l, string'("10"), right, 4); --' WRITE (l, To_BitVector(Conv_Std_Logic_Vector(i, addr_bits)), right, addr_bits+1); WRITE (l, To_BitVector(Conv_std_Logic_Vector(j, col_bits)), right, col_bits+1); WRITE (l, Bank2 (i) (j) (data_bits -1 DOWNTO 0), right, data_bits+1); WRITELINE (file_dump, l); END LOOP; END IF; END LOOP; -- Dumping Bank 3 FOR i IN 0 TO 2**addr_bits -1 LOOP -- Check if ROW is NULL IF Bank3 (i) /= NULL THEN For j IN 0 TO 2**col_bits - 1 LOOP -- Check if COL is NULL NEXT WHEN Bank3 (i) (j) (data_bits) = '0'; WRITE (l, string'("11"), right, 4); --' WRITE (l, To_BitVector(Conv_Std_Logic_Vector(i, addr_bits)), right, addr_bits+1); WRITE (l, To_BitVector(Conv_std_Logic_Vector(j, col_bits)), right, col_bits+1); WRITE (l, Bank3 (i) (j) (data_bits -1 DOWNTO 0), right, data_bits+1); WRITELINE (file_dump, l); END LOOP; END IF; END LOOP; END IF; -- Write with AutoPrecharge Calculation -- The device start internal precharge when: -- 1. tWR cycles after command -- and 2. Meet tRAS requirement -- or 3. Interrupt by a Read or Write (with or without Auto Precharge) IF ((Auto_precharge(0) = '1') AND (Write_precharge(0) = '1')) THEN IF (((NOW - RAS_chk0 >= tRAS) AND (((Burst_length_1 = '1' OR Write_burst_mode = '1' ) AND Count_precharge(0) >= 1 AND NOW - Count_time(0) >= tWRa) OR (Burst_length_2 = '1' AND Count_precharge(0) >= 2 AND NOW - Count_time(0) >= tWRa) OR (Burst_length_4 = '1' AND Count_precharge(0) >= 4 AND NOW - Count_time(0) >= tWRa) OR (Burst_length_8 = '1' AND Count_precharge(0) >= 8 AND NOW - Count_time(0) >= tWRa))) OR (RW_interrupt_write(0) = '1' AND WR_counter(0) >= 1 AND NOW - WR_time(0) >= tWRa)) THEN Auto_precharge(0) := '0'; Write_precharge(0) := '0'; RW_interrupt_write(0) := '0'; Pc_b0 := '1'; Act_b0 := '0'; RP_chk0 := NOW; ASSERT FALSE REPORT "Start Internal Precharge Bank 0" SEVERITY NOTE; END IF; END IF; IF ((Auto_precharge(1) = '1') AND (Write_precharge(1) = '1')) THEN IF (((NOW - RAS_chk1 >= tRAS) AND (((Burst_length_1 = '1' OR Write_burst_mode = '1' ) AND Count_precharge(1) >= 1 AND NOW - Count_time(1) >= tWRa) OR (Burst_length_2 = '1' AND Count_precharge(1) >= 2 AND NOW - Count_time(1) >= tWRa) OR (Burst_length_4 = '1' AND Count_precharge(1) >= 4 AND NOW - Count_time(1) >= tWRa) OR (Burst_length_8 = '1' AND Count_precharge(1) >= 8 AND NOW - Count_time(1) >= tWRa))) OR (RW_interrupt_write(1) = '1' AND WR_counter(1) >= 1 AND NOW - WR_time(1) >= tWRa)) THEN Auto_precharge(1) := '0'; Write_precharge(1) := '0'; RW_interrupt_write(1) := '0'; Pc_b1 := '1'; Act_b1 := '0'; RP_chk1 := NOW; END IF; END IF; IF ((Auto_precharge(2) = '1') AND (Write_precharge(2) = '1')) THEN IF (((NOW - RAS_chk2 >= tRAS) AND (((Burst_length_1 = '1' OR Write_burst_mode = '1' ) AND Count_precharge(2) >= 1 AND NOW - Count_time(2) >= tWRa) OR (Burst_length_2 = '1' AND Count_precharge(2) >= 2 AND NOW - Count_time(2) >= tWRa) OR (Burst_length_4 = '1' AND Count_precharge(2) >= 4 AND NOW - Count_time(2) >= tWRa) OR (Burst_length_8 = '1' AND Count_precharge(2) >= 8 AND NOW - Count_time(2) >= tWRa))) OR (RW_interrupt_write(2) = '1' AND WR_counter(2) >= 1 AND NOW - WR_time(2) >= tWRa)) THEN Auto_precharge(2) := '0'; Write_precharge(2) := '0'; RW_interrupt_write(2) := '0'; Pc_b2 := '1'; Act_b2 := '0'; RP_chk2 := NOW; END IF; END IF; IF ((Auto_precharge(3) = '1') AND (Write_precharge(3) = '1')) THEN IF (((NOW - RAS_chk3 >= tRAS) AND (((Burst_length_1 = '1' OR Write_burst_mode = '1' ) AND Count_precharge(3) >= 1 AND NOW - Count_time(3) >= tWRa) OR (Burst_length_2 = '1' AND Count_precharge(3) >= 2 AND NOW - Count_time(3) >= tWRa) OR (Burst_length_4 = '1' AND Count_precharge(3) >= 4 AND NOW - Count_time(3) >= tWRa) OR (Burst_length_8 = '1' AND Count_precharge(3) >= 8 AND NOW - Count_time(3) >= tWRa))) OR (RW_interrupt_write(0) = '1' AND WR_counter(0) >= 1 AND NOW - WR_time(3) >= tWRa)) THEN Auto_precharge(3) := '0'; Write_precharge(3) := '0'; RW_interrupt_write(3) := '0'; Pc_b3 := '1'; Act_b3 := '0'; RP_chk3 := NOW; END IF; END IF; -- Checking internal wires (Optional for debug purpose) Pre_chk (0) <= Pc_b0; Pre_chk (1) <= Pc_b1; Pre_chk (2) <= Pc_b2; Pre_chk (3) <= Pc_b3; Act_chk (0) <= Act_b0; Act_chk (1) <= Act_b1; Act_chk (2) <= Act_b2; Act_chk (3) <= Act_b3; Dq_in_chk <= Data_in_enable; Dq_out_chk <= Data_out_enable; Bank_chk <= Bank; Row_chk <= Row; Col_chk <= Col; END PROCESS; -- Clock timing checks -- Clock_check : PROCESS -- VARIABLE Clk_low, Clk_high : TIME := 0 ns; -- BEGIN -- WAIT ON Clk; -- IF (Clk = '1' AND NOW >= 10 ns) THEN -- ASSERT (NOW - Clk_low >= tCL) -- REPORT "tCL violation" -- SEVERITY WARNING; -- ASSERT (NOW - Clk_high >= tCK) -- REPORT "tCK violation" -- SEVERITY WARNING; -- Clk_high := NOW; -- ELSIF (Clk = '0' AND NOW /= 0 ns) THEN -- ASSERT (NOW - Clk_high >= tCH) -- REPORT "tCH violation" -- SEVERITY WARNING; -- Clk_low := NOW; -- END IF; -- END PROCESS; -- Setup timing checks Setup_check : PROCESS BEGIN wait; WAIT ON Clk; IF Clk = '1' THEN ASSERT(Cke'LAST_EVENT >= tCKS) --' REPORT "CKE Setup time violation -- tCKS" SEVERITY WARNING; ASSERT(Cs_n'LAST_EVENT >= tCMS) --' REPORT "CS# Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(Cas_n'LAST_EVENT >= tCMS) --' REPORT "CAS# Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(Ras_n'LAST_EVENT >= tCMS) --' REPORT "RAS# Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(We_n'LAST_EVENT >= tCMS) --' REPORT "WE# Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(Dqm'LAST_EVENT >= tCMS) --' REPORT "Dqm Setup time violation -- tCMS" SEVERITY WARNING; ASSERT(Addr'LAST_EVENT >= tAS) --' REPORT "ADDR Setup time violation -- tAS" SEVERITY WARNING; ASSERT(Ba'LAST_EVENT >= tAS) --' REPORT "BA Setup time violation -- tAS" SEVERITY WARNING; ASSERT(Dq'LAST_EVENT >= tDS) --' REPORT "Dq Setup time violation -- tDS" SEVERITY WARNING; END IF; END PROCESS; -- Hold timing checks Hold_check : PROCESS BEGIN wait; WAIT ON Clk'DELAYED (tCKH), Clk'DELAYED (tCMH), Clk'DELAYED (tAH), Clk'DELAYED (tDH); IF Clk'DELAYED (tCKH) = '1' THEN --' ASSERT(Cke'LAST_EVENT > tCKH) --' REPORT "CKE Hold time violation -- tCKH" SEVERITY WARNING; END IF; IF Clk'DELAYED (tCMH) = '1' THEN --' ASSERT(Cs_n'LAST_EVENT > tCMH) --' REPORT "CS# Hold time violation -- tCMH" SEVERITY WARNING; ASSERT(Cas_n'LAST_EVENT > tCMH) --' REPORT "CAS# Hold time violation -- tCMH" SEVERITY WARNING; ASSERT(Ras_n'LAST_EVENT > tCMH) --' REPORT "RAS# Hold time violation -- tCMH" SEVERITY WARNING; ASSERT(We_n'LAST_EVENT > tCMH) --' REPORT "WE# Hold time violation -- tCMH" SEVERITY WARNING; ASSERT(Dqm'LAST_EVENT > tCMH) --' REPORT "Dqm Hold time violation -- tCMH" SEVERITY WARNING; END IF; IF Clk'DELAYED (tAH) = '1' THEN --' ASSERT(Addr'LAST_EVENT > tAH) --' REPORT "ADDR Hold time violation -- tAH" SEVERITY WARNING; ASSERT(Ba'LAST_EVENT > tAH) --' REPORT "BA Hold time violation -- tAH" SEVERITY WARNING; END IF; IF Clk'DELAYED (tDH) = '1' THEN --' ASSERT(Dq'LAST_EVENT > tDH) --' REPORT "Dq Hold time violation -- tDH" SEVERITY WARNING; END IF; END PROCESS; END behave; -- pragma translate_on
---------------------------------------------------------------------------------- -- Company: -- Engineer: Ben Oztalay -- -- Create Date: 23:51:17 12/20/2009 -- Design Name: -- Module Name: output_pin_cntl - Behavioral -- Project Name: OZ-3 -- Target Devices: -- Tool versions: -- Description: The output pin register and controller for the OZ-3 -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Revision 0.20 - File written, will test with rest of processor; not complex enough to warrant the time -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. library UNISIM; use UNISIM.VComponents.all; entity output_pin_cntl is Port ( clock : in STD_LOGIC; enable : in STD_LOGIC; reset : in STD_LOGIC; data : in STD_LOGIC; sel : in STD_LOGIC_VECTOR(3 downto 0); pins : out STD_LOGIC_VECTOR (15 downto 0)); end output_pin_cntl; architecture Behavioral of output_pin_cntl is begin opin: process (clock, reset) is variable opin_reg : STD_LOGIC_VECTOR(15 downto 0) := x"0000"; begin if falling_edge(clock) then if enable = '1' then opin_reg(conv_integer(unsigned(sel))) := data; end if; end if; if reset = '1' then opin_reg := (others => '0'); end if; pins <= opin_reg; end process; end Behavioral;
---------------------------------------------------------------------------------- -- Company: -- Engineer: Ben Oztalay -- -- Create Date: 23:51:17 12/20/2009 -- Design Name: -- Module Name: output_pin_cntl - Behavioral -- Project Name: OZ-3 -- Target Devices: -- Tool versions: -- Description: The output pin register and controller for the OZ-3 -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Revision 0.20 - File written, will test with rest of processor; not complex enough to warrant the time -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. library UNISIM; use UNISIM.VComponents.all; entity output_pin_cntl is Port ( clock : in STD_LOGIC; enable : in STD_LOGIC; reset : in STD_LOGIC; data : in STD_LOGIC; sel : in STD_LOGIC_VECTOR(3 downto 0); pins : out STD_LOGIC_VECTOR (15 downto 0)); end output_pin_cntl; architecture Behavioral of output_pin_cntl is begin opin: process (clock, reset) is variable opin_reg : STD_LOGIC_VECTOR(15 downto 0) := x"0000"; begin if falling_edge(clock) then if enable = '1' then opin_reg(conv_integer(unsigned(sel))) := data; end if; end if; if reset = '1' then opin_reg := (others => '0'); end if; pins <= opin_reg; end process; end Behavioral;
`protect begin_protected `protect version = 1 `protect encrypt_agent = "XILINX" `protect encrypt_agent_info = "Xilinx Encryption Tool 2014" `protect key_keyowner = "Cadence Design Systems.", key_keyname= "cds_rsa_key", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 64) `protect key_block rPCxdLYFNrOCXsrnMAuCo9psgAmvp9l1YWr/rhk0oMjBWTHWDZHhCUSulxsWYiSywS8h4fy75C9X XwrDWQLg3Q== `protect key_keyowner = "Mentor Graphics Corporation", key_keyname= "MGC-VERIF-SIM-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block ceiBKPmZg4p11VE3c76n9v1Wod0FzUCFpOAvggUUHcBUAST9QQPAGIoESRuvGnx7soioB3QtqT/S rUargXIVgShMH+oKIZKyW2Ktwmwiw7SwbD2cMFRlcDOzdAc17hEFZHihx/4TCS9ls+fOrDjvfm8s a4OuC68ZKb9F7E9iBqU= `protect key_keyowner = "Xilinx", key_keyname= "xilinx_2014_03", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block RuGVuh5BKUbVn8qn2Bw/oXGQ0sJa+kvJpnkiTXtgrMd+NfLzi2Xy4Q26vfMeuesiVpgm7QbuCL9P 9Zb/IVO0QmpxteA7JNSAZtGsU4Qqs5ilpRppX1fj1qfW6DJBdMtNggJS/GnCso+7Xe6TmtkelZg2 AhYvXuDUsAOA1CQg4028Qnru+SvwwGtGrEFzRe2YjYQg/7bO0Yl0kd2CMG832pKv98LUA7S5isGN SaNK+bNlUEiXZPiHaWDTZKJke0XeG4/ll55tUIvlQYgiGW/1t6OQzrfPw7qWxpY+L2dQrzZMW/17 Uw98KEHtj2T5B1Nrlo8Suq1BeuQUMSt75dRJDw== `protect key_keyowner = "Synopsys", key_keyname= "SNPS-VCS-RSA-1", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 128) `protect key_block vPIMfamqzCzfBRj9hlOgvft6wgqAgnXrAm4KvXtx1qvxsPaL4XVITiutV3rf6XY8LIBNCbRCmizQ 73iVGccdreaEkuksTeNAyCGh/B4AnDaZJaZYxc4yc+GNGKdiphtKuyFDJ0C9Z1rnQnt8EzVwJxGf xFjMyVc4CP2cg3SoqBs= `protect key_keyowner = "Aldec", key_keyname= "ALDEC08_001", key_method = "rsa" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 256) `protect key_block TU3XRkXeelBWpjvkPgkyvPcHJW87ASYwjfwgSI7KsKOkieG5pWo98vBYY8/YANjUU1wNj7mQQxox vgDVVLcWZf9xBk1SjLLag6TOjsun2XlcA5cj9Eoxi2Az8mCm1RR1b475gI13O5rZHnTIiNlkTov7 oT0gOUEfUFsJO8Tb6t9obijU22rYVm9Nhy55C7AxjcOq+pyQYZ8kVgqdNPwQjGvFlAZKQicgpwkV US641FzvqqefnH4k67aLYcABSgl8XHcho373IqKtlQGaegN9hi+YgyDgVMFFybjzII0i+yHchClx M/yXaeAFmCB8gB/CZGaHbLGiyfdg0HBwwe2bJQ== `protect data_method = "AES128-CBC" `protect encoding = (enctype = "BASE64", line_length = 76, bytes = 16960) `protect data_block xl/R5DK5VTjHCOP4FC97BcVbucKvYP3H1yPJf6fsRwbMBNCMM7zICNvwJIjckk6TqJz3b6lCxwf+ ser0jsqP9B6TADvfgqXI9KpUQ/GHTjbYh2QkcQB+V5+8mLcTeSiTh43xbgTnhzD8X3fEpsxFBmX2 nfk1PedYvplJHaE/DJKmyEIgRVh6EfCr9jR/n7ze1p8n6xfqORMvfyeo+WzBWxTaR2kPyMRZHQUK 1FNGXQ2RmGxVTuqsyaRmFpdBnwhDDBiweRtPxdzf1ZAIELnzO3vFYaVePBZX92HyyGKv4AxfjVFP KGlHmP16ZDBzyz7L9RTQ0S7ZMtCnRalxb5+qTKayQ7G0RdFS/vDt5w/gZJVsdOlNKKvPCJK/Covx iPUm5Mg56+6lc2/DOe7mB0/mpRtgjYpSK5jvui02fq3gh8HDZniP0nDTny+ZE9AKV1+dcHnppO8N JCWNJ1jeZsy5bA2P3swsFfKwFIxch80G4fn03wq+LKoxj/esa4VtwOHnTvoRy9VKfrXszqgTbjdq hxBtWPxdunXR9R/tNtzxvVK/YGDCYa5k/BmQamVgSP66HfRCOmp2KqsBLn0KxR4HMaSO+inxYxls XvewvY6Qavkh+uRomOk0JairUQfM5GNIy5oBImzG2c3QwhZ+04b5YEcob8G53yX1na+0xe+mduwW FaYUZHNC4P1KKGScKWaYYgfucqw+gEbfovv0YBVYTDeQ+4AbWx5UMO1AA8Jrfz5Wm41eL4N5yEpv YijLGYdt+dBRE7MrMtNatJlqn0zpT9kEhQhxbb/NNAyxWG6yNSWbZIhhmlBusPMURoyAdJA7d02q AJrWlOKB3g86Kqu0asrfbubqBvTTSdSDwV+VNFpU+NhSkN61mWchC6/iiz22LMAvGb08g/7JkCaP lhj/ni6G0FKABo7BIor5bmMQzEvpKivy/QrmjULRAEhBrpffFP7ICf5BJJwg1Owt8QdVyRZrFdb5 yOyG7ktblg/I0Azmq45g08eIFej/Ps7r5/J+VZg3OCApmXmfsqkemUVfHlRG7R+U8KEOg5uxvCZP S3pt06VwoukWZXvzDCIGhaZBMhK1GzxhrfZctqc8tuxV1FlLS3pcUJhq+pArlCPgZfzT7K7OxwZR 2Ga0yQvgIofqgyHmLFkyMF4JtkOSr8160QUvrDfhQbCucgbnyrfU00b8D0TvfhqfkkzX98P/K+9o hxagGzWyDrv0Y2Uh/oo6XUqF5lSPRpH4xh8EnynDg1hFoSo2COeDgix7pwcDBB/IsaYJZY09JAA4 Gu0Upx273cqu0gVuPVU5cmsLsbdXt3TFX4Njm3uavhbzHhoLnOndl8Ic0In2Zsnjh86LvGT65NuX bY09+0+stgqbi8NIVGFt7Tya9kcn3clMn58VimDFZkbcUbXdHrSOgKQqryeJrP1aBgrw+EPlYedK n+H87TNVj4jcz9dkecyicYK71CjeIb5frxH0x8tRuIjBzsun8OgDLCC65o6I4h6UoNcmszFjx9Rg 7cC7d3Xgqf91fsVOX5ZFQqwZ22nb6AkkVULwoiouRRZxXH9DOnd+vGpnhagXjXXimQFCJqaIZPvj myJBshHXw4VIAiL2YA34RDTG459AsbHcP6EiHXQtknLaYFPJdFdZajJrp/9QlZKFmGUJWArs3jvm 2EJ2uGH0ZPWik4hT73ZC2YobtwSeDk/f4ZUV30Zxt91i4ws61DzXWg8ciV9Xecl/HhKUgPNZ1rTq dO3PJJHs+HrX4jFnT5iWgdRx3CmFm2LS6k0pApTY1m7Ko62o+8GaJcfLqCzxxeKP0NJrzSvDcSBs OQnepYodmpERKm0mLPxKcP2oLzzsXoGpeVYiUaoI2IUgClLVfF/I+lcZK18vhj6mGJEbeI2U160u We4QccA8VVPKYOBraignd7h5AsbSibXC9afMkO5xWffL9MDW7Pjw70ooNpruTguT47bZQropND4j B0TQZuFBv3aUMQzDwvjkg4TmL/86OoSn+XFm03/+jFl7xJHgEbdNV75aQUAW6BvWoI3+R4a2QeX5 pkI7Hek4s7TGhLzWjNHUAxkO7fg5Ce756sxCGgySglhKSiinehDXijYaAHtzzYirUwoqDkdMZ8Gy H8AhyzY7k3lZOceDzDGl3se5pV8eovJd1eRLmKo4CsTnnJnSzAA81uUFo+1ZCl37Ky9KaYHgnlmt bSG6/y5lsDKDomCF4dqC6TmOxqBbKWsQJ1NGuPNj2bKtambioViov0awdFxbc60vBha5dShNTbLJ ohNEG2LfFMVMLsSzunpoZ8smGl1KIfIO1lPgMAVsk6POxBUS5K//MQPgbKQFLlCtAZmFH8VH/CNO Dtw1FZl5oKv78F5insi3Y4/Nh1LrZdr20mj8ykJiqw+eoOelYzlugpL98UjYl/5VzNten+7KD47u Qifg7EgxgZmJesTHxV5KHBm0OknIO/dyUOXPOx+0Y/KkwVVbbMsen9ApmspnmpJtVM34138wrK4q WBStLWNdtDuFvE+tjVMXM7mOaFwxq3WytGsETvSSSgfh7pVq6yj+N/kF1ILXQkvs9+xoqhQDCXhJ ufgiJW+B/qIjNvPEhFaP3T0pgfryGhthaeoFU1c1TswnVDEYnsXj7Q/DZMu15NTR2tJ6AFq2xcIh V7x9eHMVDJq/Ex/SLKMrgg3nROQiDosXftvWk7h2Zi9XKgFPxyhODrz398Q2BdodZbGRISAL+g3r ckKsirgLc9q68qL97joIRvBW62GHcWxlc+a63kgx7ajVfmpgS4thmP7P/jkKV+rAPS0xsWQ1Bsx3 DkkUKmKkMC/bDWj5/nZff9jd+Yl1xTgufRezjYLMXAkX2mdiqwe0JHZkyK6awScTAft4eL4cZBj5 NwrPylZJzcBrYxjSwYONoGY3BA3SgCNuwpFJ1ndGcXbTWWKYIj5DYLmNTep1UUx7REAteNqxy7yc kTGEphhPTOSsStSIyv94W6zL8B2OGxOGBquKpw6Nb6pfa0yXqS6C24OZryLZnJvP63e0IeYJuuEK 1HCvaB1bMDYHmTBaCCaSyL5amLek9T110+uUDj+Mo5ojuans2suHOgE4HBjKds4jUu+r3G1ZdFES Y0ba+HkI2kGiCWC02RYBOLpkIUCPyh9GpNpO/m5KSc+5LodwgLqZdg34rehgJuYOvkDV7XAM4fBG Gf9MvsEyqsv22Dh+INJfCj/xhhYbLW04xTXScyng8lQR9aATU+nA/4mrvvgKdZldwAr5wNB6iUrl rQ/xrjVfq78MiubWYtJev2rh5sGbhpYVq/LqEqUXL3ScCG+xwiaA56/rEZnq0ioiVNVZU5RFN/dS LYQRCATPfvoQ3roMK83xJQixD4mR3+tX6Wej75Z+wedKdw9M9O9rPfpt2uTK182LLcr1wUKutHT7 pNsWKnK9OzAXBik45cYhpBtG8VYYgCPA3DIh05RQcqDBlYNW6xjT7FCHn3g9QgUFJwOw5GApB+WW g13IJd1AQV8TzTBN/e9wjSWq8MEyv784ARmIZqwaTL0pawboRIGvx3VlbIqcYuLHXpn0V34QjO3z Ut0GG4kdpfSpMfI3p1+rAwSiwQNlokVWdEpwWVhzdNp5bdyUt+R5sRSF+WMCEN4x3HchXxiB/Ymm RZ9diYbByJNoJjxtMQ2dPb5bcJtWl8byYVLiDwJH7ATur6oN0KIeKNBO6faOsUeh/mUK251iFcjF hb+OGjMzxvlkKo9D5cwVwSZJ3t+O8qTU0J5bR0CqFVYbjnE1cqUYiE+Z19gi00M3eoa7+jOY3z4Y f1Y8zFwehISBsTQNEfbhPT2LyYTEFcc/4D3TKdDmpLnkHDYikmgSbXaQNrlSXX/fbJVV1hJio37m YRhK8SuPiuiZVeZjRQenvEh9fTesGfxXXIUqr8URCfPNSvDgPsyvEddnvs9u6Bs0u52S/6GdHbYb 0CTDWTVFHctN8NPFBsoYZeGna4LIGMmlDkCV86r+ruUTSQWCP/TTH6idJbQw1WKDY79sCbxxWmNJ O+44+cece0CWQg+lxb9xwi92ujf9rVUfs5NpWWTCFPkDMi3VNIoGvbMAG+H19hVwcq014+EsDLRk dJC2/l4s8A77Owyjny2DDRuLaDc+tKaQ0wP83vB27O+Avu8jfydkGcTAQiDlgTIJQooTORfr7+Au WqlGnPGo6p3EcjQH9Y0xv1b4TGnsYVVaWIV+KCr26r7ECtns3rHQ2jVD3zDA6j2Bw6wanoMOhM2/ pqY//dbIJLdEAUFI2NDjaJsuaCKT8s9QEZhVk6FvZVRhocdR2CfJS9fIMN2leeYdF/2kt96dTq+K gCFawYxLouBqijNOAEXiv+CO7lsHXYIuOnDzBbNb+V13kqZVEhsJTrBM0OMKlsivqp0fxJohlHcu G2xyHi9SJATUJ9xsxR1eNsAUwbsaNYE08TUpsr3u3sNfFGYWtVIBHnZo8OTvMjLBOH5/Wgs6AyMl u+BRMUM9m7Q4oVbaZpb22AlxcWVfbCXubjnzTTzNRcHGYIflDW2sFAoHICCVek1H6/lU80/je1H5 qGXr9AN1JoVe9XlD2Oil5+Qfb/jKPZicZOPt0EGref8CJfPgI8wPS0J8lfpXoaBAHmd/b1kZRumQ Ya+2W008l2htbaBsmxpWe6Vw10fLFwzBMCKu2PTKurCkaTH5VU7t28sa3t8aLFoRgjYAbtTM/C5H yItiP69A+zuQjpyKo67UEdC9iQ2EVP2/gKRj64+dLypTD7T6uQlR4NTbhCJWEg+ftXdxeCZQXN+t OzhiAKfxKGpUn7HpIjM1jAoXycsu0KR1KbuOxuW7ec+q24EsoAxBSYzbzZyi/DMeaiobKzz7A2s1 KYj/bj0+KOeUNV40aGplEeiiIhSSL8pliot7+4aQ9Q4B5JumZ/4m9Zew79yro36IBBwcHZQpRg5+ e5/wTc9pnkW+rhCgHd1a3oenE1Vy6wnT5Mpf9zqD/Dye4EvYyhRjyzQIrnLai6sciCweCppZYROB 7Nn66e2VY7PUSGN7hfij+uD3FmzLIpA8s5+ALPsWNLZN9fzK/F6o8IHQhgD/4u87YgXoOqR0ioTw N+2MKm/gckOGA5rQlS4qmHWQj13vAXTAo2fj0iJHQ26RbllRv0+7QkdWJbJigt8+Yldsq5nt+Ae8 LDPQWmdsLirltmYnUPTWYp7p8XCYcZKRD7BByOAbAvdnHdEWVhAzIPrc1NaeEk+k+ODCn9UTC3u5 94u8zOod6XoQztzWo0oM1xugcGkDQF2GOd45r8zhFYP4rywmp5nuTZB4SfZjxLQ1fx2qDy1tLy5E uaDZLcxTU50LyFG2HNyE/MgDOr/fg/RMtuwzBmrSx898jZBMGPRMR6A7N+LVJVJI8aYqSCQC8oAC f0kONvCV4MMJsTUhxC2QiJjJu+93ZtXEDqCpvwr1nNsF8BQGoAiHfevkdz2z42saeLfHiAkiYkqk dcRQQMALagxu3RKPmt/oy+wEcVeHejWbEz9rrRwXcmhGnPMkehl4cqVcJyeH1PBILBDKKpGMYWgf px+zcjfW4IQJ+KabRzX50PltKQPhnWALdxoLOxyYlNWhBDIv/eLder30UeJJFQqlaO6qr2jJBGYO Erk5pgKelwcPoHAQrFAdjhmyhWMR+DuIX+i2Q2C02IRLN1ghOuZybjo+VfFjQ0F6IjckX+PVXVtK JOES34VUqY6k00dJFjsO+FZU5aaWNQNj3/e7ZoF1xOS+mKoMtZ4xVn7SD1ua4hDKtO7OzBE73a7Q yfr8F0PO6tns5pxdedBXU9k6Wuee87Y5v59iuHiDONu2+FNH83HxsxvC1+QRFpLUYcbQj9/zSO7u poX4CBbHQG15KfUk1kVT3LQg2G0RTxkolYyK6qzq5IgEVLIjme0ZcjXfmiBFwqqBSZTG9xena8vc GuvvI9Fi162GS+FuxGDQaanKIb3q/x13RApsIBHL0RYkgj6caiNerfCJMSA8nEYqWovI9TiYvs+7 YvkOWnaSJzm/Fuu+yPV8VIdFNbqIOiwPGqESYgbDn4/EajBZgaowTUHoL1GkK2OQURZRv0uSQKrL cHY0410wGoX0URmQf5a0rwmcG0KNLW8vKhUjRKkiHoYvZU4dZXtVF4qu+l3FCIIYBM5qmdJC/5KS 3Acb/vWxuPh4FyQx3ovLeACNQt9GRHr9lk35YweJtwpGkBlrEl/pSL2NXMfJqAReKgWWFu1pHURQ Ghl5rdrGOaz5DA2XkbAFk/3AbVqjnwqS6AR8Pw6pnP+umiKQV83Ku9D0HTArAN6FspxPklebwl3Y 6CQ42kx1dCX3rOH/j525bnXnCidUCMgSYDiHKg7LiJazJz9/u2SFq1zZVdnBvNkFdkM5EOu6KRW/ 1RtW9vMyro0Y4dcI/loznXm5MR7tG7CFTPA6coGdGkU8M1s8TciphNNTLzPaQSkRcag69yzjGUCH PpwDmEoBfM6nFbXKzIkJcKFsLl3Ky2CMK7woGLuObc9uZHoN5dOW4ZMMT5BWBF4Feie5fOisOabw /0I/CqLoATbWGr7tYQRr/M0/1qIHJHZ0BFXMbsiG4rFqKvL2NkAFezwX+NIQYuM8ewIS1jamtg24 rXqxpeXYDossrTrhlq3seaHkBPhP4gJ4jo0EPMTEwyzK3lSevYk8h3embx6dhlCo2aHTNSv471nN 3jAmygAmEKyx30W30HTIouoEZTo4sxZipbpjgCbBC1bY/uC25Q8O0TAK/XS4VIvOjj05x0CjuEKI +g2n8BvwTJ5rTmWVtnwpomyB7wTgAnhga1NFnZC8af0iL1ECybDhCtZnoKZEnf4KmhvSI2OQgbgh K2fOE9Otry3ZB2qxWgLEAKwF2mhV7mLLALQ7dnz2zntfnr4OA0l1johLZaT7N5aXMNMHzLeUtYmO uH4P3pKCQUF4ComcmxNIdvrasP18dPtmTjrURMOhLQpt12LYn9TMDVGnfh46iC2VJPlXY9BN8JyK /QiorgKD7zRySfiqCrzl97VIREF/xd+AarM6035cAlqW2EYROdKhyqBgwETsHS6LtQlvNO3gfbRZ mPOHkEFlGKVvswPIUh/seFUUaI98njc3b5wQQwhLA36T7nZD6M/O6XSo1NAG7JWdJL2BzXhWEMbs xsFGvPjg8LhfZKLfAu1g+aosD9gVG51Ak5xDtXBxAg6PWYNtiSmqXG+Dt9AtX0oshprt4y8cv3cV Y5dzgJCmTDVi6mz5p+Z9Os5VK3nLTI84xCFXWrgsZcS+Os7ySfCs6f3/dolEXFglv5o9Y9tZF7lo wqRMt5Y4BH0VAAhg07P5ZaWlcXWXEh1WcuaRcvk+08UP6AB9q7Xj0ZcrZ+TyVwdCMvdwnGHPTdL4 yuupZ0SX22kWo1i1oDihlsw2KpLBk/b0gIjMeUxuTsar9FKh4fu/P2nnjx6AvzzlFColDeuhAVxW UcNjASk2QbKHuMr0hJf3JM+Lad5nsPdG8g6YWSDlov6PRJlWKUodHbb18ndHRoDB4+1IS4T2wANy /BPsm5WryBuCBqt80mmIXwlkANKZzwNEUAfZsjVK0SlKtBSW08Bh4J2s2SmnLg3FB/zSbx8BzVOe huJs4zWSgffOtn89Syht2W0gcdBCheWCRcPjiSXaBgJqLlImrDyOvMeVRLQTsCqRPMg4fSDj7nol 19slXyQ1Lp5J+mjulRzOLUsrAoXEdEog3XPHnNtmUgJ+2FNkkvjIzTHF8YwUQRrnxblQap9wBckH Oxm3dDMJuPftimoUVyhUoIYNOquyyv/HWmpPH5e6LCj22WwSMKHq+Nyb+088OifS1Sdo0MnUy5SH 9xg4Jahsf76MPHy01qQsbvTvuoRDLWTZ40BlobgJT1O+KYJ5cqqoz0nv8hHzofwRjlCy4NvY80Og 6Mx+CG0Ktu5c7PbsnZvNRgnGz40/hv6FIw+563qjFLyhv3aYLu1hFsnGGrzN/lj7C1bbHSGvIx97 uNCCUkbot6uLEtOtowwGbgYbw/HGF4RGN85yKw120dnSZEwCCPDfOve7buoqlvRepbIII2tU3TUz sxghJpMz7GVaJwNYr7j31Tw4hCL6Vxpn+CkiCIBeILXr5sK9shMxwdWvMGKSr79ejI1rT2iSbMLp QQVtLRoxZD6WlxZ+9kWZ3BBFDhaENnNsuS/JLftevGed+Gq8N1+QZruc7dACD62IP7Afjf5Et7md INPGwoSpe6yuma5Qf/6DVojRo8oqgzK0BhrYBUxI7H2EPCVqnolSrchNM33Y98mTaIe+rX1Op8JS aoZkMfTwEE/a+629BrwfABq+PFFBwU0Wp0I5wRFaV5mfcA4UQNz74Y3IisRK4hEurA/P55/r8vn8 vJnc5zfBuB2llLfyv+Bxp1n2X0+2ffkIxySv+f+DABKZ4LF0rdqxcV/9FDE9c+1L4DaXaDierG4S NDXBg3MQdT+a7Of+66stRnm8wvN7Wbr4neHzKNix+bDLPjXR8t1omiAOECNaYJEnJ8HDlabKwSee rbjENwpf0p3M77SJYyUWvw8hDRSFPwp8tnZAJjgPXbMPmSpvS5B7aCNtLr4KYONuy70RFdft/3Ss Qb0R7OJuXqyvk0aP0K19y5mjC98ypQfOia17jGy1EAMsecYQiF8ExotgYvCWNQCHvYUV46JEtoT+ LZ+nfdEZfRv8r2ny/ufjXqGgHzrhwnetI1a4f6d3gm4Z0QD8gHDgIPBKPjIoH2wLhWJhLv5osKYF Czm1+uw1DBmvMimJCXv0w0O6TBiEJj2S3bX9RfB2EsHSYug+6nzndZ/zniYt8giZ3IXSa2KKFBCR chF0VfXMUHXIq+b/hDnWMATlk5NgxiZgGD8s+2PrZ7jjRr1ANuvlfvrMq3sRonD5iQy6wFa3A19R jOz4pOf/SMSSQ7XF9gU3hExQESKqsnU6CY8gMnXsGCXSsif7d4eHrqwKxHeHlC/DEuLXw699yQDI 2K3/X61kiIbkyn7bbP5SYTyaa6BmIzTfAS5e8hl+wD6oZEa+6HjWEVXpx8smhmbRlcVdkTOhSArQ Nblc/YTYJFpuPDDrGuJWJPTGsyXbT0ASpMd5bRZgT3KG5C2UKwToXm2p6nqNAiEk/DoHoatTU6h8 K0j4fNGxZW8Sm6X83B2PfMnfZLKNW8C8iiM0CeBi4GrTM3M9IWtBL/54NEQV7useYB/XFWFcByWa xSKXQmsUkSN5JNzygHZht/+t388dvc1wMRibo0f1WJkzZWFDywvsG5BCTKKcCZdgeIDwjGwmcnC+ 1Q7p/P8Y37DyD4gc5EhwWVZiTqpz6b1ELGaSsJICxHsCAVzYoNSClJiMb94h19di9nRxd7tM7WSA XD8unj6NKtaf6//cdeDWu0WwXRC3kNxhSNvYQz6UBdR6t0E7tS8wnzltVf5KCgoy6TqDBq3otPv+ 4KDqqQTzls9tlZcMzEz/9vRwt8uAxdWtdnq0g83ewufnL0UBFE7DFNCaK/2HxDWUT70rRZ1AwHRx 1J3oTwJMs2UrwNstYIQxUaMavYbMoss1fiqMFjBx2Ca21j5Dv42YLuk225mjvERMwGmPT1dK1fOf ZOnNrV+DbHe/fbj2fqLWszM0ccJTm1+okXnlWZtkilJrncjRQysy3uQ53BTvEgXx+YY6HKjdVu/w zy6Xbk/52rq1xv1m3NcIgCsYxN/bL9Fp3j8PY4GozOkAv16mIkqSOycutY/3/u4TRW78DKTAebob ZoAXWOc7v4Jgw02Y9rvS6OD93mxAe3Ktg2ZnkfbRe2xV14fx32LfCvOhZJLWB2/NrhAOixQ78S3O C0so440NSuVeswKX7lGD/FhUtrEd7KKEEcP1EPZuu+yOnd6FDjMFqeF9uUBKQjdtmw/Cmdv1oNGT Wr4xSX2MtbdpMmVYm1d35/t1/I7a3zq02AaRmwwMHvdhtHjkKCxEhnbzBpgBgEMFOvhQxmMgXITo jVZ1f/I3X+jd1F6PmSM3XEOcTwAm+ilifOlN0eP9TaFteB6W14Nf8frZQ8wUp5immekZpfUFzqKB 8WriJoEw9QZQrx2QtT/D+pUcX5xyX6DYc48qi+VDq0+tGBeDAdX9cc2PTx0pBQjhWdM6rgvtWESD RkJ11aATEK6pFtCZXvaBTH6SFS2LpwxFLkolJ9gZ165rA1nCqV1NGX8YlUPhdWgAUtr7B17Dhgxo p+/F7EfwFjBQeyKDuYuNDa9aLvAHpBXWgrkUBEGHVW5LhnajiBBiv/SazXmJemtYTu4q+zlsNXXa V8Ii/4XNaMclSVYKqpE7kWpA1EYYEvpIqCjHheAHzBMIGNpayyHPr2wMUuOhSCtt1XmL6EmB/g5T F+nUeV0EJyRJUCanzFn4yaFhu+KvpCsFEmis3uY0aRmX8yeZ48fUexkumG5l4Qe0pXszB1AMJ6Cb fzEkPpr383YGk5dQfyUILOQy672eqIkbI7d0lXezNaJOREoYqcnzI0QLSaSWvCPrWSCzhS/r8VFS gqeeTZOnk6Gom7LSBFvUerLYHOhxbwrxxv/es3i/+s/CBMv6ry6SnvHKuYF/2Vk49QTNNiDXWhlb 4ofgEFWBzdP1I0Hb3xEwICgatxqPaEA3DkKnnjm1PEWgcBBbXsXdD8XEmWXLR94XGd8IpeOIXjKT VIZ1t0Uq8b2GRVql8Tnslg3yEYwlXFOSoTycWuYoqAzP21FHYBPoU/RUy5xIMHvrrhq7mI9bMBL8 OKY9aY/xCFJpPOg18RiYH+l7g7ZHp05DJUe4cFliF0OuDXXPCo1TTQhmzts1mTUEG1cUL/gcUA/R 8LvkE46JZE2p3UkaaDzRkFB3qEKyZWuqJXpo+mjLuG0KNJpu3iNNHITb2aRLbrGmQUvw4zJ0UWFH NBdkLOEqG6LPGLh9RqhYv9KsJjqU1DeQYBjW6MC2/iFfEH3wHtYWSNwgP8CCGeCY5Xp89nzEdDq1 kPE1RN94InCQIbYBMSycFNhwGpCIfzKSZfqaDs2gR7Ru4pOt1oW2AnAq5aq4rsUTKQi1ZiOIppdM rmQYNC1XYX8/X+I/NzUEVOs2vgHI4wo9N4dHxKzc+U7oM4gIuv/kb48hGKsPUPbr7udwVcD6dn3Y v7QStj+v5mj1GM/+/AgDvSVoWAaXLqh59xCNsAwuDOvfwcgjQ+KTdcrsAG5E0WvOHFobrDCkyls1 gcYZi2yU63GJgFl2UzDUmApm4JbjJo8Vk9HwLhAuJ6jDvi+InCIw54ZTizul0bZPO/EDoBoXeTrn umIkBI9EkPp/qDAYQPPcSUNRxz9MDoDPxLTSL//RgmSL9YOq7Sz7xsoDrmC/DZ4mkZxvobQv+mPW raz1sL9htt/EG53PSKVGXgNLGaZrycSB4o5xTnkytZWjFY64xJJPPooWg/G3CmMi0v1FQCudJUXc WyAMb/2Exh0ufNMr/7earvXzA/tl+TpRkiMvk/JL2FPeXz8un903Xt4E7Fm7+qLuid1fPrsdHHvs xyalwePayCOzBTtS5WD8qKCJci5P4zqixM01SDaVaegyXCNcy28jAPgg55mE+pzknm/SChs1IKGU v3lla9+QUQ0UHQy4k+8DkiWgHVxXP0I0CPaFDhPl4bxU2O7OUsUNwnp9J8TWfaxM+t86b50yslmH SVcOf9I+ZVZWPU5duOjczoaPa9oZw6aWrwbCYyrttw9mpRnMkJuYGSi/rFfrHcm9CiwdOm/B7ByA 3+aOTJRuGTqPD/ZZLrlrc479LJwW0ZBI17H2yyz6dEYYs15iJT7Y+sBLE5x+lM7bymAqNyglGsY1 IhqZgwJJovrTNBQoNAxsqXcvXEDUuzNVwd5cs46Hxd3mkwrlltFz3XzAKHl+WwWgQ1sj0a9zDhWJ RWAnN0aCH0j4vCi06dRIaAQH2RR5dNo2uy8wXmm8bquGSlv7xYfZFVFvGBranWZx3q2McEEwrmr8 zWvtB6axIKfawa/niogiEgM3AjEvCFJ+lcfszHF+LXIBlWagdi9oT3VWFYUOYA8FYGHflyvz9ums Yw5A4YDjnMnNHwoNOX7FjlZ/d8uOur6trvYxHwNpFWFqesnzFVHPskKOo8yc4ezRXXAWQDr6ueyF d8o7jQmma9Rkyr4eW7OEOFeA7ImByt5pDWZJIANZZtG0gLQOjvnegUHLqPWZF6g679ss1zNDg2v7 MO1yMBv0F3ikJsC57KL63nahH18TltH0VPNij56am5FRrDacv8woH+gXEFbgzZ1+xpZ5gSvMyeE3 MbzWHGbzYYpMw6R5r0iumgjJmA6f7h40XgsluFxLniRigIZNXw2eCWk5H4caCwBip5cqDDvuSPde 3xeEL4SyUrY9K8IkBY54caaFmJhlMkbtoniSRcUAXa5hcANpH45eKHNlTr86LtGSgjQWPXsQfvzM b9jnOiXr60FX1uidEGUNsOAq+t6uMeXeI3WEMU52VCZsThZDZ2ojskztkQWk/8l4tzNCrgCQVcIo NJc4y4+/JYaDv69RU91BiAp83StRWYQmN1XizNCfrXvbYXXzxtpzRytQi49rUMIjjMuFiO3o6s35 1loHD7oRBzfh96FkV6f8PuNU5hE5utP7MvNj1uyVLvJuauCMNzVje/x9WaSE1n4dFGjUvntVV4ZQ uHyuwCRmO9xp3l2jBv3+b191b3rYzatf98rCtiHiQQ/oI3Yp3wqH+/H2UCwmADQ5eWcPpJ/kUHPQ mndXq8ymXxMdJl9jO7x7zASZlqGRrbW5HrmMWdhCrU8P5I28uxC3LnQs31cZ9LanOH1WPRpV0nWc AQPFbEoLIoEwkszjScicGrYVc41lTcLACfikBu7X4ux8Yp3OhiH1gW7V504Xy8a5PLq73GQCO4hn ImooaFVXIqPWLZtvsPZlUyCO/JDRS8MJVbz5qGInntwXZP0FM5kc3xfnXxJF+NMdAmwXrLOHULLA a7n9ZwXXziQ1krKmQ0yIu2c3T0H43GuDKedn0aeXpfHtAaHzAncEHk2y9etY4DR7zCFWSKEDqQdH MB80zwn5JSksIh8kMRwBDADz3ltB33d/11rPeGyoQZzT2XHBExwfD2HVTo3Es+OrkDypf/BIpqOA 5f/jE2K9IWv1VECTY4IeLV4k6jipdX3m3p25iTrWunqmaM3tsGZwlH4zBDsKbplr3ivdPveEieCp yOQpbggyRik8QtdR6rfRAlizBvT4ezMd5MjzFyLEhHnW2ovsRvjI8nm1NYK6rUa4XHNJVOxMJWex PgQi+QqRS8upfbvM4LqD1TE/QzJFXkuD3K35PYoFOzRn6eKNopUm7WNLZqS805sro85NPn/6Ok6L joYmag/K8Ql3ni6a+wKzBpSkrEGN+SCIqQBJ6BhJQiL257zpzxmAYNcQ+WP5bw4h5Md4KyWtjuuK VV8usz+ew/YRiPx4j3naUUovqT0OfbUBh9GAf+Q6TPgWfntn54Yx5+Lnk2TBdtakuwylQMdllr+V TzCBRHa1TZmeagoyoipk1bvshPBFCXpgseqQ1dFxfVJCEKPHZNeXGOhdZOelsbg5sONsNoQwWzlL Iz9foh/AEPjqyIcLogK5I9QuJlNTUSK7I14Ip/XkpPhtIZNcvmvUem1kn+W2ICDs54BWYoQwb+Ds C6gBWorigKlUcnFTHxqwIQ91aAbFWkao5M2eboibjhwWyLrcQ9+h/wPR2ex1zGFwz8jEd5d1iHcs 2VvMn0pIVElC4LU4fLrEua3NmYkUqiiD6656oii3H23iImUz/orqyauEq+/cM5e3604BVXs5dhVY e/ZNtoprjdPtSiv+lpl3Oo7ddKLKf2vXG2oMpf6mR9v+XZPKNyz30KuczMWvySryIOoEooDazZMQ Sb3dc8H9BDJry+su4vIVJNZ7AUriLD5JNPV5NHJ0Jeom1vSrMjXSggAI7pTw2XRvsN+jm08eqLP5 sWx7nCW7XiCtPUgNxVOB9EBfETCLyTeEYL3IpYeh0ikwFMMLgunnXvlQDl/fvWFdhuGjGtAEyW2L ad6xWpEG15e3QaQQrcPa/BbiI0JH4VTtk4vCHRMGR79eGqmvDudzxVDxF913P7JEOODq3ieh1cSr 165nufGut0B2Aj1eAjI0HYF64qmiCn8rVKewq1VLzz0WRiPE8xMfuCewL5ZsEy5arj/zZ/Y6nhoG 1NOJE5DmrwpYgbfASJVHFIXnhXjF7sNGSMLb6TFZU6+X7oBCDyVIpYEuzNAHL/CPSLopxwhaP6Ia eqVn5d+SbyqwA9a95sPnAu7VL/S20Le3b5SuVR8q7UkAHmz0M7PicaXw9SzaM9fUhq8OVqrr8cHY 8PPT5Xw2+WRzndweFTyDkoVEvhNXbmlIRVv9/NT3s37vmlC/ltMq4tMugtHsnCl6643PavoycSJ7 zEEWOiGcy89VQoKoqG8ZzjNdEMgQtlLtkWQ4ZUk8PACh0voipuF17zeDm0BU2yWOOwJW9IfCA88e CksRQ8JMsCaxHcLk4S9VT2cSyk6KoYlON3t9YC27x2iv9isbkzhfZK0jXKq+oOltjZHERuInWtVz egq4XRWO1AWjY6LES3xYD/opRLRlgEwsJF8WrrqBHlSg6rL71tMNZhxn1/ZvMgF7YqFi7A7dYTk+ BV6qczxkLsHd47Lp7+5suLyIcvKcsAZ3HyvEEdKBhvj+/Gjpxi9aUj2fXyB5r/pv7mvuWQThznnv w/7l335cpixTXUxKhU6xQmf5Nxc24ja0MVN50rdUWWs5ltaWWN+9WFBzP7B+dXkd2V26CSr3bwWe 0JMK3Pd1ea2LmBfOE91CJVR98ULzo5CJfr3DY+mHlvWAfHWg1vTzrvliDlyfHmkqax71NIq+sbbP EblH/iTVHIOXsrkhFNtilPE8KTsbhdaGGUzj8w0SNI6+8NnSjEUuOQ1glrao3EcIUtPhcMhy7bO0 UMJ0O0zoLtsjGuGjqdKfKx8ItdbNLID7DP00/pcBZba4yZ+enqNXxbA46c7nw4q5MZt1A4XBT+PR 1JOGCgSWlXw5S9nWCdFNAudFgqPpXnSt8m9+r/vEjePa4Snne10OpnERthwmCcxsg9y2EmWdhncB 3pbK5RFy0UGHON19y9pD21ILArriRfljl6z6/RFKek2146hK5iojH03dtejNyYz5PekWnAUm2+dh Yy2eFrvDJOAjyr7KCm3gnEjuQFIYpfqOPIBMaQJYnzhnB1wwiGRLt1voWE7CS629q2SW69RDqXhD frH7CSK4EVgGHNr2e1Uuu7FuPdO3DtYwR6qhSDCIDGn8HJ3vxQE9v+6s7gx77+/S3UmEHaoUj1Ig gGPBZ1OagSJZo+TXNOsvtPFtpIrolSu0o3a69OPfjTLe8meEZ1LiD0SKTJO4+UO3qjdyMDoK5P7G K6yhE0RKUA82cI3lGEdNQps94blDGhygrOJ2lTRFf+tD1xVKMU6vRBs7iRTTTpRLVraCUdGVBS+H ia1UVb7sOLP9eH5EBp7vkEj/8SqzUYv3ph9iTUro0SUxaDgCLnI84RnTU+eowNYNqP8TBzb1pffG 8Aaxv16ainGbhxz++zQ8REujI5T+2Fize5TUV4gfVLfuUdBzkuvWHw56Nww9avgaMXuMJWJrOYwH XF+h3bqXuTwecMmRjQHfJb4pZ9m98OCfC4xMECeJ1/oj1J+Bobn5hbARNbu3XCdZqAYJ2PwssrIV 4FlP3+wxBiYAZxogAFDYEwvvyZkUBqDgSd5EmyPlni6PDApUrUTUryXEVAOvOf8M1fkgZZajANpA dM21LGD5m0h1f65uOzmECKClh6Ea44sV0c4Kqw6JPMHlQ0nfl1ypH5tI5cP4z81n9MchRuDnZ4M6 KP5hcH9WBQfm/+K2bGWDOsR1+OS87Qm5WDffMBYrqHq7rvpKXSfF8Vr2WoFiAYnZnVcGNxeFSOJt JdYLCMQe3m8FNVsaSFeUhJzyvPqTyzM8d3YAEiAJJKbWXp6ySNtJjQTd1K0ryocxyGNm8/xomAvq byo8UAc6dw88cUf2emt0lhsXiDXyUHHOpA5kzHWVieZkEI1TMt0APFPd74+gwx/I0w9LyRrUuVtx rh9H6cCvwvqX0Fw+A/t5ZTxIuqUZRxRlm4EQRFbbfrR1+zM/0h5PC65tNSk+4/bDobC2ckgtx40J FL43Ne7bjU4IVcXQ4sLaOlW2DdJ5DMrIkI2uZMcxt2p7+xfFQV2XKgvvZS/svOllZz04Yx3sIoL3 /m7n9lnBP2FEPCC6yia3183HkqHNRAuvMPhbPyI6H7hlwFbG9x42iSGGmCoIQhFv1LSSU+n6N0Ee IvPsDN3ijcg/6ptaT2WNK7bocUo96GxUFamsstY0SEQA3RFYgmLJ0RwnZ0EpKjx76xmcNMdno0I2 TdQEgaTx6LuWKvtbmUEJiglWqGTFRVjtmVQfxH3JJ2VWEuSNv+PbAo30qwT1Cz345u8hfIHHQr9F xLiRKHgw9lnzoYeO/AirxG+3vpYvD0JT6JGZrmkkLHP/9OkYix4y8P7/pRPEXGORhJgQtqyt0MTD pgHlg2N03siw44oNlNCx4Wlh8uL+7aD4MSBsKt3DEdrokfvHpd6oEU0CQ3ln86scNKObnQzqLZty Fw8MIQwsqKTQQ1n5P5UziSvFAkrQjpCdCBm2ApNiYhDam8kpo8lQSvHWbV0LvprAu/hY425Eug2J nkTi29UxCfQlKBOaVdUQG/4GvVE6blOZpi6oEyvOIh8FEqWtVxbSbhn9jFrzqSKkpepNuuQ6CtfY qOP5bLC50mZod9ozPGlaGLF1kfeziaLAQ38VduVCiCMyUN9jgtdAFEVVFA64+IueqtqUMYP6gwA+ X9+Z7KXMOvOB3efD/LZBfMPEKINkmb/5edzypfeNh8b4fZIcxkOvbIQW6Xo0fiTb70ul/ze6XdCL HLy7FnQzMie6NMLG/W1Gr7Fn2HIYb7S/bEsAPZF/V5smH05La0JedXM3Q5cqWbVM2cBhlBV3lyvD VQTHjglXBNZXLgbBpKdiu3BLGUPy0ANAKg4Cj87SMXXWwTVTUxjXHNWLfIPIXGAtfGlvD08jGWQE LSFKt3IvsikcXJ/0pAfxR7PzRMF2sTchpxUUx2YqRJMrntMxYaByJYUTxrCuL1oI5TSnbR869UEZ FIipg/q/eqICSTPKA3VB2JWQqYHShv4jQpLOxZ2sDuhjVvP2jIRA6WrKw/SUir+h6HxeEbMU3Qwn POpsNcuCN0abhMRxZT0Yg9NePyLKUmX7Ssb7AtkGaBfBM7ibT1lfsfMCncMOixG4RE1S/WwMQ3rv eX2Krpds7zz1NUmirF/6qxUrzFhipEbWm9tswNaiRAQja7aEi5EAiN06ZTMsfkZd7UZ+vtt+/AGU OlovBhO7urInFakV7vNHCv39j6Xce3+rzwybKhqiccA+fZahesG+qHOOeLUzS/30IqkS4uVhdJm1 y9LCNT5VBUJL1gOnf/SSQVT1LQZTlENXACXNVASWVik7gnPZFwzJgPwjT2TaR5x4UpyCdr4D7Wfz c0zuts6guqtAnW6FTD2WouxE19D1IIezYVFZpeQDKZjGn7FXqUTUAkXA61hfjVkEypznL1qlJMdJ GLBc+0yR6Z0OEyNuHzghfltxQdyrtSf4RmZEsCqVU9w6QviCb+FyZtDLMU0THFBGcb9oGDJJykMI vR1C1NxhUkg8UIyTERnFT+etiC4Rgzrws6BYF4HvS85uwjnk3D+7ajTfQU/YLj5xZSr2f3W0Iy93 ighTEl/LgaIPK8pYEsnKb+vnnP5zoQZf58KBsOjQHRN6inYkqP9zhWIuPPyoY3VIaZBfuhY9O1x5 CAvuk8G1xP6jumDEYizln+yzgMgsGfTGvW3tiaRj9B0p00fq4JmAdPtM7ODuHSqKBadQr3qUAbuv ynihCyqVftLp+V28jPp5jva+tWaU+teKncOl17tSfBmBAnOdwUiSuOJnPPgch19YcJbJ01rO+g8f cXHQn4b78JHNyz5qhr4fHrJIzTKdUcmvfM0qfl5R3uGbmZMgMZAIuIPQCJB+EMhJQLxrtmbcLPiq FsvE3fn6kRzFikRaBb+UWuUtgQ4tMqvKImSivfUGSmdPA8FZuQpvi/3hCoM+l3G6Ik0DpLlIwL6F GRzcJKwgafc8KF0qgR8M+BMMxBgRoLhmhrVtkqLuqD1WshHzW5stx8MOonOwHu5liQSC1Ov1PHdu Nhix0T8o9Vk6Zb9YeYL/cS4JrdICmXY0LeAeFir5UmAU7iDVWp0aqLaclMxmK9A+lUTkgoY2ez1i q7CL1RuDR5qTzYgI2rT05C+QO4vLMHPnzd2jalCWq95uD6HFahtPkShCK2cBfXXSEwi3Izua6PRl NkFmSYd6dfYfWDiSLGusfMqcu4OxLTkAcGv4dS5tKcSom5CEgk2F8jvjw4lvK88hqkDXwjzWWajB ToBsUUx+B8h3c5KEBUWBt3WspvEtI6NvOtVxx3hJDPlauQOqlxN+7YdB5wvBLdEm1HAUTyPGYqoM x4dkQBX7v9/BJGT/ui1wwHug1bY2bfI7HMiJRLr4rOZNOhf6VP0wDH74ngDc5XlsHIIeVmZOvyTN B88rD6e09CAyLo8fQ6PXfa5NRSdqN9P8cVythRQ8ksDH5kamHgkcryuLDMiU035iDPbojm0C5l8U LRzRV5lPexotKkobjT0uLIEe32LVFJnPNGIVPHYCmYIpYzLHL+eUsYNOyrB7sq4vKt4fBTqus4u+ pyo2imANuCX9mk3VFN1/t+ztBzXS8Gckdy5lOumwOFxh2418enLntixmnwVki4kpvn5i2MDKUp/f rCNkjqWwbkWuMtS0jH4MEBrRhDJU5jZo3TWBWmjvBuY1L2j9XN6UJM4VQxbO7SWdti+uAdgCIFv6 AVnU6OaqppZxvhOFisdMs/Xtj3UF29TJJuB7JigvY0DfL8OR7tI+lj+2xvoZpLUxGThYXW9jWX8u YL7uE9ewNc9gyHrq/CxOtimawsF7bR0HzK5S8WoL0rIjyt7CQg3UDWAS0hJbp1x3A2PUYV5wCWs3 r5RegeyXIAzF1dPMru7pLPfAtG5AiCxMgqOaC5JUuJFAGWNgl2xjJB4k1jOUleaJLDdhLZ7ccvmQ 7E62a6UKcbAj/RD+Sq2ENJEYuCigKtU2oYhjsR4R6nqvQcO8mdxEnEMgw32zvXLMRaG6YQ6a8IGG eApYV4JYPkwpFrn9k9hvbHdqY3gHqrtm0IWvemQbk9LhzzBEM4epap6QmcgL/kgEOwEAJhncKn8I lBG+ha9o096Z0EitkMBRtq6WZGIZQZ0VjAlXPu1YMaUvRHh+egNtnUJCafRLMxgOcLfDwYaG2Eo5 bxz9IFuSb1te92of2Ywtvy7SReZ7IaSqpEng0SRk2U1HhcJlkLiqa4PkhbcbZGRDGO6gKsHDgXec fZL024RiI0dflLjyUpRXbLDLRej8DKiw8rMFuH265wBWgl0g36rMdJAwOJmpRHTzoCybHW6eJl9l uSWfWsJewv4B073RJWLalN3XdgHloVDEb4ymwjZ8PrQhcK2y5wdeksJx4oMGuCVSJt1ZZboKvTx3 cJkXdPEOXB5xgtZI/RCtKLQe3Z35Q3Yc3LcsM51wpp8VZ2g+LV/DzOCgsV8QTos3pdSMbMOAgYUr q2ZnC6dXlSDgejtfu+OoffKcIl/a47dw76EGx4Ai8P7zh9PkBXP/Uu/WVY9NNSg2Hkwz2k/xkR4e Ra8ZW5cUBga8qveyrr05i57alzlHhI+yq8e2tdT5hT4MSpalDewMDBVqYeLx0g/Q1eQxRKuOhR0F Vj5fRw8+FjgTNWRvs1YotOroM9MoPjdpcpHiIhgRmZl9gZfGsiqYMEx4NZ8VhtMVcrOM50YZNGax p6sZrt5lHFQRchJoqYsMLhXrLm3XWQNwVYSzPwwEEmpZIAwDF+Ukx1pxA3b0ei344OVyQsLbmqTJ P/drbhXVLlfO4/1AuimSatVpPbmx6aGHJAdFjqUReDxrM6ZYSufQqd4z9Mj+EtSN5WZfUl7CP+tl uTyRlTpLhJdBtJIiI8z05eXQQAGPIbHQGE7n7ic7vHzpV1g4CI9rdHKR6PZLQdO00ol7DtSu1DLE NGotL9rkc56XW/jwBFmz521/sRilyiHodxE4xGc1oldnnJp9vCXdDb8Q259Ro22gtKxYiVyhaVry 29xbNQHSW7QaRhhpxHmwXp8fmYST7SiHNsU8fU49i67yXJEu2Ez5MWTRVD5asQTcniuNja42K464 Ayy+1/YPG3aZDVy6rXo/ueF/+cW6wcIDLXVjjW0GTMWp/s5N1rDO5WkUcKOUDVY9CL/wLN0xan4T va7jx7QvDtVMHxJ30u1kMyqn0YZjz0BunF1XUqtl4a7IF681n+9L66h2d/9s95OAyj/kFXSUxN7V zuH9QSG3l/IxVHSxixxJIb6iOPw99EyeN5L8X7+LQtchDwko7xGQnZ2udKOhUU1U4/pGky+lpXF8 7ucs+sZnJKSHXd8/hVlqTesfHUznSntP5oGPhO3sHHp0g7EZPuzMM3V16GluHwMlxtd/5hDhiRvI erge9YiLvBcF3pI1e/MBVBpwNA5cPEMoTAsUyP8M8Ql54OvUl6fp1oY/EDP5V3wpwIjjUhUd3TLx AaPlrhc/OhfFVtgBndlI/ILxCktK2s7qRcheJrWqdgxZFd98Oa9pdzReEFqdpvWn3qV2EOPJP0gg RzDi9b4x+d+vFVbxibf9X0/RWZpyPQ1RL1Bn9Nuc3+V9ZVdzWGtRMlGD8+Awl8tpOxjeBJyyiT4a ZnLHSkMXdj8KHuLLEB4A2O58qFePZI9QLi2ueJt/D3sKXkEtWjHxFwTmeAXQOy2ROv7ENDfbrrru 7zXXz7GzDPsLFBsgeJ8CO8iEdIIw0ai0mFLus8LVVJyrtATUxBMbIcTG55F5T4gJ4Efs2F4nLoZ1 EjFxPdsjM4PkiYBFiIVmvNmjwiBgAbSP4Phcbd9oVXNGEtnF2bGZx80WB3uB3RWBfwnqULYIIp+c k/hwG/u2V5u0TifCEnqM5XWpHxqIy8H/WK/NPmEvNdPBKJakuB6vLflnpuHPtrtuJih0yKdyEJao 72V/dMtlwvB3pCkVP83lUpEmGMYFTwE0DWJTj2sHZdAmzDR/BywcnlPcaSMPhTco4fyeRaJAQn52 Pzk7MhuYCu2ruKX/0Ei1vOBh7p1GVgfkXenVNDR488j7Ex3OmPeTEsksZwOe7RD+ZwINfiA5djJV MsxVG+f6hAY11uiSnQuu8TNmUPYumHf2EuCIaywyRv0u1eROC81h18+LOLViS+hJiYEMBTFArziU Fdw/uYUtDhPDzfDn+BWHFnBmQhsTi/QUAOqXSmUg9uR9NOB2/SUdcNG1Zz7qWmdM+gYDA85wppVV /l+TP6FezMCBbkJnTAb4B7ebbcsmHMNGnZVck/BSPO+Yl3mlvk3S2eYpat2RdyoEY5IQb0ceATIS 2nE0eNj+yJWUNFb8VSePxO/ehPA5tziafAIx6Q1R5/IBCjtsLscLTL9W9JKBa5B/aldjLuVxzmsk vivPGAYURQaJ10wtT0N1qNP1LqcZAwnUlQRb6OkOpgMzthctPn29HG6oJBe0Rd6cnAlDLCO0Fijj NO12tiu/BSf7K+b9D+u0prf5BD9FEzJiD9Qyy4RxOp86xW5bPTfJe8MixZIZQqniIUeZ8p93JreB EcEl8ucm/G5UzWA90xnPH0UhVLu6nW5DFrWP0+sl08+Muzz6mjJhoCrpBCjqyZUkwLIp/jhu87+l 1ubs4qzjZKJx0s091EtJ7KKOk9M7AMlBbAwe47Y7yHE4TnFk4krPa4Ox5PjtfCZA97D8hBf8DauF EMTu9qv/au92RaKqPSPT63YIV+11WGE0yVI3osYcUKaQkbTMxFXI9EwGyXAzxSpAoGwLXEc9YB2Q I/DEGQNXn8zhPKd5D1FaoYqUrbJxd7CKyg31R9jMCPsjIytZKzMI+2R2zYn7HWwMvWPqDvnKL+Tr Yqwt/pM4YcYDDZ4/+adDC8ydoKCAq/PrDpAaVrdv5tlXhTsaTy5JGPUVh0QXDRUb8Ib77XWfjEcR tpSZdLMm+/HiV1OLV0iMe2NKigs0IeXXczqrKJA7ssZqkhAvwdtLeiFbdUcLugI3AXPVrUZvBVdJ K1Z/RuSU1SfgN2ni6Iw8Zv/49GaQOc5iJiN1QXuIlP1LSyOqodQnTgx/Ls91HR0aHcZPL014dCfl W9ythkr/DFqWUC0FTXpE6SZLbMoN+ODbx69VLpi0M3E0cnFYQ3PK7kw1Bsc4dROUN0Pj6b7RsjI1 N2RqVLtZJCl/26s9S6Q/vX/jZLbDTITEFYmOB2VWUA3fQaBbvz1WG6vOmz/2WUQ4UTje/gakrv7f Wg4U3z6U53wU3kXUrO+d/DGkvDIX2PHLw2DlD0xfYsYRxBK11wO1iDojqO0oZ0v1cTu6GguvWSmV 6CcOeJrewxUMb7b5+MayMOkVEduVbZ1dfFi+udSWXrelSSIVpPVc/hKgI6lJJJl6QR0vrkqCr1J5 oYF8wSxSqvbKY/egrfxeA4xavOd26WOQe+zzqMEw1AYR9akj8fGznvZMvi5IkxCAUjsuUxwfi/uZ 6TbRGKWCz8txD4gxV+wRDLRIYKZJGI8OhMdfHCcNdQ== `protect end_protected
-- RGB2YUV -- transforms RGB to YUV -- Y = 0.299 * R + 0.587 * G + 0.114 * B -- U = 0.492 * (B - Y) = 0.436 * B - 0.147 * R + 0.289 * G -- V = 0.877 * (R - Y) = 0.615 * R - 0.515 * G + 0.100 * B -- -- delay: 2 clk cycles -- -- file: rgb2yuv.vhd -- author: Sebastian Weiss <[email protected]> -- version: 0.1 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.math_real.all; entity rgb2yuv is generic( width : positive; resolution : positive ); port ( clk : in std_logic; red : in std_logic_vector(width-1 downto 0); green : in std_logic_vector(width-1 downto 0); blue : in std_logic_vector(width-1 downto 0); y : out std_logic_vector(width-1 downto 0); u : out std_logic_vector(width-1 downto 0); v : out std_logic_vector(width-1 downto 0) ); end entity rgb2yuv; architecture behavioral of rgb2yuv is constant exp_width : integer := width+resolution; signal RsY : unsigned(exp_width-1 downto 0); signal GsY : unsigned(exp_width-1 downto 0); signal BsY : unsigned(exp_width-1 downto 0); signal Ys : unsigned(exp_width-1 downto 0); signal RsU : unsigned(exp_width-1 downto 0); signal GsU : unsigned(exp_width-1 downto 0); signal BsU : unsigned(exp_width-1 downto 0); signal Us : unsigned(exp_width-1 downto 0); signal RsV : unsigned(exp_width-1 downto 0); signal GsV : unsigned(exp_width-1 downto 0); signal BsV : unsigned(exp_width-1 downto 0); signal Vs : unsigned(exp_width-1 downto 0); alias RY is RsY(exp_width-1 downto resolution); alias GY is GsY(exp_width-1 downto resolution); alias BY is BsY(exp_width-1 downto resolution); alias Yrs is Ys(exp_width-1 downto resolution); alias RU is RsU(exp_width-1 downto resolution); alias GU is GsU(exp_width-1 downto resolution); alias BU is BsU(exp_width-1 downto resolution); alias Urs is Us(exp_width-1 downto resolution); alias RV is RsV(exp_width-1 downto resolution); alias GV is GsV(exp_width-1 downto resolution); alias BV is BsV(exp_width-1 downto resolution); alias Vrs is Vs(exp_width-1 downto resolution); constant CrY : unsigned(resolution-1 downto 0) := to_unsigned(integer(round(0.299 * real(2**resolution))),resolution); constant CgY : unsigned(resolution-1 downto 0) := to_unsigned(integer(round(0.587 * real(2**resolution))),resolution); constant CbY : unsigned(resolution-1 downto 0) := to_unsigned(integer(round(0.114 * real(2**resolution))),resolution); constant CrU : unsigned(resolution-1 downto 0) := to_unsigned(integer(round(0.147 * real(2**resolution))),resolution); constant CgU : unsigned(resolution-1 downto 0) := to_unsigned(integer(round(0.289 * real(2**resolution))),resolution); constant CbU : unsigned(resolution-1 downto 0) := to_unsigned(integer(round(0.436 * real(2**resolution))),resolution); constant CrV : unsigned(resolution-1 downto 0) := to_unsigned(integer(round(0.615 * real(2**resolution))),resolution); constant CgV : unsigned(resolution-1 downto 0) := to_unsigned(integer(round(0.515 * real(2**resolution))),resolution); constant CbV : unsigned(resolution-1 downto 0) := to_unsigned(integer(round(0.100 * real(2**resolution))),resolution); begin process begin wait until rising_edge(clk); RsY <= unsigned(red) * CrY; GsY <= unsigned(green) * CgY; BsY <= unsigned(blue) * CbY; Ys <= RsY + GsY + BsY; RsU <= unsigned(red) * CrU; GsU <= unsigned(green) * CgU; BsU <= unsigned(blue) * CbU; Us <= BsU - GsU - RsU; RsV <= unsigned(red) * CrV; GsV <= unsigned(green) * CgV; BsV <= unsigned(blue) * CbV; Vs <= RsV - GsV - BsV; if (GsU + RsU > BsU) then Us <= (others => '0'); end if; if (GsV + BsV > RsV) then Vs <= (others => '0'); end if; end process; y <= std_logic_vector(Yrs); u <= std_logic_vector(Urs); v <= std_logic_vector(Vrs); end architecture behavioral;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; --STEP 4 --This component takes 2 mantissas that were already equalized and adds them entity expanded_mantissa_adder is generic( BITS : natural := 16 ); port( man_1_in : in std_logic_vector(BITS - 1 downto 0); man_2_in : in std_logic_vector(BITS - 1 downto 0); result : out std_logic_vector(BITS - 1 downto 0); cout : out std_logic ); end expanded_mantissa_adder; architecture expanded_mantissa_adder_arq of expanded_mantissa_adder is signal sum_result : std_logic_vector(BITS - 1 downto 0) := (others => '0'); signal result_carry : std_logic := '0'; component class_adder is generic(N: integer:= 4); port( number1_in: in std_logic_vector(N-1 downto 0); number2_in: in std_logic_vector(N-1 downto 0); cin: in std_logic; result: out std_logic_vector(N-1 downto 0); cout: out std_logic ); end component; for adder_0 : class_adder use entity work.class_adder; begin adder_0 : class_adder generic map(N => BITS) port map( number1_in => man_1_in, number2_in => man_2_in, cin => '0', result => sum_result, cout => result_carry ); process(man_1_in,man_2_in,sum_result,result_carry) is begin result <= sum_result; cout <= result_carry; end process; end architecture;
-- a D-type flip-flop with synchronous reset library ieee; use ieee.std_logic_1164.all; entity fdc is port (clk: in std_logic; reset: in std_logic; d: in std_logic; q: out std_logic ); end fdc; architecture fdc_rtl of fdc is begin i_finish: process (clk) begin if (clk'event and clk = '1') then if (reset = '1') then q <= '0'; else q <= d; end if; end if; end process; end fdc_rtl;
-- a D-type flip-flop with synchronous reset library ieee; use ieee.std_logic_1164.all; entity fdc is port (clk: in std_logic; reset: in std_logic; d: in std_logic; q: out std_logic ); end fdc; architecture fdc_rtl of fdc is begin i_finish: process (clk) begin if (clk'event and clk = '1') then if (reset = '1') then q <= '0'; else q <= d; end if; end if; end process; end fdc_rtl;
-- a D-type flip-flop with synchronous reset library ieee; use ieee.std_logic_1164.all; entity fdc is port (clk: in std_logic; reset: in std_logic; d: in std_logic; q: out std_logic ); end fdc; architecture fdc_rtl of fdc is begin i_finish: process (clk) begin if (clk'event and clk = '1') then if (reset = '1') then q <= '0'; else q <= d; end if; end if; end process; end fdc_rtl;
-- a D-type flip-flop with synchronous reset library ieee; use ieee.std_logic_1164.all; entity fdc is port (clk: in std_logic; reset: in std_logic; d: in std_logic; q: out std_logic ); end fdc; architecture fdc_rtl of fdc is begin i_finish: process (clk) begin if (clk'event and clk = '1') then if (reset = '1') then q <= '0'; else q <= d; end if; end if; end process; end fdc_rtl;
-- a D-type flip-flop with synchronous reset library ieee; use ieee.std_logic_1164.all; entity fdc is port (clk: in std_logic; reset: in std_logic; d: in std_logic; q: out std_logic ); end fdc; architecture fdc_rtl of fdc is begin i_finish: process (clk) begin if (clk'event and clk = '1') then if (reset = '1') then q <= '0'; else q <= d; end if; end if; end process; end fdc_rtl;
-- a D-type flip-flop with synchronous reset library ieee; use ieee.std_logic_1164.all; entity fdc is port (clk: in std_logic; reset: in std_logic; d: in std_logic; q: out std_logic ); end fdc; architecture fdc_rtl of fdc is begin i_finish: process (clk) begin if (clk'event and clk = '1') then if (reset = '1') then q <= '0'; else q <= d; end if; end if; end process; end fdc_rtl;
-- a D-type flip-flop with synchronous reset library ieee; use ieee.std_logic_1164.all; entity fdc is port (clk: in std_logic; reset: in std_logic; d: in std_logic; q: out std_logic ); end fdc; architecture fdc_rtl of fdc is begin i_finish: process (clk) begin if (clk'event and clk = '1') then if (reset = '1') then q <= '0'; else q <= d; end if; end if; end process; end fdc_rtl;
-- a D-type flip-flop with synchronous reset library ieee; use ieee.std_logic_1164.all; entity fdc is port (clk: in std_logic; reset: in std_logic; d: in std_logic; q: out std_logic ); end fdc; architecture fdc_rtl of fdc is begin i_finish: process (clk) begin if (clk'event and clk = '1') then if (reset = '1') then q <= '0'; else q <= d; end if; end if; end process; end fdc_rtl;
--Copyright (C) 2016 Siavoosh Payandeh Azad library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity Arbiter is port ( reset: in std_logic; clk: in std_logic; Req_N, Req_E, Req_W, Req_S, Req_L:in std_logic; -- From LBDR modules DCTS: in std_logic; -- Getting the CTS signal from the input FIFO of the next router/NI (for hand-shaking) Grant_N, Grant_E, Grant_W, Grant_S, Grant_L:out std_logic; -- Grants given to LBDR requests (encoded as one-hot) Xbar_sel : out std_logic_vector(4 downto 0); -- select lines for XBAR RTS: out std_logic; -- Valid output which is sent to the next router/NI to specify that the data on the output port is valid -- fault injector signals shift: in std_logic; fault_clk: in std_logic; data_in_serial: in std_logic; data_out_serial: out std_logic; -- Checker outputs err_state_IDLE_xbar, err_state_not_IDLE_xbar, err_state_IDLE_RTS_FF_in, err_state_not_IDLE_RTS_FF_RTS_FF_in, err_state_not_IDLE_DCTS_RTS_FF_RTS_FF_in, err_state_not_IDLE_not_DCTS_RTS_FF_RTS_FF_in, err_RTS_FF_not_DCTS_state_state_in, err_not_RTS_FF_state_in_next_state, err_RTS_FF_DCTS_state_in_next_state, err_not_DCTS_Grants, err_DCTS_not_RTS_FF_Grants, err_DCTS_RTS_FF_IDLE_Grants, err_DCTS_RTS_FF_not_IDLE_Grants_onehot, err_Requests_next_state_IDLE, err_IDLE_Req_L, err_Local_Req_L, err_North_Req_N, --err_East_Req_E, --err_West_Req_W, --err_South_Req_S, err_IDLE_Req_N, err_Local_Req_N, --err_North_Req_E, --err_East_Req_W, --err_West_Req_S, err_South_Req_L, --err_IDLE_Req_E, --err_Local_Req_E, --err_North_Req_W, --err_East_Req_S, err_West_Req_L, err_South_Req_N, --err_IDLE_Req_W, --err_Local_Req_W, --err_North_Req_S, err_East_Req_L, err_West_Req_N, --err_South_Req_E, --err_IDLE_Req_S, --err_Local_Req_S, --err_North_Req_L, err_East_Req_N, --err_West_Req_E, --err_South_Req_W, err_next_state_onehot, err_state_in_onehot, --err_DCTS_RTS_FF_state_Grant_L, --err_DCTS_RTS_FF_state_Grant_N, --err_DCTS_RTS_FF_state_Grant_E, --err_DCTS_RTS_FF_state_Grant_W, --err_DCTS_RTS_FF_state_Grant_S, err_state_north_xbar_sel, err_state_east_xbar_sel, err_state_west_xbar_sel, err_state_south_xbar_sel : out std_logic --err_state_local_xbar_sel : out std_logic ); end; architecture behavior of Arbiter is -- TYPE STATE_TYPE IS (IDLE, North, East, West, South, Local); SUBTYPE STATE_TYPE IS STD_LOGIC_VECTOR (5 downto 0); CONSTANT IDLE: STATE_TYPE := "000001"; CONSTANT Local: STATE_TYPE := "000010"; CONSTANT North: STATE_TYPE := "000100"; CONSTANT East: STATE_TYPE := "001000"; CONSTANT West: STATE_TYPE := "010000"; CONSTANT South: STATE_TYPE := "100000"; SIGNAL state, state_in, next_state : STATE_TYPE := IDLE; SIGNAL RTS_FF, RTS_FF_in: std_logic; signal Grant_N_sig, Grant_E_sig, Grant_W_sig, Grant_S_sig, Grant_L_sig: std_logic; signal Xbar_sel_sig: std_logic_vector(4 downto 0); -- New signals used for integration of FI(s) in LBDR module signal Req_N_faulty, Req_E_faulty, Req_W_faulty, Req_S_faulty, Req_L_faulty : std_logic; signal DCTS_faulty : std_logic; SIGNAL state_faulty, state_in_faulty, next_state_faulty : STATE_TYPE := IDLE; SIGNAL RTS_FF_faulty, RTS_FF_in_faulty: std_logic; signal Grant_N_sig_faulty, Grant_E_sig_faulty, Grant_W_sig_faulty, Grant_S_sig_faulty, Grant_L_sig_faulty: std_logic; signal Xbar_sel_sig_faulty: std_logic_vector(4 downto 0); component Arbiter_checkers is port ( Req_N, Req_E, Req_W, Req_S, Req_L:in std_logic; DCTS: in std_logic; Grant_N, Grant_E, Grant_W, Grant_S, Grant_L: in std_logic; Xbar_sel : in std_logic_vector(4 downto 0); state: in std_logic_vector (5 downto 0); state_in: in std_logic_vector (5 downto 0); next_state_out: in std_logic_vector (5 downto 0); RTS_FF: in std_logic; RTS_FF_in: in std_logic; -- Checker outputs err_state_IDLE_xbar, err_state_not_IDLE_xbar, err_state_IDLE_RTS_FF_in, err_state_not_IDLE_RTS_FF_RTS_FF_in, err_state_not_IDLE_DCTS_RTS_FF_RTS_FF_in, err_state_not_IDLE_not_DCTS_RTS_FF_RTS_FF_in, err_RTS_FF_not_DCTS_state_state_in, err_not_RTS_FF_state_in_next_state, err_RTS_FF_DCTS_state_in_next_state, err_not_DCTS_Grants, err_DCTS_not_RTS_FF_Grants, err_DCTS_RTS_FF_IDLE_Grants, err_DCTS_RTS_FF_not_IDLE_Grants_onehot, err_Requests_next_state_IDLE, err_IDLE_Req_L, err_Local_Req_L, err_North_Req_N, --err_East_Req_E, --err_West_Req_W, --err_South_Req_S, err_IDLE_Req_N, err_Local_Req_N, --err_North_Req_E, --err_East_Req_W, --err_West_Req_S, err_South_Req_L, --err_IDLE_Req_E, --err_Local_Req_E, --err_North_Req_W, --err_East_Req_S, err_West_Req_L, err_South_Req_N, --err_IDLE_Req_W, --err_Local_Req_W, --err_North_Req_S, err_East_Req_L, err_West_Req_N, --err_South_Req_E, --err_IDLE_Req_S, --err_Local_Req_S, --err_North_Req_L, err_East_Req_N, --err_West_Req_E, --err_South_Req_W, err_next_state_onehot, err_state_in_onehot, --err_DCTS_RTS_FF_state_Grant_L, --err_DCTS_RTS_FF_state_Grant_N, --err_DCTS_RTS_FF_state_Grant_E, --err_DCTS_RTS_FF_state_Grant_W, --err_DCTS_RTS_FF_state_Grant_S, err_state_north_xbar_sel, err_state_east_xbar_sel, err_state_west_xbar_sel, err_state_south_xbar_sel : out std_logic --err_state_local_xbar_sel : out std_logic ); end component; component fault_injector is generic(DATA_WIDTH : integer := 32; ADDRESS_WIDTH : integer := 5); port( data_in: in std_logic_vector (DATA_WIDTH-1 downto 0); address: in std_logic_vector(ADDRESS_WIDTH-1 downto 0); sta_0: in std_logic; sta_1: in std_logic; data_out: out std_logic_vector (DATA_WIDTH-1 downto 0) ); end component; component shift_register_serial_in is generic ( REG_WIDTH: integer := 44 ); port ( clk, reset : in std_logic; shift: in std_logic; data_in_serial: in std_logic; data_out_parallel: out std_logic_vector(REG_WIDTH-1 downto 0); data_out_serial: out std_logic ); end component; signal FI_add_sta: std_logic_vector(43 downto 0); -- 36 bits for inputs and internal signals -- 6 bits for fault injection location address (ceil of log2(36) = 6) -- 2 bits for type of fault (SA0 or SA1) signal non_faulty_signals: std_logic_vector (35 downto 0); signal faulty_signals: std_logic_vector(35 downto 0); -- 36 bits for inputs, internal and output signals (with one fault injected in one of them) begin non_faulty_signals <= Req_N & Req_E & Req_W & Req_S & Req_L & DCTS & state & state_in & next_state & RTS_FF & RTS_FF_in & Grant_N_sig & Grant_E_sig & Grant_W_sig & Grant_S_sig & Grant_L_sig & Xbar_sel_sig; FI: fault_injector generic map(DATA_WIDTH => 36, ADDRESS_WIDTH => 6) port map (data_in=> non_faulty_signals , address=> FI_add_sta(7 downto 2), sta_0=> FI_add_sta(1), sta_1=> FI_add_sta(0), data_out=> faulty_signals ); -- Extracting faulty values for input, internal and output signals Req_N_faulty <= faulty_signals(35); Req_E_faulty <= faulty_signals(34); Req_W_faulty <= faulty_signals(33); Req_S_faulty <= faulty_signals(32); Req_L_faulty <= faulty_signals(31); DCTS_faulty <= faulty_signals(30); state_faulty <= faulty_signals(29 downto 24); state_in_faulty <= faulty_signals(23 downto 18); next_state_faulty <= faulty_signals(17 downto 12); RTS_FF_faulty <= faulty_signals(11); RTS_FF_in_faulty <= faulty_signals(10); Grant_N_sig_faulty <= faulty_signals(9); Grant_E_sig_faulty <= faulty_signals(8); Grant_W_sig_faulty <= faulty_signals(7); Grant_S_sig_faulty <= faulty_signals(6); Grant_L_sig_faulty <= faulty_signals(5); Xbar_sel_sig_faulty <= faulty_signals(4 downto 0); SR: shift_register_serial_in generic map(REG_WIDTH => 44) port map( clk=> fault_clk, reset=>reset, shift=> shift,data_in_serial=> data_in_serial, data_out_parallel=> FI_add_sta, data_out_serial=> data_out_serial ); -- Arbiter checkers instantiation ARBITERCHECKERS: Arbiter_checkers port map ( Req_N => Req_N, Req_E => Req_E, Req_W => Req_W, Req_S => Req_S, Req_L => Req_L, DCTS => DCTS, Grant_N => Grant_N_sig, Grant_E => Grant_E_sig, Grant_W => Grant_W_sig, Grant_S => Grant_S_sig, Grant_L => Grant_L_sig, Xbar_sel=>Xbar_sel_sig, state => state, state_in => state_in, next_state_out => next_state, RTS_FF => RTS_FF, RTS_FF_in => RTS_FF_in, err_state_IDLE_xbar => err_state_IDLE_xbar, err_state_not_IDLE_xbar => err_state_not_IDLE_xbar, err_state_IDLE_RTS_FF_in => err_state_IDLE_RTS_FF_in, err_state_not_IDLE_RTS_FF_RTS_FF_in => err_state_not_IDLE_RTS_FF_RTS_FF_in, err_state_not_IDLE_DCTS_RTS_FF_RTS_FF_in => err_state_not_IDLE_DCTS_RTS_FF_RTS_FF_in, err_state_not_IDLE_not_DCTS_RTS_FF_RTS_FF_in => err_state_not_IDLE_not_DCTS_RTS_FF_RTS_FF_in, err_RTS_FF_not_DCTS_state_state_in => err_RTS_FF_not_DCTS_state_state_in, err_not_RTS_FF_state_in_next_state => err_not_RTS_FF_state_in_next_state, err_RTS_FF_DCTS_state_in_next_state => err_RTS_FF_DCTS_state_in_next_state, err_not_DCTS_Grants => err_not_DCTS_Grants, err_DCTS_not_RTS_FF_Grants => err_DCTS_not_RTS_FF_Grants, err_DCTS_RTS_FF_IDLE_Grants => err_DCTS_RTS_FF_IDLE_Grants, err_DCTS_RTS_FF_not_IDLE_Grants_onehot => err_DCTS_RTS_FF_not_IDLE_Grants_onehot, err_Requests_next_state_IDLE => err_Requests_next_state_IDLE, err_IDLE_Req_L => err_IDLE_Req_L, err_Local_Req_L => err_Local_Req_L, err_North_Req_N => err_North_Req_N, err_IDLE_Req_N => err_IDLE_Req_N, err_Local_Req_N => err_Local_Req_N, err_South_Req_L => err_South_Req_L, err_West_Req_L => err_West_Req_L, err_South_Req_N => err_South_Req_N, err_East_Req_L => err_East_Req_L, err_West_Req_N => err_West_Req_N, err_East_Req_N => err_East_Req_N, err_next_state_onehot => err_next_state_onehot, err_state_in_onehot => err_state_in_onehot, err_state_north_xbar_sel => err_state_north_xbar_sel, err_state_east_xbar_sel => err_state_east_xbar_sel, err_state_west_xbar_sel => err_state_west_xbar_sel, err_state_south_xbar_sel => err_state_south_xbar_sel ); -- process for updating the state of arbiter's FSM, also setting RTS based on the state (if Grant is given or not) process(clk, reset)begin if reset = '0' then state<=IDLE; RTS_FF <= '0'; elsif clk'event and clk = '1' then -- no grant given yet, it might be that there is no request to -- arbiter or request is there, but the next router's/NI's FIFO is full state <= state_in_faulty; RTS_FF <= RTS_FF_in_faulty; end if; end process; -- anything below here is pure combinational RTS <= RTS_FF; -- Becuase of checkers we did this! Grant_N <= Grant_N_sig; Grant_E <= Grant_E_sig; Grant_W <= Grant_W_sig; Grant_S <= Grant_S_sig; Grant_L <= Grant_L_sig; Xbar_sel <= Xbar_sel_sig; process(RTS_FF_faulty, DCTS_faulty, state_faulty, next_state_faulty)begin if RTS_FF_faulty = '1' and DCTS_faulty = '0' then state_in <= state_faulty; else state_in <= next_state_faulty; end if; end process; process(state_faulty, RTS_FF_faulty, DCTS_faulty)begin if state_faulty = IDLE then RTS_FF_in <= '0'; -- if there was a grant given to one of the inputs, -- tell the next router/NI that the output data is valid else if RTS_FF_faulty = '1' and DCTS_faulty = '1' then RTS_FF_in <= '0'; else RTS_FF_in <= '1'; end if; end if ; end process; -- sets the grants using round robin -- the order is L --> N --> E --> W --> S and then back to L process(state_faulty, Req_N_faulty, Req_E_faulty, Req_W_faulty, Req_S_faulty, Req_L_faulty, DCTS_faulty, RTS_FF_faulty)begin Grant_N_sig <= '0'; Grant_E_sig <= '0'; Grant_W_sig <= '0'; Grant_S_sig <= '0'; Grant_L_sig <= '0'; Xbar_sel_sig <= "00000"; case(state_faulty) is when IDLE => Xbar_sel_sig <= "00000"; If Req_L_faulty = '1' then next_state <= Local; elsif Req_N_faulty = '1' then next_state <= North; elsif Req_E_faulty = '1' then next_state <= East; elsif Req_W_faulty = '1' then next_state <= West; elsif Req_S_faulty = '1' then next_state <= South; else next_state <= IDLE; end if; when North => Grant_N_sig <= DCTS_faulty and RTS_FF_faulty ; Xbar_sel_sig <= "00001"; If Req_N_faulty = '1' then next_state <= North; elsif Req_E_faulty = '1' then next_state <= East; elsif Req_W_faulty = '1' then next_state <= West; elsif Req_S_faulty = '1' then next_state <= South; elsif Req_L_faulty = '1' then next_state <= Local; else next_state <= IDLE; end if; when East => Grant_E_sig <= DCTS_faulty and RTS_FF_faulty; Xbar_sel_sig <= "00010"; If Req_E_faulty = '1' then next_state <= East; elsif Req_W_faulty = '1' then next_state <= West; elsif Req_S_faulty = '1' then next_state <= South; elsif Req_L_faulty = '1' then next_state <= Local; elsif Req_N_faulty = '1' then next_state <= North; else next_state <= IDLE; end if; when West => Grant_W_sig <= DCTS_faulty and RTS_FF_faulty; Xbar_sel_sig <= "00100"; If Req_W_faulty = '1' then next_state <= West; elsif Req_S_faulty = '1' then next_state <= South; elsif Req_L_faulty = '1' then next_state <= Local; elsif Req_N_faulty = '1' then next_state <= North; elsif Req_E_faulty = '1' then next_state <= East; else next_state <= IDLE; end if; when South => Grant_S_sig <= DCTS_faulty and RTS_FF_faulty; Xbar_sel_sig <= "01000"; If Req_S_faulty = '1' then next_state <= South; elsif Req_L_faulty = '1' then next_state <= Local; elsif Req_N_faulty = '1' then next_state <= North; elsif Req_E_faulty = '1' then next_state <= East; elsif Req_W_faulty = '1' then next_state <= West; else next_state <= IDLE; end if; when others => -- Local Grant_L_sig <= DCTS_faulty and RTS_FF_faulty; Xbar_sel_sig <= "10000"; If Req_L_faulty = '1' then next_state <= Local; elsif Req_N_faulty = '1' then next_state <= North; elsif Req_E_faulty = '1' then next_state <= East; elsif Req_W_faulty = '1' then next_state <= West; elsif Req_S_faulty = '1' then next_state <= South; else next_state <= IDLE; end if; end case ; end process; end;
-- Bridge from TCP receive and send streams to an AXI memory map -- Also can route packets to/from CPLD interface -- -- Original author: Colm Ryan -- Copyright 2015, Raytheon BBN Technologies library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.tcp_bridge_pkg.all; entity TCP_AXI_DMA is port ( clk : in std_logic; rst : in std_logic; ---TCP receive rx_tdata : in std_logic_vector(31 downto 0); rx_tvalid : in std_logic; rx_tready : out std_logic; rx_tlast : in std_logic; --TCP send channels tx_write_resp_tdata : out std_logic_vector(31 downto 0); tx_write_resp_tvalid : out std_logic; tx_write_resp_tlast : out std_logic; tx_write_resp_tready : in std_logic; tx_read_resp_tdata : out std_logic_vector(31 downto 0); tx_read_resp_tvalid : out std_logic; tx_read_resp_tlast : out std_logic; tx_read_resp_tready : in std_logic; --DataMover interfaces MM2S_CMD_tdata : out std_logic_vector( 71 downto 0 ); MM2S_CMD_tready : in std_logic; MM2S_CMD_tvalid : out std_logic; MM2S_tdata : in std_logic_vector( 31 downto 0 ); MM2S_tkeep : in std_logic_vector( 3 downto 0 ); MM2S_tlast : in std_logic; MM2S_tready : out std_logic; MM2S_tvalid : in std_logic; MM2S_STS_tdata : in std_logic_vector( 7 downto 0 ); MM2S_STS_tkeep : in std_logic_vector( 0 to 0 ); MM2S_STS_tlast : in std_logic; MM2S_STS_tready : out std_logic; MM2S_STS_tvalid : in std_logic; S2MM_CMD_tdata : out std_logic_vector( 71 downto 0 ); S2MM_CMD_tready : in std_logic; S2MM_CMD_tvalid : out std_logic; S2MM_tdata : out std_logic_vector( 31 downto 0 ); S2MM_tkeep : out std_logic_vector( 3 downto 0 ); S2MM_tlast : out std_logic; S2MM_tready : in std_logic; S2MM_tvalid : out std_logic; S2MM_STS_tdata : in std_logic_vector( 7 downto 0 ); S2MM_STS_tkeep : in std_logic_vector( 0 to 0 ); S2MM_STS_tlast : in std_logic; S2MM_STS_tready : out std_logic; S2MM_STS_tvalid : in std_logic ); end entity; architecture arch of TCP_AXI_DMA is --Annoying internal signals for Vivado's crummy VHDL support signal rx_tready_int : std_logic; signal tx_write_resp_tvalid_int : std_logic; signal tx_read_resp_tvalid_int : std_logic; type DataMoverCmd_t is record rsvd : std_logic_vector(3 downto 0) ; tag : std_logic_vector(3 downto 0) ; addr : std_logic_vector(31 downto 0) ; drr : std_logic; eof : std_logic; dsa : std_logic_vector(5 downto 0) ; axiType : std_logic; btt : std_logic_vector(22 downto 0) ; end record; signal mover_cmd : DataMoverCmd_t := (rsvd => (others => '0'), tag => (others => '0'), addr => (others => '0'), drr => '0', eof => '1', dsa => (others => '0'), axiType => '1', btt => (others => '0')); function movercmd2slv(cmd : DataMoverCmd_t) return std_logic_vector is variable slvOut : std_logic_vector(71 downto 0) ; begin slvOut := cmd.rsvd & cmd.tag & cmd.addr & cmd.drr & cmd.eof & cmd.dsa & cmd.axiType & cmd.btt; return slvOut; end movercmd2slv; type main_state_t is (IDLE, LATCH_CONTROL, LATCH_ADDR, ISSUE_DMA_READ_CMD, ISSUE_DMA_WRITE_CMD, WAIT_FOR_LAST); signal main_state : main_state_t; type mm2s_data_state_t is (IDLE, WRITE_CMD, WRITE_ADDR, WAIT_FOR_LAST); signal mm2s_data_state : mm2s_data_state_t; type s2mm_status_state_t is (IDLE, CHECK_ACK_NEEDED, WRITE_CMD, WRITE_ADDR, DRIVE_READY); signal s2mm_status_state : s2mm_status_state_t; signal write_cmd_in_tdata : std_logic_vector(63 downto 0) := (others => '0'); signal write_cmd_in_tvalid, write_cmd_in_tready, write_cmd_in_tlast : std_logic := '0'; signal write_cmd_out_tdata : std_logic_vector(63 downto 0) := (others => '0'); signal write_cmd_out_tvalid, write_cmd_out_tready, write_cmd_out_tlast : std_logic := '0'; signal write_cmd_fifo_count : std_logic_vector(4 downto 0); signal read_cmd_in_tdata : std_logic_vector(63 downto 0) := (others => '0'); signal read_cmd_in_tvalid, read_cmd_in_tready, read_cmd_in_tlast : std_logic := '0'; signal read_cmd_out_tdata : std_logic_vector(63 downto 0) := (others => '0'); signal read_cmd_out_tvalid, read_cmd_out_tready, read_cmd_out_tlast : std_logic := '0'; signal read_cmd_fifo_count : std_logic_vector(4 downto 0); begin --Irritatingly Vivado simulator doesn't support VHDL-2008 so need extra signal to read out port rx_tready <= rx_tready_int; tx_write_resp_tvalid <= tx_write_resp_tvalid_int; tx_read_resp_tvalid <= tx_read_resp_tvalid_int; main : process(clk) variable cmd : std_logic_vector(31 downto 0); variable addr : std_logic_vector(31 downto 0); alias cmd_rw : std_logic is cmd(28); variable accepted_tcp_data : boolean; begin if rising_edge(clk) then if rst = '1' then main_state <= IDLE; else accepted_tcp_data := rx_tvalid = '1' and rx_tready_int = '1'; write_cmd_in_tdata <= cmd & addr; write_cmd_in_tvalid <= '0'; write_cmd_in_tlast <= '0'; read_cmd_in_tdata <= cmd & addr; read_cmd_in_tvalid <= '0'; read_cmd_in_tlast <= '0'; case( main_state ) is when IDLE => --Use tx_valid to indicate start of packet if rx_tvalid = '1' then main_state <= LATCH_CONTROL; end if; when LATCH_CONTROL => cmd := rx_tdata; mover_cmd.btt <= b"00000" & cmd(15 downto 0) & b"00"; mover_cmd.tag <= cmd(27 downto 24); if accepted_tcp_data then main_state <= LATCH_ADDR; end if; when LATCH_ADDR => addr := rx_tdata; mover_cmd.addr <= addr; if accepted_tcp_data then if cmd_rw = '1' then main_state <= ISSUE_DMA_READ_CMD; else main_state <= ISSUE_DMA_WRITE_CMD; end if; end if; when ISSUE_DMA_WRITE_CMD => if S2MM_tready = '1' then --Should probably also check cmd FIFO isn't full write_cmd_in_tvalid <= '1'; write_cmd_in_tlast <= '1'; main_state <= WAIT_FOR_LAST; end if; when ISSUE_DMA_READ_CMD => if MM2S_CMD_tready = '1' then --Should probably also check cmd FIFO isn't full read_cmd_in_tvalid <= '1'; read_cmd_in_tlast <= '1'; main_state <= IDLE; end if; when WAIT_FOR_LAST => if accepted_tcp_data and rx_tlast = '1' then main_state <= IDLE; end if; end case; end if; end if; end process; --Combinational signals S2MM_tkeep <= "1111"; --Assume 4 byte boundaries for now S2MM_tdata <= rx_tdata; S2MM_tvalid <= rx_tvalid when (main_state = WAIT_FOR_LAST) else '0'; S2MM_tlast <= rx_tlast; --hold ready high for latching control and address otherwise let stream handle with main_state select rx_tready_int <= S2MM_tready when WAIT_FOR_LAST, '1' when LATCH_CONTROL | LATCH_ADDR, '0' when others; --We only have one source of mover commands so wire both S2MM and MM2S to the same command S2MM_CMD_tdata <= movercmd2slv(mover_cmd); MM2S_CMD_tdata <= movercmd2slv(mover_cmd); --just use the valid to choose between S2MM and MM2S S2MM_CMD_tvalid <= '1' when (main_state = ISSUE_DMA_WRITE_CMD) else '0'; MM2S_CMD_tvalid <= '1' when (main_state = ISSUE_DMA_READ_CMD) else '0'; -- FIFOs to store read/write commands waiting for status or read responses write_cmd_fifo: axis_srl_fifo generic map ( DATA_WIDTH => 64, DEPTH => 16 ) port map ( clk => clk, rst => rst, input_axis_tdata => write_cmd_in_tdata, input_axis_tvalid => write_cmd_in_tvalid, input_axis_tready => write_cmd_in_tready, input_axis_tlast => write_cmd_in_tlast, input_axis_tuser => '0', output_axis_tdata => write_cmd_out_tdata, output_axis_tvalid => write_cmd_out_tvalid, output_axis_tready => write_cmd_out_tready, output_axis_tlast => write_cmd_out_tlast, output_axis_tuser => open, count => write_cmd_fifo_count ); read_cmd_fifo: axis_srl_fifo generic map ( DATA_WIDTH => 64, DEPTH => 16 ) port map ( clk => clk, rst => rst, input_axis_tdata => read_cmd_in_tdata, input_axis_tvalid => read_cmd_in_tvalid, input_axis_tready => read_cmd_in_tready, input_axis_tlast => read_cmd_in_tlast, input_axis_tuser => '0', output_axis_tdata => read_cmd_out_tdata, output_axis_tvalid => read_cmd_out_tvalid, output_axis_tready => read_cmd_out_tready, output_axis_tlast => read_cmd_out_tlast, output_axis_tuser => open, count => read_cmd_fifo_count ); --read data receiver mm2s_data_receiver : process(clk) begin if rising_edge(clk) then if rst = '1' then mm2s_data_state <= IDLE; read_cmd_out_tready <= '0'; else read_cmd_out_tready <= '0'; case( mm2s_data_state ) is when IDLE => --wait for cmd fifo valid to signal command has been issued if read_cmd_out_tvalid = '1' then mm2s_data_state <= WRITE_CMD; end if; when WRITE_CMD => if tx_read_resp_tready = '1' then mm2s_data_state <= WRITE_ADDR; end if; when WRITE_ADDR => if tx_read_resp_tready = '1' then mm2s_data_state <= WAIT_FOR_LAST; read_cmd_out_tready <= '1'; end if; when WAIT_FOR_LAST => --wait for tlast from MM2S --TODO also check status is not error and if error zero pad response and then send error packet if MM2S_tlast = '1' and tx_read_resp_tready = '1' then mm2s_data_state <= IDLE; end if; end case; end if; end if; end process; --combinationally mux in MM2S stream MM2S_tready <= tx_read_resp_tready when mm2s_data_state = WAIT_FOR_LAST else '0'; with mm2s_data_state select tx_read_resp_tdata <= read_cmd_out_tdata(63 downto 32) when WRITE_CMD, read_cmd_out_tdata(31 downto 0) when WRITE_ADDR, MM2S_tdata when others; with mm2s_data_state select tx_read_resp_tvalid_int <= MM2S_tvalid when WAIT_FOR_LAST, '1' when WRITE_CMD | WRITE_ADDR, '0' when others; with mm2s_data_state select tx_read_resp_tlast <= MM2S_tlast when WAIT_FOR_LAST, '0' when others; --TODO: read in process and send error codes MM2S_STS_tready <= '1'; s2mm_status_receiver : process(clk) variable status : std_logic_vector(7 downto 0); alias status_ok : std_logic is status(7); variable cmd : std_logic_vector(31 downto 0); alias ack_req : std_logic is cmd(31); begin if rising_edge(clk) then if rst = '1' then s2mm_status_state <= IDLE; else cmd := write_cmd_out_tdata(63 downto 32); case( s2mm_status_state ) is when IDLE => status := S2MM_STS_tdata; if S2MM_STS_tvalid = '1' and write_cmd_out_tvalid = '1' then s2mm_status_state <= CHECK_ACK_NEEDED; end if; when CHECK_ACK_NEEDED => --check whether there was an error or if we want an acknowledge if status_ok = '0' or ack_req = '1' then s2mm_status_state <= WRITE_CMD; else s2mm_status_state <= DRIVE_READY; end if; when WRITE_CMD => if tx_write_resp_tready = '1' then s2mm_status_state <= WRITE_ADDR; end if; when WRITE_ADDR => if tx_write_resp_tready = '1' then s2mm_status_state <= DRIVE_READY; end if; when DRIVE_READY => s2mm_status_state <= IDLE; end case; end if; end if; end process; --combinational AXIS signals with s2mm_status_state select tx_write_resp_tvalid_int <= '1' when WRITE_CMD | WRITE_ADDR, '0' when others; tx_write_resp_tlast <= '1' when s2mm_status_state = WRITE_ADDR else '0'; --content of an ACK: -- (ACK SEQ SEL R/W CMD<3:0>) (DATAMOVER STATUS<7:0>) CNT<15:0> -- ADDRESS<31:0> with s2mm_status_state select tx_write_resp_tdata <= write_cmd_out_tdata(63 downto 56) & S2MM_STS_tdata & write_cmd_out_tdata(47 downto 32) when WRITE_CMD, write_cmd_out_tdata(31 downto 0) when WRITE_ADDR, (others => '0') when others; S2MM_STS_tready <= '1' when s2mm_status_state = DRIVE_READY else '0'; write_cmd_out_tready <= '1' when s2mm_status_state = DRIVE_READY else '0'; end architecture;
------------------------------------------------------------------------------- -- lmb_bram_elaborate.vhd ------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity lmb_bram_elaborate is generic ( C_MEMSIZE : integer; C_PORT_DWIDTH : integer; C_PORT_AWIDTH : integer; C_NUM_WE : integer; C_FAMILY : string ); port ( BRAM_Rst_A : in std_logic; BRAM_Clk_A : in std_logic; BRAM_EN_A : in std_logic; BRAM_WEN_A : in std_logic_vector(0 to C_NUM_WE-1); BRAM_Addr_A : in std_logic_vector(0 to C_PORT_AWIDTH-1); BRAM_Din_A : out std_logic_vector(0 to C_PORT_DWIDTH-1); BRAM_Dout_A : in std_logic_vector(0 to C_PORT_DWIDTH-1); BRAM_Rst_B : in std_logic; BRAM_Clk_B : in std_logic; BRAM_EN_B : in std_logic; BRAM_WEN_B : in std_logic_vector(0 to C_NUM_WE-1); BRAM_Addr_B : in std_logic_vector(0 to C_PORT_AWIDTH-1); BRAM_Din_B : out std_logic_vector(0 to C_PORT_DWIDTH-1); BRAM_Dout_B : in std_logic_vector(0 to C_PORT_DWIDTH-1) ); attribute keep_hierarchy : STRING; attribute keep_hierarchy of lmb_bram_elaborate : entity is "yes"; end lmb_bram_elaborate; architecture STRUCTURE of lmb_bram_elaborate is component RAMB36 is generic ( WRITE_MODE_A : string; WRITE_MODE_B : string; INIT_FILE : string; READ_WIDTH_A : integer; READ_WIDTH_B : integer; WRITE_WIDTH_A : integer; WRITE_WIDTH_B : integer; RAM_EXTENSION_A : string; RAM_EXTENSION_B : string ); port ( ADDRA : in std_logic_vector(15 downto 0); CASCADEINLATA : in std_logic; CASCADEINREGA : in std_logic; CASCADEOUTLATA : out std_logic; CASCADEOUTREGA : out std_logic; CLKA : in std_logic; DIA : in std_logic_vector(31 downto 0); DIPA : in std_logic_vector(3 downto 0); DOA : out std_logic_vector(31 downto 0); DOPA : out std_logic_vector(3 downto 0); ENA : in std_logic; REGCEA : in std_logic; SSRA : in std_logic; WEA : in std_logic_vector(3 downto 0); ADDRB : in std_logic_vector(15 downto 0); CASCADEINLATB : in std_logic; CASCADEINREGB : in std_logic; CASCADEOUTLATB : out std_logic; CASCADEOUTREGB : out std_logic; CLKB : in std_logic; DIB : in std_logic_vector(31 downto 0); DIPB : in std_logic_vector(3 downto 0); DOB : out std_logic_vector(31 downto 0); DOPB : out std_logic_vector(3 downto 0); ENB : in std_logic; REGCEB : in std_logic; SSRB : in std_logic; WEB : in std_logic_vector(3 downto 0) ); end component; attribute BMM_INFO : STRING; attribute BMM_INFO of ramb36_0: label is " "; attribute BMM_INFO of ramb36_1: label is " "; attribute BMM_INFO of ramb36_2: label is " "; attribute BMM_INFO of ramb36_3: label is " "; -- Internal signals signal net_gnd0 : std_logic; signal net_gnd4 : std_logic_vector(3 downto 0); signal pgassign1 : std_logic_vector(0 to 0); signal pgassign2 : std_logic_vector(0 to 2); signal pgassign3 : std_logic_vector(0 to 23); signal pgassign4 : std_logic_vector(15 downto 0); signal pgassign5 : std_logic_vector(31 downto 0); signal pgassign6 : std_logic_vector(31 downto 0); signal pgassign7 : std_logic_vector(3 downto 0); signal pgassign8 : std_logic_vector(15 downto 0); signal pgassign9 : std_logic_vector(31 downto 0); signal pgassign10 : std_logic_vector(31 downto 0); signal pgassign11 : std_logic_vector(3 downto 0); signal pgassign12 : std_logic_vector(15 downto 0); signal pgassign13 : std_logic_vector(31 downto 0); signal pgassign14 : std_logic_vector(31 downto 0); signal pgassign15 : std_logic_vector(3 downto 0); signal pgassign16 : std_logic_vector(15 downto 0); signal pgassign17 : std_logic_vector(31 downto 0); signal pgassign18 : std_logic_vector(31 downto 0); signal pgassign19 : std_logic_vector(3 downto 0); signal pgassign20 : std_logic_vector(15 downto 0); signal pgassign21 : std_logic_vector(31 downto 0); signal pgassign22 : std_logic_vector(31 downto 0); signal pgassign23 : std_logic_vector(3 downto 0); signal pgassign24 : std_logic_vector(15 downto 0); signal pgassign25 : std_logic_vector(31 downto 0); signal pgassign26 : std_logic_vector(31 downto 0); signal pgassign27 : std_logic_vector(3 downto 0); signal pgassign28 : std_logic_vector(15 downto 0); signal pgassign29 : std_logic_vector(31 downto 0); signal pgassign30 : std_logic_vector(31 downto 0); signal pgassign31 : std_logic_vector(3 downto 0); signal pgassign32 : std_logic_vector(15 downto 0); signal pgassign33 : std_logic_vector(31 downto 0); signal pgassign34 : std_logic_vector(31 downto 0); signal pgassign35 : std_logic_vector(3 downto 0); begin -- Internal assignments pgassign1(0 to 0) <= B"1"; pgassign2(0 to 2) <= B"000"; pgassign3(0 to 23) <= B"000000000000000000000000"; pgassign4(15 downto 15) <= B"1"; pgassign4(14 downto 3) <= BRAM_Addr_A(18 to 29); pgassign4(2 downto 0) <= B"000"; pgassign5(31 downto 8) <= B"000000000000000000000000"; pgassign5(7 downto 0) <= BRAM_Dout_A(0 to 7); BRAM_Din_A(0 to 7) <= pgassign6(7 downto 0); pgassign7(3 downto 3) <= BRAM_WEN_A(0 to 0); pgassign7(2 downto 2) <= BRAM_WEN_A(0 to 0); pgassign7(1 downto 1) <= BRAM_WEN_A(0 to 0); pgassign7(0 downto 0) <= BRAM_WEN_A(0 to 0); pgassign8(15 downto 15) <= B"1"; pgassign8(14 downto 3) <= BRAM_Addr_B(18 to 29); pgassign8(2 downto 0) <= B"000"; pgassign9(31 downto 8) <= B"000000000000000000000000"; pgassign9(7 downto 0) <= BRAM_Dout_B(0 to 7); BRAM_Din_B(0 to 7) <= pgassign10(7 downto 0); pgassign11(3 downto 3) <= BRAM_WEN_B(0 to 0); pgassign11(2 downto 2) <= BRAM_WEN_B(0 to 0); pgassign11(1 downto 1) <= BRAM_WEN_B(0 to 0); pgassign11(0 downto 0) <= BRAM_WEN_B(0 to 0); pgassign12(15 downto 15) <= B"1"; pgassign12(14 downto 3) <= BRAM_Addr_A(18 to 29); pgassign12(2 downto 0) <= B"000"; pgassign13(31 downto 8) <= B"000000000000000000000000"; pgassign13(7 downto 0) <= BRAM_Dout_A(8 to 15); BRAM_Din_A(8 to 15) <= pgassign14(7 downto 0); pgassign15(3 downto 3) <= BRAM_WEN_A(1 to 1); pgassign15(2 downto 2) <= BRAM_WEN_A(1 to 1); pgassign15(1 downto 1) <= BRAM_WEN_A(1 to 1); pgassign15(0 downto 0) <= BRAM_WEN_A(1 to 1); pgassign16(15 downto 15) <= B"1"; pgassign16(14 downto 3) <= BRAM_Addr_B(18 to 29); pgassign16(2 downto 0) <= B"000"; pgassign17(31 downto 8) <= B"000000000000000000000000"; pgassign17(7 downto 0) <= BRAM_Dout_B(8 to 15); BRAM_Din_B(8 to 15) <= pgassign18(7 downto 0); pgassign19(3 downto 3) <= BRAM_WEN_B(1 to 1); pgassign19(2 downto 2) <= BRAM_WEN_B(1 to 1); pgassign19(1 downto 1) <= BRAM_WEN_B(1 to 1); pgassign19(0 downto 0) <= BRAM_WEN_B(1 to 1); pgassign20(15 downto 15) <= B"1"; pgassign20(14 downto 3) <= BRAM_Addr_A(18 to 29); pgassign20(2 downto 0) <= B"000"; pgassign21(31 downto 8) <= B"000000000000000000000000"; pgassign21(7 downto 0) <= BRAM_Dout_A(16 to 23); BRAM_Din_A(16 to 23) <= pgassign22(7 downto 0); pgassign23(3 downto 3) <= BRAM_WEN_A(2 to 2); pgassign23(2 downto 2) <= BRAM_WEN_A(2 to 2); pgassign23(1 downto 1) <= BRAM_WEN_A(2 to 2); pgassign23(0 downto 0) <= BRAM_WEN_A(2 to 2); pgassign24(15 downto 15) <= B"1"; pgassign24(14 downto 3) <= BRAM_Addr_B(18 to 29); pgassign24(2 downto 0) <= B"000"; pgassign25(31 downto 8) <= B"000000000000000000000000"; pgassign25(7 downto 0) <= BRAM_Dout_B(16 to 23); BRAM_Din_B(16 to 23) <= pgassign26(7 downto 0); pgassign27(3 downto 3) <= BRAM_WEN_B(2 to 2); pgassign27(2 downto 2) <= BRAM_WEN_B(2 to 2); pgassign27(1 downto 1) <= BRAM_WEN_B(2 to 2); pgassign27(0 downto 0) <= BRAM_WEN_B(2 to 2); pgassign28(15 downto 15) <= B"1"; pgassign28(14 downto 3) <= BRAM_Addr_A(18 to 29); pgassign28(2 downto 0) <= B"000"; pgassign29(31 downto 8) <= B"000000000000000000000000"; pgassign29(7 downto 0) <= BRAM_Dout_A(24 to 31); BRAM_Din_A(24 to 31) <= pgassign30(7 downto 0); pgassign31(3 downto 3) <= BRAM_WEN_A(3 to 3); pgassign31(2 downto 2) <= BRAM_WEN_A(3 to 3); pgassign31(1 downto 1) <= BRAM_WEN_A(3 to 3); pgassign31(0 downto 0) <= BRAM_WEN_A(3 to 3); pgassign32(15 downto 15) <= B"1"; pgassign32(14 downto 3) <= BRAM_Addr_B(18 to 29); pgassign32(2 downto 0) <= B"000"; pgassign33(31 downto 8) <= B"000000000000000000000000"; pgassign33(7 downto 0) <= BRAM_Dout_B(24 to 31); BRAM_Din_B(24 to 31) <= pgassign34(7 downto 0); pgassign35(3 downto 3) <= BRAM_WEN_B(3 to 3); pgassign35(2 downto 2) <= BRAM_WEN_B(3 to 3); pgassign35(1 downto 1) <= BRAM_WEN_B(3 to 3); pgassign35(0 downto 0) <= BRAM_WEN_B(3 to 3); net_gnd0 <= '0'; net_gnd4(3 downto 0) <= B"0000"; ramb36_0 : RAMB36 generic map ( WRITE_MODE_A => "WRITE_FIRST", WRITE_MODE_B => "WRITE_FIRST", INIT_FILE => "lmb_bram_combined_0.mem", READ_WIDTH_A => 9, READ_WIDTH_B => 9, WRITE_WIDTH_A => 9, WRITE_WIDTH_B => 9, RAM_EXTENSION_A => "NONE", RAM_EXTENSION_B => "NONE" ) port map ( ADDRA => pgassign4, CASCADEINLATA => net_gnd0, CASCADEINREGA => net_gnd0, CASCADEOUTLATA => open, CASCADEOUTREGA => open, CLKA => BRAM_Clk_A, DIA => pgassign5, DIPA => net_gnd4, DOA => pgassign6, DOPA => open, ENA => BRAM_EN_A, REGCEA => net_gnd0, SSRA => BRAM_Rst_A, WEA => pgassign7, ADDRB => pgassign8, CASCADEINLATB => net_gnd0, CASCADEINREGB => net_gnd0, CASCADEOUTLATB => open, CASCADEOUTREGB => open, CLKB => BRAM_Clk_B, DIB => pgassign9, DIPB => net_gnd4, DOB => pgassign10, DOPB => open, ENB => BRAM_EN_B, REGCEB => net_gnd0, SSRB => BRAM_Rst_B, WEB => pgassign11 ); ramb36_1 : RAMB36 generic map ( WRITE_MODE_A => "WRITE_FIRST", WRITE_MODE_B => "WRITE_FIRST", INIT_FILE => "lmb_bram_combined_1.mem", READ_WIDTH_A => 9, READ_WIDTH_B => 9, WRITE_WIDTH_A => 9, WRITE_WIDTH_B => 9, RAM_EXTENSION_A => "NONE", RAM_EXTENSION_B => "NONE" ) port map ( ADDRA => pgassign12, CASCADEINLATA => net_gnd0, CASCADEINREGA => net_gnd0, CASCADEOUTLATA => open, CASCADEOUTREGA => open, CLKA => BRAM_Clk_A, DIA => pgassign13, DIPA => net_gnd4, DOA => pgassign14, DOPA => open, ENA => BRAM_EN_A, REGCEA => net_gnd0, SSRA => BRAM_Rst_A, WEA => pgassign15, ADDRB => pgassign16, CASCADEINLATB => net_gnd0, CASCADEINREGB => net_gnd0, CASCADEOUTLATB => open, CASCADEOUTREGB => open, CLKB => BRAM_Clk_B, DIB => pgassign17, DIPB => net_gnd4, DOB => pgassign18, DOPB => open, ENB => BRAM_EN_B, REGCEB => net_gnd0, SSRB => BRAM_Rst_B, WEB => pgassign19 ); ramb36_2 : RAMB36 generic map ( WRITE_MODE_A => "WRITE_FIRST", WRITE_MODE_B => "WRITE_FIRST", INIT_FILE => "lmb_bram_combined_2.mem", READ_WIDTH_A => 9, READ_WIDTH_B => 9, WRITE_WIDTH_A => 9, WRITE_WIDTH_B => 9, RAM_EXTENSION_A => "NONE", RAM_EXTENSION_B => "NONE" ) port map ( ADDRA => pgassign20, CASCADEINLATA => net_gnd0, CASCADEINREGA => net_gnd0, CASCADEOUTLATA => open, CASCADEOUTREGA => open, CLKA => BRAM_Clk_A, DIA => pgassign21, DIPA => net_gnd4, DOA => pgassign22, DOPA => open, ENA => BRAM_EN_A, REGCEA => net_gnd0, SSRA => BRAM_Rst_A, WEA => pgassign23, ADDRB => pgassign24, CASCADEINLATB => net_gnd0, CASCADEINREGB => net_gnd0, CASCADEOUTLATB => open, CASCADEOUTREGB => open, CLKB => BRAM_Clk_B, DIB => pgassign25, DIPB => net_gnd4, DOB => pgassign26, DOPB => open, ENB => BRAM_EN_B, REGCEB => net_gnd0, SSRB => BRAM_Rst_B, WEB => pgassign27 ); ramb36_3 : RAMB36 generic map ( WRITE_MODE_A => "WRITE_FIRST", WRITE_MODE_B => "WRITE_FIRST", INIT_FILE => "lmb_bram_combined_3.mem", READ_WIDTH_A => 9, READ_WIDTH_B => 9, WRITE_WIDTH_A => 9, WRITE_WIDTH_B => 9, RAM_EXTENSION_A => "NONE", RAM_EXTENSION_B => "NONE" ) port map ( ADDRA => pgassign28, CASCADEINLATA => net_gnd0, CASCADEINREGA => net_gnd0, CASCADEOUTLATA => open, CASCADEOUTREGA => open, CLKA => BRAM_Clk_A, DIA => pgassign29, DIPA => net_gnd4, DOA => pgassign30, DOPA => open, ENA => BRAM_EN_A, REGCEA => net_gnd0, SSRA => BRAM_Rst_A, WEA => pgassign31, ADDRB => pgassign32, CASCADEINLATB => net_gnd0, CASCADEINREGB => net_gnd0, CASCADEOUTLATB => open, CASCADEOUTREGB => open, CLKB => BRAM_Clk_B, DIB => pgassign33, DIPB => net_gnd4, DOB => pgassign34, DOPB => open, ENB => BRAM_EN_B, REGCEB => net_gnd0, SSRB => BRAM_Rst_B, WEB => pgassign35 ); end architecture STRUCTURE;
architecture behav of tb is begin assert false report "Hello world" severity note; end behav;
architecture behav of tb is begin assert false report "Hello world" severity note; end behav;
-- ---------------------------------------------------------------------- -- DspUnit : Advanced So(P)C Sequential Signal Processor -- Copyright (C) 2007-2010 by Adrien LELONG (www.lelongdunet.com) -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the -- Free Software Foundation, Inc., -- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- ---------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.dspunit_pac.all; use work.dspalu_pac.all; ------------------------------------------------------------------------------- entity cpflip is port ( --@inputs clk : in std_logic; op_en : in std_logic; data_in_m2 : in std_logic_vector((sig_width - 1) downto 0); length_reg : in std_logic_vector((cmdreg_data_width -1) downto 0); --@outputs; dsp_bus : out t_dsp_bus ); end cpflip; --=---------------------------------------------------------------------------- architecture archi_cpflip of cpflip is ----------------------------------------------------------------------------- -- @constants definition ----------------------------------------------------------------------------- --=-------------------------------------------------------------------------- -- -- @component declarations -- ----------------------------------------------------------------------------- --=-------------------------------------------------------------------------- -- @signals definition ----------------------------------------------------------------------------- signal s_dsp_bus : t_dsp_bus; type t_cpflip_state is (st_init, st_startpipe, st_copy); signal s_state : t_cpflip_state; signal s_length : unsigned((cmdreg_width - 1) downto 0); begin -- archs_cpflip ----------------------------------------------------------------------------- -- -- @instantiations -- ----------------------------------------------------------------------------- --=--------------------------------------------------------------------------- p_cpflip : process (clk) begin -- process p_cpflip if rising_edge(clk) then -- rising clock edge if op_en = '0' then s_state <= st_init; --s_dsp_bus <= c_dsp_bus_init; s_dsp_bus.op_done <= '0'; -- memory 0 -- s_dsp_bus.data_out_m0 <= (others => '0'); s_dsp_bus.addr_r_m0 <= (others => '0'); s_dsp_bus.addr_w_m0 <= (others => '0'); s_dsp_bus.wr_en_m0 <= '0'; --s_dsp_bus.c_en_m0 <= '0'; -- memory 1 -- s_dsp_bus.data_out_m1 <= (others => '0'); s_dsp_bus.addr_m1 <= (others => '0'); s_dsp_bus.wr_en_m1 <= '0'; --s_dsp_bus.c_en_m1 <= '0'; -- memory 2 -- s_dsp_bus.data_out_m2 <= (others => '0'); s_dsp_bus.addr_m2 <= (others => '0'); s_dsp_bus.wr_en_m2 <= '0'; --s_dsp_bus.c_en_m2 <= '0'; -- alu --s_dsp_bus.mul_in_a1 <= (others <= '0'); --s_dsp_bus.mul_in_b1 <= (others <= '0'); --s_dsp_bus.mul_in_a2 <= (others <= '0'); --s_dsp_bus.mul_in_b2 <= (others <= '0'); s_dsp_bus.acc_mode1 <= acc_store; s_dsp_bus.acc_mode2 <= acc_store; s_dsp_bus.alu_select <= alu_mul; -- global counter --s_dsp_bus.gcounter_reset <= '0'; ------------------------------------------------------------------------------- -- operation management ------------------------------------------------------------------------------- else case s_state is when st_init => s_dsp_bus.addr_m1 <= s_length; s_dsp_bus.addr_m2 <= (others => '0'); s_dsp_bus.wr_en_m1 <= '0'; if s_dsp_bus.op_done = '0' then s_state <= st_startpipe; end if; when st_startpipe => if s_dsp_bus.addr_m2 = 1 then s_dsp_bus.wr_en_m1 <= '1'; s_state <= st_copy; end if; -- index increment s_dsp_bus.addr_m2 <= s_dsp_bus.addr_m2 + 1; when st_copy => s_dsp_bus.wr_en_m1 <= '1'; if(s_dsp_bus.addr_m1 = 0) then s_state <= st_init; s_dsp_bus.op_done <= '1'; else s_dsp_bus.addr_m2 <= s_dsp_bus.addr_m2 + 1; s_dsp_bus.addr_m1 <= (s_dsp_bus.addr_m1 - 1) and s_length; end if; when others => null; end case; end if; end if; end process p_cpflip; --=--------------------------------------------------------------------------- -- -- @concurrent signal assignments -- ----------------------------------------------------------------------------- dsp_bus <= s_dsp_bus; s_dsp_bus.data_out_m2 <= (others => '0'); s_dsp_bus.data_out_m0 <= (others => '0'); s_dsp_bus.data_out_m1 <= data_in_m2; s_dsp_bus.c_en_m0 <= '0'; s_dsp_bus.c_en_m1 <= '1'; s_dsp_bus.c_en_m2 <= '1'; s_dsp_bus.gcounter_reset <= '1'; s_length <= unsigned(length_reg); end archi_cpflip;
-- ---------------------------------------------------------------------- -- DspUnit : Advanced So(P)C Sequential Signal Processor -- Copyright (C) 2007-2010 by Adrien LELONG (www.lelongdunet.com) -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the -- Free Software Foundation, Inc., -- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- ---------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.dspunit_pac.all; use work.dspalu_pac.all; ------------------------------------------------------------------------------- entity cpflip is port ( --@inputs clk : in std_logic; op_en : in std_logic; data_in_m2 : in std_logic_vector((sig_width - 1) downto 0); length_reg : in std_logic_vector((cmdreg_data_width -1) downto 0); --@outputs; dsp_bus : out t_dsp_bus ); end cpflip; --=---------------------------------------------------------------------------- architecture archi_cpflip of cpflip is ----------------------------------------------------------------------------- -- @constants definition ----------------------------------------------------------------------------- --=-------------------------------------------------------------------------- -- -- @component declarations -- ----------------------------------------------------------------------------- --=-------------------------------------------------------------------------- -- @signals definition ----------------------------------------------------------------------------- signal s_dsp_bus : t_dsp_bus; type t_cpflip_state is (st_init, st_startpipe, st_copy); signal s_state : t_cpflip_state; signal s_length : unsigned((cmdreg_width - 1) downto 0); begin -- archs_cpflip ----------------------------------------------------------------------------- -- -- @instantiations -- ----------------------------------------------------------------------------- --=--------------------------------------------------------------------------- p_cpflip : process (clk) begin -- process p_cpflip if rising_edge(clk) then -- rising clock edge if op_en = '0' then s_state <= st_init; --s_dsp_bus <= c_dsp_bus_init; s_dsp_bus.op_done <= '0'; -- memory 0 -- s_dsp_bus.data_out_m0 <= (others => '0'); s_dsp_bus.addr_r_m0 <= (others => '0'); s_dsp_bus.addr_w_m0 <= (others => '0'); s_dsp_bus.wr_en_m0 <= '0'; --s_dsp_bus.c_en_m0 <= '0'; -- memory 1 -- s_dsp_bus.data_out_m1 <= (others => '0'); s_dsp_bus.addr_m1 <= (others => '0'); s_dsp_bus.wr_en_m1 <= '0'; --s_dsp_bus.c_en_m1 <= '0'; -- memory 2 -- s_dsp_bus.data_out_m2 <= (others => '0'); s_dsp_bus.addr_m2 <= (others => '0'); s_dsp_bus.wr_en_m2 <= '0'; --s_dsp_bus.c_en_m2 <= '0'; -- alu --s_dsp_bus.mul_in_a1 <= (others <= '0'); --s_dsp_bus.mul_in_b1 <= (others <= '0'); --s_dsp_bus.mul_in_a2 <= (others <= '0'); --s_dsp_bus.mul_in_b2 <= (others <= '0'); s_dsp_bus.acc_mode1 <= acc_store; s_dsp_bus.acc_mode2 <= acc_store; s_dsp_bus.alu_select <= alu_mul; -- global counter --s_dsp_bus.gcounter_reset <= '0'; ------------------------------------------------------------------------------- -- operation management ------------------------------------------------------------------------------- else case s_state is when st_init => s_dsp_bus.addr_m1 <= s_length; s_dsp_bus.addr_m2 <= (others => '0'); s_dsp_bus.wr_en_m1 <= '0'; if s_dsp_bus.op_done = '0' then s_state <= st_startpipe; end if; when st_startpipe => if s_dsp_bus.addr_m2 = 1 then s_dsp_bus.wr_en_m1 <= '1'; s_state <= st_copy; end if; -- index increment s_dsp_bus.addr_m2 <= s_dsp_bus.addr_m2 + 1; when st_copy => s_dsp_bus.wr_en_m1 <= '1'; if(s_dsp_bus.addr_m1 = 0) then s_state <= st_init; s_dsp_bus.op_done <= '1'; else s_dsp_bus.addr_m2 <= s_dsp_bus.addr_m2 + 1; s_dsp_bus.addr_m1 <= (s_dsp_bus.addr_m1 - 1) and s_length; end if; when others => null; end case; end if; end if; end process p_cpflip; --=--------------------------------------------------------------------------- -- -- @concurrent signal assignments -- ----------------------------------------------------------------------------- dsp_bus <= s_dsp_bus; s_dsp_bus.data_out_m2 <= (others => '0'); s_dsp_bus.data_out_m0 <= (others => '0'); s_dsp_bus.data_out_m1 <= data_in_m2; s_dsp_bus.c_en_m0 <= '0'; s_dsp_bus.c_en_m1 <= '1'; s_dsp_bus.c_en_m2 <= '1'; s_dsp_bus.gcounter_reset <= '1'; s_length <= unsigned(length_reg); end archi_cpflip;
------------------------------------------------------------------------------ -- Copyright (c) 2009 Xilinx, Inc. -- This design is confidential and proprietary of Xilinx, All Rights Reserved. ------------------------------------------------------------------------------ -- ____ ____ -- / /\/ / -- /___/ \ / Vendor: Xilinx -- \ \ \/ Version: 1.0 -- \ \ Filename: serdes_1_to_n_clk_ddr_s8_diff.vhd -- / / Date Last Modified: November 5 2009 -- /___/ /\ Date Created: August 1 2008 -- \ \ / \ -- \___\/\___\ -- --Device: Spartan 6 --Purpose: 1-bit generic 1:n DDR clock receiver module for serdes factors from 2 to 8 with differential inputs -- Instantiates necessary BUFIO2 clock buffers -- --Reference: -- --Revision History: -- Rev 1.0 - First created (nicks) ------------------------------------------------------------------------------ library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all ; library unisim ; use unisim.vcomponents.all ; entity serdes_1_to_n_clk_ddr_s8_diff is generic ( S : integer := 8 ; -- Parameter to set the serdes factor 1..8 DIFF_TERM : boolean := FALSE) ; -- Enable or disable internal differential termination port ( clkin_p : in std_logic ; -- Input from LVDS receiver pin clkin_n : in std_logic ; -- Input from LVDS receiver pin rxioclkp : out std_logic ; -- IO Clock network rxioclkn : out std_logic ; -- IO Clock network rx_serdesstrobe : out std_logic ; -- Parallel data capture strobe rx_bufg_x1 : out std_logic) ; -- Global clock end serdes_1_to_n_clk_ddr_s8_diff ; architecture arch_serdes_1_to_n_clk_ddr_s8_diff of serdes_1_to_n_clk_ddr_s8_diff is signal ddly_m : std_logic; -- Master output from IODELAY1 signal ddly_s : std_logic; -- Slave output from IODELAY1 signal rx_clk_in : std_logic; -- signal iob_data_in_p : std_logic; -- signal iob_data_in_n : std_logic; -- signal rx_clk_in_p : std_logic; -- signal rx_clk_in_n : std_logic; -- signal rx_bufio2_x1 : std_logic; -- constant RX_SWAP_CLK : std_logic := '0' ; -- pinswap mask for input clock (0 = no swap (default), 1 = swap). Allows input to be connected the wrong way round to ease PCB routing. begin iob_clk_in : IBUFDS_DIFF_OUT generic map( DIFF_TERM => DIFF_TERM) port map ( I => clkin_p, IB => clkin_n, O => rx_clk_in_p, OB => rx_clk_in_n) ; iob_data_in_p <= rx_clk_in_p xor RX_SWAP_CLK ; -- Invert clock as required iob_data_in_n <= rx_clk_in_n xor RX_SWAP_CLK ; -- Invert clock as required iodelay_m : IODELAY2 generic map( DATA_RATE => "SDR", -- <SDR>, DDR SIM_TAPDELAY_VALUE => 49, -- nominal tap delay (sim parameter only) IDELAY_VALUE => 0, -- {0 ... 255} IDELAY2_VALUE => 0, -- {0 ... 255} ODELAY_VALUE => 0, -- {0 ... 255} IDELAY_MODE => "NORMAL", -- "NORMAL", "PCI" SERDES_MODE => "MASTER", -- <NONE>, MASTER, SLAVE IDELAY_TYPE => "FIXED", -- "DEFAULT", "DIFF_PHASE_DETECTOR", "FIXED", "VARIABLE_FROM_HALF_MAX", "VARIABLE_FROM_ZERO" COUNTER_WRAPAROUND => "STAY_AT_LIMIT", -- <STAY_AT_LIMIT>, WRAPAROUND DELAY_SRC => "IDATAIN") -- "IO", "IDATAIN", "ODATAIN" port map ( IDATAIN => iob_data_in_p, -- data from master IOB TOUT => open, -- tri-state signal to IOB DOUT => open, -- output data to IOB T => '1', -- tri-state control from OLOGIC/OSERDES2 ODATAIN => '0', -- data from OLOGIC/OSERDES2 DATAOUT => ddly_m, -- Output data 1 to ILOGIC/ISERDES2 DATAOUT2 => open, -- Output data 2 to ILOGIC/ISERDES2 IOCLK0 => '0', -- High speed clock for calibration IOCLK1 => '0', -- High speed clock for calibration CLK => '0', -- Fabric clock (GCLK) for control signals CAL => '0', -- Calibrate enable signal INC => '0', -- Increment counter CE => '0', -- Clock Enable RST => '0', -- Reset delay line to 1/2 max in this case BUSY => open) ; -- output signal indicating sync circuit has finished / calibration has finished iodelay_s : IODELAY2 generic map( DATA_RATE => "SDR", -- <SDR>, DDR SIM_TAPDELAY_VALUE => 49, -- nominal tap delay (sim parameter only) IDELAY_VALUE => 0, -- {0 ... 255} IDELAY2_VALUE => 0, -- {0 ... 255} ODELAY_VALUE => 0, -- {0 ... 255} IDELAY_MODE => "NORMAL", -- "NORMAL", "PCI" SERDES_MODE => "SLAVE", -- <NONE>, MASTER, SLAVE IDELAY_TYPE => "FIXED", -- "DEFAULT", "DIFF_PHASE_DETECTOR", "FIXED", "VARIABLE_FROM_HALF_MAX", "VARIABLE_FROM_ZERO" COUNTER_WRAPAROUND => "STAY_AT_LIMIT", -- <STAY_AT_LIMIT>, WRAPAROUND DELAY_SRC => "IDATAIN") -- "IO", "IDATAIN", "ODATAIN" port map ( IDATAIN => iob_data_in_n, -- data from slave IOB TOUT => open, -- tri-state signal to IOB DOUT => open, -- output data to IOB T => '1', -- tri-state control from OLOGIC/OSERDES2 ODATAIN => '0', -- data from OLOGIC/OSERDES2 DATAOUT => ddly_s, -- Output data 1 to ILOGIC/ISERDES2 DATAOUT2 => open, -- Output data 2 to ILOGIC/ISERDES2 IOCLK0 => '0', -- High speed clock for calibration IOCLK1 => '0', -- High speed clock for calibration CLK => '0', -- Fabric clock (GCLK) for control signals CAL => '0', -- Calibrate control signal, never needed as the slave supplies the clock input to the PLL INC => '0', -- Increment counter CE => '0', -- Clock Enable RST => '0', -- Reset delay line BUSY => open) ; -- output signal indicating sync circuit has finished / calibration has finished bufg_pll_x1 : BUFG port map (I => rx_bufio2_x1, O => rx_bufg_x1) ; bufio2_2clk_inst : BUFIO2_2CLK generic map( DIVIDE => S) -- The DIVCLK divider divide-by value; default 1 port map ( I => ddly_m, -- Input source clock 0 degrees IB => ddly_s, -- Input source clock 0 degrees IOCLK => rxioclkp, -- Output Clock for IO DIVCLK => rx_bufio2_x1, -- Output Divided Clock SERDESSTROBE => rx_serdesstrobe) ; -- Output SERDES strobe (Clock Enable) bufio2_inst : BUFIO2 generic map( I_INVERT => FALSE, -- DIVIDE_BYPASS => FALSE, -- USE_DOUBLER => FALSE) -- port map ( I => ddly_s, -- N_clk input from IDELAY IOCLK => rxioclkn, -- Output Clock DIVCLK => open, -- Output Divided Clock SERDESSTROBE => open) ; -- Output SERDES strobe (Clock Enable) end arch_serdes_1_to_n_clk_ddr_s8_diff ;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc1735.vhd,v 1.2 2001-10-26 16:29:43 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c09s04b00x00p06n01i01735ent IS END c09s04b00x00p06n01i01735ent; ARCHITECTURE c09s04b00x00p06n01i01735arch OF c09s04b00x00p06n01i01735ent IS signal arch_s1 : bit; signal arch_s2 : boolean; signal arch_s3 : character; signal arch_s4 : severity_level; signal arch_s5 : integer; signal arch_s6 : real; signal arch_s7 : time; signal arch_s8 : positive; signal arch_s9 : natural; BEGIN ASSERT arch_s1 /= bit'left REPORT "bit concurrent assertion" severity NOTE; ASSERT arch_s2 /= boolean'left REPORT "boolean concurrent assertion" severity NOTE; ASSERT arch_s3 /= character'left REPORT "character concurrent assertion" severity NOTE; ASSERT arch_s4 /= severity_level'left REPORT "severity_level concurrent assertion" severity NOTE; ASSERT arch_s5 /= integer'left REPORT "integer concurrent assertion" severity NOTE; ASSERT arch_s6 /= real'left REPORT "real concurrent assertion" severity NOTE; ASSERT arch_s7 /= time'left REPORT "time concurrent assertion" severity NOTE; ASSERT arch_s8 /= positive'left REPORT "positive concurrent assertion" severity NOTE; ASSERT arch_s9 /= natural'left REPORT "natural concurrent assertion" severity NOTE; TESTING: PROCESS BEGIN ASSERT arch_s1 /= bit'left REPORT "bit concurrent assertion" severity NOTE; ASSERT arch_s2 /= boolean'left REPORT "boolean concurrent assertion" severity NOTE; ASSERT arch_s3 /= character'left REPORT "character concurrent assertion" severity NOTE; ASSERT arch_s4 /= severity_level'left REPORT "severity_level concurrent assertion" severity NOTE; ASSERT arch_s5 /= integer'left REPORT "integer concurrent assertion" severity NOTE; ASSERT arch_s6 /= real'left REPORT "real concurrent assertion" severity NOTE; ASSERT arch_s7 /= time'left REPORT "time concurrent assertion" severity NOTE; ASSERT arch_s8 /= positive'left REPORT "positive concurrent assertion" severity NOTE; ASSERT arch_s9 /= natural'left REPORT "natural concurrent assertion" severity NOTE; assert FALSE report "***PASSED TEST: c09s04b00x00p06n01i01735 - This need manual check - The concurrent assertion statement and the sequential assertion should print out the same ASSERTION NOTES." severity NOTE; wait; END PROCESS TESTING; END c09s04b00x00p06n01i01735arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc1735.vhd,v 1.2 2001-10-26 16:29:43 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c09s04b00x00p06n01i01735ent IS END c09s04b00x00p06n01i01735ent; ARCHITECTURE c09s04b00x00p06n01i01735arch OF c09s04b00x00p06n01i01735ent IS signal arch_s1 : bit; signal arch_s2 : boolean; signal arch_s3 : character; signal arch_s4 : severity_level; signal arch_s5 : integer; signal arch_s6 : real; signal arch_s7 : time; signal arch_s8 : positive; signal arch_s9 : natural; BEGIN ASSERT arch_s1 /= bit'left REPORT "bit concurrent assertion" severity NOTE; ASSERT arch_s2 /= boolean'left REPORT "boolean concurrent assertion" severity NOTE; ASSERT arch_s3 /= character'left REPORT "character concurrent assertion" severity NOTE; ASSERT arch_s4 /= severity_level'left REPORT "severity_level concurrent assertion" severity NOTE; ASSERT arch_s5 /= integer'left REPORT "integer concurrent assertion" severity NOTE; ASSERT arch_s6 /= real'left REPORT "real concurrent assertion" severity NOTE; ASSERT arch_s7 /= time'left REPORT "time concurrent assertion" severity NOTE; ASSERT arch_s8 /= positive'left REPORT "positive concurrent assertion" severity NOTE; ASSERT arch_s9 /= natural'left REPORT "natural concurrent assertion" severity NOTE; TESTING: PROCESS BEGIN ASSERT arch_s1 /= bit'left REPORT "bit concurrent assertion" severity NOTE; ASSERT arch_s2 /= boolean'left REPORT "boolean concurrent assertion" severity NOTE; ASSERT arch_s3 /= character'left REPORT "character concurrent assertion" severity NOTE; ASSERT arch_s4 /= severity_level'left REPORT "severity_level concurrent assertion" severity NOTE; ASSERT arch_s5 /= integer'left REPORT "integer concurrent assertion" severity NOTE; ASSERT arch_s6 /= real'left REPORT "real concurrent assertion" severity NOTE; ASSERT arch_s7 /= time'left REPORT "time concurrent assertion" severity NOTE; ASSERT arch_s8 /= positive'left REPORT "positive concurrent assertion" severity NOTE; ASSERT arch_s9 /= natural'left REPORT "natural concurrent assertion" severity NOTE; assert FALSE report "***PASSED TEST: c09s04b00x00p06n01i01735 - This need manual check - The concurrent assertion statement and the sequential assertion should print out the same ASSERTION NOTES." severity NOTE; wait; END PROCESS TESTING; END c09s04b00x00p06n01i01735arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc1735.vhd,v 1.2 2001-10-26 16:29:43 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c09s04b00x00p06n01i01735ent IS END c09s04b00x00p06n01i01735ent; ARCHITECTURE c09s04b00x00p06n01i01735arch OF c09s04b00x00p06n01i01735ent IS signal arch_s1 : bit; signal arch_s2 : boolean; signal arch_s3 : character; signal arch_s4 : severity_level; signal arch_s5 : integer; signal arch_s6 : real; signal arch_s7 : time; signal arch_s8 : positive; signal arch_s9 : natural; BEGIN ASSERT arch_s1 /= bit'left REPORT "bit concurrent assertion" severity NOTE; ASSERT arch_s2 /= boolean'left REPORT "boolean concurrent assertion" severity NOTE; ASSERT arch_s3 /= character'left REPORT "character concurrent assertion" severity NOTE; ASSERT arch_s4 /= severity_level'left REPORT "severity_level concurrent assertion" severity NOTE; ASSERT arch_s5 /= integer'left REPORT "integer concurrent assertion" severity NOTE; ASSERT arch_s6 /= real'left REPORT "real concurrent assertion" severity NOTE; ASSERT arch_s7 /= time'left REPORT "time concurrent assertion" severity NOTE; ASSERT arch_s8 /= positive'left REPORT "positive concurrent assertion" severity NOTE; ASSERT arch_s9 /= natural'left REPORT "natural concurrent assertion" severity NOTE; TESTING: PROCESS BEGIN ASSERT arch_s1 /= bit'left REPORT "bit concurrent assertion" severity NOTE; ASSERT arch_s2 /= boolean'left REPORT "boolean concurrent assertion" severity NOTE; ASSERT arch_s3 /= character'left REPORT "character concurrent assertion" severity NOTE; ASSERT arch_s4 /= severity_level'left REPORT "severity_level concurrent assertion" severity NOTE; ASSERT arch_s5 /= integer'left REPORT "integer concurrent assertion" severity NOTE; ASSERT arch_s6 /= real'left REPORT "real concurrent assertion" severity NOTE; ASSERT arch_s7 /= time'left REPORT "time concurrent assertion" severity NOTE; ASSERT arch_s8 /= positive'left REPORT "positive concurrent assertion" severity NOTE; ASSERT arch_s9 /= natural'left REPORT "natural concurrent assertion" severity NOTE; assert FALSE report "***PASSED TEST: c09s04b00x00p06n01i01735 - This need manual check - The concurrent assertion statement and the sequential assertion should print out the same ASSERTION NOTES." severity NOTE; wait; END PROCESS TESTING; END c09s04b00x00p06n01i01735arch;
-------------------------------------------------------------------------------- -- This file is owned and controlled by Xilinx and must be used -- -- solely for design, simulation, implementation and creation of -- -- design files limited to Xilinx devices or technologies. Use -- -- with non-Xilinx devices or technologies is expressly prohibited -- -- and immediately terminates your license. -- -- -- -- XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" -- -- SOLELY FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR -- -- XILINX DEVICES. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION -- -- AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION -- -- OR STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS -- -- IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT, -- -- AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE -- -- FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY DISCLAIMS ANY -- -- WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE -- -- IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR -- -- REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF -- -- INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -- -- FOR A PARTICULAR PURPOSE. -- -- -- -- Xilinx products are not intended for use in life support -- -- appliances, devices, or systems. Use in such applications are -- -- expressly prohibited. -- -- -- -- (c) Copyright 1995-2011 Xilinx, Inc. -- -- All rights reserved. -- -------------------------------------------------------------------------------- -- You must compile the wrapper file program_memory.vhd when simulating -- the core, program_memory. When compiling the wrapper file, be sure to -- reference the XilinxCoreLib VHDL simulation library. For detailed -- instructions, please refer to the "CORE Generator Help". -- The synthesis directives "translate_off/translate_on" specified -- below are supported by Xilinx, Mentor Graphics and Synplicity -- synthesis tools. Ensure they are correct for your synthesis tool(s). LIBRARY ieee; USE ieee.std_logic_1164.ALL; -- synthesis translate_off LIBRARY XilinxCoreLib; -- synthesis translate_on ENTITY program_memory IS PORT ( clka : IN STD_LOGIC; addra : IN STD_LOGIC_VECTOR(8 DOWNTO 0); douta : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) ); END program_memory; ARCHITECTURE program_memory_a OF program_memory IS -- synthesis translate_off COMPONENT wrapped_program_memory PORT ( clka : IN STD_LOGIC; addra : IN STD_LOGIC_VECTOR(8 DOWNTO 0); douta : OUT STD_LOGIC_VECTOR(31 DOWNTO 0) ); END COMPONENT; -- Configuration specification FOR ALL : wrapped_program_memory USE ENTITY XilinxCoreLib.blk_mem_gen_v6_1(behavioral) GENERIC MAP ( c_addra_width => 9, c_addrb_width => 9, c_algorithm => 1, c_axi_id_width => 4, c_axi_slave_type => 0, c_axi_type => 1, c_byte_size => 9, c_common_clk => 0, c_default_data => "0", c_disable_warn_bhv_coll => 0, c_disable_warn_bhv_range => 0, c_family => "spartan3", c_has_axi_id => 0, c_has_ena => 0, c_has_enb => 0, c_has_injecterr => 0, c_has_mem_output_regs_a => 0, c_has_mem_output_regs_b => 0, c_has_mux_output_regs_a => 0, c_has_mux_output_regs_b => 0, c_has_regcea => 0, c_has_regceb => 0, c_has_rsta => 0, c_has_rstb => 0, c_has_softecc_input_regs_a => 0, c_has_softecc_output_regs_b => 0, c_init_file_name => "program_memory.mif", c_inita_val => "0", c_initb_val => "0", c_interface_type => 0, c_load_init_file => 1, c_mem_type => 3, c_mux_pipeline_stages => 0, c_prim_type => 1, c_read_depth_a => 512, c_read_depth_b => 512, c_read_width_a => 32, c_read_width_b => 32, c_rst_priority_a => "CE", c_rst_priority_b => "CE", c_rst_type => "SYNC", c_rstram_a => 0, c_rstram_b => 0, c_sim_collision_check => "ALL", c_use_byte_wea => 0, c_use_byte_web => 0, c_use_default_data => 0, c_use_ecc => 0, c_use_softecc => 0, c_wea_width => 1, c_web_width => 1, c_write_depth_a => 512, c_write_depth_b => 512, c_write_mode_a => "WRITE_FIRST", c_write_mode_b => "WRITE_FIRST", c_write_width_a => 32, c_write_width_b => 32, c_xdevicefamily => "spartan3e" ); -- synthesis translate_on BEGIN -- synthesis translate_off U0 : wrapped_program_memory PORT MAP ( clka => clka, addra => addra, douta => douta ); -- synthesis translate_on END program_memory_a;
LIBRARY IEEE; USE IEEE.std_logic_1164.ALL; USE IEEE.numeric_std.ALL; ENTITY SimpleUnitReanamedPort4 IS PORT( b_rx_data : IN STD_LOGIC_VECTOR(63 DOWNTO 0); b_rx_last : IN STD_LOGIC; b_rx_ready : OUT STD_LOGIC; b_rx_valid : IN STD_LOGIC; b_tx_data : OUT STD_LOGIC_VECTOR(63 DOWNTO 0); b_tx_last : OUT STD_LOGIC; b_tx_ready : IN STD_LOGIC; b_tx_valid : OUT STD_LOGIC; rx_data : OUT STD_LOGIC_VECTOR(63 DOWNTO 0); rx_last : OUT STD_LOGIC; rx_ready : IN STD_LOGIC; rx_valid : OUT STD_LOGIC; tx_data : IN STD_LOGIC_VECTOR(63 DOWNTO 0); tx_last : IN STD_LOGIC; tx_ready : OUT STD_LOGIC; tx_valid : IN STD_LOGIC ); END ENTITY; ARCHITECTURE rtl OF SimpleUnitReanamedPort4 IS BEGIN b_rx_ready <= rx_ready; b_tx_data <= tx_data; b_tx_last <= tx_last; b_tx_valid <= tx_valid; rx_data <= b_rx_data; rx_last <= b_rx_last; rx_valid <= b_rx_valid; tx_ready <= b_tx_ready; END ARCHITECTURE;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc519.vhd,v 1.2 2001-10-26 16:29:56 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- package c03s03b00x00p03n01i00519pkg is ----------------------------------USING ONLY WHITE MATTER--------------------------------- ------------------------------------------------------------------------------------------ ---ACCESS TYPE FROM STANDARD PACKAGE type boolean_ptr is access boolean ; --simple boolean type type bit_ptr is access bit ; --simple bit type type char_ptr is access character; --simple character type type severity_level_ptr is access severity_level;--simple severity type type integer_ptr is access integer; --simple integer type type real_ptr is access real; --simple real type type time_ptr is access time; --simple time type type natural_ptr is access natural; --simple natural type type positive_ptr is access positive; --simple positive type type string_ptr is access string; --simple string type type bit_vector_ptr is access bit_vector; --simple bit_vector type ------------------------------------------------------------------------------------------ --UNCONSTRAINED ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type boolean_vector is array (natural range <>) of boolean; type severity_level_vector is array (natural range <>) of severity_level; type integer_vector is array (natural range <>) of integer; type real_vector is array (natural range <>) of real; type time_vector is array (natural range <>) of time; type natural_vector is array (natural range <>) of natural; type positive_vector is array (natural range <>) of positive; ------------------------------------------------------------------------------------------- --CONSTRAINED ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural subtype boolean_vector_st is boolean_vector(0 to 15); subtype severity_level_vector_st is severity_level_vector(0 to 15); subtype integer_vector_st is integer_vector(0 to 15); subtype real_vector_st is real_vector(0 to 15); subtype time_vector_st is time_vector(0 to 15); subtype natural_vector_st is natural_vector(0 to 15); subtype positive_vector_st is positive_vector(0 to 15); ------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- --CONSTRAINED ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type boolean_cons_vector is array (15 downto 0) of boolean; type severity_level_cons_vector is array (15 downto 0) of severity_level; type integer_cons_vector is array (15 downto 0) of integer; type real_cons_vector is array (15 downto 0) of real; type time_cons_vector is array (15 downto 0) of time; type natural_cons_vector is array (15 downto 0) of natural; type positive_cons_vector is array (15 downto 0) of positive; ------------------------------------------------------------------------------------------- --CONSTRAINED ARRAY OF ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type boolean_cons_vectorofvector is array (0 to 15) of boolean_cons_vector; type severity_level_cons_vectorofvector is array (0 to 15) of severity_level_cons_vector; type integer_cons_vectorofvector is array (0 to 15) of integer_cons_vector ; type real_cons_vectorofvector is array (0 to 15) of real_cons_vector; type time_cons_vectorofvector is array (0 to 15) of time_cons_vector; type natural_cons_vectorofvector is array (0 to 15) of natural_cons_vector; type positive_cons_vectorofvector is array (0 to 15) of positive_cons_vector; ------------------------------------------------------------------------------------------- --UNCONSTRAINED 2-DIMENSIONAL ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type s2boolean_vector is array (natural range <>,natural range <>) of boolean; type s2bit_vector is array (natural range <>,natural range <>) of bit; type s2char_vector is array (natural range <>,natural range <>) of character; type s2severity_level_vector is array (natural range <>,natural range <>) of severity_level; type s2integer_vector is array (natural range <>,natural range <>) of integer; type s2real_vector is array (natural range <>,natural range <>) of real; type s2time_vector is array (natural range <>,natural range <>) of time; type s2natural_vector is array (natural range <>,natural range <>) of natural; type s2positive_vector is array (natural range <>,natural range <>) of positive; ------------------------------------------------------------------------------------------- --CONSTRAINED 2-DIMENSIONAL ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type column is range 1 to 64; type row is range 1 to 1024; type s2boolean_cons_vector is array (row,column) of boolean; type s2bit_cons_vector is array (row,column) of bit; type s2char_cons_vector is array (row,column) of character; type s2severity_level_cons_vector is array (row,column) of severity_level; type s2integer_cons_vector is array (row,column) of integer; type s2real_cons_vector is array (row,column) of real; type s2time_cons_vector is array (row,column) of time; type s2natural_cons_vector is array (row,column) of natural; type s2positive_cons_vector is array (row,column) of positive; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS FROM STANDARD PACKAGE type record_std_package is record a: boolean; b: bit; c:character; d:severity_level; e:integer; f:real; g:time; h:natural; i:positive; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS CONSTRAINT ARRAYS type record_array_st is record a:boolean_vector_st; b:severity_level_vector_st; c:integer_vector_st; d:real_vector_st; e:time_vector_st; f:natural_vector_st; g:positive_vector_st; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS CONSTRAINT ARRAYS type record_cons_array is record a:boolean_cons_vector; b:severity_level_cons_vector; c:integer_cons_vector; d:real_cons_vector; e:time_cons_vector; f:natural_cons_vector; g:positive_cons_vector; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS 2-DIMENSIONAL CONSTRAINED ARRAYS type record_2cons_array is record a:s2boolean_cons_vector; b:s2bit_cons_vector; c:s2char_cons_vector; d:s2severity_level_cons_vector; e:s2integer_cons_vector; f:s2real_cons_vector; g:s2time_cons_vector; h:s2natural_cons_vector; i:s2positive_cons_vector; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS 2-DIMENSIONAL CONSTRAINED ARRAYS OF ARRAY type record_cons_arrayofarray is record a:boolean_cons_vectorofvector; b:severity_level_cons_vectorofvector; c:integer_cons_vectorofvector; d:real_cons_vectorofvector; e:time_cons_vectorofvector; f:natural_cons_vectorofvector; g:positive_cons_vectorofvector; end record; -------------------------------------------------------------------------------------------- type record_of_ptr is record a:boolean_ptr ; --simple boolean type b:bit_ptr; --simple bit type c:char_ptr; --simple character type e:severity_level_ptr; --simple severity type f:integer_ptr; --simple integer type g:real_ptr ; --simple real type h:time_ptr; --simple time type i:natural_ptr; --simple natural type j:positive_ptr; --simple positive type k:string_ptr; --simple string type l:bit_vector_ptr; --simple bit_vector type end record; -------------------------------------------------------------------------------------------- type record_of_records is record a: record_std_package; c: record_cons_array; e: record_2cons_array; g: record_cons_arrayofarray; h: record_of_ptr; i: record_array_st; end record; -------------------------------------------------------------------------------------------- --ACCESS TYPES FOR ABOVE -------------------------------------------------------------------------------------------- type boolean_vector_ptr is access boolean_vector; type severity_level_vector_ptr is access severity_level_vector; type integer_vector_ptr is access integer_vector; type real_vector_ptr is access real_vector; type time_vector_ptr is access time_vector; type natural_vector_ptr is access natural_vector; type positive_vector_ptr is access positive_vector; -------------------------------------------------------------------------------------------- type boolean_cons_vector_ptr is access boolean_cons_vector; type severity_level_cons_vector_ptr is access severity_level_cons_vector; type integer_cons_vector_ptr is access integer_cons_vector; type real_cons_vector_ptr is access real_cons_vector; type time_cons_vector_ptr is access time_cons_vector; type natural_cons_vector_ptr is access natural_cons_vector; type positive_cons_vector_ptr is access positive_cons_vector; -------------------------------------------------------------------------------------------- type boolean_cons_vectorofvector_ptr is access boolean_cons_vectorofvector; type sev_lvl_cons_vecofvec_ptr is access severity_level_cons_vectorofvector; type integer_cons_vectorofvector_ptr is access integer_cons_vectorofvector; type real_cons_vectorofvector_ptr is access real_cons_vectorofvector; type time_cons_vectorofvector_ptr is access time_cons_vectorofvector; type natural_cons_vectorofvector_ptr is access natural_cons_vectorofvector; type posi_cons_vecofvec_ptr is access positive_cons_vectorofvector; -------------------------------------------------------------------------------------------- type s2boolean_vector_ptr is access boolean_vector; type s2bit_vector_ptr is access s2bit_vector; type s2char_vector_ptr is access s2char_vector; type s2severity_level_vector_ptr is access s2severity_level_vector; type s2integer_vector_ptr is access s2integer_vector; type s2real_vector_ptr is access s2real_vector; type s2time_vector_ptr is access s2time_vector; type s2positive_vector_ptr is access s2positive_vector; -------------------------------------------------------------------------------------------- type s2boolean_cons_vector_ptr is access s2boolean_cons_vector; type s2bit_cons_vector_ptr is access s2bit_cons_vector; type s2char_cons_vector_ptr is access s2char_cons_vector; type s2sev_lvl_cons_vec_ptr is access s2severity_level_cons_vector; type s2integer_cons_vector_ptr is access s2integer_cons_vector; type s2real_cons_vector_ptr is access s2real_cons_vector; type s2time_cons_vector_ptr is access s2time_cons_vector; type s2natural_cons_vector_ptr is access natural_cons_vector; type s2positive_cons_vector_ptr is access s2positive_cons_vector; -------------------------------------------------------------------------------------------- type record_std_package_ptr is access record_std_package; type record_cons_array_ptr is access record_cons_array; type record_2cons_array_ptr is access record_2cons_array; type record_cons_arrayofarray_ptr is access record_cons_arrayofarray; type record_of_ptr_ptr is access record_of_ptr; type record_of_records_ptr is access record_of_records; -------------------------------------------------------------------------------------------- --------------------USING PARTIAL GRAY & PARTIAL WHITE MATTER------------------------------- type four_value is ('Z','0','1','X'); --enumerated type type four_value_map is array(four_value) of boolean; subtype binary is four_value range '0' to '1'; type four_value_vector is array (natural range <>) of four_value; --unconstraint array of type byte is array(0 to 7) of bit; subtype word is bit_vector(0 to 15); --constrained array function resolution(i:in four_value_vector) return four_value; --bus resolution subtype four_value_state is resolution four_value; --function type type state_vector is array (natural range <>) of four_value_state; --unconstraint array of constant size :integer := 63; type primary_memory is array(0 to size) of word; --array of an array type primary_memory_module is --record with field record --as an array enable:binary; memory_number:primary_memory; end record; type whole_memory is array(0 to size) of primary_memory_module; --array of a complex record type current is range -2147483647 to +2147483647 units nA; uA = 1000 nA; mA = 1000 uA; A = 1000 mA; end units; type resistance is range -2147483647 to +2147483647 units uOhm; mOhm = 1000 uOhm; Ohm = 1000 mOhm; KOhm = 1000 Ohm; end units; subtype delay is integer range 1 to 10; type four_value_ptr is access four_value; type four_value_map_ptr is access four_value_map; type binary_ptr is access binary; type four_value_vector_ptr is access four_value_vector; --ennumerated type type byte_ptr is access byte; type word_ptr is access word; type four_value_state_ptr is access four_value_state; type state_vector_ptr is access state_vector; --type returned by resolu. type primary_memory_ptr is access primary_memory; type whole_memory_ptr is access whole_memory; type current_ptr is access current; type resistance_ptr is access resistance; type delay_ptr is access delay; ----------------------------------------------------------------------------------------- end c03s03b00x00p03n01i00519pkg; package body c03s03b00x00p03n01i00519pkg is function resolution(i:in four_value_vector) return four_value is variable temp :four_value := 'Z'; begin return temp; end; end c03s03b00x00p03n01i00519pkg; use work.c03s03b00x00p03n01i00519pkg.all; ENTITY c03s03b00x00p03n01i00519ent IS END c03s03b00x00p03n01i00519ent; ARCHITECTURE c03s03b00x00p03n01i00519arch OF c03s03b00x00p03n01i00519ent IS BEGIN TESTING: PROCESS variable var1 : boolean_ptr ; variable var2 : bit_ptr ; variable var3 : char_ptr ; variable var4 : severity_level_ptr ; variable var5 : integer_ptr ; variable var6 : real_ptr ; variable var7 : time_ptr ; variable var8 : natural_ptr ; variable var9 : positive_ptr ; variable var10 : string_ptr ; variable var11 : bit_vector_ptr ; variable var12 : boolean_vector_ptr ; variable var13 : severity_level_vector_ptr ; variable var14 : integer_vector_ptr ; variable var15 : real_vector_ptr ; variable var16 : time_vector_ptr ; variable var17 : natural_vector_ptr ; variable var18 : positive_vector_ptr ; variable var19 : boolean_cons_vector_ptr ; variable var20 : severity_level_cons_vector_ptr ; variable var21 : integer_cons_vector_ptr ; variable var22 : real_cons_vector_ptr ; variable var23 : time_cons_vector_ptr ; variable var24 : natural_cons_vector_ptr ; variable var25 : positive_cons_vector_ptr ; variable var26 : boolean_cons_vectorofvector_ptr ; variable var27 : sev_lvl_cons_vecofvec_ptr ; variable var28 : integer_cons_vectorofvector_ptr ; variable var29 : real_cons_vectorofvector_ptr ; variable var30 : time_cons_vectorofvector_ptr ; variable var31 : natural_cons_vectorofvector_ptr ; variable var32 : posi_cons_vecofvec_ptr ; variable var33 : s2boolean_vector_ptr ; variable var34 : s2bit_vector_ptr ; variable var35 : s2char_vector_ptr ; variable var36 : s2severity_level_vector_ptr ; variable var37 : s2integer_vector_ptr ; variable var38 : s2real_vector_ptr ; variable var39 : s2time_vector_ptr ; variable var40 : s2positive_vector_ptr ; variable var41 : s2boolean_cons_vector_ptr ; variable var42 : s2bit_cons_vector_ptr ; variable var43 : s2char_cons_vector_ptr ; variable var44 : s2sev_lvl_cons_vec_ptr ; variable var45 : s2integer_cons_vector_ptr ; variable var46 : s2real_cons_vector_ptr ; variable var47 : s2time_cons_vector_ptr ; variable var48 : s2natural_cons_vector_ptr ; variable var49 : s2positive_cons_vector_ptr ; variable var50 : record_std_package_ptr ; variable var51 : record_cons_array_ptr ; variable var52 : record_2cons_array_ptr ; variable var53 : record_cons_arrayofarray_ptr ; variable var54 : record_of_ptr_ptr ; variable var55 : record_of_records_ptr ; variable var56 : four_value_ptr ; variable var57 : four_value_map_ptr ; variable var58 : binary_ptr ; variable var59 : four_value_vector_ptr ; variable var60 : byte_ptr ; variable var61 : word_ptr ; variable var62 : four_value_state_ptr ; variable var63 : state_vector_ptr ; variable var64 : primary_memory_ptr ; variable var65 : whole_memory_ptr ; variable var66 : current_ptr ; variable var67 : resistance_ptr ; variable var68 : delay_ptr ; BEGIN assert (var1 = null) report "var1 has not been set to null." severity FAILURE ; assert (var2 = null) report "var2 has not been set to null." severity FAILURE ; assert (var3 = null) report "var3 has not been set to null." severity FAILURE ; assert (var4 = null) report "var4 has not been set to null." severity FAILURE ; assert (var5 = null) report "var5 has not been set to null." severity FAILURE ; assert (var6 = null) report "var6 has not been set to null." severity FAILURE ; assert (var7 = null) report "var7 has not been set to null." severity FAILURE ; assert (var8 = null) report "var8 has not been set to null." severity FAILURE ; assert (var9 = null) report "var9 has not been set to null." severity FAILURE ; assert (var10 = null) report "var10 has not been set to null." severity FAILURE ; assert (var11 = null) report "var11 has not been set to null." severity FAILURE ; assert (var12 = null) report "var12 has not been set to null." severity FAILURE ; assert (var13 = null) report "var13 has not been set to null." severity FAILURE ; assert (var14 = null) report "var14 has not been set to null." severity FAILURE ; assert (var15 = null) report "var15 has not been set to null." severity FAILURE ; assert (var16 = null) report "var16 has not been set to null." severity FAILURE ; assert (var17 = null) report "var17 has not been set to null." severity FAILURE ; assert (var18 = null) report "var18 has not been set to null." severity FAILURE ; assert (var19 = null) report "var19 has not been set to null." severity FAILURE ; assert (var20 = null) report "var20 has not been set to null." severity FAILURE ; assert (var21 = null) report "var21 has not been set to null." severity FAILURE ; assert (var22 = null) report "var22 has not been set to null." severity FAILURE ; assert (var23 = null) report "var23 has not been set to null." severity FAILURE ; assert (var24 = null) report "var24 has not been set to null." severity FAILURE ; assert (var25 = null) report "var25 has not been set to null." severity FAILURE ; assert (var26 = null) report "var26 has not been set to null." severity FAILURE ; assert (var27 = null) report "var27 has not been set to null." severity FAILURE ; assert (var28 = null) report "var28 has not been set to null." severity FAILURE ; assert (var29 = null) report "var29 has not been set to null." severity FAILURE ; assert (var30 = null) report "var30 has not been set to null." severity FAILURE ; assert (var31 = null) report "var31 has not been set to null." severity FAILURE ; assert (var32 = null) report "var32 has not been set to null." severity FAILURE ; assert (var33 = null) report "var33 has not been set to null." severity FAILURE ; assert (var34 = null) report "var34 has not been set to null." severity FAILURE ; assert (var35 = null) report "var35 has not been set to null." severity FAILURE ; assert (var36 = null) report "var36 has not been set to null." severity FAILURE ; assert (var37 = null) report "var37 has not been set to null." severity FAILURE ; assert (var38 = null) report "var38 has not been set to null." severity FAILURE ; assert (var39 = null) report "var39 has not been set to null." severity FAILURE ; assert (var40 = null) report "var40 has not been set to null." severity FAILURE ; assert (var41 = null) report "var41 has not been set to null." severity FAILURE ; assert (var42 = null) report "var42 has not been set to null." severity FAILURE ; assert (var43 = null) report "var43 has not been set to null." severity FAILURE ; assert (var44 = null) report "var44 has not been set to null." severity FAILURE ; assert (var45 = null) report "var45 has not been set to null." severity FAILURE ; assert (var46 = null) report "var46 has not been set to null." severity FAILURE ; assert (var47 = null) report "var47 has not been set to null." severity FAILURE ; assert (var48 = null) report "var48 has not been set to null." severity FAILURE ; assert (var49 = null) report "var49 has not been set to null." severity FAILURE ; assert (var50 = null) report "var50 has not been set to null." severity FAILURE ; assert (var51 = null) report "var51 has not been set to null." severity FAILURE ; assert (var52 = null) report "var52 has not been set to null." severity FAILURE ; assert (var53 = null) report "var53 has not been set to null." severity FAILURE ; assert (var54 = null) report "var54 has not been set to null." severity FAILURE ; assert (var55 = null) report "var55 has not been set to null." severity FAILURE ; assert (var56 = null) report "var56 has not been set to null." severity FAILURE ; assert (var57 = null) report "var57 has not been set to null." severity FAILURE ; assert (var58 = null) report "var58 has not been set to null." severity FAILURE ; assert (var59 = null) report "var59 has not been set to null." severity FAILURE ; assert (var60 = null) report "var60 has not been set to null." severity FAILURE ; assert (var61 = null) report "var61 has not been set to null." severity FAILURE ; assert (var62 = null) report "var62 has not been set to null." severity FAILURE ; assert (var63 = null) report "var63 has not been set to null." severity FAILURE ; assert (var64 = null) report "var64 has not been set to null." severity FAILURE ; assert (var65 = null) report "var65 has not been set to null." severity FAILURE ; assert (var66 = null) report "var66 has not been set to null." severity FAILURE ; assert (var67 = null) report "var67 has not been set to null." severity FAILURE ; assert (var68 = null) report "var68 has not been set to null." severity FAILURE ; assert NOT((var1 = null) and (var2 = null) and (var3 = null) and (var4 = null) and (var5 = null) and (var6 = null) and (var7 = null) and (var8 = null) and (var9 = null) and (var10 = null) and (var11 = null) and (var12 = null) and (var13 = null) and (var14 = null) and (var15 = null) and (var16 = null) and (var17 = null) and (var18 = null) and (var19 = null) and (var20 = null) and (var21 = null) and (var22 = null) and (var23 = null) and (var24 = null) and (var25 = null) and (var26 = null) and (var27 = null) and (var28 = null) and (var29 = null) and (var30 = null) and (var31 = null) and (var32 = null) and (var33 = null) and (var34 = null) and (var35 = null) and (var36 = null) and (var37 = null) and (var38 = null) and (var39 = null) and (var40 = null) and (var41 = null) and (var42 = null) and (var43 = null) and (var44 = null) and (var45 = null) and (var46 = null) and (var47 = null) and (var48 = null) and (var49 = null) and (var50 = null) and (var51 = null) and (var52 = null) and (var53 = null) and (var54 = null) and (var55 = null) and (var56 = null) and (var57 = null) and (var58 = null) and (var59 = null) and (var60 = null) and (var61 = null) and (var62 = null) and (var63 = null) and (var64 = null) and (var65 = null) and (var66 = null) and (var67 = null) and (var68 = null)) report "***PASSED TEST: c03s03b00x00p03n01i00519" severity NOTE; assert ((var1 = null) and (var2 = null) and (var3 = null) and (var4 = null) and (var5 = null) and (var6 = null) and (var7 = null) and (var8 = null) and (var9 = null) and (var10 = null) and (var11 = null) and (var12 = null) and (var13 = null) and (var14 = null) and (var15 = null) and (var16 = null) and (var17 = null) and (var18 = null) and (var19 = null) and (var20 = null) and (var21 = null) and (var22 = null) and (var23 = null) and (var24 = null) and (var25 = null) and (var26 = null) and (var27 = null) and (var28 = null) and (var29 = null) and (var30 = null) and (var31 = null) and (var32 = null) and (var33 = null) and (var34 = null) and (var35 = null) and (var36 = null) and (var37 = null) and (var38 = null) and (var39 = null) and (var40 = null) and (var41 = null) and (var42 = null) and (var43 = null) and (var44 = null) and (var45 = null) and (var46 = null) and (var47 = null) and (var48 = null) and (var49 = null) and (var50 = null) and (var51 = null) and (var52 = null) and (var53 = null) and (var54 = null) and (var55 = null) and (var56 = null) and (var57 = null) and (var58 = null) and (var59 = null) and (var60 = null) and (var61 = null) and (var62 = null) and (var63 = null) and (var64 = null) and (var65 = null) and (var66 = null) and (var67 = null) and (var68 = null)) report "***FAILED TEST: c03s03b00x00p03n01i00519 - The null value of an access type is the default initial value of the type." severity ERROR; wait; END PROCESS TESTING; END c03s03b00x00p03n01i00519arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc519.vhd,v 1.2 2001-10-26 16:29:56 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- package c03s03b00x00p03n01i00519pkg is ----------------------------------USING ONLY WHITE MATTER--------------------------------- ------------------------------------------------------------------------------------------ ---ACCESS TYPE FROM STANDARD PACKAGE type boolean_ptr is access boolean ; --simple boolean type type bit_ptr is access bit ; --simple bit type type char_ptr is access character; --simple character type type severity_level_ptr is access severity_level;--simple severity type type integer_ptr is access integer; --simple integer type type real_ptr is access real; --simple real type type time_ptr is access time; --simple time type type natural_ptr is access natural; --simple natural type type positive_ptr is access positive; --simple positive type type string_ptr is access string; --simple string type type bit_vector_ptr is access bit_vector; --simple bit_vector type ------------------------------------------------------------------------------------------ --UNCONSTRAINED ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type boolean_vector is array (natural range <>) of boolean; type severity_level_vector is array (natural range <>) of severity_level; type integer_vector is array (natural range <>) of integer; type real_vector is array (natural range <>) of real; type time_vector is array (natural range <>) of time; type natural_vector is array (natural range <>) of natural; type positive_vector is array (natural range <>) of positive; ------------------------------------------------------------------------------------------- --CONSTRAINED ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural subtype boolean_vector_st is boolean_vector(0 to 15); subtype severity_level_vector_st is severity_level_vector(0 to 15); subtype integer_vector_st is integer_vector(0 to 15); subtype real_vector_st is real_vector(0 to 15); subtype time_vector_st is time_vector(0 to 15); subtype natural_vector_st is natural_vector(0 to 15); subtype positive_vector_st is positive_vector(0 to 15); ------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- --CONSTRAINED ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type boolean_cons_vector is array (15 downto 0) of boolean; type severity_level_cons_vector is array (15 downto 0) of severity_level; type integer_cons_vector is array (15 downto 0) of integer; type real_cons_vector is array (15 downto 0) of real; type time_cons_vector is array (15 downto 0) of time; type natural_cons_vector is array (15 downto 0) of natural; type positive_cons_vector is array (15 downto 0) of positive; ------------------------------------------------------------------------------------------- --CONSTRAINED ARRAY OF ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type boolean_cons_vectorofvector is array (0 to 15) of boolean_cons_vector; type severity_level_cons_vectorofvector is array (0 to 15) of severity_level_cons_vector; type integer_cons_vectorofvector is array (0 to 15) of integer_cons_vector ; type real_cons_vectorofvector is array (0 to 15) of real_cons_vector; type time_cons_vectorofvector is array (0 to 15) of time_cons_vector; type natural_cons_vectorofvector is array (0 to 15) of natural_cons_vector; type positive_cons_vectorofvector is array (0 to 15) of positive_cons_vector; ------------------------------------------------------------------------------------------- --UNCONSTRAINED 2-DIMENSIONAL ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type s2boolean_vector is array (natural range <>,natural range <>) of boolean; type s2bit_vector is array (natural range <>,natural range <>) of bit; type s2char_vector is array (natural range <>,natural range <>) of character; type s2severity_level_vector is array (natural range <>,natural range <>) of severity_level; type s2integer_vector is array (natural range <>,natural range <>) of integer; type s2real_vector is array (natural range <>,natural range <>) of real; type s2time_vector is array (natural range <>,natural range <>) of time; type s2natural_vector is array (natural range <>,natural range <>) of natural; type s2positive_vector is array (natural range <>,natural range <>) of positive; ------------------------------------------------------------------------------------------- --CONSTRAINED 2-DIMENSIONAL ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type column is range 1 to 64; type row is range 1 to 1024; type s2boolean_cons_vector is array (row,column) of boolean; type s2bit_cons_vector is array (row,column) of bit; type s2char_cons_vector is array (row,column) of character; type s2severity_level_cons_vector is array (row,column) of severity_level; type s2integer_cons_vector is array (row,column) of integer; type s2real_cons_vector is array (row,column) of real; type s2time_cons_vector is array (row,column) of time; type s2natural_cons_vector is array (row,column) of natural; type s2positive_cons_vector is array (row,column) of positive; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS FROM STANDARD PACKAGE type record_std_package is record a: boolean; b: bit; c:character; d:severity_level; e:integer; f:real; g:time; h:natural; i:positive; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS CONSTRAINT ARRAYS type record_array_st is record a:boolean_vector_st; b:severity_level_vector_st; c:integer_vector_st; d:real_vector_st; e:time_vector_st; f:natural_vector_st; g:positive_vector_st; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS CONSTRAINT ARRAYS type record_cons_array is record a:boolean_cons_vector; b:severity_level_cons_vector; c:integer_cons_vector; d:real_cons_vector; e:time_cons_vector; f:natural_cons_vector; g:positive_cons_vector; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS 2-DIMENSIONAL CONSTRAINED ARRAYS type record_2cons_array is record a:s2boolean_cons_vector; b:s2bit_cons_vector; c:s2char_cons_vector; d:s2severity_level_cons_vector; e:s2integer_cons_vector; f:s2real_cons_vector; g:s2time_cons_vector; h:s2natural_cons_vector; i:s2positive_cons_vector; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS 2-DIMENSIONAL CONSTRAINED ARRAYS OF ARRAY type record_cons_arrayofarray is record a:boolean_cons_vectorofvector; b:severity_level_cons_vectorofvector; c:integer_cons_vectorofvector; d:real_cons_vectorofvector; e:time_cons_vectorofvector; f:natural_cons_vectorofvector; g:positive_cons_vectorofvector; end record; -------------------------------------------------------------------------------------------- type record_of_ptr is record a:boolean_ptr ; --simple boolean type b:bit_ptr; --simple bit type c:char_ptr; --simple character type e:severity_level_ptr; --simple severity type f:integer_ptr; --simple integer type g:real_ptr ; --simple real type h:time_ptr; --simple time type i:natural_ptr; --simple natural type j:positive_ptr; --simple positive type k:string_ptr; --simple string type l:bit_vector_ptr; --simple bit_vector type end record; -------------------------------------------------------------------------------------------- type record_of_records is record a: record_std_package; c: record_cons_array; e: record_2cons_array; g: record_cons_arrayofarray; h: record_of_ptr; i: record_array_st; end record; -------------------------------------------------------------------------------------------- --ACCESS TYPES FOR ABOVE -------------------------------------------------------------------------------------------- type boolean_vector_ptr is access boolean_vector; type severity_level_vector_ptr is access severity_level_vector; type integer_vector_ptr is access integer_vector; type real_vector_ptr is access real_vector; type time_vector_ptr is access time_vector; type natural_vector_ptr is access natural_vector; type positive_vector_ptr is access positive_vector; -------------------------------------------------------------------------------------------- type boolean_cons_vector_ptr is access boolean_cons_vector; type severity_level_cons_vector_ptr is access severity_level_cons_vector; type integer_cons_vector_ptr is access integer_cons_vector; type real_cons_vector_ptr is access real_cons_vector; type time_cons_vector_ptr is access time_cons_vector; type natural_cons_vector_ptr is access natural_cons_vector; type positive_cons_vector_ptr is access positive_cons_vector; -------------------------------------------------------------------------------------------- type boolean_cons_vectorofvector_ptr is access boolean_cons_vectorofvector; type sev_lvl_cons_vecofvec_ptr is access severity_level_cons_vectorofvector; type integer_cons_vectorofvector_ptr is access integer_cons_vectorofvector; type real_cons_vectorofvector_ptr is access real_cons_vectorofvector; type time_cons_vectorofvector_ptr is access time_cons_vectorofvector; type natural_cons_vectorofvector_ptr is access natural_cons_vectorofvector; type posi_cons_vecofvec_ptr is access positive_cons_vectorofvector; -------------------------------------------------------------------------------------------- type s2boolean_vector_ptr is access boolean_vector; type s2bit_vector_ptr is access s2bit_vector; type s2char_vector_ptr is access s2char_vector; type s2severity_level_vector_ptr is access s2severity_level_vector; type s2integer_vector_ptr is access s2integer_vector; type s2real_vector_ptr is access s2real_vector; type s2time_vector_ptr is access s2time_vector; type s2positive_vector_ptr is access s2positive_vector; -------------------------------------------------------------------------------------------- type s2boolean_cons_vector_ptr is access s2boolean_cons_vector; type s2bit_cons_vector_ptr is access s2bit_cons_vector; type s2char_cons_vector_ptr is access s2char_cons_vector; type s2sev_lvl_cons_vec_ptr is access s2severity_level_cons_vector; type s2integer_cons_vector_ptr is access s2integer_cons_vector; type s2real_cons_vector_ptr is access s2real_cons_vector; type s2time_cons_vector_ptr is access s2time_cons_vector; type s2natural_cons_vector_ptr is access natural_cons_vector; type s2positive_cons_vector_ptr is access s2positive_cons_vector; -------------------------------------------------------------------------------------------- type record_std_package_ptr is access record_std_package; type record_cons_array_ptr is access record_cons_array; type record_2cons_array_ptr is access record_2cons_array; type record_cons_arrayofarray_ptr is access record_cons_arrayofarray; type record_of_ptr_ptr is access record_of_ptr; type record_of_records_ptr is access record_of_records; -------------------------------------------------------------------------------------------- --------------------USING PARTIAL GRAY & PARTIAL WHITE MATTER------------------------------- type four_value is ('Z','0','1','X'); --enumerated type type four_value_map is array(four_value) of boolean; subtype binary is four_value range '0' to '1'; type four_value_vector is array (natural range <>) of four_value; --unconstraint array of type byte is array(0 to 7) of bit; subtype word is bit_vector(0 to 15); --constrained array function resolution(i:in four_value_vector) return four_value; --bus resolution subtype four_value_state is resolution four_value; --function type type state_vector is array (natural range <>) of four_value_state; --unconstraint array of constant size :integer := 63; type primary_memory is array(0 to size) of word; --array of an array type primary_memory_module is --record with field record --as an array enable:binary; memory_number:primary_memory; end record; type whole_memory is array(0 to size) of primary_memory_module; --array of a complex record type current is range -2147483647 to +2147483647 units nA; uA = 1000 nA; mA = 1000 uA; A = 1000 mA; end units; type resistance is range -2147483647 to +2147483647 units uOhm; mOhm = 1000 uOhm; Ohm = 1000 mOhm; KOhm = 1000 Ohm; end units; subtype delay is integer range 1 to 10; type four_value_ptr is access four_value; type four_value_map_ptr is access four_value_map; type binary_ptr is access binary; type four_value_vector_ptr is access four_value_vector; --ennumerated type type byte_ptr is access byte; type word_ptr is access word; type four_value_state_ptr is access four_value_state; type state_vector_ptr is access state_vector; --type returned by resolu. type primary_memory_ptr is access primary_memory; type whole_memory_ptr is access whole_memory; type current_ptr is access current; type resistance_ptr is access resistance; type delay_ptr is access delay; ----------------------------------------------------------------------------------------- end c03s03b00x00p03n01i00519pkg; package body c03s03b00x00p03n01i00519pkg is function resolution(i:in four_value_vector) return four_value is variable temp :four_value := 'Z'; begin return temp; end; end c03s03b00x00p03n01i00519pkg; use work.c03s03b00x00p03n01i00519pkg.all; ENTITY c03s03b00x00p03n01i00519ent IS END c03s03b00x00p03n01i00519ent; ARCHITECTURE c03s03b00x00p03n01i00519arch OF c03s03b00x00p03n01i00519ent IS BEGIN TESTING: PROCESS variable var1 : boolean_ptr ; variable var2 : bit_ptr ; variable var3 : char_ptr ; variable var4 : severity_level_ptr ; variable var5 : integer_ptr ; variable var6 : real_ptr ; variable var7 : time_ptr ; variable var8 : natural_ptr ; variable var9 : positive_ptr ; variable var10 : string_ptr ; variable var11 : bit_vector_ptr ; variable var12 : boolean_vector_ptr ; variable var13 : severity_level_vector_ptr ; variable var14 : integer_vector_ptr ; variable var15 : real_vector_ptr ; variable var16 : time_vector_ptr ; variable var17 : natural_vector_ptr ; variable var18 : positive_vector_ptr ; variable var19 : boolean_cons_vector_ptr ; variable var20 : severity_level_cons_vector_ptr ; variable var21 : integer_cons_vector_ptr ; variable var22 : real_cons_vector_ptr ; variable var23 : time_cons_vector_ptr ; variable var24 : natural_cons_vector_ptr ; variable var25 : positive_cons_vector_ptr ; variable var26 : boolean_cons_vectorofvector_ptr ; variable var27 : sev_lvl_cons_vecofvec_ptr ; variable var28 : integer_cons_vectorofvector_ptr ; variable var29 : real_cons_vectorofvector_ptr ; variable var30 : time_cons_vectorofvector_ptr ; variable var31 : natural_cons_vectorofvector_ptr ; variable var32 : posi_cons_vecofvec_ptr ; variable var33 : s2boolean_vector_ptr ; variable var34 : s2bit_vector_ptr ; variable var35 : s2char_vector_ptr ; variable var36 : s2severity_level_vector_ptr ; variable var37 : s2integer_vector_ptr ; variable var38 : s2real_vector_ptr ; variable var39 : s2time_vector_ptr ; variable var40 : s2positive_vector_ptr ; variable var41 : s2boolean_cons_vector_ptr ; variable var42 : s2bit_cons_vector_ptr ; variable var43 : s2char_cons_vector_ptr ; variable var44 : s2sev_lvl_cons_vec_ptr ; variable var45 : s2integer_cons_vector_ptr ; variable var46 : s2real_cons_vector_ptr ; variable var47 : s2time_cons_vector_ptr ; variable var48 : s2natural_cons_vector_ptr ; variable var49 : s2positive_cons_vector_ptr ; variable var50 : record_std_package_ptr ; variable var51 : record_cons_array_ptr ; variable var52 : record_2cons_array_ptr ; variable var53 : record_cons_arrayofarray_ptr ; variable var54 : record_of_ptr_ptr ; variable var55 : record_of_records_ptr ; variable var56 : four_value_ptr ; variable var57 : four_value_map_ptr ; variable var58 : binary_ptr ; variable var59 : four_value_vector_ptr ; variable var60 : byte_ptr ; variable var61 : word_ptr ; variable var62 : four_value_state_ptr ; variable var63 : state_vector_ptr ; variable var64 : primary_memory_ptr ; variable var65 : whole_memory_ptr ; variable var66 : current_ptr ; variable var67 : resistance_ptr ; variable var68 : delay_ptr ; BEGIN assert (var1 = null) report "var1 has not been set to null." severity FAILURE ; assert (var2 = null) report "var2 has not been set to null." severity FAILURE ; assert (var3 = null) report "var3 has not been set to null." severity FAILURE ; assert (var4 = null) report "var4 has not been set to null." severity FAILURE ; assert (var5 = null) report "var5 has not been set to null." severity FAILURE ; assert (var6 = null) report "var6 has not been set to null." severity FAILURE ; assert (var7 = null) report "var7 has not been set to null." severity FAILURE ; assert (var8 = null) report "var8 has not been set to null." severity FAILURE ; assert (var9 = null) report "var9 has not been set to null." severity FAILURE ; assert (var10 = null) report "var10 has not been set to null." severity FAILURE ; assert (var11 = null) report "var11 has not been set to null." severity FAILURE ; assert (var12 = null) report "var12 has not been set to null." severity FAILURE ; assert (var13 = null) report "var13 has not been set to null." severity FAILURE ; assert (var14 = null) report "var14 has not been set to null." severity FAILURE ; assert (var15 = null) report "var15 has not been set to null." severity FAILURE ; assert (var16 = null) report "var16 has not been set to null." severity FAILURE ; assert (var17 = null) report "var17 has not been set to null." severity FAILURE ; assert (var18 = null) report "var18 has not been set to null." severity FAILURE ; assert (var19 = null) report "var19 has not been set to null." severity FAILURE ; assert (var20 = null) report "var20 has not been set to null." severity FAILURE ; assert (var21 = null) report "var21 has not been set to null." severity FAILURE ; assert (var22 = null) report "var22 has not been set to null." severity FAILURE ; assert (var23 = null) report "var23 has not been set to null." severity FAILURE ; assert (var24 = null) report "var24 has not been set to null." severity FAILURE ; assert (var25 = null) report "var25 has not been set to null." severity FAILURE ; assert (var26 = null) report "var26 has not been set to null." severity FAILURE ; assert (var27 = null) report "var27 has not been set to null." severity FAILURE ; assert (var28 = null) report "var28 has not been set to null." severity FAILURE ; assert (var29 = null) report "var29 has not been set to null." severity FAILURE ; assert (var30 = null) report "var30 has not been set to null." severity FAILURE ; assert (var31 = null) report "var31 has not been set to null." severity FAILURE ; assert (var32 = null) report "var32 has not been set to null." severity FAILURE ; assert (var33 = null) report "var33 has not been set to null." severity FAILURE ; assert (var34 = null) report "var34 has not been set to null." severity FAILURE ; assert (var35 = null) report "var35 has not been set to null." severity FAILURE ; assert (var36 = null) report "var36 has not been set to null." severity FAILURE ; assert (var37 = null) report "var37 has not been set to null." severity FAILURE ; assert (var38 = null) report "var38 has not been set to null." severity FAILURE ; assert (var39 = null) report "var39 has not been set to null." severity FAILURE ; assert (var40 = null) report "var40 has not been set to null." severity FAILURE ; assert (var41 = null) report "var41 has not been set to null." severity FAILURE ; assert (var42 = null) report "var42 has not been set to null." severity FAILURE ; assert (var43 = null) report "var43 has not been set to null." severity FAILURE ; assert (var44 = null) report "var44 has not been set to null." severity FAILURE ; assert (var45 = null) report "var45 has not been set to null." severity FAILURE ; assert (var46 = null) report "var46 has not been set to null." severity FAILURE ; assert (var47 = null) report "var47 has not been set to null." severity FAILURE ; assert (var48 = null) report "var48 has not been set to null." severity FAILURE ; assert (var49 = null) report "var49 has not been set to null." severity FAILURE ; assert (var50 = null) report "var50 has not been set to null." severity FAILURE ; assert (var51 = null) report "var51 has not been set to null." severity FAILURE ; assert (var52 = null) report "var52 has not been set to null." severity FAILURE ; assert (var53 = null) report "var53 has not been set to null." severity FAILURE ; assert (var54 = null) report "var54 has not been set to null." severity FAILURE ; assert (var55 = null) report "var55 has not been set to null." severity FAILURE ; assert (var56 = null) report "var56 has not been set to null." severity FAILURE ; assert (var57 = null) report "var57 has not been set to null." severity FAILURE ; assert (var58 = null) report "var58 has not been set to null." severity FAILURE ; assert (var59 = null) report "var59 has not been set to null." severity FAILURE ; assert (var60 = null) report "var60 has not been set to null." severity FAILURE ; assert (var61 = null) report "var61 has not been set to null." severity FAILURE ; assert (var62 = null) report "var62 has not been set to null." severity FAILURE ; assert (var63 = null) report "var63 has not been set to null." severity FAILURE ; assert (var64 = null) report "var64 has not been set to null." severity FAILURE ; assert (var65 = null) report "var65 has not been set to null." severity FAILURE ; assert (var66 = null) report "var66 has not been set to null." severity FAILURE ; assert (var67 = null) report "var67 has not been set to null." severity FAILURE ; assert (var68 = null) report "var68 has not been set to null." severity FAILURE ; assert NOT((var1 = null) and (var2 = null) and (var3 = null) and (var4 = null) and (var5 = null) and (var6 = null) and (var7 = null) and (var8 = null) and (var9 = null) and (var10 = null) and (var11 = null) and (var12 = null) and (var13 = null) and (var14 = null) and (var15 = null) and (var16 = null) and (var17 = null) and (var18 = null) and (var19 = null) and (var20 = null) and (var21 = null) and (var22 = null) and (var23 = null) and (var24 = null) and (var25 = null) and (var26 = null) and (var27 = null) and (var28 = null) and (var29 = null) and (var30 = null) and (var31 = null) and (var32 = null) and (var33 = null) and (var34 = null) and (var35 = null) and (var36 = null) and (var37 = null) and (var38 = null) and (var39 = null) and (var40 = null) and (var41 = null) and (var42 = null) and (var43 = null) and (var44 = null) and (var45 = null) and (var46 = null) and (var47 = null) and (var48 = null) and (var49 = null) and (var50 = null) and (var51 = null) and (var52 = null) and (var53 = null) and (var54 = null) and (var55 = null) and (var56 = null) and (var57 = null) and (var58 = null) and (var59 = null) and (var60 = null) and (var61 = null) and (var62 = null) and (var63 = null) and (var64 = null) and (var65 = null) and (var66 = null) and (var67 = null) and (var68 = null)) report "***PASSED TEST: c03s03b00x00p03n01i00519" severity NOTE; assert ((var1 = null) and (var2 = null) and (var3 = null) and (var4 = null) and (var5 = null) and (var6 = null) and (var7 = null) and (var8 = null) and (var9 = null) and (var10 = null) and (var11 = null) and (var12 = null) and (var13 = null) and (var14 = null) and (var15 = null) and (var16 = null) and (var17 = null) and (var18 = null) and (var19 = null) and (var20 = null) and (var21 = null) and (var22 = null) and (var23 = null) and (var24 = null) and (var25 = null) and (var26 = null) and (var27 = null) and (var28 = null) and (var29 = null) and (var30 = null) and (var31 = null) and (var32 = null) and (var33 = null) and (var34 = null) and (var35 = null) and (var36 = null) and (var37 = null) and (var38 = null) and (var39 = null) and (var40 = null) and (var41 = null) and (var42 = null) and (var43 = null) and (var44 = null) and (var45 = null) and (var46 = null) and (var47 = null) and (var48 = null) and (var49 = null) and (var50 = null) and (var51 = null) and (var52 = null) and (var53 = null) and (var54 = null) and (var55 = null) and (var56 = null) and (var57 = null) and (var58 = null) and (var59 = null) and (var60 = null) and (var61 = null) and (var62 = null) and (var63 = null) and (var64 = null) and (var65 = null) and (var66 = null) and (var67 = null) and (var68 = null)) report "***FAILED TEST: c03s03b00x00p03n01i00519 - The null value of an access type is the default initial value of the type." severity ERROR; wait; END PROCESS TESTING; END c03s03b00x00p03n01i00519arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc519.vhd,v 1.2 2001-10-26 16:29:56 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- package c03s03b00x00p03n01i00519pkg is ----------------------------------USING ONLY WHITE MATTER--------------------------------- ------------------------------------------------------------------------------------------ ---ACCESS TYPE FROM STANDARD PACKAGE type boolean_ptr is access boolean ; --simple boolean type type bit_ptr is access bit ; --simple bit type type char_ptr is access character; --simple character type type severity_level_ptr is access severity_level;--simple severity type type integer_ptr is access integer; --simple integer type type real_ptr is access real; --simple real type type time_ptr is access time; --simple time type type natural_ptr is access natural; --simple natural type type positive_ptr is access positive; --simple positive type type string_ptr is access string; --simple string type type bit_vector_ptr is access bit_vector; --simple bit_vector type ------------------------------------------------------------------------------------------ --UNCONSTRAINED ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type boolean_vector is array (natural range <>) of boolean; type severity_level_vector is array (natural range <>) of severity_level; type integer_vector is array (natural range <>) of integer; type real_vector is array (natural range <>) of real; type time_vector is array (natural range <>) of time; type natural_vector is array (natural range <>) of natural; type positive_vector is array (natural range <>) of positive; ------------------------------------------------------------------------------------------- --CONSTRAINED ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural subtype boolean_vector_st is boolean_vector(0 to 15); subtype severity_level_vector_st is severity_level_vector(0 to 15); subtype integer_vector_st is integer_vector(0 to 15); subtype real_vector_st is real_vector(0 to 15); subtype time_vector_st is time_vector(0 to 15); subtype natural_vector_st is natural_vector(0 to 15); subtype positive_vector_st is positive_vector(0 to 15); ------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- --CONSTRAINED ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type boolean_cons_vector is array (15 downto 0) of boolean; type severity_level_cons_vector is array (15 downto 0) of severity_level; type integer_cons_vector is array (15 downto 0) of integer; type real_cons_vector is array (15 downto 0) of real; type time_cons_vector is array (15 downto 0) of time; type natural_cons_vector is array (15 downto 0) of natural; type positive_cons_vector is array (15 downto 0) of positive; ------------------------------------------------------------------------------------------- --CONSTRAINED ARRAY OF ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type boolean_cons_vectorofvector is array (0 to 15) of boolean_cons_vector; type severity_level_cons_vectorofvector is array (0 to 15) of severity_level_cons_vector; type integer_cons_vectorofvector is array (0 to 15) of integer_cons_vector ; type real_cons_vectorofvector is array (0 to 15) of real_cons_vector; type time_cons_vectorofvector is array (0 to 15) of time_cons_vector; type natural_cons_vectorofvector is array (0 to 15) of natural_cons_vector; type positive_cons_vectorofvector is array (0 to 15) of positive_cons_vector; ------------------------------------------------------------------------------------------- --UNCONSTRAINED 2-DIMENSIONAL ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type s2boolean_vector is array (natural range <>,natural range <>) of boolean; type s2bit_vector is array (natural range <>,natural range <>) of bit; type s2char_vector is array (natural range <>,natural range <>) of character; type s2severity_level_vector is array (natural range <>,natural range <>) of severity_level; type s2integer_vector is array (natural range <>,natural range <>) of integer; type s2real_vector is array (natural range <>,natural range <>) of real; type s2time_vector is array (natural range <>,natural range <>) of time; type s2natural_vector is array (natural range <>,natural range <>) of natural; type s2positive_vector is array (natural range <>,natural range <>) of positive; ------------------------------------------------------------------------------------------- --CONSTRAINED 2-DIMENSIONAL ARRAY OF TYPES FROM STANDARD PACKAGE --Index type is natural type column is range 1 to 64; type row is range 1 to 1024; type s2boolean_cons_vector is array (row,column) of boolean; type s2bit_cons_vector is array (row,column) of bit; type s2char_cons_vector is array (row,column) of character; type s2severity_level_cons_vector is array (row,column) of severity_level; type s2integer_cons_vector is array (row,column) of integer; type s2real_cons_vector is array (row,column) of real; type s2time_cons_vector is array (row,column) of time; type s2natural_cons_vector is array (row,column) of natural; type s2positive_cons_vector is array (row,column) of positive; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS FROM STANDARD PACKAGE type record_std_package is record a: boolean; b: bit; c:character; d:severity_level; e:integer; f:real; g:time; h:natural; i:positive; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS CONSTRAINT ARRAYS type record_array_st is record a:boolean_vector_st; b:severity_level_vector_st; c:integer_vector_st; d:real_vector_st; e:time_vector_st; f:natural_vector_st; g:positive_vector_st; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS CONSTRAINT ARRAYS type record_cons_array is record a:boolean_cons_vector; b:severity_level_cons_vector; c:integer_cons_vector; d:real_cons_vector; e:time_cons_vector; f:natural_cons_vector; g:positive_cons_vector; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS 2-DIMENSIONAL CONSTRAINED ARRAYS type record_2cons_array is record a:s2boolean_cons_vector; b:s2bit_cons_vector; c:s2char_cons_vector; d:s2severity_level_cons_vector; e:s2integer_cons_vector; f:s2real_cons_vector; g:s2time_cons_vector; h:s2natural_cons_vector; i:s2positive_cons_vector; end record; ------------------------------------------------------------------------------------------- --RECORD WITH FIELDS AS 2-DIMENSIONAL CONSTRAINED ARRAYS OF ARRAY type record_cons_arrayofarray is record a:boolean_cons_vectorofvector; b:severity_level_cons_vectorofvector; c:integer_cons_vectorofvector; d:real_cons_vectorofvector; e:time_cons_vectorofvector; f:natural_cons_vectorofvector; g:positive_cons_vectorofvector; end record; -------------------------------------------------------------------------------------------- type record_of_ptr is record a:boolean_ptr ; --simple boolean type b:bit_ptr; --simple bit type c:char_ptr; --simple character type e:severity_level_ptr; --simple severity type f:integer_ptr; --simple integer type g:real_ptr ; --simple real type h:time_ptr; --simple time type i:natural_ptr; --simple natural type j:positive_ptr; --simple positive type k:string_ptr; --simple string type l:bit_vector_ptr; --simple bit_vector type end record; -------------------------------------------------------------------------------------------- type record_of_records is record a: record_std_package; c: record_cons_array; e: record_2cons_array; g: record_cons_arrayofarray; h: record_of_ptr; i: record_array_st; end record; -------------------------------------------------------------------------------------------- --ACCESS TYPES FOR ABOVE -------------------------------------------------------------------------------------------- type boolean_vector_ptr is access boolean_vector; type severity_level_vector_ptr is access severity_level_vector; type integer_vector_ptr is access integer_vector; type real_vector_ptr is access real_vector; type time_vector_ptr is access time_vector; type natural_vector_ptr is access natural_vector; type positive_vector_ptr is access positive_vector; -------------------------------------------------------------------------------------------- type boolean_cons_vector_ptr is access boolean_cons_vector; type severity_level_cons_vector_ptr is access severity_level_cons_vector; type integer_cons_vector_ptr is access integer_cons_vector; type real_cons_vector_ptr is access real_cons_vector; type time_cons_vector_ptr is access time_cons_vector; type natural_cons_vector_ptr is access natural_cons_vector; type positive_cons_vector_ptr is access positive_cons_vector; -------------------------------------------------------------------------------------------- type boolean_cons_vectorofvector_ptr is access boolean_cons_vectorofvector; type sev_lvl_cons_vecofvec_ptr is access severity_level_cons_vectorofvector; type integer_cons_vectorofvector_ptr is access integer_cons_vectorofvector; type real_cons_vectorofvector_ptr is access real_cons_vectorofvector; type time_cons_vectorofvector_ptr is access time_cons_vectorofvector; type natural_cons_vectorofvector_ptr is access natural_cons_vectorofvector; type posi_cons_vecofvec_ptr is access positive_cons_vectorofvector; -------------------------------------------------------------------------------------------- type s2boolean_vector_ptr is access boolean_vector; type s2bit_vector_ptr is access s2bit_vector; type s2char_vector_ptr is access s2char_vector; type s2severity_level_vector_ptr is access s2severity_level_vector; type s2integer_vector_ptr is access s2integer_vector; type s2real_vector_ptr is access s2real_vector; type s2time_vector_ptr is access s2time_vector; type s2positive_vector_ptr is access s2positive_vector; -------------------------------------------------------------------------------------------- type s2boolean_cons_vector_ptr is access s2boolean_cons_vector; type s2bit_cons_vector_ptr is access s2bit_cons_vector; type s2char_cons_vector_ptr is access s2char_cons_vector; type s2sev_lvl_cons_vec_ptr is access s2severity_level_cons_vector; type s2integer_cons_vector_ptr is access s2integer_cons_vector; type s2real_cons_vector_ptr is access s2real_cons_vector; type s2time_cons_vector_ptr is access s2time_cons_vector; type s2natural_cons_vector_ptr is access natural_cons_vector; type s2positive_cons_vector_ptr is access s2positive_cons_vector; -------------------------------------------------------------------------------------------- type record_std_package_ptr is access record_std_package; type record_cons_array_ptr is access record_cons_array; type record_2cons_array_ptr is access record_2cons_array; type record_cons_arrayofarray_ptr is access record_cons_arrayofarray; type record_of_ptr_ptr is access record_of_ptr; type record_of_records_ptr is access record_of_records; -------------------------------------------------------------------------------------------- --------------------USING PARTIAL GRAY & PARTIAL WHITE MATTER------------------------------- type four_value is ('Z','0','1','X'); --enumerated type type four_value_map is array(four_value) of boolean; subtype binary is four_value range '0' to '1'; type four_value_vector is array (natural range <>) of four_value; --unconstraint array of type byte is array(0 to 7) of bit; subtype word is bit_vector(0 to 15); --constrained array function resolution(i:in four_value_vector) return four_value; --bus resolution subtype four_value_state is resolution four_value; --function type type state_vector is array (natural range <>) of four_value_state; --unconstraint array of constant size :integer := 63; type primary_memory is array(0 to size) of word; --array of an array type primary_memory_module is --record with field record --as an array enable:binary; memory_number:primary_memory; end record; type whole_memory is array(0 to size) of primary_memory_module; --array of a complex record type current is range -2147483647 to +2147483647 units nA; uA = 1000 nA; mA = 1000 uA; A = 1000 mA; end units; type resistance is range -2147483647 to +2147483647 units uOhm; mOhm = 1000 uOhm; Ohm = 1000 mOhm; KOhm = 1000 Ohm; end units; subtype delay is integer range 1 to 10; type four_value_ptr is access four_value; type four_value_map_ptr is access four_value_map; type binary_ptr is access binary; type four_value_vector_ptr is access four_value_vector; --ennumerated type type byte_ptr is access byte; type word_ptr is access word; type four_value_state_ptr is access four_value_state; type state_vector_ptr is access state_vector; --type returned by resolu. type primary_memory_ptr is access primary_memory; type whole_memory_ptr is access whole_memory; type current_ptr is access current; type resistance_ptr is access resistance; type delay_ptr is access delay; ----------------------------------------------------------------------------------------- end c03s03b00x00p03n01i00519pkg; package body c03s03b00x00p03n01i00519pkg is function resolution(i:in four_value_vector) return four_value is variable temp :four_value := 'Z'; begin return temp; end; end c03s03b00x00p03n01i00519pkg; use work.c03s03b00x00p03n01i00519pkg.all; ENTITY c03s03b00x00p03n01i00519ent IS END c03s03b00x00p03n01i00519ent; ARCHITECTURE c03s03b00x00p03n01i00519arch OF c03s03b00x00p03n01i00519ent IS BEGIN TESTING: PROCESS variable var1 : boolean_ptr ; variable var2 : bit_ptr ; variable var3 : char_ptr ; variable var4 : severity_level_ptr ; variable var5 : integer_ptr ; variable var6 : real_ptr ; variable var7 : time_ptr ; variable var8 : natural_ptr ; variable var9 : positive_ptr ; variable var10 : string_ptr ; variable var11 : bit_vector_ptr ; variable var12 : boolean_vector_ptr ; variable var13 : severity_level_vector_ptr ; variable var14 : integer_vector_ptr ; variable var15 : real_vector_ptr ; variable var16 : time_vector_ptr ; variable var17 : natural_vector_ptr ; variable var18 : positive_vector_ptr ; variable var19 : boolean_cons_vector_ptr ; variable var20 : severity_level_cons_vector_ptr ; variable var21 : integer_cons_vector_ptr ; variable var22 : real_cons_vector_ptr ; variable var23 : time_cons_vector_ptr ; variable var24 : natural_cons_vector_ptr ; variable var25 : positive_cons_vector_ptr ; variable var26 : boolean_cons_vectorofvector_ptr ; variable var27 : sev_lvl_cons_vecofvec_ptr ; variable var28 : integer_cons_vectorofvector_ptr ; variable var29 : real_cons_vectorofvector_ptr ; variable var30 : time_cons_vectorofvector_ptr ; variable var31 : natural_cons_vectorofvector_ptr ; variable var32 : posi_cons_vecofvec_ptr ; variable var33 : s2boolean_vector_ptr ; variable var34 : s2bit_vector_ptr ; variable var35 : s2char_vector_ptr ; variable var36 : s2severity_level_vector_ptr ; variable var37 : s2integer_vector_ptr ; variable var38 : s2real_vector_ptr ; variable var39 : s2time_vector_ptr ; variable var40 : s2positive_vector_ptr ; variable var41 : s2boolean_cons_vector_ptr ; variable var42 : s2bit_cons_vector_ptr ; variable var43 : s2char_cons_vector_ptr ; variable var44 : s2sev_lvl_cons_vec_ptr ; variable var45 : s2integer_cons_vector_ptr ; variable var46 : s2real_cons_vector_ptr ; variable var47 : s2time_cons_vector_ptr ; variable var48 : s2natural_cons_vector_ptr ; variable var49 : s2positive_cons_vector_ptr ; variable var50 : record_std_package_ptr ; variable var51 : record_cons_array_ptr ; variable var52 : record_2cons_array_ptr ; variable var53 : record_cons_arrayofarray_ptr ; variable var54 : record_of_ptr_ptr ; variable var55 : record_of_records_ptr ; variable var56 : four_value_ptr ; variable var57 : four_value_map_ptr ; variable var58 : binary_ptr ; variable var59 : four_value_vector_ptr ; variable var60 : byte_ptr ; variable var61 : word_ptr ; variable var62 : four_value_state_ptr ; variable var63 : state_vector_ptr ; variable var64 : primary_memory_ptr ; variable var65 : whole_memory_ptr ; variable var66 : current_ptr ; variable var67 : resistance_ptr ; variable var68 : delay_ptr ; BEGIN assert (var1 = null) report "var1 has not been set to null." severity FAILURE ; assert (var2 = null) report "var2 has not been set to null." severity FAILURE ; assert (var3 = null) report "var3 has not been set to null." severity FAILURE ; assert (var4 = null) report "var4 has not been set to null." severity FAILURE ; assert (var5 = null) report "var5 has not been set to null." severity FAILURE ; assert (var6 = null) report "var6 has not been set to null." severity FAILURE ; assert (var7 = null) report "var7 has not been set to null." severity FAILURE ; assert (var8 = null) report "var8 has not been set to null." severity FAILURE ; assert (var9 = null) report "var9 has not been set to null." severity FAILURE ; assert (var10 = null) report "var10 has not been set to null." severity FAILURE ; assert (var11 = null) report "var11 has not been set to null." severity FAILURE ; assert (var12 = null) report "var12 has not been set to null." severity FAILURE ; assert (var13 = null) report "var13 has not been set to null." severity FAILURE ; assert (var14 = null) report "var14 has not been set to null." severity FAILURE ; assert (var15 = null) report "var15 has not been set to null." severity FAILURE ; assert (var16 = null) report "var16 has not been set to null." severity FAILURE ; assert (var17 = null) report "var17 has not been set to null." severity FAILURE ; assert (var18 = null) report "var18 has not been set to null." severity FAILURE ; assert (var19 = null) report "var19 has not been set to null." severity FAILURE ; assert (var20 = null) report "var20 has not been set to null." severity FAILURE ; assert (var21 = null) report "var21 has not been set to null." severity FAILURE ; assert (var22 = null) report "var22 has not been set to null." severity FAILURE ; assert (var23 = null) report "var23 has not been set to null." severity FAILURE ; assert (var24 = null) report "var24 has not been set to null." severity FAILURE ; assert (var25 = null) report "var25 has not been set to null." severity FAILURE ; assert (var26 = null) report "var26 has not been set to null." severity FAILURE ; assert (var27 = null) report "var27 has not been set to null." severity FAILURE ; assert (var28 = null) report "var28 has not been set to null." severity FAILURE ; assert (var29 = null) report "var29 has not been set to null." severity FAILURE ; assert (var30 = null) report "var30 has not been set to null." severity FAILURE ; assert (var31 = null) report "var31 has not been set to null." severity FAILURE ; assert (var32 = null) report "var32 has not been set to null." severity FAILURE ; assert (var33 = null) report "var33 has not been set to null." severity FAILURE ; assert (var34 = null) report "var34 has not been set to null." severity FAILURE ; assert (var35 = null) report "var35 has not been set to null." severity FAILURE ; assert (var36 = null) report "var36 has not been set to null." severity FAILURE ; assert (var37 = null) report "var37 has not been set to null." severity FAILURE ; assert (var38 = null) report "var38 has not been set to null." severity FAILURE ; assert (var39 = null) report "var39 has not been set to null." severity FAILURE ; assert (var40 = null) report "var40 has not been set to null." severity FAILURE ; assert (var41 = null) report "var41 has not been set to null." severity FAILURE ; assert (var42 = null) report "var42 has not been set to null." severity FAILURE ; assert (var43 = null) report "var43 has not been set to null." severity FAILURE ; assert (var44 = null) report "var44 has not been set to null." severity FAILURE ; assert (var45 = null) report "var45 has not been set to null." severity FAILURE ; assert (var46 = null) report "var46 has not been set to null." severity FAILURE ; assert (var47 = null) report "var47 has not been set to null." severity FAILURE ; assert (var48 = null) report "var48 has not been set to null." severity FAILURE ; assert (var49 = null) report "var49 has not been set to null." severity FAILURE ; assert (var50 = null) report "var50 has not been set to null." severity FAILURE ; assert (var51 = null) report "var51 has not been set to null." severity FAILURE ; assert (var52 = null) report "var52 has not been set to null." severity FAILURE ; assert (var53 = null) report "var53 has not been set to null." severity FAILURE ; assert (var54 = null) report "var54 has not been set to null." severity FAILURE ; assert (var55 = null) report "var55 has not been set to null." severity FAILURE ; assert (var56 = null) report "var56 has not been set to null." severity FAILURE ; assert (var57 = null) report "var57 has not been set to null." severity FAILURE ; assert (var58 = null) report "var58 has not been set to null." severity FAILURE ; assert (var59 = null) report "var59 has not been set to null." severity FAILURE ; assert (var60 = null) report "var60 has not been set to null." severity FAILURE ; assert (var61 = null) report "var61 has not been set to null." severity FAILURE ; assert (var62 = null) report "var62 has not been set to null." severity FAILURE ; assert (var63 = null) report "var63 has not been set to null." severity FAILURE ; assert (var64 = null) report "var64 has not been set to null." severity FAILURE ; assert (var65 = null) report "var65 has not been set to null." severity FAILURE ; assert (var66 = null) report "var66 has not been set to null." severity FAILURE ; assert (var67 = null) report "var67 has not been set to null." severity FAILURE ; assert (var68 = null) report "var68 has not been set to null." severity FAILURE ; assert NOT((var1 = null) and (var2 = null) and (var3 = null) and (var4 = null) and (var5 = null) and (var6 = null) and (var7 = null) and (var8 = null) and (var9 = null) and (var10 = null) and (var11 = null) and (var12 = null) and (var13 = null) and (var14 = null) and (var15 = null) and (var16 = null) and (var17 = null) and (var18 = null) and (var19 = null) and (var20 = null) and (var21 = null) and (var22 = null) and (var23 = null) and (var24 = null) and (var25 = null) and (var26 = null) and (var27 = null) and (var28 = null) and (var29 = null) and (var30 = null) and (var31 = null) and (var32 = null) and (var33 = null) and (var34 = null) and (var35 = null) and (var36 = null) and (var37 = null) and (var38 = null) and (var39 = null) and (var40 = null) and (var41 = null) and (var42 = null) and (var43 = null) and (var44 = null) and (var45 = null) and (var46 = null) and (var47 = null) and (var48 = null) and (var49 = null) and (var50 = null) and (var51 = null) and (var52 = null) and (var53 = null) and (var54 = null) and (var55 = null) and (var56 = null) and (var57 = null) and (var58 = null) and (var59 = null) and (var60 = null) and (var61 = null) and (var62 = null) and (var63 = null) and (var64 = null) and (var65 = null) and (var66 = null) and (var67 = null) and (var68 = null)) report "***PASSED TEST: c03s03b00x00p03n01i00519" severity NOTE; assert ((var1 = null) and (var2 = null) and (var3 = null) and (var4 = null) and (var5 = null) and (var6 = null) and (var7 = null) and (var8 = null) and (var9 = null) and (var10 = null) and (var11 = null) and (var12 = null) and (var13 = null) and (var14 = null) and (var15 = null) and (var16 = null) and (var17 = null) and (var18 = null) and (var19 = null) and (var20 = null) and (var21 = null) and (var22 = null) and (var23 = null) and (var24 = null) and (var25 = null) and (var26 = null) and (var27 = null) and (var28 = null) and (var29 = null) and (var30 = null) and (var31 = null) and (var32 = null) and (var33 = null) and (var34 = null) and (var35 = null) and (var36 = null) and (var37 = null) and (var38 = null) and (var39 = null) and (var40 = null) and (var41 = null) and (var42 = null) and (var43 = null) and (var44 = null) and (var45 = null) and (var46 = null) and (var47 = null) and (var48 = null) and (var49 = null) and (var50 = null) and (var51 = null) and (var52 = null) and (var53 = null) and (var54 = null) and (var55 = null) and (var56 = null) and (var57 = null) and (var58 = null) and (var59 = null) and (var60 = null) and (var61 = null) and (var62 = null) and (var63 = null) and (var64 = null) and (var65 = null) and (var66 = null) and (var67 = null) and (var68 = null)) report "***FAILED TEST: c03s03b00x00p03n01i00519 - The null value of an access type is the default initial value of the type." severity ERROR; wait; END PROCESS TESTING; END c03s03b00x00p03n01i00519arch;
library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity LBDR_packet_drop_routing_part_pseudo_with_checkers_top is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; packet_drop_order_out: out std_logic; packet_drop_in_out: out std_logic; Req_N_in_out, Req_E_in_out, Req_W_in_out, Req_S_in_out, Req_L_in_out: out std_logic; N1_out, E1_out, W1_out, S1_out: out std_logic; grants_out: out std_logic; -- Checker outputs --err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order : out std_logic ); end LBDR_packet_drop_routing_part_pseudo_with_checkers_top; architecture behavior of LBDR_packet_drop_routing_part_pseudo_with_checkers_top is component LBDR_packet_drop_routing_part_pseudo is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; packet_drop_order: out std_logic; packet_drop_in: out std_logic; Req_N_in, Req_E_in, Req_W_in, Req_S_in, Req_L_in: out std_logic; N1_out, E1_out, W1_out, S1_out: out std_logic; grants_out: out std_logic ); end component; component LBDR_packet_drop_routing_part_pseudo_checkers is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; dst_addr: in std_logic_vector(NoC_size-1 downto 0); Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; N1_out, E1_out, W1_out, S1_out: in std_logic; Req_N_in, Req_E_in, Req_W_in, Req_S_in, Req_L_in: in std_logic; grants: in std_logic; packet_drop_order: in std_logic; packet_drop_in: in std_logic; -- Checker outputs --err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order : out std_logic ); end component; signal Req_N_in_sig, Req_E_in_sig, Req_W_in_sig, Req_S_in_sig, Req_L_in_sig: std_logic; signal N1_out_sig, E1_out_sig, W1_out_sig, S1_out_sig: std_logic; signal grants_out_sig, packet_drop_order_sig, packet_drop_in_sig: std_logic; begin packet_drop_in_out <= packet_drop_in_sig; packet_drop_order_out <= packet_drop_order_sig; Req_N_in_out <= Req_N_in_sig; Req_E_in_out <= Req_E_in_sig; Req_W_in_out <= Req_W_in_sig; Req_S_in_out <= Req_S_in_sig; Req_L_in_out <= Req_L_in_sig; N1_out <= N1_out_sig; E1_out <= E1_out_sig; W1_out <= W1_out_sig; S1_out <= S1_out_sig; grants_out <= grants_out_sig; -- LBDR packet drop routing part (pseudo-combinational) module instantiation LBDR_routing_part_pseudo: LBDR_packet_drop_routing_part_pseudo generic map (cur_addr_rst => 5, NoC_size => 4) port map ( empty => empty, flit_type => flit_type, dst_addr => dst_addr, grant_N => grant_N, grant_E => grant_E, grant_W => grant_W, grant_S => grant_S, grant_L => grant_L, Req_N_FF => Req_N_FF, Req_E_FF => Req_E_FF, Req_W_FF => Req_W_FF, Req_S_FF => Req_S_FF, Req_L_FF => Req_L_FF, Cx => Cx, Rxy => Rxy, packet_drop => packet_drop, packet_drop_order => packet_drop_order_sig, packet_drop_in => packet_drop_in_sig, Req_N_in => Req_N_in_sig, Req_E_in => Req_E_in_sig, Req_W_in => Req_W_in_sig, Req_S_in => Req_S_in_sig, Req_L_in => Req_L_in_sig, N1_out => N1_out_sig, E1_out => E1_out_sig, W1_out => W1_out_sig, S1_out => S1_out_sig, grants_out => grants_out_sig ); -- LBDR packet drop routing part checkers instantiation CHECKERS: LBDR_packet_drop_routing_part_pseudo_checkers generic map (cur_addr_rst => 5, NoC_size => 4) port map ( empty => empty, flit_type => flit_type, Req_N_FF => Req_N_FF, Req_E_FF => Req_E_FF, Req_W_FF => Req_W_FF, Req_S_FF => Req_S_FF, Req_L_FF => Req_L_FF, grant_N => grant_N, grant_E => grant_E, grant_W => grant_W, grant_S => grant_S, grant_L => grant_L, dst_addr => dst_addr, Cx => Cx, Rxy => Rxy, packet_drop => packet_drop, N1_out => N1_out_sig, E1_out => E1_out_sig, W1_out => W1_out_sig, S1_out => S1_out_sig, Req_N_in => Req_N_in_sig, Req_E_in => Req_E_in_sig, Req_W_in => Req_W_in_sig, Req_S_in => Req_S_in_sig, Req_L_in => Req_L_in_sig, grants => grants_out_sig, packet_drop_order => packet_drop_order_sig, packet_drop_in => packet_drop_in_sig, -- Checker outputs --err_header_not_empty_Requests_in_onehot => err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in => err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => err_grants_onehot, err_grants_mismatch => err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in => err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in => err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in => err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in => err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal => err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal => err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => err_packet_drop_order ); end behavior;
library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity LBDR_packet_drop_routing_part_pseudo_with_checkers_top is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; packet_drop_order_out: out std_logic; packet_drop_in_out: out std_logic; Req_N_in_out, Req_E_in_out, Req_W_in_out, Req_S_in_out, Req_L_in_out: out std_logic; N1_out, E1_out, W1_out, S1_out: out std_logic; grants_out: out std_logic; -- Checker outputs --err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order : out std_logic ); end LBDR_packet_drop_routing_part_pseudo_with_checkers_top; architecture behavior of LBDR_packet_drop_routing_part_pseudo_with_checkers_top is component LBDR_packet_drop_routing_part_pseudo is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; packet_drop_order: out std_logic; packet_drop_in: out std_logic; Req_N_in, Req_E_in, Req_W_in, Req_S_in, Req_L_in: out std_logic; N1_out, E1_out, W1_out, S1_out: out std_logic; grants_out: out std_logic ); end component; component LBDR_packet_drop_routing_part_pseudo_checkers is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; dst_addr: in std_logic_vector(NoC_size-1 downto 0); Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; N1_out, E1_out, W1_out, S1_out: in std_logic; Req_N_in, Req_E_in, Req_W_in, Req_S_in, Req_L_in: in std_logic; grants: in std_logic; packet_drop_order: in std_logic; packet_drop_in: in std_logic; -- Checker outputs --err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order : out std_logic ); end component; signal Req_N_in_sig, Req_E_in_sig, Req_W_in_sig, Req_S_in_sig, Req_L_in_sig: std_logic; signal N1_out_sig, E1_out_sig, W1_out_sig, S1_out_sig: std_logic; signal grants_out_sig, packet_drop_order_sig, packet_drop_in_sig: std_logic; begin packet_drop_in_out <= packet_drop_in_sig; packet_drop_order_out <= packet_drop_order_sig; Req_N_in_out <= Req_N_in_sig; Req_E_in_out <= Req_E_in_sig; Req_W_in_out <= Req_W_in_sig; Req_S_in_out <= Req_S_in_sig; Req_L_in_out <= Req_L_in_sig; N1_out <= N1_out_sig; E1_out <= E1_out_sig; W1_out <= W1_out_sig; S1_out <= S1_out_sig; grants_out <= grants_out_sig; -- LBDR packet drop routing part (pseudo-combinational) module instantiation LBDR_routing_part_pseudo: LBDR_packet_drop_routing_part_pseudo generic map (cur_addr_rst => 5, NoC_size => 4) port map ( empty => empty, flit_type => flit_type, dst_addr => dst_addr, grant_N => grant_N, grant_E => grant_E, grant_W => grant_W, grant_S => grant_S, grant_L => grant_L, Req_N_FF => Req_N_FF, Req_E_FF => Req_E_FF, Req_W_FF => Req_W_FF, Req_S_FF => Req_S_FF, Req_L_FF => Req_L_FF, Cx => Cx, Rxy => Rxy, packet_drop => packet_drop, packet_drop_order => packet_drop_order_sig, packet_drop_in => packet_drop_in_sig, Req_N_in => Req_N_in_sig, Req_E_in => Req_E_in_sig, Req_W_in => Req_W_in_sig, Req_S_in => Req_S_in_sig, Req_L_in => Req_L_in_sig, N1_out => N1_out_sig, E1_out => E1_out_sig, W1_out => W1_out_sig, S1_out => S1_out_sig, grants_out => grants_out_sig ); -- LBDR packet drop routing part checkers instantiation CHECKERS: LBDR_packet_drop_routing_part_pseudo_checkers generic map (cur_addr_rst => 5, NoC_size => 4) port map ( empty => empty, flit_type => flit_type, Req_N_FF => Req_N_FF, Req_E_FF => Req_E_FF, Req_W_FF => Req_W_FF, Req_S_FF => Req_S_FF, Req_L_FF => Req_L_FF, grant_N => grant_N, grant_E => grant_E, grant_W => grant_W, grant_S => grant_S, grant_L => grant_L, dst_addr => dst_addr, Cx => Cx, Rxy => Rxy, packet_drop => packet_drop, N1_out => N1_out_sig, E1_out => E1_out_sig, W1_out => W1_out_sig, S1_out => S1_out_sig, Req_N_in => Req_N_in_sig, Req_E_in => Req_E_in_sig, Req_W_in => Req_W_in_sig, Req_S_in => Req_S_in_sig, Req_L_in => Req_L_in_sig, grants => grants_out_sig, packet_drop_order => packet_drop_order_sig, packet_drop_in => packet_drop_in_sig, -- Checker outputs --err_header_not_empty_Requests_in_onehot => err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in => err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => err_grants_onehot, err_grants_mismatch => err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in => err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in => err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in => err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in => err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal => err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal => err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => err_packet_drop_order ); end behavior;
library ieee; use ieee.std_logic_1164.all; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; use IEEE.NUMERIC_STD.all; use IEEE.MATH_REAL.ALL; entity LBDR_packet_drop_routing_part_pseudo_with_checkers_top is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; packet_drop_order_out: out std_logic; packet_drop_in_out: out std_logic; Req_N_in_out, Req_E_in_out, Req_W_in_out, Req_S_in_out, Req_L_in_out: out std_logic; N1_out, E1_out, W1_out, S1_out: out std_logic; grants_out: out std_logic; -- Checker outputs --err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order : out std_logic ); end LBDR_packet_drop_routing_part_pseudo_with_checkers_top; architecture behavior of LBDR_packet_drop_routing_part_pseudo_with_checkers_top is component LBDR_packet_drop_routing_part_pseudo is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); dst_addr: in std_logic_vector(NoC_size-1 downto 0); grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; packet_drop_order: out std_logic; packet_drop_in: out std_logic; Req_N_in, Req_E_in, Req_W_in, Req_S_in, Req_L_in: out std_logic; N1_out, E1_out, W1_out, S1_out: out std_logic; grants_out: out std_logic ); end component; component LBDR_packet_drop_routing_part_pseudo_checkers is generic ( cur_addr_rst: integer := 5; NoC_size: integer := 4 ); port ( empty: in std_logic; flit_type: in std_logic_vector(2 downto 0); Req_N_FF, Req_E_FF, Req_W_FF, Req_S_FF, Req_L_FF: in std_logic; grant_N, grant_E, grant_W, grant_S, grant_L: in std_logic; dst_addr: in std_logic_vector(NoC_size-1 downto 0); Cx: in std_logic_vector(3 downto 0); Rxy: in std_logic_vector(7 downto 0); packet_drop: in std_logic; N1_out, E1_out, W1_out, S1_out: in std_logic; Req_N_in, Req_E_in, Req_W_in, Req_S_in, Req_L_in: in std_logic; grants: in std_logic; packet_drop_order: in std_logic; packet_drop_in: in std_logic; -- Checker outputs --err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot, err_grants_mismatch, err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order : out std_logic ); end component; signal Req_N_in_sig, Req_E_in_sig, Req_W_in_sig, Req_S_in_sig, Req_L_in_sig: std_logic; signal N1_out_sig, E1_out_sig, W1_out_sig, S1_out_sig: std_logic; signal grants_out_sig, packet_drop_order_sig, packet_drop_in_sig: std_logic; begin packet_drop_in_out <= packet_drop_in_sig; packet_drop_order_out <= packet_drop_order_sig; Req_N_in_out <= Req_N_in_sig; Req_E_in_out <= Req_E_in_sig; Req_W_in_out <= Req_W_in_sig; Req_S_in_out <= Req_S_in_sig; Req_L_in_out <= Req_L_in_sig; N1_out <= N1_out_sig; E1_out <= E1_out_sig; W1_out <= W1_out_sig; S1_out <= S1_out_sig; grants_out <= grants_out_sig; -- LBDR packet drop routing part (pseudo-combinational) module instantiation LBDR_routing_part_pseudo: LBDR_packet_drop_routing_part_pseudo generic map (cur_addr_rst => 5, NoC_size => 4) port map ( empty => empty, flit_type => flit_type, dst_addr => dst_addr, grant_N => grant_N, grant_E => grant_E, grant_W => grant_W, grant_S => grant_S, grant_L => grant_L, Req_N_FF => Req_N_FF, Req_E_FF => Req_E_FF, Req_W_FF => Req_W_FF, Req_S_FF => Req_S_FF, Req_L_FF => Req_L_FF, Cx => Cx, Rxy => Rxy, packet_drop => packet_drop, packet_drop_order => packet_drop_order_sig, packet_drop_in => packet_drop_in_sig, Req_N_in => Req_N_in_sig, Req_E_in => Req_E_in_sig, Req_W_in => Req_W_in_sig, Req_S_in => Req_S_in_sig, Req_L_in => Req_L_in_sig, N1_out => N1_out_sig, E1_out => E1_out_sig, W1_out => W1_out_sig, S1_out => S1_out_sig, grants_out => grants_out_sig ); -- LBDR packet drop routing part checkers instantiation CHECKERS: LBDR_packet_drop_routing_part_pseudo_checkers generic map (cur_addr_rst => 5, NoC_size => 4) port map ( empty => empty, flit_type => flit_type, Req_N_FF => Req_N_FF, Req_E_FF => Req_E_FF, Req_W_FF => Req_W_FF, Req_S_FF => Req_S_FF, Req_L_FF => Req_L_FF, grant_N => grant_N, grant_E => grant_E, grant_W => grant_W, grant_S => grant_S, grant_L => grant_L, dst_addr => dst_addr, Cx => Cx, Rxy => Rxy, packet_drop => packet_drop, N1_out => N1_out_sig, E1_out => E1_out_sig, W1_out => W1_out_sig, S1_out => S1_out_sig, Req_N_in => Req_N_in_sig, Req_E_in => Req_E_in_sig, Req_W_in => Req_W_in_sig, Req_S_in => Req_S_in_sig, Req_L_in => Req_L_in_sig, grants => grants_out_sig, packet_drop_order => packet_drop_order_sig, packet_drop_in => packet_drop_in_sig, -- Checker outputs --err_header_not_empty_Requests_in_onehot => err_header_not_empty_Requests_in_onehot, err_header_empty_Requests_FF_Requests_in => err_header_empty_Requests_FF_Requests_in, err_tail_Requests_in_all_zero => err_tail_Requests_in_all_zero, err_tail_empty_Requests_FF_Requests_in => err_tail_empty_Requests_FF_Requests_in, err_tail_not_empty_not_grants_Requests_FF_Requests_in => err_tail_not_empty_not_grants_Requests_FF_Requests_in, err_grants_onehot => err_grants_onehot, err_grants_mismatch => err_grants_mismatch, err_header_tail_Requests_FF_Requests_in => err_header_tail_Requests_FF_Requests_in, err_dst_addr_cur_addr_N1 => err_dst_addr_cur_addr_N1, err_dst_addr_cur_addr_not_N1 => err_dst_addr_cur_addr_not_N1, err_dst_addr_cur_addr_E1 => err_dst_addr_cur_addr_E1, err_dst_addr_cur_addr_not_E1 => err_dst_addr_cur_addr_not_E1, err_dst_addr_cur_addr_W1 => err_dst_addr_cur_addr_W1, err_dst_addr_cur_addr_not_W1 => err_dst_addr_cur_addr_not_W1, err_dst_addr_cur_addr_S1 => err_dst_addr_cur_addr_S1, err_dst_addr_cur_addr_not_S1 => err_dst_addr_cur_addr_not_S1, err_dst_addr_cur_addr_not_Req_L_in => err_dst_addr_cur_addr_not_Req_L_in, err_dst_addr_cur_addr_Req_L_in => err_dst_addr_cur_addr_Req_L_in, err_header_not_empty_Req_N_in => err_header_not_empty_Req_N_in, err_header_not_empty_Req_E_in => err_header_not_empty_Req_E_in, err_header_not_empty_Req_W_in => err_header_not_empty_Req_W_in, err_header_not_empty_Req_S_in => err_header_not_empty_Req_S_in, err_header_not_empty_packet_drop_in => err_header_not_empty_packet_drop_in, err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal => err_header_not_empty_dst_addr_cur_addr_equal_packet_drop_in_packet_drop_equal, err_header_empty_packet_drop_in_packet_drop_equal => err_header_empty_packet_drop_in_packet_drop_equal, err_tail_not_empty_packet_drop_not_packet_drop_in => err_tail_not_empty_packet_drop_not_packet_drop_in, err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal => err_tail_not_empty_not_packet_drop_packet_drop_in_packet_drop_equal, err_invalid_or_body_flit_packet_drop_in_packet_drop_equal => err_invalid_or_body_flit_packet_drop_in_packet_drop_equal, err_packet_drop_order => err_packet_drop_order ); end behavior;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2703.vhd,v 1.2 2001-10-26 16:29:49 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c13s04b01x00p06n01i02703ent IS END c13s04b01x00p06n01i02703ent; ARCHITECTURE c13s04b01x00p06n01i02703arch OF c13s04b01x00p06n01i02703ent IS constant i : real := 12.3; constant m : real := 1.23e1; BEGIN TESTING: PROCESS BEGIN assert NOT( i=m ) report "***PASSED TEST: c13s04b01x00p06n01i02703" severity NOTE; assert ( i=m ) report "***FAILED TEST: c13s04b01x00p06n01i02703 - An exponent indicaters the power of ten to obtain the value of the decimal literal without the exponent." severity ERROR; wait; END PROCESS TESTING; END c13s04b01x00p06n01i02703arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2703.vhd,v 1.2 2001-10-26 16:29:49 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c13s04b01x00p06n01i02703ent IS END c13s04b01x00p06n01i02703ent; ARCHITECTURE c13s04b01x00p06n01i02703arch OF c13s04b01x00p06n01i02703ent IS constant i : real := 12.3; constant m : real := 1.23e1; BEGIN TESTING: PROCESS BEGIN assert NOT( i=m ) report "***PASSED TEST: c13s04b01x00p06n01i02703" severity NOTE; assert ( i=m ) report "***FAILED TEST: c13s04b01x00p06n01i02703 - An exponent indicaters the power of ten to obtain the value of the decimal literal without the exponent." severity ERROR; wait; END PROCESS TESTING; END c13s04b01x00p06n01i02703arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2703.vhd,v 1.2 2001-10-26 16:29:49 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c13s04b01x00p06n01i02703ent IS END c13s04b01x00p06n01i02703ent; ARCHITECTURE c13s04b01x00p06n01i02703arch OF c13s04b01x00p06n01i02703ent IS constant i : real := 12.3; constant m : real := 1.23e1; BEGIN TESTING: PROCESS BEGIN assert NOT( i=m ) report "***PASSED TEST: c13s04b01x00p06n01i02703" severity NOTE; assert ( i=m ) report "***FAILED TEST: c13s04b01x00p06n01i02703 - An exponent indicaters the power of ten to obtain the value of the decimal literal without the exponent." severity ERROR; wait; END PROCESS TESTING; END c13s04b01x00p06n01i02703arch;
------------------------------------------------------------------------------- -- Title : data_crc.vhd ------------------------------------------------------------------------------- -- File : data_crc.vhd -- Author : Gideon Zweijtzer <[email protected]> ------------------------------------------------------------------------------- -- Description: This file is used to calculate the CRC over a USB data ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity usb1_data_crc is port ( clock : in std_logic; sync : in std_logic; valid : in std_logic; data_in : in std_logic_vector(7 downto 0); crc : out std_logic_vector(15 downto 0) ); end usb1_data_crc; architecture Gideon of usb1_data_crc is constant polynom : std_logic_vector(15 downto 0) := X"8004"; -- CRC-5 = x5 + x2 + 1 begin process(clock) variable tmp : std_logic_vector(crc'range); variable d : std_logic; begin if rising_edge(clock) then if sync = '1' then tmp := (others => '1'); end if; if valid = '1' then for i in data_in'reverse_range loop -- LSB first! d := data_in(i) xor tmp(tmp'high); tmp := tmp(tmp'high-1 downto 0) & d; --'0'; if d = '1' then tmp := tmp xor polynom; end if; end loop; end if; for i in tmp'range loop -- reverse and invert crc(crc'high-i) <= not(tmp(i)); end loop; end if; end process; end Gideon;
------------------------------------------------------------------------------- -- Title : data_crc.vhd ------------------------------------------------------------------------------- -- File : data_crc.vhd -- Author : Gideon Zweijtzer <[email protected]> ------------------------------------------------------------------------------- -- Description: This file is used to calculate the CRC over a USB data ------------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; entity usb1_data_crc is port ( clock : in std_logic; sync : in std_logic; valid : in std_logic; data_in : in std_logic_vector(7 downto 0); crc : out std_logic_vector(15 downto 0) ); end usb1_data_crc; architecture Gideon of usb1_data_crc is constant polynom : std_logic_vector(15 downto 0) := X"8004"; -- CRC-5 = x5 + x2 + 1 begin process(clock) variable tmp : std_logic_vector(crc'range); variable d : std_logic; begin if rising_edge(clock) then if sync = '1' then tmp := (others => '1'); end if; if valid = '1' then for i in data_in'reverse_range loop -- LSB first! d := data_in(i) xor tmp(tmp'high); tmp := tmp(tmp'high-1 downto 0) & d; --'0'; if d = '1' then tmp := tmp xor polynom; end if; end loop; end if; for i in tmp'range loop -- reverse and invert crc(crc'high-i) <= not(tmp(i)); end loop; end if; end process; end Gideon;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; --------------------------------------------------- entity determ_adc is generic ( N : positive := 16; DA_RESET_DELAY: positive ); port( CLK1, spi_sck_i, conv_i: in std_logic; spi_miso_o: out std_logic ); end determ_adc; --------------------------------------------------- architecture Behavioral of determ_adc is type state_type is (s0,s1,s2,s3,s4); --type of state machine. signal current_s,next_s: state_type; --current and next state declaration. signal di_i: std_logic_vector (N-1 downto 0) := "0000000000000000"; signal di_req_o: std_logic; signal wren_i: std_logic := '0'; signal spi_ssel_i: std_logic := '1'; signal cnt1_clear: std_logic; signal cnt1_Q: unsigned (31 downto 0); signal cnt1_Q_v: std_logic_vector (31 downto 0); signal slower_spi_clock: std_logic := '0'; signal s_read_state: unsigned (3 downto 0) := "0000"; signal next_s_read_state: unsigned (3 downto 0) := "0010"; begin ss1: entity work.spi_slave generic map (N => N) port map ( clk_i => slower_spi_clock, spi_sck_i => spi_sck_i, spi_ssel_i => spi_ssel_i, di_i => di_i, di_req_o => di_req_o, wren_i => wren_i, spi_miso_o => spi_miso_o ); cnt1: entity work.counter generic map (n => 32) port map ( clock => CLK1, clear => cnt1_clear, count => '1', Q => cnt1_Q_v ); process(CLK1) begin s_read_state <= next_s_read_state; if rising_edge(CLK1) then slower_spi_clock <= not slower_spi_clock; end if; end process; process(s_read_state, CLK1) variable currcount: unsigned (3 downto 0) := "0000"; begin if(cnt1_Q = DA_RESET_DELAY) then currcount := "0000"; next_s_read_state <= "0001"; spi_ssel_i <= '1'; elsif rising_edge(CLK1) then case s_read_state is when "0000" => if di_req_o = '1' then next_s_read_state <= "0001"; end if; when "0001" => next_s_read_state <= "0010"; di_i <= "0" & std_logic_vector(currcount) & "00000000" & "111"; when "0010" => next_s_read_state <= "0011"; currcount := currcount + 1; -- We toggle ssel like this because it resets the position -- if we change our mind about di_i. spi_ssel_i <= '0'; when "0011" => next_s_read_state <= "0100"; when "0100" => next_s_read_state <= "0101"; when "0101" => next_s_read_state <= "0110"; wren_i <= '1'; when "0110" => next_s_read_state <= "0111"; when "0111" => next_s_read_state <= "1000"; when "1000" => next_s_read_state <= "0000"; wren_i <= '0'; when others => next_s_read_state <= "0000"; end case; end if; end process; cnt1_clear <= di_req_o; cnt1_Q <= unsigned(cnt1_Q_v); end Behavioral;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; --------------------------------------------------- entity determ_adc is generic ( N : positive := 16; DA_RESET_DELAY: positive ); port( CLK1, spi_sck_i, conv_i: in std_logic; spi_miso_o: out std_logic ); end determ_adc; --------------------------------------------------- architecture Behavioral of determ_adc is type state_type is (s0,s1,s2,s3,s4); --type of state machine. signal current_s,next_s: state_type; --current and next state declaration. signal di_i: std_logic_vector (N-1 downto 0) := "0000000000000000"; signal di_req_o: std_logic; signal wren_i: std_logic := '0'; signal spi_ssel_i: std_logic := '1'; signal cnt1_clear: std_logic; signal cnt1_Q: unsigned (31 downto 0); signal cnt1_Q_v: std_logic_vector (31 downto 0); signal slower_spi_clock: std_logic := '0'; signal s_read_state: unsigned (3 downto 0) := "0000"; signal next_s_read_state: unsigned (3 downto 0) := "0010"; begin ss1: entity work.spi_slave generic map (N => N) port map ( clk_i => slower_spi_clock, spi_sck_i => spi_sck_i, spi_ssel_i => spi_ssel_i, di_i => di_i, di_req_o => di_req_o, wren_i => wren_i, spi_miso_o => spi_miso_o ); cnt1: entity work.counter generic map (n => 32) port map ( clock => CLK1, clear => cnt1_clear, count => '1', Q => cnt1_Q_v ); process(CLK1) begin s_read_state <= next_s_read_state; if rising_edge(CLK1) then slower_spi_clock <= not slower_spi_clock; end if; end process; process(s_read_state, CLK1) variable currcount: unsigned (3 downto 0) := "0000"; begin if(cnt1_Q = DA_RESET_DELAY) then currcount := "0000"; next_s_read_state <= "0001"; spi_ssel_i <= '1'; elsif rising_edge(CLK1) then case s_read_state is when "0000" => if di_req_o = '1' then next_s_read_state <= "0001"; end if; when "0001" => next_s_read_state <= "0010"; di_i <= "0" & std_logic_vector(currcount) & "00000000" & "111"; when "0010" => next_s_read_state <= "0011"; currcount := currcount + 1; -- We toggle ssel like this because it resets the position -- if we change our mind about di_i. spi_ssel_i <= '0'; when "0011" => next_s_read_state <= "0100"; when "0100" => next_s_read_state <= "0101"; when "0101" => next_s_read_state <= "0110"; wren_i <= '1'; when "0110" => next_s_read_state <= "0111"; when "0111" => next_s_read_state <= "1000"; when "1000" => next_s_read_state <= "0000"; wren_i <= '0'; when others => next_s_read_state <= "0000"; end case; end if; end process; cnt1_clear <= di_req_o; cnt1_Q <= unsigned(cnt1_Q_v); end Behavioral;
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; --------------------------------------------------- entity determ_adc is generic ( N : positive := 16; DA_RESET_DELAY: positive ); port( CLK1, spi_sck_i, conv_i: in std_logic; spi_miso_o: out std_logic ); end determ_adc; --------------------------------------------------- architecture Behavioral of determ_adc is type state_type is (s0,s1,s2,s3,s4); --type of state machine. signal current_s,next_s: state_type; --current and next state declaration. signal di_i: std_logic_vector (N-1 downto 0) := "0000000000000000"; signal di_req_o: std_logic; signal wren_i: std_logic := '0'; signal spi_ssel_i: std_logic := '1'; signal cnt1_clear: std_logic; signal cnt1_Q: unsigned (31 downto 0); signal cnt1_Q_v: std_logic_vector (31 downto 0); signal slower_spi_clock: std_logic := '0'; signal s_read_state: unsigned (3 downto 0) := "0000"; signal next_s_read_state: unsigned (3 downto 0) := "0010"; begin ss1: entity work.spi_slave generic map (N => N) port map ( clk_i => slower_spi_clock, spi_sck_i => spi_sck_i, spi_ssel_i => spi_ssel_i, di_i => di_i, di_req_o => di_req_o, wren_i => wren_i, spi_miso_o => spi_miso_o ); cnt1: entity work.counter generic map (n => 32) port map ( clock => CLK1, clear => cnt1_clear, count => '1', Q => cnt1_Q_v ); process(CLK1) begin s_read_state <= next_s_read_state; if rising_edge(CLK1) then slower_spi_clock <= not slower_spi_clock; end if; end process; process(s_read_state, CLK1) variable currcount: unsigned (3 downto 0) := "0000"; begin if(cnt1_Q = DA_RESET_DELAY) then currcount := "0000"; next_s_read_state <= "0001"; spi_ssel_i <= '1'; elsif rising_edge(CLK1) then case s_read_state is when "0000" => if di_req_o = '1' then next_s_read_state <= "0001"; end if; when "0001" => next_s_read_state <= "0010"; di_i <= "0" & std_logic_vector(currcount) & "00000000" & "111"; when "0010" => next_s_read_state <= "0011"; currcount := currcount + 1; -- We toggle ssel like this because it resets the position -- if we change our mind about di_i. spi_ssel_i <= '0'; when "0011" => next_s_read_state <= "0100"; when "0100" => next_s_read_state <= "0101"; when "0101" => next_s_read_state <= "0110"; wren_i <= '1'; when "0110" => next_s_read_state <= "0111"; when "0111" => next_s_read_state <= "1000"; when "1000" => next_s_read_state <= "0000"; wren_i <= '0'; when others => next_s_read_state <= "0000"; end case; end if; end process; cnt1_clear <= di_req_o; cnt1_Q <= unsigned(cnt1_Q_v); end Behavioral;
--------------------------------------------------------------- -- Title : fpga_pkg_2 example for many devices -- Project : --------------------------------------------------------------- -- File : manny_devices.vhd -- Author : Florian Wombacher -- Email : [email protected] -- Organization : MEN Mikro Elektronik Nuremberg GmbH -- Created : 08/10/17 --------------------------------------------------------------- -- Simulator : -- Synthesis : --------------------------------------------------------------- -- Description : -- exampel for fpga_pkg_2 usage --------------------------------------------------------------- -- Hierarchy: -- --------------------------------------------------------------- -- Copyright (C) 2008, MEN Mikroelektronik Nuernberg GmbH -- -- All rights reserved. Reproduction in whole or part is -- prohibited without the written permission of the -- copyright owner. --------------------------------------------------------------- -- History --------------------------------------------------------------- -- $Revision: 1.3 $ -- -- $Log: many_devices.vhd,v $ -- Revision 1.3 2008/11/21 15:16:58 FWombacher -- changed name of the fpga_pkg to allow use together with local version -- -- Revision 1.2 2008/10/24 16:40:00 FWombacher -- more deatiled exampels -- -- Revision 1.1 2008/10/22 14:19:18 FWombacher -- Initial Revision -- -- -- --------------------------------------------------------------- LIBRARY ieee; USE ieee.std_logic_1164.ALL; LIBRARY work; USE work.fpga_pkg_2.all; ENTITY many_devices IS GENERIC ( FPGA_FAMILY : family_type := NONE -- use NONE to force definiton in top level file ); PORT ( dummy : IN std_logic ); END many_devices; ARCHITECTURE many_devices_arch OF many_devices IS COMPONENT cyclone_implementation PORT ( dummy : IN std_logic ); END COMPONENT; COMPONENT cyclone2_implementation PORT ( dummy : IN std_logic ); END COMPONENT; COMPONENT a3p_implementation PORT ( dummy : IN std_logic ); END COMPONENT; COMPONENT arria_gx_implementation PORT ( dummy : IN std_logic ); END COMPONENT; BEGIN gen_cyc : IF (FPGA_FAMILY = CYCLONE) GENERATE the_cyclone_implementation : cyclone_implementation PORT MAP ( dummy => dummy ); END GENERATE; gen_cyc2 : IF (FPGA_FAMILY = CYCLONE2) GENERATE the_cyclone2_implementation : cyclone2_implementation PORT MAP ( dummy => dummy ); END GENERATE; gen_a3p : IF (FPGA_FAMILY = A3P) GENERATE the_a3p_implementation : a3p_implementation PORT MAP ( dummy => dummy ); END GENERATE; gen_ariagx : IF (FPGA_FAMILY = ARRIA_GX) GENERATE the_arria_gx_implementation : arria_gx_implementation PORT MAP ( dummy => dummy ); END GENERATE; END many_devices_arch;
-- -- Simple Dual-Port RAM -- -- Author(s): -- * Rodrigo A. Melo -- -- Copyright (c) 2016 Authors and INTI -- Distributed under the BSD 3-Clause License -- library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; library FPGALIB; use FPGALIB.MEMS.all; entity SimpleDualPortRAM is generic ( AWIDTH : positive:=8; -- Address width DWIDTH : positive:=8; -- Data width DEPTH : natural:=0; -- Memory depth OUTREG : boolean :=FALSE -- Optional Output Register ); port ( clk1_i : in std_logic; clk2_i : in std_logic; wen1_i : in std_logic; addr1_i : in std_logic_vector(AWIDTH-1 downto 0); addr2_i : in std_logic_vector(AWIDTH-1 downto 0); data1_i : in std_logic_vector(DWIDTH-1 downto 0); data2_o : out std_logic_vector(DWIDTH-1 downto 0) ); end entity SimpleDualPortRAM; architecture RTL of SimpleDualPortRAM is constant SIZE : positive:=getMemorySize(DEPTH,AWIDTH); type ram_type is array(SIZE-1 downto 0) of std_logic_vector (DWIDTH-1 downto 0); signal ram : ram_type; signal data2 : std_logic_vector(DWIDTH-1 downto 0); begin ram1_p: process (clk1_i) begin if rising_edge(clk1_i) then if wen1_i='1' then ram(to_integer(unsigned(addr1_i))) <= data1_i; end if; end if; end process ram1_p; ram2_p: process (clk2_i) begin if rising_edge(clk2_i) then if OUTREG then data2 <= ram(to_integer(unsigned(addr2_i))); data2_o <= data2; else data2_o <= ram(to_integer(unsigned(addr2_i))); end if; end if; end process ram2_p; end architecture RTL;
-- Copyright 1986-2018 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2018.2 (win64) Build 2258646 Thu Jun 14 20:03:12 MDT 2018 -- Date : Sun Sep 22 03:32:35 2019 -- Host : varun-laptop running 64-bit Service Pack 1 (build 7601) -- Command : write_vhdl -force -mode funcsim -- d:/github/Digital-Hardware-Modelling/xilinx-vivado/gcd/gcd.srcs/sources_1/bd/gcd_block_design/ip/gcd_block_design_rst_ps7_0_100M_0/gcd_block_design_rst_ps7_0_100M_0_sim_netlist.vhdl -- Design : gcd_block_design_rst_ps7_0_100M_0 -- Purpose : This VHDL netlist is a functional simulation representation of the design and should not be modified or -- synthesized. This netlist cannot be used for SDF annotated simulation. -- Device : xc7z010clg400-1 -- -------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_cdc_sync is port ( lpf_asr_reg : out STD_LOGIC; scndry_out : out STD_LOGIC; lpf_asr : in STD_LOGIC; p_1_in : in STD_LOGIC; p_2_in : in STD_LOGIC; asr_lpf : in STD_LOGIC_VECTOR ( 0 to 0 ); aux_reset_in : in STD_LOGIC; slowest_sync_clk : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_cdc_sync : entity is "cdc_sync"; end gcd_block_design_rst_ps7_0_100M_0_cdc_sync; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_cdc_sync is signal asr_d1 : STD_LOGIC; signal s_level_out_d1_cdc_to : STD_LOGIC; signal s_level_out_d2 : STD_LOGIC; signal s_level_out_d3 : STD_LOGIC; signal \^scndry_out\ : STD_LOGIC; attribute ASYNC_REG : boolean; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM : string; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is "FDR"; attribute box_type : string; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is "PRIMITIVE"; begin scndry_out <= \^scndry_out\; \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => asr_d1, Q => s_level_out_d1_cdc_to, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to_i_1__0\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => aux_reset_in, O => asr_d1 ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d1_cdc_to, Q => s_level_out_d2, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d2, Q => s_level_out_d3, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d3, Q => \^scndry_out\, R => '0' ); lpf_asr_i_1: unisim.vcomponents.LUT5 generic map( INIT => X"EAAAAAA8" ) port map ( I0 => lpf_asr, I1 => p_1_in, I2 => p_2_in, I3 => \^scndry_out\, I4 => asr_lpf(0), O => lpf_asr_reg ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0 is port ( lpf_exr_reg : out STD_LOGIC; scndry_out : out STD_LOGIC; lpf_exr : in STD_LOGIC; p_3_out : in STD_LOGIC_VECTOR ( 2 downto 0 ); mb_debug_sys_rst : in STD_LOGIC; ext_reset_in : in STD_LOGIC; slowest_sync_clk : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0 : entity is "cdc_sync"; end gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0 is signal exr_d1 : STD_LOGIC; signal s_level_out_d1_cdc_to : STD_LOGIC; signal s_level_out_d2 : STD_LOGIC; signal s_level_out_d3 : STD_LOGIC; signal \^scndry_out\ : STD_LOGIC; attribute ASYNC_REG : boolean; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM : string; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is "FDR"; attribute box_type : string; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is "PRIMITIVE"; begin scndry_out <= \^scndry_out\; \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => exr_d1, Q => s_level_out_d1_cdc_to, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"B" ) port map ( I0 => mb_debug_sys_rst, I1 => ext_reset_in, O => exr_d1 ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d1_cdc_to, Q => s_level_out_d2, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d2, Q => s_level_out_d3, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d3, Q => \^scndry_out\, R => '0' ); lpf_exr_i_1: unisim.vcomponents.LUT5 generic map( INIT => X"EAAAAAA8" ) port map ( I0 => lpf_exr, I1 => p_3_out(1), I2 => p_3_out(2), I3 => \^scndry_out\, I4 => p_3_out(0), O => lpf_exr_reg ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_upcnt_n is port ( Q : out STD_LOGIC_VECTOR ( 5 downto 0 ); seq_clr : in STD_LOGIC; seq_cnt_en : in STD_LOGIC; slowest_sync_clk : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_upcnt_n : entity is "upcnt_n"; end gcd_block_design_rst_ps7_0_100M_0_upcnt_n; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_upcnt_n is signal \^q\ : STD_LOGIC_VECTOR ( 5 downto 0 ); signal clear : STD_LOGIC; signal q_int0 : STD_LOGIC_VECTOR ( 5 downto 0 ); attribute SOFT_HLUTNM : string; attribute SOFT_HLUTNM of \q_int[1]_i_1\ : label is "soft_lutpair1"; attribute SOFT_HLUTNM of \q_int[2]_i_1\ : label is "soft_lutpair1"; attribute SOFT_HLUTNM of \q_int[3]_i_1\ : label is "soft_lutpair0"; attribute SOFT_HLUTNM of \q_int[4]_i_1\ : label is "soft_lutpair0"; begin Q(5 downto 0) <= \^q\(5 downto 0); \q_int[0]_i_1\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => \^q\(0), O => q_int0(0) ); \q_int[1]_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"6" ) port map ( I0 => \^q\(0), I1 => \^q\(1), O => q_int0(1) ); \q_int[2]_i_1\: unisim.vcomponents.LUT3 generic map( INIT => X"78" ) port map ( I0 => \^q\(0), I1 => \^q\(1), I2 => \^q\(2), O => q_int0(2) ); \q_int[3]_i_1\: unisim.vcomponents.LUT4 generic map( INIT => X"7F80" ) port map ( I0 => \^q\(1), I1 => \^q\(0), I2 => \^q\(2), I3 => \^q\(3), O => q_int0(3) ); \q_int[4]_i_1\: unisim.vcomponents.LUT5 generic map( INIT => X"7FFF8000" ) port map ( I0 => \^q\(2), I1 => \^q\(0), I2 => \^q\(1), I3 => \^q\(3), I4 => \^q\(4), O => q_int0(4) ); \q_int[5]_i_1\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => seq_clr, O => clear ); \q_int[5]_i_2\: unisim.vcomponents.LUT6 generic map( INIT => X"7FFFFFFF80000000" ) port map ( I0 => \^q\(3), I1 => \^q\(1), I2 => \^q\(0), I3 => \^q\(2), I4 => \^q\(4), I5 => \^q\(5), O => q_int0(5) ); \q_int_reg[0]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(0), Q => \^q\(0), R => clear ); \q_int_reg[1]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(1), Q => \^q\(1), R => clear ); \q_int_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(2), Q => \^q\(2), R => clear ); \q_int_reg[3]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(3), Q => \^q\(3), R => clear ); \q_int_reg[4]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(4), Q => \^q\(4), R => clear ); \q_int_reg[5]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(5), Q => \^q\(5), R => clear ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_lpf is port ( lpf_int : out STD_LOGIC; slowest_sync_clk : in STD_LOGIC; dcm_locked : in STD_LOGIC; mb_debug_sys_rst : in STD_LOGIC; ext_reset_in : in STD_LOGIC; aux_reset_in : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_lpf : entity is "lpf"; end gcd_block_design_rst_ps7_0_100M_0_lpf; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_lpf is signal \ACTIVE_LOW_AUX.ACT_LO_AUX_n_0\ : STD_LOGIC; signal \ACTIVE_LOW_EXT.ACT_LO_EXT_n_0\ : STD_LOGIC; signal Q : STD_LOGIC; signal asr_lpf : STD_LOGIC_VECTOR ( 0 to 0 ); signal lpf_asr : STD_LOGIC; signal lpf_exr : STD_LOGIC; signal \lpf_int0__0\ : STD_LOGIC; signal p_1_in : STD_LOGIC; signal p_2_in : STD_LOGIC; signal p_3_in1_in : STD_LOGIC; signal p_3_out : STD_LOGIC_VECTOR ( 3 downto 0 ); attribute XILINX_LEGACY_PRIM : string; attribute XILINX_LEGACY_PRIM of POR_SRL_I : label is "SRL16"; attribute box_type : string; attribute box_type of POR_SRL_I : label is "PRIMITIVE"; attribute srl_name : string; attribute srl_name of POR_SRL_I : label is "U0/\EXT_LPF/POR_SRL_I "; begin \ACTIVE_LOW_AUX.ACT_LO_AUX\: entity work.gcd_block_design_rst_ps7_0_100M_0_cdc_sync port map ( asr_lpf(0) => asr_lpf(0), aux_reset_in => aux_reset_in, lpf_asr => lpf_asr, lpf_asr_reg => \ACTIVE_LOW_AUX.ACT_LO_AUX_n_0\, p_1_in => p_1_in, p_2_in => p_2_in, scndry_out => p_3_in1_in, slowest_sync_clk => slowest_sync_clk ); \ACTIVE_LOW_EXT.ACT_LO_EXT\: entity work.gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0 port map ( ext_reset_in => ext_reset_in, lpf_exr => lpf_exr, lpf_exr_reg => \ACTIVE_LOW_EXT.ACT_LO_EXT_n_0\, mb_debug_sys_rst => mb_debug_sys_rst, p_3_out(2 downto 0) => p_3_out(2 downto 0), scndry_out => p_3_out(3), slowest_sync_clk => slowest_sync_clk ); \AUX_LPF[1].asr_lpf_reg[1]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_in1_in, Q => p_2_in, R => '0' ); \AUX_LPF[2].asr_lpf_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_2_in, Q => p_1_in, R => '0' ); \AUX_LPF[3].asr_lpf_reg[3]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_1_in, Q => asr_lpf(0), R => '0' ); \EXT_LPF[1].exr_lpf_reg[1]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(3), Q => p_3_out(2), R => '0' ); \EXT_LPF[2].exr_lpf_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(2), Q => p_3_out(1), R => '0' ); \EXT_LPF[3].exr_lpf_reg[3]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(1), Q => p_3_out(0), R => '0' ); POR_SRL_I: unisim.vcomponents.SRL16E generic map( INIT => X"FFFF" ) port map ( A0 => '1', A1 => '1', A2 => '1', A3 => '1', CE => '1', CLK => slowest_sync_clk, D => '0', Q => Q ); lpf_asr_reg: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \ACTIVE_LOW_AUX.ACT_LO_AUX_n_0\, Q => lpf_asr, R => '0' ); lpf_exr_reg: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \ACTIVE_LOW_EXT.ACT_LO_EXT_n_0\, Q => lpf_exr, R => '0' ); lpf_int0: unisim.vcomponents.LUT4 generic map( INIT => X"FFFD" ) port map ( I0 => dcm_locked, I1 => lpf_exr, I2 => lpf_asr, I3 => Q, O => \lpf_int0__0\ ); lpf_int_reg: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \lpf_int0__0\, Q => lpf_int, R => '0' ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_sequence_psr is port ( MB_out : out STD_LOGIC; Bsr_out : out STD_LOGIC; Pr_out : out STD_LOGIC; \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\ : out STD_LOGIC; \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\ : out STD_LOGIC; lpf_int : in STD_LOGIC; slowest_sync_clk : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_sequence_psr : entity is "sequence_psr"; end gcd_block_design_rst_ps7_0_100M_0_sequence_psr; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_sequence_psr is signal \^bsr_out\ : STD_LOGIC; signal Core_i_1_n_0 : STD_LOGIC; signal \^mb_out\ : STD_LOGIC; signal \^pr_out\ : STD_LOGIC; signal \bsr_dec_reg_n_0_[0]\ : STD_LOGIC; signal \bsr_dec_reg_n_0_[2]\ : STD_LOGIC; signal bsr_i_1_n_0 : STD_LOGIC; signal \core_dec[0]_i_1_n_0\ : STD_LOGIC; signal \core_dec[2]_i_1_n_0\ : STD_LOGIC; signal \core_dec_reg_n_0_[0]\ : STD_LOGIC; signal \core_dec_reg_n_0_[1]\ : STD_LOGIC; signal from_sys_i_1_n_0 : STD_LOGIC; signal p_0_in : STD_LOGIC; signal p_3_out : STD_LOGIC_VECTOR ( 2 downto 0 ); signal p_5_out : STD_LOGIC_VECTOR ( 2 downto 0 ); signal \pr_dec0__0\ : STD_LOGIC; signal \pr_dec_reg_n_0_[0]\ : STD_LOGIC; signal \pr_dec_reg_n_0_[2]\ : STD_LOGIC; signal pr_i_1_n_0 : STD_LOGIC; signal seq_clr : STD_LOGIC; signal seq_cnt : STD_LOGIC_VECTOR ( 5 downto 0 ); signal seq_cnt_en : STD_LOGIC; attribute SOFT_HLUTNM : string; attribute SOFT_HLUTNM of \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N_i_1\ : label is "soft_lutpair5"; attribute SOFT_HLUTNM of \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N_i_1\ : label is "soft_lutpair4"; attribute SOFT_HLUTNM of Core_i_1 : label is "soft_lutpair3"; attribute SOFT_HLUTNM of \bsr_dec[2]_i_1\ : label is "soft_lutpair6"; attribute SOFT_HLUTNM of bsr_i_1 : label is "soft_lutpair5"; attribute SOFT_HLUTNM of \core_dec[0]_i_1\ : label is "soft_lutpair2"; attribute SOFT_HLUTNM of \core_dec[2]_i_1\ : label is "soft_lutpair6"; attribute SOFT_HLUTNM of from_sys_i_1 : label is "soft_lutpair3"; attribute SOFT_HLUTNM of \pr_dec[0]_i_1\ : label is "soft_lutpair2"; attribute SOFT_HLUTNM of pr_i_1 : label is "soft_lutpair4"; begin Bsr_out <= \^bsr_out\; MB_out <= \^mb_out\; Pr_out <= \^pr_out\; \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N_i_1\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => \^bsr_out\, O => \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\ ); \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N_i_1\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => \^pr_out\, O => \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\ ); Core_i_1: unisim.vcomponents.LUT2 generic map( INIT => X"2" ) port map ( I0 => \^mb_out\, I1 => p_0_in, O => Core_i_1_n_0 ); Core_reg: unisim.vcomponents.FDSE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => '1', D => Core_i_1_n_0, Q => \^mb_out\, S => lpf_int ); SEQ_COUNTER: entity work.gcd_block_design_rst_ps7_0_100M_0_upcnt_n port map ( Q(5 downto 0) => seq_cnt(5 downto 0), seq_clr => seq_clr, seq_cnt_en => seq_cnt_en, slowest_sync_clk => slowest_sync_clk ); \bsr_dec[0]_i_1\: unisim.vcomponents.LUT4 generic map( INIT => X"0090" ) port map ( I0 => seq_cnt_en, I1 => seq_cnt(4), I2 => seq_cnt(3), I3 => seq_cnt(5), O => p_5_out(0) ); \bsr_dec[2]_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"8" ) port map ( I0 => \core_dec_reg_n_0_[1]\, I1 => \bsr_dec_reg_n_0_[0]\, O => p_5_out(2) ); \bsr_dec_reg[0]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_5_out(0), Q => \bsr_dec_reg_n_0_[0]\, R => '0' ); \bsr_dec_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_5_out(2), Q => \bsr_dec_reg_n_0_[2]\, R => '0' ); bsr_i_1: unisim.vcomponents.LUT2 generic map( INIT => X"2" ) port map ( I0 => \^bsr_out\, I1 => \bsr_dec_reg_n_0_[2]\, O => bsr_i_1_n_0 ); bsr_reg: unisim.vcomponents.FDSE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => '1', D => bsr_i_1_n_0, Q => \^bsr_out\, S => lpf_int ); \core_dec[0]_i_1\: unisim.vcomponents.LUT4 generic map( INIT => X"9000" ) port map ( I0 => seq_cnt_en, I1 => seq_cnt(4), I2 => seq_cnt(3), I3 => seq_cnt(5), O => \core_dec[0]_i_1_n_0\ ); \core_dec[2]_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"8" ) port map ( I0 => \core_dec_reg_n_0_[1]\, I1 => \core_dec_reg_n_0_[0]\, O => \core_dec[2]_i_1_n_0\ ); \core_dec_reg[0]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \core_dec[0]_i_1_n_0\, Q => \core_dec_reg_n_0_[0]\, R => '0' ); \core_dec_reg[1]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \pr_dec0__0\, Q => \core_dec_reg_n_0_[1]\, R => '0' ); \core_dec_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \core_dec[2]_i_1_n_0\, Q => p_0_in, R => '0' ); from_sys_i_1: unisim.vcomponents.LUT2 generic map( INIT => X"8" ) port map ( I0 => \^mb_out\, I1 => seq_cnt_en, O => from_sys_i_1_n_0 ); from_sys_reg: unisim.vcomponents.FDSE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => from_sys_i_1_n_0, Q => seq_cnt_en, S => lpf_int ); pr_dec0: unisim.vcomponents.LUT4 generic map( INIT => X"0018" ) port map ( I0 => seq_cnt_en, I1 => seq_cnt(0), I2 => seq_cnt(2), I3 => seq_cnt(1), O => \pr_dec0__0\ ); \pr_dec[0]_i_1\: unisim.vcomponents.LUT4 generic map( INIT => X"0480" ) port map ( I0 => seq_cnt_en, I1 => seq_cnt(3), I2 => seq_cnt(5), I3 => seq_cnt(4), O => p_3_out(0) ); \pr_dec[2]_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"8" ) port map ( I0 => \core_dec_reg_n_0_[1]\, I1 => \pr_dec_reg_n_0_[0]\, O => p_3_out(2) ); \pr_dec_reg[0]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(0), Q => \pr_dec_reg_n_0_[0]\, R => '0' ); \pr_dec_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(2), Q => \pr_dec_reg_n_0_[2]\, R => '0' ); pr_i_1: unisim.vcomponents.LUT2 generic map( INIT => X"2" ) port map ( I0 => \^pr_out\, I1 => \pr_dec_reg_n_0_[2]\, O => pr_i_1_n_0 ); pr_reg: unisim.vcomponents.FDSE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => '1', D => pr_i_1_n_0, Q => \^pr_out\, S => lpf_int ); seq_clr_reg: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => '1', Q => seq_clr, R => lpf_int ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset is port ( slowest_sync_clk : in STD_LOGIC; ext_reset_in : in STD_LOGIC; aux_reset_in : in STD_LOGIC; mb_debug_sys_rst : in STD_LOGIC; dcm_locked : in STD_LOGIC; mb_reset : out STD_LOGIC; bus_struct_reset : out STD_LOGIC_VECTOR ( 0 to 0 ); peripheral_reset : out STD_LOGIC_VECTOR ( 0 to 0 ); interconnect_aresetn : out STD_LOGIC_VECTOR ( 0 to 0 ); peripheral_aresetn : out STD_LOGIC_VECTOR ( 0 to 0 ) ); attribute C_AUX_RESET_HIGH : string; attribute C_AUX_RESET_HIGH of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is "1'b0"; attribute C_AUX_RST_WIDTH : integer; attribute C_AUX_RST_WIDTH of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 4; attribute C_EXT_RESET_HIGH : string; attribute C_EXT_RESET_HIGH of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is "1'b0"; attribute C_EXT_RST_WIDTH : integer; attribute C_EXT_RST_WIDTH of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 4; attribute C_FAMILY : string; attribute C_FAMILY of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is "zynq"; attribute C_NUM_BUS_RST : integer; attribute C_NUM_BUS_RST of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 1; attribute C_NUM_INTERCONNECT_ARESETN : integer; attribute C_NUM_INTERCONNECT_ARESETN of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 1; attribute C_NUM_PERP_ARESETN : integer; attribute C_NUM_PERP_ARESETN of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 1; attribute C_NUM_PERP_RST : integer; attribute C_NUM_PERP_RST of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 1; attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is "proc_sys_reset"; end gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset is signal Bsr_out : STD_LOGIC; signal MB_out : STD_LOGIC; signal Pr_out : STD_LOGIC; signal SEQ_n_3 : STD_LOGIC; signal SEQ_n_4 : STD_LOGIC; signal lpf_int : STD_LOGIC; attribute box_type : string; attribute box_type of \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\ : label is "PRIMITIVE"; attribute box_type of \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\ : label is "PRIMITIVE"; attribute box_type of \BSR_OUT_DFF[0].FDRE_BSR\ : label is "PRIMITIVE"; attribute box_type of FDRE_inst : label is "PRIMITIVE"; attribute box_type of \PR_OUT_DFF[0].FDRE_PER\ : label is "PRIMITIVE"; attribute equivalent_register_removal : string; attribute equivalent_register_removal of bus_struct_reset : signal is "no"; attribute equivalent_register_removal of interconnect_aresetn : signal is "no"; attribute equivalent_register_removal of peripheral_aresetn : signal is "no"; attribute equivalent_register_removal of peripheral_reset : signal is "no"; begin \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\: unisim.vcomponents.FDRE generic map( INIT => '0', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => SEQ_n_3, Q => interconnect_aresetn(0), R => '0' ); \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\: unisim.vcomponents.FDRE generic map( INIT => '0', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => SEQ_n_4, Q => peripheral_aresetn(0), R => '0' ); \BSR_OUT_DFF[0].FDRE_BSR\: unisim.vcomponents.FDRE generic map( INIT => '1', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => Bsr_out, Q => bus_struct_reset(0), R => '0' ); EXT_LPF: entity work.gcd_block_design_rst_ps7_0_100M_0_lpf port map ( aux_reset_in => aux_reset_in, dcm_locked => dcm_locked, ext_reset_in => ext_reset_in, lpf_int => lpf_int, mb_debug_sys_rst => mb_debug_sys_rst, slowest_sync_clk => slowest_sync_clk ); FDRE_inst: unisim.vcomponents.FDRE generic map( INIT => '1', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => MB_out, Q => mb_reset, R => '0' ); \PR_OUT_DFF[0].FDRE_PER\: unisim.vcomponents.FDRE generic map( INIT => '1', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => Pr_out, Q => peripheral_reset(0), R => '0' ); SEQ: entity work.gcd_block_design_rst_ps7_0_100M_0_sequence_psr port map ( \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\ => SEQ_n_3, \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\ => SEQ_n_4, Bsr_out => Bsr_out, MB_out => MB_out, Pr_out => Pr_out, lpf_int => lpf_int, slowest_sync_clk => slowest_sync_clk ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0 is port ( slowest_sync_clk : in STD_LOGIC; ext_reset_in : in STD_LOGIC; aux_reset_in : in STD_LOGIC; mb_debug_sys_rst : in STD_LOGIC; dcm_locked : in STD_LOGIC; mb_reset : out STD_LOGIC; bus_struct_reset : out STD_LOGIC_VECTOR ( 0 to 0 ); peripheral_reset : out STD_LOGIC_VECTOR ( 0 to 0 ); interconnect_aresetn : out STD_LOGIC_VECTOR ( 0 to 0 ); peripheral_aresetn : out STD_LOGIC_VECTOR ( 0 to 0 ) ); attribute NotValidForBitStream : boolean; attribute NotValidForBitStream of gcd_block_design_rst_ps7_0_100M_0 : entity is true; attribute CHECK_LICENSE_TYPE : string; attribute CHECK_LICENSE_TYPE of gcd_block_design_rst_ps7_0_100M_0 : entity is "gcd_block_design_rst_ps7_0_100M_0,proc_sys_reset,{}"; attribute downgradeipidentifiedwarnings : string; attribute downgradeipidentifiedwarnings of gcd_block_design_rst_ps7_0_100M_0 : entity is "yes"; attribute x_core_info : string; attribute x_core_info of gcd_block_design_rst_ps7_0_100M_0 : entity is "proc_sys_reset,Vivado 2018.2"; end gcd_block_design_rst_ps7_0_100M_0; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0 is attribute C_AUX_RESET_HIGH : string; attribute C_AUX_RESET_HIGH of U0 : label is "1'b0"; attribute C_AUX_RST_WIDTH : integer; attribute C_AUX_RST_WIDTH of U0 : label is 4; attribute C_EXT_RESET_HIGH : string; attribute C_EXT_RESET_HIGH of U0 : label is "1'b0"; attribute C_EXT_RST_WIDTH : integer; attribute C_EXT_RST_WIDTH of U0 : label is 4; attribute C_FAMILY : string; attribute C_FAMILY of U0 : label is "zynq"; attribute C_NUM_BUS_RST : integer; attribute C_NUM_BUS_RST of U0 : label is 1; attribute C_NUM_INTERCONNECT_ARESETN : integer; attribute C_NUM_INTERCONNECT_ARESETN of U0 : label is 1; attribute C_NUM_PERP_ARESETN : integer; attribute C_NUM_PERP_ARESETN of U0 : label is 1; attribute C_NUM_PERP_RST : integer; attribute C_NUM_PERP_RST of U0 : label is 1; attribute x_interface_info : string; attribute x_interface_info of aux_reset_in : signal is "xilinx.com:signal:reset:1.0 aux_reset RST"; attribute x_interface_parameter : string; attribute x_interface_parameter of aux_reset_in : signal is "XIL_INTERFACENAME aux_reset, POLARITY ACTIVE_LOW"; attribute x_interface_info of ext_reset_in : signal is "xilinx.com:signal:reset:1.0 ext_reset RST"; attribute x_interface_parameter of ext_reset_in : signal is "XIL_INTERFACENAME ext_reset, BOARD.ASSOCIATED_PARAM RESET_BOARD_INTERFACE, POLARITY ACTIVE_LOW"; attribute x_interface_info of mb_debug_sys_rst : signal is "xilinx.com:signal:reset:1.0 dbg_reset RST"; attribute x_interface_parameter of mb_debug_sys_rst : signal is "XIL_INTERFACENAME dbg_reset, POLARITY ACTIVE_HIGH"; attribute x_interface_info of mb_reset : signal is "xilinx.com:signal:reset:1.0 mb_rst RST"; attribute x_interface_parameter of mb_reset : signal is "XIL_INTERFACENAME mb_rst, POLARITY ACTIVE_HIGH, TYPE PROCESSOR"; attribute x_interface_info of slowest_sync_clk : signal is "xilinx.com:signal:clock:1.0 clock CLK"; attribute x_interface_parameter of slowest_sync_clk : signal is "XIL_INTERFACENAME clock, ASSOCIATED_RESET mb_reset:bus_struct_reset:interconnect_aresetn:peripheral_aresetn:peripheral_reset, FREQ_HZ 100000000, PHASE 0.000, CLK_DOMAIN gcd_block_design_processing_system7_0_2_FCLK_CLK0"; attribute x_interface_info of bus_struct_reset : signal is "xilinx.com:signal:reset:1.0 bus_struct_reset RST"; attribute x_interface_parameter of bus_struct_reset : signal is "XIL_INTERFACENAME bus_struct_reset, POLARITY ACTIVE_HIGH, TYPE INTERCONNECT"; attribute x_interface_info of interconnect_aresetn : signal is "xilinx.com:signal:reset:1.0 interconnect_low_rst RST"; attribute x_interface_parameter of interconnect_aresetn : signal is "XIL_INTERFACENAME interconnect_low_rst, POLARITY ACTIVE_LOW, TYPE INTERCONNECT"; attribute x_interface_info of peripheral_aresetn : signal is "xilinx.com:signal:reset:1.0 peripheral_low_rst RST"; attribute x_interface_parameter of peripheral_aresetn : signal is "XIL_INTERFACENAME peripheral_low_rst, POLARITY ACTIVE_LOW, TYPE PERIPHERAL"; attribute x_interface_info of peripheral_reset : signal is "xilinx.com:signal:reset:1.0 peripheral_high_rst RST"; attribute x_interface_parameter of peripheral_reset : signal is "XIL_INTERFACENAME peripheral_high_rst, POLARITY ACTIVE_HIGH, TYPE PERIPHERAL"; begin U0: entity work.gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset port map ( aux_reset_in => aux_reset_in, bus_struct_reset(0) => bus_struct_reset(0), dcm_locked => dcm_locked, ext_reset_in => ext_reset_in, interconnect_aresetn(0) => interconnect_aresetn(0), mb_debug_sys_rst => mb_debug_sys_rst, mb_reset => mb_reset, peripheral_aresetn(0) => peripheral_aresetn(0), peripheral_reset(0) => peripheral_reset(0), slowest_sync_clk => slowest_sync_clk ); end STRUCTURE;
-- Copyright 1986-2018 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2018.2 (win64) Build 2258646 Thu Jun 14 20:03:12 MDT 2018 -- Date : Sun Sep 22 03:32:35 2019 -- Host : varun-laptop running 64-bit Service Pack 1 (build 7601) -- Command : write_vhdl -force -mode funcsim -- d:/github/Digital-Hardware-Modelling/xilinx-vivado/gcd/gcd.srcs/sources_1/bd/gcd_block_design/ip/gcd_block_design_rst_ps7_0_100M_0/gcd_block_design_rst_ps7_0_100M_0_sim_netlist.vhdl -- Design : gcd_block_design_rst_ps7_0_100M_0 -- Purpose : This VHDL netlist is a functional simulation representation of the design and should not be modified or -- synthesized. This netlist cannot be used for SDF annotated simulation. -- Device : xc7z010clg400-1 -- -------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_cdc_sync is port ( lpf_asr_reg : out STD_LOGIC; scndry_out : out STD_LOGIC; lpf_asr : in STD_LOGIC; p_1_in : in STD_LOGIC; p_2_in : in STD_LOGIC; asr_lpf : in STD_LOGIC_VECTOR ( 0 to 0 ); aux_reset_in : in STD_LOGIC; slowest_sync_clk : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_cdc_sync : entity is "cdc_sync"; end gcd_block_design_rst_ps7_0_100M_0_cdc_sync; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_cdc_sync is signal asr_d1 : STD_LOGIC; signal s_level_out_d1_cdc_to : STD_LOGIC; signal s_level_out_d2 : STD_LOGIC; signal s_level_out_d3 : STD_LOGIC; signal \^scndry_out\ : STD_LOGIC; attribute ASYNC_REG : boolean; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM : string; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is "FDR"; attribute box_type : string; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is "PRIMITIVE"; begin scndry_out <= \^scndry_out\; \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => asr_d1, Q => s_level_out_d1_cdc_to, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to_i_1__0\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => aux_reset_in, O => asr_d1 ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d1_cdc_to, Q => s_level_out_d2, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d2, Q => s_level_out_d3, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d3, Q => \^scndry_out\, R => '0' ); lpf_asr_i_1: unisim.vcomponents.LUT5 generic map( INIT => X"EAAAAAA8" ) port map ( I0 => lpf_asr, I1 => p_1_in, I2 => p_2_in, I3 => \^scndry_out\, I4 => asr_lpf(0), O => lpf_asr_reg ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0 is port ( lpf_exr_reg : out STD_LOGIC; scndry_out : out STD_LOGIC; lpf_exr : in STD_LOGIC; p_3_out : in STD_LOGIC_VECTOR ( 2 downto 0 ); mb_debug_sys_rst : in STD_LOGIC; ext_reset_in : in STD_LOGIC; slowest_sync_clk : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0 : entity is "cdc_sync"; end gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0 is signal exr_d1 : STD_LOGIC; signal s_level_out_d1_cdc_to : STD_LOGIC; signal s_level_out_d2 : STD_LOGIC; signal s_level_out_d3 : STD_LOGIC; signal \^scndry_out\ : STD_LOGIC; attribute ASYNC_REG : boolean; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM : string; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is "FDR"; attribute box_type : string; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\ : label is "PRIMITIVE"; attribute ASYNC_REG of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is std.standard.true; attribute XILINX_LEGACY_PRIM of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is "FDR"; attribute box_type of \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\ : label is "PRIMITIVE"; begin scndry_out <= \^scndry_out\; \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => exr_d1, Q => s_level_out_d1_cdc_to, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_IN_cdc_to_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"B" ) port map ( I0 => mb_debug_sys_rst, I1 => ext_reset_in, O => exr_d1 ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d2\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d1_cdc_to, Q => s_level_out_d2, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d3\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d2, Q => s_level_out_d3, R => '0' ); \GENERATE_LEVEL_P_S_CDC.SINGLE_BIT.CROSS_PLEVEL_IN2SCNDRY_s_level_out_d4\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => s_level_out_d3, Q => \^scndry_out\, R => '0' ); lpf_exr_i_1: unisim.vcomponents.LUT5 generic map( INIT => X"EAAAAAA8" ) port map ( I0 => lpf_exr, I1 => p_3_out(1), I2 => p_3_out(2), I3 => \^scndry_out\, I4 => p_3_out(0), O => lpf_exr_reg ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_upcnt_n is port ( Q : out STD_LOGIC_VECTOR ( 5 downto 0 ); seq_clr : in STD_LOGIC; seq_cnt_en : in STD_LOGIC; slowest_sync_clk : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_upcnt_n : entity is "upcnt_n"; end gcd_block_design_rst_ps7_0_100M_0_upcnt_n; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_upcnt_n is signal \^q\ : STD_LOGIC_VECTOR ( 5 downto 0 ); signal clear : STD_LOGIC; signal q_int0 : STD_LOGIC_VECTOR ( 5 downto 0 ); attribute SOFT_HLUTNM : string; attribute SOFT_HLUTNM of \q_int[1]_i_1\ : label is "soft_lutpair1"; attribute SOFT_HLUTNM of \q_int[2]_i_1\ : label is "soft_lutpair1"; attribute SOFT_HLUTNM of \q_int[3]_i_1\ : label is "soft_lutpair0"; attribute SOFT_HLUTNM of \q_int[4]_i_1\ : label is "soft_lutpair0"; begin Q(5 downto 0) <= \^q\(5 downto 0); \q_int[0]_i_1\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => \^q\(0), O => q_int0(0) ); \q_int[1]_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"6" ) port map ( I0 => \^q\(0), I1 => \^q\(1), O => q_int0(1) ); \q_int[2]_i_1\: unisim.vcomponents.LUT3 generic map( INIT => X"78" ) port map ( I0 => \^q\(0), I1 => \^q\(1), I2 => \^q\(2), O => q_int0(2) ); \q_int[3]_i_1\: unisim.vcomponents.LUT4 generic map( INIT => X"7F80" ) port map ( I0 => \^q\(1), I1 => \^q\(0), I2 => \^q\(2), I3 => \^q\(3), O => q_int0(3) ); \q_int[4]_i_1\: unisim.vcomponents.LUT5 generic map( INIT => X"7FFF8000" ) port map ( I0 => \^q\(2), I1 => \^q\(0), I2 => \^q\(1), I3 => \^q\(3), I4 => \^q\(4), O => q_int0(4) ); \q_int[5]_i_1\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => seq_clr, O => clear ); \q_int[5]_i_2\: unisim.vcomponents.LUT6 generic map( INIT => X"7FFFFFFF80000000" ) port map ( I0 => \^q\(3), I1 => \^q\(1), I2 => \^q\(0), I3 => \^q\(2), I4 => \^q\(4), I5 => \^q\(5), O => q_int0(5) ); \q_int_reg[0]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(0), Q => \^q\(0), R => clear ); \q_int_reg[1]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(1), Q => \^q\(1), R => clear ); \q_int_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(2), Q => \^q\(2), R => clear ); \q_int_reg[3]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(3), Q => \^q\(3), R => clear ); \q_int_reg[4]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(4), Q => \^q\(4), R => clear ); \q_int_reg[5]\: unisim.vcomponents.FDRE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => seq_cnt_en, D => q_int0(5), Q => \^q\(5), R => clear ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_lpf is port ( lpf_int : out STD_LOGIC; slowest_sync_clk : in STD_LOGIC; dcm_locked : in STD_LOGIC; mb_debug_sys_rst : in STD_LOGIC; ext_reset_in : in STD_LOGIC; aux_reset_in : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_lpf : entity is "lpf"; end gcd_block_design_rst_ps7_0_100M_0_lpf; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_lpf is signal \ACTIVE_LOW_AUX.ACT_LO_AUX_n_0\ : STD_LOGIC; signal \ACTIVE_LOW_EXT.ACT_LO_EXT_n_0\ : STD_LOGIC; signal Q : STD_LOGIC; signal asr_lpf : STD_LOGIC_VECTOR ( 0 to 0 ); signal lpf_asr : STD_LOGIC; signal lpf_exr : STD_LOGIC; signal \lpf_int0__0\ : STD_LOGIC; signal p_1_in : STD_LOGIC; signal p_2_in : STD_LOGIC; signal p_3_in1_in : STD_LOGIC; signal p_3_out : STD_LOGIC_VECTOR ( 3 downto 0 ); attribute XILINX_LEGACY_PRIM : string; attribute XILINX_LEGACY_PRIM of POR_SRL_I : label is "SRL16"; attribute box_type : string; attribute box_type of POR_SRL_I : label is "PRIMITIVE"; attribute srl_name : string; attribute srl_name of POR_SRL_I : label is "U0/\EXT_LPF/POR_SRL_I "; begin \ACTIVE_LOW_AUX.ACT_LO_AUX\: entity work.gcd_block_design_rst_ps7_0_100M_0_cdc_sync port map ( asr_lpf(0) => asr_lpf(0), aux_reset_in => aux_reset_in, lpf_asr => lpf_asr, lpf_asr_reg => \ACTIVE_LOW_AUX.ACT_LO_AUX_n_0\, p_1_in => p_1_in, p_2_in => p_2_in, scndry_out => p_3_in1_in, slowest_sync_clk => slowest_sync_clk ); \ACTIVE_LOW_EXT.ACT_LO_EXT\: entity work.gcd_block_design_rst_ps7_0_100M_0_cdc_sync_0 port map ( ext_reset_in => ext_reset_in, lpf_exr => lpf_exr, lpf_exr_reg => \ACTIVE_LOW_EXT.ACT_LO_EXT_n_0\, mb_debug_sys_rst => mb_debug_sys_rst, p_3_out(2 downto 0) => p_3_out(2 downto 0), scndry_out => p_3_out(3), slowest_sync_clk => slowest_sync_clk ); \AUX_LPF[1].asr_lpf_reg[1]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_in1_in, Q => p_2_in, R => '0' ); \AUX_LPF[2].asr_lpf_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_2_in, Q => p_1_in, R => '0' ); \AUX_LPF[3].asr_lpf_reg[3]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_1_in, Q => asr_lpf(0), R => '0' ); \EXT_LPF[1].exr_lpf_reg[1]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(3), Q => p_3_out(2), R => '0' ); \EXT_LPF[2].exr_lpf_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(2), Q => p_3_out(1), R => '0' ); \EXT_LPF[3].exr_lpf_reg[3]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(1), Q => p_3_out(0), R => '0' ); POR_SRL_I: unisim.vcomponents.SRL16E generic map( INIT => X"FFFF" ) port map ( A0 => '1', A1 => '1', A2 => '1', A3 => '1', CE => '1', CLK => slowest_sync_clk, D => '0', Q => Q ); lpf_asr_reg: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \ACTIVE_LOW_AUX.ACT_LO_AUX_n_0\, Q => lpf_asr, R => '0' ); lpf_exr_reg: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \ACTIVE_LOW_EXT.ACT_LO_EXT_n_0\, Q => lpf_exr, R => '0' ); lpf_int0: unisim.vcomponents.LUT4 generic map( INIT => X"FFFD" ) port map ( I0 => dcm_locked, I1 => lpf_exr, I2 => lpf_asr, I3 => Q, O => \lpf_int0__0\ ); lpf_int_reg: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \lpf_int0__0\, Q => lpf_int, R => '0' ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_sequence_psr is port ( MB_out : out STD_LOGIC; Bsr_out : out STD_LOGIC; Pr_out : out STD_LOGIC; \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\ : out STD_LOGIC; \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\ : out STD_LOGIC; lpf_int : in STD_LOGIC; slowest_sync_clk : in STD_LOGIC ); attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_sequence_psr : entity is "sequence_psr"; end gcd_block_design_rst_ps7_0_100M_0_sequence_psr; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_sequence_psr is signal \^bsr_out\ : STD_LOGIC; signal Core_i_1_n_0 : STD_LOGIC; signal \^mb_out\ : STD_LOGIC; signal \^pr_out\ : STD_LOGIC; signal \bsr_dec_reg_n_0_[0]\ : STD_LOGIC; signal \bsr_dec_reg_n_0_[2]\ : STD_LOGIC; signal bsr_i_1_n_0 : STD_LOGIC; signal \core_dec[0]_i_1_n_0\ : STD_LOGIC; signal \core_dec[2]_i_1_n_0\ : STD_LOGIC; signal \core_dec_reg_n_0_[0]\ : STD_LOGIC; signal \core_dec_reg_n_0_[1]\ : STD_LOGIC; signal from_sys_i_1_n_0 : STD_LOGIC; signal p_0_in : STD_LOGIC; signal p_3_out : STD_LOGIC_VECTOR ( 2 downto 0 ); signal p_5_out : STD_LOGIC_VECTOR ( 2 downto 0 ); signal \pr_dec0__0\ : STD_LOGIC; signal \pr_dec_reg_n_0_[0]\ : STD_LOGIC; signal \pr_dec_reg_n_0_[2]\ : STD_LOGIC; signal pr_i_1_n_0 : STD_LOGIC; signal seq_clr : STD_LOGIC; signal seq_cnt : STD_LOGIC_VECTOR ( 5 downto 0 ); signal seq_cnt_en : STD_LOGIC; attribute SOFT_HLUTNM : string; attribute SOFT_HLUTNM of \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N_i_1\ : label is "soft_lutpair5"; attribute SOFT_HLUTNM of \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N_i_1\ : label is "soft_lutpair4"; attribute SOFT_HLUTNM of Core_i_1 : label is "soft_lutpair3"; attribute SOFT_HLUTNM of \bsr_dec[2]_i_1\ : label is "soft_lutpair6"; attribute SOFT_HLUTNM of bsr_i_1 : label is "soft_lutpair5"; attribute SOFT_HLUTNM of \core_dec[0]_i_1\ : label is "soft_lutpair2"; attribute SOFT_HLUTNM of \core_dec[2]_i_1\ : label is "soft_lutpair6"; attribute SOFT_HLUTNM of from_sys_i_1 : label is "soft_lutpair3"; attribute SOFT_HLUTNM of \pr_dec[0]_i_1\ : label is "soft_lutpair2"; attribute SOFT_HLUTNM of pr_i_1 : label is "soft_lutpair4"; begin Bsr_out <= \^bsr_out\; MB_out <= \^mb_out\; Pr_out <= \^pr_out\; \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N_i_1\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => \^bsr_out\, O => \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\ ); \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N_i_1\: unisim.vcomponents.LUT1 generic map( INIT => X"1" ) port map ( I0 => \^pr_out\, O => \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\ ); Core_i_1: unisim.vcomponents.LUT2 generic map( INIT => X"2" ) port map ( I0 => \^mb_out\, I1 => p_0_in, O => Core_i_1_n_0 ); Core_reg: unisim.vcomponents.FDSE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => '1', D => Core_i_1_n_0, Q => \^mb_out\, S => lpf_int ); SEQ_COUNTER: entity work.gcd_block_design_rst_ps7_0_100M_0_upcnt_n port map ( Q(5 downto 0) => seq_cnt(5 downto 0), seq_clr => seq_clr, seq_cnt_en => seq_cnt_en, slowest_sync_clk => slowest_sync_clk ); \bsr_dec[0]_i_1\: unisim.vcomponents.LUT4 generic map( INIT => X"0090" ) port map ( I0 => seq_cnt_en, I1 => seq_cnt(4), I2 => seq_cnt(3), I3 => seq_cnt(5), O => p_5_out(0) ); \bsr_dec[2]_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"8" ) port map ( I0 => \core_dec_reg_n_0_[1]\, I1 => \bsr_dec_reg_n_0_[0]\, O => p_5_out(2) ); \bsr_dec_reg[0]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_5_out(0), Q => \bsr_dec_reg_n_0_[0]\, R => '0' ); \bsr_dec_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_5_out(2), Q => \bsr_dec_reg_n_0_[2]\, R => '0' ); bsr_i_1: unisim.vcomponents.LUT2 generic map( INIT => X"2" ) port map ( I0 => \^bsr_out\, I1 => \bsr_dec_reg_n_0_[2]\, O => bsr_i_1_n_0 ); bsr_reg: unisim.vcomponents.FDSE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => '1', D => bsr_i_1_n_0, Q => \^bsr_out\, S => lpf_int ); \core_dec[0]_i_1\: unisim.vcomponents.LUT4 generic map( INIT => X"9000" ) port map ( I0 => seq_cnt_en, I1 => seq_cnt(4), I2 => seq_cnt(3), I3 => seq_cnt(5), O => \core_dec[0]_i_1_n_0\ ); \core_dec[2]_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"8" ) port map ( I0 => \core_dec_reg_n_0_[1]\, I1 => \core_dec_reg_n_0_[0]\, O => \core_dec[2]_i_1_n_0\ ); \core_dec_reg[0]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \core_dec[0]_i_1_n_0\, Q => \core_dec_reg_n_0_[0]\, R => '0' ); \core_dec_reg[1]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \pr_dec0__0\, Q => \core_dec_reg_n_0_[1]\, R => '0' ); \core_dec_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => \core_dec[2]_i_1_n_0\, Q => p_0_in, R => '0' ); from_sys_i_1: unisim.vcomponents.LUT2 generic map( INIT => X"8" ) port map ( I0 => \^mb_out\, I1 => seq_cnt_en, O => from_sys_i_1_n_0 ); from_sys_reg: unisim.vcomponents.FDSE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => from_sys_i_1_n_0, Q => seq_cnt_en, S => lpf_int ); pr_dec0: unisim.vcomponents.LUT4 generic map( INIT => X"0018" ) port map ( I0 => seq_cnt_en, I1 => seq_cnt(0), I2 => seq_cnt(2), I3 => seq_cnt(1), O => \pr_dec0__0\ ); \pr_dec[0]_i_1\: unisim.vcomponents.LUT4 generic map( INIT => X"0480" ) port map ( I0 => seq_cnt_en, I1 => seq_cnt(3), I2 => seq_cnt(5), I3 => seq_cnt(4), O => p_3_out(0) ); \pr_dec[2]_i_1\: unisim.vcomponents.LUT2 generic map( INIT => X"8" ) port map ( I0 => \core_dec_reg_n_0_[1]\, I1 => \pr_dec_reg_n_0_[0]\, O => p_3_out(2) ); \pr_dec_reg[0]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(0), Q => \pr_dec_reg_n_0_[0]\, R => '0' ); \pr_dec_reg[2]\: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => p_3_out(2), Q => \pr_dec_reg_n_0_[2]\, R => '0' ); pr_i_1: unisim.vcomponents.LUT2 generic map( INIT => X"2" ) port map ( I0 => \^pr_out\, I1 => \pr_dec_reg_n_0_[2]\, O => pr_i_1_n_0 ); pr_reg: unisim.vcomponents.FDSE generic map( INIT => '1' ) port map ( C => slowest_sync_clk, CE => '1', D => pr_i_1_n_0, Q => \^pr_out\, S => lpf_int ); seq_clr_reg: unisim.vcomponents.FDRE generic map( INIT => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => '1', Q => seq_clr, R => lpf_int ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset is port ( slowest_sync_clk : in STD_LOGIC; ext_reset_in : in STD_LOGIC; aux_reset_in : in STD_LOGIC; mb_debug_sys_rst : in STD_LOGIC; dcm_locked : in STD_LOGIC; mb_reset : out STD_LOGIC; bus_struct_reset : out STD_LOGIC_VECTOR ( 0 to 0 ); peripheral_reset : out STD_LOGIC_VECTOR ( 0 to 0 ); interconnect_aresetn : out STD_LOGIC_VECTOR ( 0 to 0 ); peripheral_aresetn : out STD_LOGIC_VECTOR ( 0 to 0 ) ); attribute C_AUX_RESET_HIGH : string; attribute C_AUX_RESET_HIGH of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is "1'b0"; attribute C_AUX_RST_WIDTH : integer; attribute C_AUX_RST_WIDTH of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 4; attribute C_EXT_RESET_HIGH : string; attribute C_EXT_RESET_HIGH of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is "1'b0"; attribute C_EXT_RST_WIDTH : integer; attribute C_EXT_RST_WIDTH of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 4; attribute C_FAMILY : string; attribute C_FAMILY of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is "zynq"; attribute C_NUM_BUS_RST : integer; attribute C_NUM_BUS_RST of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 1; attribute C_NUM_INTERCONNECT_ARESETN : integer; attribute C_NUM_INTERCONNECT_ARESETN of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 1; attribute C_NUM_PERP_ARESETN : integer; attribute C_NUM_PERP_ARESETN of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 1; attribute C_NUM_PERP_RST : integer; attribute C_NUM_PERP_RST of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is 1; attribute ORIG_REF_NAME : string; attribute ORIG_REF_NAME of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset : entity is "proc_sys_reset"; end gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset is signal Bsr_out : STD_LOGIC; signal MB_out : STD_LOGIC; signal Pr_out : STD_LOGIC; signal SEQ_n_3 : STD_LOGIC; signal SEQ_n_4 : STD_LOGIC; signal lpf_int : STD_LOGIC; attribute box_type : string; attribute box_type of \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\ : label is "PRIMITIVE"; attribute box_type of \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\ : label is "PRIMITIVE"; attribute box_type of \BSR_OUT_DFF[0].FDRE_BSR\ : label is "PRIMITIVE"; attribute box_type of FDRE_inst : label is "PRIMITIVE"; attribute box_type of \PR_OUT_DFF[0].FDRE_PER\ : label is "PRIMITIVE"; attribute equivalent_register_removal : string; attribute equivalent_register_removal of bus_struct_reset : signal is "no"; attribute equivalent_register_removal of interconnect_aresetn : signal is "no"; attribute equivalent_register_removal of peripheral_aresetn : signal is "no"; attribute equivalent_register_removal of peripheral_reset : signal is "no"; begin \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\: unisim.vcomponents.FDRE generic map( INIT => '0', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => SEQ_n_3, Q => interconnect_aresetn(0), R => '0' ); \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\: unisim.vcomponents.FDRE generic map( INIT => '0', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => SEQ_n_4, Q => peripheral_aresetn(0), R => '0' ); \BSR_OUT_DFF[0].FDRE_BSR\: unisim.vcomponents.FDRE generic map( INIT => '1', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => Bsr_out, Q => bus_struct_reset(0), R => '0' ); EXT_LPF: entity work.gcd_block_design_rst_ps7_0_100M_0_lpf port map ( aux_reset_in => aux_reset_in, dcm_locked => dcm_locked, ext_reset_in => ext_reset_in, lpf_int => lpf_int, mb_debug_sys_rst => mb_debug_sys_rst, slowest_sync_clk => slowest_sync_clk ); FDRE_inst: unisim.vcomponents.FDRE generic map( INIT => '1', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => MB_out, Q => mb_reset, R => '0' ); \PR_OUT_DFF[0].FDRE_PER\: unisim.vcomponents.FDRE generic map( INIT => '1', IS_C_INVERTED => '0', IS_D_INVERTED => '0', IS_R_INVERTED => '0' ) port map ( C => slowest_sync_clk, CE => '1', D => Pr_out, Q => peripheral_reset(0), R => '0' ); SEQ: entity work.gcd_block_design_rst_ps7_0_100M_0_sequence_psr port map ( \ACTIVE_LOW_BSR_OUT_DFF[0].FDRE_BSR_N\ => SEQ_n_3, \ACTIVE_LOW_PR_OUT_DFF[0].FDRE_PER_N\ => SEQ_n_4, Bsr_out => Bsr_out, MB_out => MB_out, Pr_out => Pr_out, lpf_int => lpf_int, slowest_sync_clk => slowest_sync_clk ); end STRUCTURE; library IEEE; use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity gcd_block_design_rst_ps7_0_100M_0 is port ( slowest_sync_clk : in STD_LOGIC; ext_reset_in : in STD_LOGIC; aux_reset_in : in STD_LOGIC; mb_debug_sys_rst : in STD_LOGIC; dcm_locked : in STD_LOGIC; mb_reset : out STD_LOGIC; bus_struct_reset : out STD_LOGIC_VECTOR ( 0 to 0 ); peripheral_reset : out STD_LOGIC_VECTOR ( 0 to 0 ); interconnect_aresetn : out STD_LOGIC_VECTOR ( 0 to 0 ); peripheral_aresetn : out STD_LOGIC_VECTOR ( 0 to 0 ) ); attribute NotValidForBitStream : boolean; attribute NotValidForBitStream of gcd_block_design_rst_ps7_0_100M_0 : entity is true; attribute CHECK_LICENSE_TYPE : string; attribute CHECK_LICENSE_TYPE of gcd_block_design_rst_ps7_0_100M_0 : entity is "gcd_block_design_rst_ps7_0_100M_0,proc_sys_reset,{}"; attribute downgradeipidentifiedwarnings : string; attribute downgradeipidentifiedwarnings of gcd_block_design_rst_ps7_0_100M_0 : entity is "yes"; attribute x_core_info : string; attribute x_core_info of gcd_block_design_rst_ps7_0_100M_0 : entity is "proc_sys_reset,Vivado 2018.2"; end gcd_block_design_rst_ps7_0_100M_0; architecture STRUCTURE of gcd_block_design_rst_ps7_0_100M_0 is attribute C_AUX_RESET_HIGH : string; attribute C_AUX_RESET_HIGH of U0 : label is "1'b0"; attribute C_AUX_RST_WIDTH : integer; attribute C_AUX_RST_WIDTH of U0 : label is 4; attribute C_EXT_RESET_HIGH : string; attribute C_EXT_RESET_HIGH of U0 : label is "1'b0"; attribute C_EXT_RST_WIDTH : integer; attribute C_EXT_RST_WIDTH of U0 : label is 4; attribute C_FAMILY : string; attribute C_FAMILY of U0 : label is "zynq"; attribute C_NUM_BUS_RST : integer; attribute C_NUM_BUS_RST of U0 : label is 1; attribute C_NUM_INTERCONNECT_ARESETN : integer; attribute C_NUM_INTERCONNECT_ARESETN of U0 : label is 1; attribute C_NUM_PERP_ARESETN : integer; attribute C_NUM_PERP_ARESETN of U0 : label is 1; attribute C_NUM_PERP_RST : integer; attribute C_NUM_PERP_RST of U0 : label is 1; attribute x_interface_info : string; attribute x_interface_info of aux_reset_in : signal is "xilinx.com:signal:reset:1.0 aux_reset RST"; attribute x_interface_parameter : string; attribute x_interface_parameter of aux_reset_in : signal is "XIL_INTERFACENAME aux_reset, POLARITY ACTIVE_LOW"; attribute x_interface_info of ext_reset_in : signal is "xilinx.com:signal:reset:1.0 ext_reset RST"; attribute x_interface_parameter of ext_reset_in : signal is "XIL_INTERFACENAME ext_reset, BOARD.ASSOCIATED_PARAM RESET_BOARD_INTERFACE, POLARITY ACTIVE_LOW"; attribute x_interface_info of mb_debug_sys_rst : signal is "xilinx.com:signal:reset:1.0 dbg_reset RST"; attribute x_interface_parameter of mb_debug_sys_rst : signal is "XIL_INTERFACENAME dbg_reset, POLARITY ACTIVE_HIGH"; attribute x_interface_info of mb_reset : signal is "xilinx.com:signal:reset:1.0 mb_rst RST"; attribute x_interface_parameter of mb_reset : signal is "XIL_INTERFACENAME mb_rst, POLARITY ACTIVE_HIGH, TYPE PROCESSOR"; attribute x_interface_info of slowest_sync_clk : signal is "xilinx.com:signal:clock:1.0 clock CLK"; attribute x_interface_parameter of slowest_sync_clk : signal is "XIL_INTERFACENAME clock, ASSOCIATED_RESET mb_reset:bus_struct_reset:interconnect_aresetn:peripheral_aresetn:peripheral_reset, FREQ_HZ 100000000, PHASE 0.000, CLK_DOMAIN gcd_block_design_processing_system7_0_2_FCLK_CLK0"; attribute x_interface_info of bus_struct_reset : signal is "xilinx.com:signal:reset:1.0 bus_struct_reset RST"; attribute x_interface_parameter of bus_struct_reset : signal is "XIL_INTERFACENAME bus_struct_reset, POLARITY ACTIVE_HIGH, TYPE INTERCONNECT"; attribute x_interface_info of interconnect_aresetn : signal is "xilinx.com:signal:reset:1.0 interconnect_low_rst RST"; attribute x_interface_parameter of interconnect_aresetn : signal is "XIL_INTERFACENAME interconnect_low_rst, POLARITY ACTIVE_LOW, TYPE INTERCONNECT"; attribute x_interface_info of peripheral_aresetn : signal is "xilinx.com:signal:reset:1.0 peripheral_low_rst RST"; attribute x_interface_parameter of peripheral_aresetn : signal is "XIL_INTERFACENAME peripheral_low_rst, POLARITY ACTIVE_LOW, TYPE PERIPHERAL"; attribute x_interface_info of peripheral_reset : signal is "xilinx.com:signal:reset:1.0 peripheral_high_rst RST"; attribute x_interface_parameter of peripheral_reset : signal is "XIL_INTERFACENAME peripheral_high_rst, POLARITY ACTIVE_HIGH, TYPE PERIPHERAL"; begin U0: entity work.gcd_block_design_rst_ps7_0_100M_0_proc_sys_reset port map ( aux_reset_in => aux_reset_in, bus_struct_reset(0) => bus_struct_reset(0), dcm_locked => dcm_locked, ext_reset_in => ext_reset_in, interconnect_aresetn(0) => interconnect_aresetn(0), mb_debug_sys_rst => mb_debug_sys_rst, mb_reset => mb_reset, peripheral_aresetn(0) => peripheral_aresetn(0), peripheral_reset(0) => peripheral_reset(0), slowest_sync_clk => slowest_sync_clk ); end STRUCTURE;
---------------------------------------------------------------------------------- -- Engineer: Mike Field <[email protected]> -- -- Module Name: pmodenc - Behavioral -- Description: Process the quadrature signals from the rotary encode on -- the Digilent PMODENC -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity encoder is Port ( clk : in STD_LOGIC; quad : in STD_LOGIC_VECTOR (1 downto 0); up : out STD_LOGIC; down : out STD_LOGIC; error : out STD_LOGIC); end encoder; architecture Behavioral of encoder is signal sr : std_logic_vector(5 downto 0) := (others => '0'); begin process(clk) begin if rising_edge(clk) then up <= '0'; down <= '0'; error <= '0'; case sr(3 downto 0) is when "0100" => down <= '1'; when "1101" => down <= '1'; when "1011" => down <= '1'; when "0010" => down <= '1'; when "1000" => up <= '1'; when "1110" => up <= '1'; when "0111" => up <= '1'; when "0001" => up <= '1'; when "0011" => error <= '1'; when "1100" => error <= '1'; when "0110" => error <= '1'; when "1001" => error <= '1'; when others => end case; sr <= quad & sr(sr'high downto 2); end if; end process; end Behavioral;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2374.vhd,v 1.2 2001-10-26 16:29:47 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c07s03b02x00p02n01i02374ent IS END c07s03b02x00p02n01i02374ent; ARCHITECTURE c07s03b02x00p02n01i02374arch OF c07s03b02x00p02n01i02374ent IS BEGIN TESTING: PROCESS type x1 is array (1 to 2) of integer; constant v1 : x1 := (0, 0); -- Success_here BEGIN assert NOT(v1(1)=0 and v1(2)=0) report "***PASSED TEST: c07s03b02x00p02n01i02374" severity NOTE; assert (v1(1)=0 and v1(2)=0) report "***FAILED TEST: c07s03b02x00p02n01i02374 - The aggregate consists of one or more element associations seperated with commas(,) which are enclosed with parentheses." severity ERROR; wait; END PROCESS TESTING; END c07s03b02x00p02n01i02374arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2374.vhd,v 1.2 2001-10-26 16:29:47 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c07s03b02x00p02n01i02374ent IS END c07s03b02x00p02n01i02374ent; ARCHITECTURE c07s03b02x00p02n01i02374arch OF c07s03b02x00p02n01i02374ent IS BEGIN TESTING: PROCESS type x1 is array (1 to 2) of integer; constant v1 : x1 := (0, 0); -- Success_here BEGIN assert NOT(v1(1)=0 and v1(2)=0) report "***PASSED TEST: c07s03b02x00p02n01i02374" severity NOTE; assert (v1(1)=0 and v1(2)=0) report "***FAILED TEST: c07s03b02x00p02n01i02374 - The aggregate consists of one or more element associations seperated with commas(,) which are enclosed with parentheses." severity ERROR; wait; END PROCESS TESTING; END c07s03b02x00p02n01i02374arch;
-- Copyright (C) 2001 Bill Billowitch. -- Some of the work to develop this test suite was done with Air Force -- support. The Air Force and Bill Billowitch assume no -- responsibilities for this software. -- This file is part of VESTs (Vhdl tESTs). -- VESTs is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the -- Free Software Foundation; either version 2 of the License, or (at -- your option) any later version. -- VESTs is distributed in the hope that it will be useful, but WITHOUT -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- for more details. -- You should have received a copy of the GNU General Public License -- along with VESTs; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- --------------------------------------------------------------------- -- -- $Id: tc2374.vhd,v 1.2 2001-10-26 16:29:47 paw Exp $ -- $Revision: 1.2 $ -- -- --------------------------------------------------------------------- ENTITY c07s03b02x00p02n01i02374ent IS END c07s03b02x00p02n01i02374ent; ARCHITECTURE c07s03b02x00p02n01i02374arch OF c07s03b02x00p02n01i02374ent IS BEGIN TESTING: PROCESS type x1 is array (1 to 2) of integer; constant v1 : x1 := (0, 0); -- Success_here BEGIN assert NOT(v1(1)=0 and v1(2)=0) report "***PASSED TEST: c07s03b02x00p02n01i02374" severity NOTE; assert (v1(1)=0 and v1(2)=0) report "***FAILED TEST: c07s03b02x00p02n01i02374 - The aggregate consists of one or more element associations seperated with commas(,) which are enclosed with parentheses." severity ERROR; wait; END PROCESS TESTING; END c07s03b02x00p02n01i02374arch;
-- ############################################################################# -- DE0_Nano_SoC_top_level.vhd -- ========================== -- -- BOARD : DE0-Nano-SoC from Terasic -- Author : Sahand Kashani-Akhavan from Terasic documentation -- Revision : 1.3 -- Last updated : 2017-06-11 12:48:26 UTC -- -- Syntax Rule : GROUP_NAME_N[bit] -- -- GROUP : specify a particular interface (ex: SDR_) -- NAME : signal name (ex: CONFIG, D, ...) -- bit : signal index -- _N : to specify an active-low signal -- ############################################################################# library ieee; use ieee.std_logic_1164.all; entity DE0_Nano_SoC_top_level is port( -- ADC ADC_CONVST : out std_logic; ADC_SCK : out std_logic; ADC_SDI : out std_logic; ADC_SDO : in std_logic; -- ARDUINO ARDUINO_IO : inout std_logic_vector(15 downto 0); ARDUINO_RESET_N : inout std_logic; -- CLOCK FPGA_CLK1_50 : in std_logic; FPGA_CLK2_50 : in std_logic; FPGA_CLK3_50 : in std_logic; -- KEY KEY_N : in std_logic_vector(1 downto 0); -- LED LED : out std_logic_vector(7 downto 0); -- SW SW : in std_logic_vector(3 downto 0); -- GPIO_0 GPIO_0 : inout std_logic_vector(35 downto 0); -- GPIO_1 GPIO_1 : inout std_logic_vector(35 downto 0); -- HPS HPS_CONV_USB_N : inout std_logic; HPS_DDR3_ADDR : out std_logic_vector(14 downto 0); HPS_DDR3_BA : out std_logic_vector(2 downto 0); HPS_DDR3_CAS_N : out std_logic; HPS_DDR3_CK_N : out std_logic; HPS_DDR3_CK_P : out std_logic; HPS_DDR3_CKE : out std_logic; HPS_DDR3_CS_N : out std_logic; HPS_DDR3_DM : out std_logic_vector(3 downto 0); HPS_DDR3_DQ : inout std_logic_vector(31 downto 0); HPS_DDR3_DQS_N : inout std_logic_vector(3 downto 0); HPS_DDR3_DQS_P : inout std_logic_vector(3 downto 0); HPS_DDR3_ODT : out std_logic; HPS_DDR3_RAS_N : out std_logic; HPS_DDR3_RESET_N : out std_logic; HPS_DDR3_RZQ : in std_logic; HPS_DDR3_WE_N : out std_logic; HPS_ENET_GTX_CLK : out std_logic; HPS_ENET_INT_N : inout std_logic; HPS_ENET_MDC : out std_logic; HPS_ENET_MDIO : inout std_logic; HPS_ENET_RX_CLK : in std_logic; HPS_ENET_RX_DATA : in std_logic_vector(3 downto 0); HPS_ENET_RX_DV : in std_logic; HPS_ENET_TX_DATA : out std_logic_vector(3 downto 0); HPS_ENET_TX_EN : out std_logic; HPS_GSENSOR_INT : inout std_logic; HPS_I2C0_SCLK : inout std_logic; HPS_I2C0_SDAT : inout std_logic; HPS_I2C1_SCLK : inout std_logic; HPS_I2C1_SDAT : inout std_logic; HPS_KEY_N : inout std_logic; HPS_LED : inout std_logic; HPS_LTC_GPIO : inout std_logic; HPS_SD_CLK : out std_logic; HPS_SD_CMD : inout std_logic; HPS_SD_DATA : inout std_logic_vector(3 downto 0); HPS_SPIM_CLK : out std_logic; HPS_SPIM_MISO : in std_logic; HPS_SPIM_MOSI : out std_logic; HPS_SPIM_SS : inout std_logic; HPS_UART_RX : in std_logic; HPS_UART_TX : out std_logic; HPS_USB_CLKOUT : in std_logic; HPS_USB_DATA : inout std_logic_vector(7 downto 0); HPS_USB_DIR : in std_logic; HPS_USB_NXT : in std_logic; HPS_USB_STP : out std_logic ); end entity DE0_Nano_SoC_top_level; architecture rtl of DE0_Nano_SoC_top_level is begin end;
library ieee; use ieee.std_logic_1164.all; entity tri is port (i, en : std_logic; o : out std_logic); end tri; architecture behav of tri is begin o <= i when en = '1' else 'Z'; end behav;
library IEEE; use IEEE.NUMERIC_STD.ALL; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity alu is Port( carry: in STD_LOGIC; aluop : in STD_LOGIC_VECTOR (5 downto 0); crs1 : in STD_LOGIC_VECTOR (31 downto 0); crs2 : in STD_LOGIC_VECTOR (31 downto 0); r : out STD_LOGIC_VECTOR (31 downto 0) ); end alu; architecture ArqAlu of alu is begin process(aluop, crs1, crs2,carry) begin if (aluop="000000") or (aluop="001000") then --Add Operations r <= crs1 + crs2; elsif (aluop="001010") or (aluop="001011") then --AddX Operations r<=crs1 +crs2 + carry; elsif (aluop="000001") or (aluop="001001") then --Sub Operations r <= crs1 - crs2 ; elsif (aluop="001100") or (aluop="001101") then --SubX Operations r<=crs1 - crs2 - carry; elsif (aluop="000010") or (aluop="001110") then --Or Operations r <= crs1 or crs2; elsif (aluop="000011") or (aluop="001111") then --And Operations r <= crs1 and crs2; elsif (aluop="000101") or (aluop="010010") then --OrN Operations r <= crs1 or not(crs2); elsif (aluop="000100") or (aluop="010000") then --Xor Operations r <= crs1 xor crs2; elsif (aluop="000110") or (aluop="010001") then --AndN Operations r <= crs1 and not(crs2); elsif (aluop="000111") or (aluop="010011") then --Xnor Operations r <= crs1 xnor crs2; elsif (aluop="010100")then --SLL r<= to_stdlogicvector(to_bitvector(crs1) SLL conv_integer(crs2)); elsif (aluop="010101")then --SRL r<= to_stdlogicvector(to_bitvector(crs1) SRL conv_integer(crs2)); else r<=x"00000000"; end if; end process; end ArqAlu;
--------------------------------------------------------------------- -- TITLE: Random Access Memory for Xilinx -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 11/06/05 -- FILENAME: ram_xilinx.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Implements Plasma internal RAM as RAMB for Spartan 3x -- -- Compile the MIPS C and assembly code into "test.axf". -- Run convert.exe to change "test.axf" to "code.txt" which -- will contain the hex values of the opcodes. -- Next run "ram_image ram_xilinx.vhd code.txt ram_image.vhd", -- to create the "ram_image.vhd" file that will have the opcodes -- correctly placed inside the INIT_00 => strings. -- Then include ram_image.vhd in the simulation/synthesis. -- -- Warning: Addresses 0x1000 - 0x1FFF are reserved for the cache -- if the DDR cache is enabled. --------------------------------------------------------------------- -- UPDATED: 09/07/10 Olivier Rinaudo ([email protected]) -- new behaviour: 8KB expandable to 64KB of internal RAM -- -- MEMORY MAP -- 0000..1FFF : 8KB 8KB block0 (upper 4KB used as DDR cache) -- 2000..3FFF : 8KB 16KB block1 -- 4000..5FFF : 8KB 24KB block2 -- 6000..7FFF : 8KB 32KB block3 -- 8000..9FFF : 8KB 40KB block4 -- A000..BFFF : 8KB 48KB block5 -- C000..DFFF : 8KB 56KB block6 -- E000..FFFF : 8KB 64KB block7 --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use work.mlite_pack.all; library UNISIM; use UNISIM.vcomponents.all; entity ram is generic(memory_type : string := "DEFAULT"; --Number of 8KB blocks of internal RAM, up to 64KB (1 to 8) block_count : integer := 1); port(clk : in std_logic; enable : in std_logic; reset : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0)); end; --entity ram architecture logic of ram is --type type mem32_vector IS ARRAY (NATURAL RANGE<>) OF std_logic_vector(31 downto 0); --Which 8KB block alias block_sel: std_logic_vector(2 downto 0) is address(15 downto 13); --Address within a 8KB block (without lower two bits) alias block_addr : std_logic_vector(10 downto 0) is address(12 downto 2); --Block enable with 1 bit per memory block signal block_enable: std_logic_vector(7 downto 0); --Block Data Out signal block_do: mem32_vector(7 downto 0); --Remember which block was selected signal block_sel_buf: std_logic_vector(2 downto 0); begin block_enable<= "00000001" when (enable='1') and (block_sel="000") else "00000010" when (enable='1') and (block_sel="001") else "00000100" when (enable='1') and (block_sel="010") else "00001000" when (enable='1') and (block_sel="011") else "00010000" when (enable='1') and (block_sel="100") else "00100000" when (enable='1') and (block_sel="101") else "01000000" when (enable='1') and (block_sel="110") else "10000000" when (enable='1') and (block_sel="111") else "00000000"; proc_blocksel: process (clk, block_sel) is begin if rising_edge(clk) then block_sel_buf <= block_sel; end if; end process; proc_do: process (block_do, block_sel_buf) is begin data_read <= block_do(conv_integer(block_sel_buf)); end process; -- BLOCKS generation block0: if (block_count > 0) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"afafafafafafafafafafafafafafafaf2308000c241400ac273c243c243c273c", INIT_01 => X"8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f230c008c8c3caf00af00af2340afaf", INIT_02 => X"acacacac0003373cac038cac8cac8cac8c243c40034040033423038f038f8f8f", INIT_03 => X"000300ac0300000034038c8c8c8c8c8c8c8c8c8c8c8c3403acacacacacacacac", INIT_04 => X"8c343c00af03af270003278f0300ac008f34af0000000014008f8fafaf03af27", INIT_05 => X"008f000c2400142480008f0010af03afaf270003278f0300ac008f3c00103000", INIT_06 => X"008f8f0010af24af03afaf270003278f8f030000140080008f000c000080af24", INIT_07 => X"03000004008faf24008f000c0024008f0010000c0024008f00102c008faf3000", INIT_08 => X"0c000080af24008f0010af27000c8f008f002727afafaf03afaf270003278f8f", INIT_09 => X"3c03af270003278f8f030000140080008fa0248faf24008f0014248024008f00", INIT_0A => X"0000000003278f8f030000008c3c0010000c0003afaf270003278f0330008c34", INIT_0B => X"243c000c343c243c24000c343c243c24000c243c000c243c000c243c03afaf27", INIT_0C => X"24243c243c243caf243caf24000c24243c243c243caf243caf24000c243c000c", INIT_0D => X"000c343c243c243c243caf243caf24000c343c243c243c243caf243caf24000c", INIT_0E => X"243c000c000c243c000c243c000c000c243c000c243c000c000c243c000c243c", INIT_0F => X"3c000c243c0010000c243c0014008c3c000c243c000c243c000c000c243c000c", INIT_10 => X"af240010af24afaf03afaf270003278f8f0300000c24000c0024008c3c000c24", INIT_11 => X"0c8f24000010008f001400008f8faf24008f0010af001400000014008f8f0010", INIT_12 => X"24008faf240010008f8c002400008f3c000c0024008c002400008f3c000c2400", INIT_13 => X"0c243c0010ac3c24008c3c000c243c0014248f001428008faf24008f000c24af", INIT_14 => X"0087000c24000c8faf00008f870010a7afafafaf03afaf270003278f8f030000", INIT_15 => X"0087a730240097af240010008f8c00008f000087000c24000c00008c00008f00", INIT_16 => X"000c243c0010ac3c24008c3c000c243c0014248f000c8f2400000c243c001428", INIT_17 => X"87000c24000c8faf0000008f870010a7afafafafaf03afaf270003278f8f0300", INIT_18 => X"87a730240097af240010008f8c00008f000087000c24000c00008c00008f0000", INIT_19 => X"008c00008f000087000c24000c8faf0000008f2400870010a7000c2400142800", INIT_1A => X"000c240014280087a730240097af240010008f8c00008f000087000c24000c00", INIT_1B => X"000c00008c00008f0000343c87000c24000c8faf0000000014008f870010a724", INIT_1C => X"24000c240014280087a730240097af240010008f8c00008f0000343c87000c24", INIT_1D => X"0c24000c00008c00008f0000343c87000c24000c8faf00000014008f870010a7", INIT_1E => X"2400000c243c0014280087a730240097af240010008f8c00008f0000343c8700", INIT_1F => X"af270003278f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c8f", INIT_20 => X"0c24000c00008c002400008f3c000c24000c8faf00008f8f0010afafaf2403af", INIT_21 => X"008f8f0010af000c24001428008faf24008faf240010008f8c002400008f3c00", INIT_22 => X"10008f8c002400008f3c000c24000c00008c002400008f3c000c24000c8faf00", INIT_23 => X"0010ac3c24008c3c000c243c0014248f000c243c001428008faf24008faf2400", INIT_24 => X"8f0000008fa000278f0000008f0010afaf03afaf270003278f8f0300000c243c", INIT_25 => X"00af008000278f0010af001428008faf24008fac008f002700008fa400270000", INIT_26 => X"10008f8c002400008f3c000c24000c0024008c002400008f3c000c24000c8f24", INIT_27 => X"24000c0024008c002400008f3c000c24000c8f2400af0084002700008faf2400", INIT_28 => X"3c000c24000c8f2400af008c002700008faf240010008f8c002400008f3c000c", INIT_29 => X"8faf24008faf240010008f8c002400008f3c000c24000c0024008c002400008f", INIT_2A => X"8f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c243c00142800", INIT_2B => X"000c24000c00008c3c000c24000c8faf00008f8fafaf24af2403afaf27000327", INIT_2C => X"8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f8c3c", INIT_2D => X"008f8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f", INIT_2E => X"240010008f8c243c000c24000c00008c243c000c24000c8faf00008faf240010", INIT_2F => X"008faf240010008f8c243c000c24000c00008c243c000c24000c8faf24008faf", INIT_30 => X"0014248f000c243caf240010008f8c243c000c00008c243c000c24000c8faf24", INIT_31 => X"28008c3caf03af27000003278f8f0300000c243c0010ac3c24008c3c000c243c", INIT_32 => X"a324af03af270003278f0324001000ac3c24008c3cac008f0024003c8c3c0010", INIT_33 => X"14003c8c340010240010248c3c00100083a4248fa3001000102400100094008f", INIT_34 => X"af270003278f0324a4008fa30010ac3cac243cac3cac008c3c240018008c3c00", INIT_35 => X"0010240010248c3c00100083a4248fa3001000102400100094008fa324afaf03", INIT_36 => X"3cac0024003c8c248c3c001028008c3c0004008f0010008faf008c34af008c34", INIT_37 => X"af008fafaf03af270003278f0324a4008fa30010ac243cac3cac3cac3c24008c", INIT_38 => X"10afafafafaf03afaf270003278f038f00140080a00080af24008faf24008f00", INIT_39 => X"8f8faf240010af240010248f0004008fa3001428008faf24008fa02400278f00", INIT_3A => X"008f001028008faf0000000014008f8faf00000014008f8f0010af24af000000", INIT_3B => X"1000008c008f00008f240014008fa000278f0000302430008f00100000302430", INIT_3C => X"8f0010008c008fa02400278faf24008f0014248f0000100004008faf24008f00", INIT_3D => X"2700248c008f0010ac008f00008f24000c8f0000008f2700100000008f248c00", INIT_3E => X"af03af270003278f0300ac343c343cafaf03af270003278f8f0300000c8f0000", INIT_3F => X"008fafaf03af270003278f038f0014008faf00008f24008faf302c008f0010af" ) port map ( DO => block_do(0)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"b8afaeadacabaaa9a8a7a6a5a4a3a2a1bd000000a560a4a0bd1d8404a5059c1c", INIT_01 => X"b9b8afaeadacabaaa9a8a7a6a5a4a3a2a1a50086c6c406bb00bb00ba5a1abfb9", INIT_02 => X"9392919000405a1a06e0a606a606a606a6a50584e0029b401bbd60bb60bbbabf", INIT_03 => X"00e000c4e0000085a2e09f9d9c9e979695949392919002e09f9d9c9e97969594", INIT_04 => X"42420200c4a0bebd00e0bdbec0004300c302c2000007624000c2c3c5c4a0bebd", INIT_05 => X"00c20000040062024300c20000c4a0bebfbd00e0bdbec0004300c30200404200", INIT_06 => X"00c2c30000c202c4a0bebfbd00e0bdbebfc0000040004200c20000400042c343", INIT_07 => X"c000004100c2c24200c20000404200c200000000404200c200404200c2c24243", INIT_08 => X"00400042c34300c20000c2c20000c440c660c2c3c6c5c4a0bebfbd00e0bdbebf", INIT_09 => X"02a0bebd00e0bdbebfc0000040004200c24303c2c24200c2006202434200c200", INIT_0A => X"00000000e0bdbebfc002020042020040000000a0bebfbd00e0bdbec042004242", INIT_0B => X"44020000440245020600004402450206000044020000440200004402a0bebfbd", INIT_0C => X"04450246024702a24202a202000004450246024702a24202a202000044020000", INIT_0D => X"00004402450246024702a24202a20200004402450246024702a24202a2020000", INIT_0E => X"4402000000004402000044020000000044020000440200000000440200004402", INIT_0F => X"0200004402000000004402004000420200004402000044020000000044020000", INIT_10 => X"c2020000c202c0c0a0bebfbd00e0bdbebfc00000000400004005004202000044", INIT_11 => X"00c40500004000c200406200c2c3c24200c20000c000400007624000c2c30000", INIT_12 => X"4200c2c202006200c24362420300c30200004005004262420300c30200000400", INIT_13 => X"004402000043024300420200004402006202c300404200c2c24200c2000004c2", INIT_14 => X"00c20000040000c4c24300c3c20000c0c0c6c5c4a0bebfbd00e0bdbebfc00000", INIT_15 => X"00c2c2424200c2c202006200c2436200c30200c200000400004000426200c302", INIT_16 => X"00004402000043024300420200004402006202c30000c4050000004402004042", INIT_17 => X"c20000040000c4c2006200c2c30000c0c0c7c6c5c4a0bebfbd00e0bdbebfc000", INIT_18 => X"c2c2424200c2c202006200c2436200c30200c200000400004000426200c30200", INIT_19 => X"00426200c30200c20000040000c4c2006200c24300c20000c000000400404200", INIT_1A => X"00000400404200c2c2424200c2c202006200c2436200c30200c2000004000040", INIT_1B => X"00004000426200c302624202c30000040000c4c2000007624000c3c20000c202", INIT_1C => X"0200000400404200c2c2424200c2c202006200c2436200c302624202c3000004", INIT_1D => X"000400004000426200c302624202c30000040000c4c20007624000c3c20000c2", INIT_1E => X"05000000440200404200c2c2424200c2c202006200c2436200c302624202c300", INIT_1F => X"bfbd00e0bdbebfc00000004402000043024300420200004402006202c30000c4", INIT_20 => X"0004000040004262420300c3020000040000c4c26200c2c30000c0c0c202a0be", INIT_21 => X"00c2c30000c000000400404200c2c24200c2c202006200c24362420300c30200", INIT_22 => X"6200c24362420300c302000004000040004262420300c3020000040000c4c262", INIT_23 => X"000043024300420200004402006202c30000440200404200c2c24200c2c20200", INIT_24 => X"c2030200c24382c4c2030200c20000c0c0a0bebfbd00e0bdbebfc00000004402", INIT_25 => X"00c2004262c3c20000c000404200c2c24200c24300c362c30200c24382c40200", INIT_26 => X"6200c24362420300c30200000400004005004262420300c3020000040000c405", INIT_27 => X"0400004005004262420300c3020000040000c40500c2004262c30200c2c20200", INIT_28 => X"020000040000c40500c2004262c30200c2c202006200c24362420300c3020000", INIT_29 => X"c2c24200c2c202006200c24362420300c30200000400004005004262420300c3", INIT_2A => X"bebfc00000004402000043024300420200004402006202c30000440200404200", INIT_2B => X"0000040000400042020000040000c4c26200c2c3c0c202c202a0bebfbd00e0bd", INIT_2C => X"434202000004000040004242020000040000c4c26200c2c3c202006200c24302", INIT_2D => X"00c2434202000004000040004242020000040000c4c26200c2c3c202006200c2", INIT_2E => X"02006200c2434202000004000040004242020000040000c4c20200c2c2020062", INIT_2F => X"00c2c202006200c2434202000004000040004242020000040000c4c24200c2c2", INIT_30 => X"006202c300004402c202006200c2434202000040004242020000040000c4c242", INIT_31 => X"42004202c4a0bebd0000e0bdbebfc00000004402000043024300420200004402", INIT_32 => X"c202c4a0bebd00e0bdbec0020000004302430042024300c36242030243020040", INIT_33 => X"40620243020000020062024302004000c24303c2c000000043030040004200c2", INIT_34 => X"bebd00e0bdbec0024000c2c00000400243030240024300630302004000420200", INIT_35 => X"0000020062024302004000c24303c2c000000043030040004200c2c202c0c4a0", INIT_36 => X"02438242040243024402004042004202004000c2004000c2c2004202c2004202", INIT_37 => X"c200c2c5c4a0bebd00e0bdbec0024000c2c00000430302400240024302430042", INIT_38 => X"00c0c7c6c5c4a0bebfbd00e0bdbec0c200400042430063c46400c3c34300c200", INIT_39 => X"c2c3c2020000c202006202c3004100c2c000404200c2c24200c2430362c3c200", INIT_3A => X"00c200404200c2c2000007624000c3c2c20007624000c3c20000c202c2006200", INIT_3B => X"4062004200c26200c203004000c26283c4c3020242424200c200000202424242", INIT_3C => X"c20040004200c2430362c3c2c24200c2006202c3000000004100c2c24200c200", INIT_3D => X"c362034200c200004300c26200c2030000c4406200c2c30040628200c2044300", INIT_3E => X"c4a0bebd00e0bdbec0004363034202c5c4a0bebd00e0bdbebfc0000000c44062", INIT_3F => X"00c2c5c4a0bebd00e0bdbec0c2004000c2c26200c34200c2c2424200c20000c0" ) port map ( DO => block_do(0)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"00000000000000000000000000000000ff00000800ff1800350035003300b200", INIT_01 => X"000000000000000000000000000000000000072000002000d800d800ff700000", INIT_02 => X"0000000000000010000000000000000000010060006060000000000000000000", INIT_03 => X"0000000000201000000000000000000000000000000000000000000000000000", INIT_04 => X"0000200000f000ff00000000e800000000800010100000000000000000f000ff", INIT_05 => X"0000000000000000000000000000f00000ff00000000e8000000002000ff0000", INIT_06 => X"0000000000000000f00000ff0000000000e80000ff0000000000002000000000", INIT_07 => X"e80000ff000000ff000000002000000000000000200000000000000000000010", INIT_08 => X"0020000000000000000000000007002800380000000000f00000ff0000000000", INIT_09 => X"20f000ff0000000000e80000ff0000000000000000ff000000000000ff000000", INIT_0A => X"0000000000000000e8161600002000ff000100f00000ff00000000e800000000", INIT_0B => X"2a00000256922700000002561227000000002a0000002a0000002a00f00000ff", INIT_0C => X"032800280028000028000000000200280028002800002800000000002a000000", INIT_0D => X"0002230029002900290000290000000002430028002900290000290000000002", INIT_0E => X"2a00000400002a0000002a00000500002a0000002a00000300002a0000002a00", INIT_0F => X"0000002b00000000002b00000000330000002b0000002b00000200002a000000", INIT_10 => X"0000000000000000f00000ff0000000000e8000000000001200030330000002b", INIT_11 => X"010000300000000000ff10000000000000000000000000100000000000000000", INIT_12 => X"0000000000000000000010241800000000012000300010241800000000000000", INIT_13 => X"002b00000033000000330000002b000000000000ff0300000000000000000000", INIT_14 => X"0000000000000000001000000000000000000000f00000ff0000000000e80000", INIT_15 => X"000000ff00000000000000000000100000100000000000000020000010000010", INIT_16 => X"00002b00000033000000330000002b0000000000000100003000002b0000ff00", INIT_17 => X"000000000000000010000000000000000000000000f00000ff0000000000e800", INIT_18 => X"0000ff0000000000000000000010000010000000000000002000001000001000", INIT_19 => X"0000100000100000000000000000001000000001000000000000000000ff0000", INIT_1A => X"00000000ff00000000ff00000000000000000000100000100000000000000020", INIT_1B => X"00002000001000001010ff3f0000000000000000101000000000000000000000", INIT_1C => X"0000000000ff00000000ff000000000000000000001000001010ff3f00000000", INIT_1D => X"000000002000001000001010ff3f000000000000000010000000000000000000", INIT_1E => X"003000002b0000ff00000000ff000000000000000000001000001010ff3f0000", INIT_1F => X"00ff0000000000e80000002b00000033000000330000002b0000000000000100", INIT_20 => X"000000002000001029180000000000000000000010000000000000000012f000", INIT_21 => X"00000000000000000000ff000000000000000000000000000010291800000000", INIT_22 => X"00000000102a180000000000000000200000102a180000000000000000000010", INIT_23 => X"000033000000330000002b000000000000002c0000ff00000000000000000000", INIT_24 => X"001c1c0000001000001e1e000000000000f00000ff0000000000e80000002b00", INIT_25 => X"3000000010000000000000ff0000000000000000000010001000000010001000", INIT_26 => X"00000000102c18000000000000000120003000102c1800000000000000010000", INIT_27 => X"00000120003000102c1800000000000000010000300000001000100000000000", INIT_28 => X"000000000001000030000000100010000000000000000000102c180000000000", INIT_29 => X"000000000000000000000000102c18000000000000000120003000102c180000", INIT_2A => X"0000e80000002b00000033000000330000002b000000000000002c0000ff0000", INIT_2B => X"000000000020002c0000000000000000100000000000430012f00000ff000000", INIT_2C => X"002c0000000000002000002c0000000000000000100000000000000000002c00", INIT_2D => X"0000002c0000000000002000002c000000000000000010000000000000000000", INIT_2E => X"0000000000002c0000000000002000002c000000000000000010000000000000", INIT_2F => X"0000000000000000002c0000000000002000002c000000000000000000000000", INIT_30 => X"0000000000002c00000000000000002c0000002000002c0000000000000000ff", INIT_31 => X"0000330000f000ff000000000000e80000002b00000033000000330000002b00", INIT_32 => X"000000f000ff00000000e8ff0000103300000033000000001035180033000000", INIT_33 => X"0010400080000000000000320000000000000000000000000000000000000000", INIT_34 => X"00ff00000000e8000000000000ff33003300003200000035007f000000330000", INIT_35 => X"00000000000033000000000000000000000000000000000000000000000000f0", INIT_36 => X"000010352000007f330000000000330000000000000000000000008000000080", INIT_37 => X"0000000000f000ff00000000e8000000000000ff330000330032003300000033", INIT_38 => X"000000000000f00000ff00000000e80000ff0000000000000000000000000000", INIT_39 => X"000000ff0000000000000000000000000000ff00000000000000000010000000", INIT_3A => X"0000000000000000101000000000000000100000000000000000000000100000", INIT_3B => X"0010000000001800000000000000001800001616000000000000001616000000", INIT_3C => X"00000000000000000010000000ff00000000ff0000000000ff000000ff000000", INIT_3D => X"0010000000000000000000180000000006002810000000000010100000000000", INIT_3E => X"00f000ff00000000e80000fc0000200000f000ff0000000000e8000006002810", INIT_3F => X"00000000f000ff00000000e80000ff000000100000ff00000000000000000000" ) port map ( DO => block_do(0)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"4c4844403c3834302c2824201c181410980e00ac04fd2a001800b0000000f001", INIT_01 => X"504c4844403c3834302c2824201c18141000cc2410200060125c1058fc005450", INIT_02 => X"0c08040000083c0048080c440840043c006000000800000801681360115c5854", INIT_03 => X"00080c000810121900082c2824201c1814100c08040000082c2824201c181410", INIT_04 => X"00200000082504f80008100c2500000000100012100d1b020014101410250cf0", INIT_05 => X"001800980d00040a000018001318251014e80008080425000000080000fa0200", INIT_06 => X"001020001e101c2025181ce00008181014250000e90000001800982500001801", INIT_07 => X"250000e0001010fc0010009825570014000700982530001400090a0014140f06", INIT_08 => X"9825000010010010001810140016a025a42514a8a8a4a025989c60000820181c", INIT_09 => X"002504f80008a0989c250000e400000010000d1010ff001000080a00ff001000", INIT_0A => X"000000000818101425030000000000fd003c00251014e8000808042501000020", INIT_0B => X"8000008878348c0002008878340c000100ae680000ae540000ae3c0025181ce0", INIT_0C => X"2184009c00b40010d800140200e7070c0024003c00106000140100ae680000ae", INIT_0D => X"00e7450174008c00a40010c800140400e72105fc0014002c00105000140300e7", INIT_0E => X"f800008b00ae680000aee000006300ae680000aec80000fe00ae680000aea800", INIT_0F => X"0000ae5000001300ae4800000700100000ae380000ae2800001400ae680000ae", INIT_10 => X"1403004b10031c18252024d8000820181c250000980a0005250a25100000ae5c", INIT_11 => X"05100a250026001400eb2a00101414020014000b140004100d1a020014100011", INIT_12 => X"0100181c0100030010002170800018000005250a250021708000180000983a00", INIT_13 => X"ae9c00000510000100100000ae7400000d011c00b2e800101002001000982018", INIT_14 => X"001000983a00d4181807002810002c1014302c28252024d80008282024250000", INIT_15 => X"001010ff0100101401000300180021002c80001000982000d425000021002c80", INIT_16 => X"00aee400000510000100100000aed800000d01140005300a2500aec40000d120", INIT_17 => X"1000983a00d418181218002810002d101434302c28252024d800082820242500", INIT_18 => X"1010ff0100101401000300180021002c80001000982000d425000021002c8000", INIT_19 => X"000021003080001000983a00d4181812180028230010002f1000980a00d00600", INIT_1A => X"00980a00ce06001010ff0100101401000300180021003080001000982000d425", INIT_1B => X"00d42500002100348021ffff1000983a00d4181812100d1a0200281000341001", INIT_1C => X"0100980a00c90a001010ff010010140100030018002100348021ffff10009820", INIT_1D => X"982000d42500002100388021ffff1000983a00d41818100d1a02002810003310", INIT_1E => X"0a2500aef00000ca0a001010ff010010140100030018002100388021ffff1000", INIT_1F => X"24d80008282024250000aee400000510000100100000aed800000d011400053c", INIT_20 => X"982000d425000021ec8000100000983a00d41c1c21001018002b101418342520", INIT_21 => X"001018002b1000980a00d20a00101001001014010003001c0021ec8000100000", INIT_22 => X"03001c0021148000100000982000d425000021148000100000983a00d41c1c23", INIT_23 => X"000510000100100000aed800000d011400ae140000d20a001010010010140100", INIT_24 => X"10030000100c21101003000010001f1014259094680008282024250000aee400", INIT_25 => X"2518000c21101000871000de0a0010100100103c001021108000101c21104000", INIT_26 => X"030018002158800010000098200005250a250021588000100000983a0005180a", INIT_27 => X"200005250a250021588000100000983a0005180a2518001c2110400010140100", INIT_28 => X"0000983a0005180a2518003c2110800010140100030018002158800010000098", INIT_29 => X"10100100101401000300180021588000100000980a0005250a25002158800010", INIT_2A => X"9094250000aee400000510000100100000aed800000d011400ae300000760a00", INIT_2B => X"00982000d42500800000983a00d41c1c240018141018211434252024d8000898", INIT_2C => X"04800000982000d4250004800000983a00d41c1c2500181410010003001c8000", INIT_2D => X"001c08800000982000d4250008800000983a00d41c1c2600181410010003001c", INIT_2E => X"010003001c0c800000982000d425000c800000983a00d41c1c27001410010003", INIT_2F => X"001410010003001c10800000982000d4250010800000983a00d41c1c12001410", INIT_30 => X"000d011000ae400010010003001c14800000d4250014800000983a00d41c1cee", INIT_31 => X"0f002400082504f8000008282024250000aee400000510000100100000aed800", INIT_32 => X"000110250cf00008080425ff0002252400010024000000082130800024000013", INIT_33 => X"0b24000000001f01000401f0000006000000321000002a000732000600000010", INIT_34 => X"14e80008100c25030000100000d82c00280100f00000003000fc000600240000", INIT_35 => X"003401000401280000060000005d1800003f00075d0006000000180001041825", INIT_36 => X"00002170800000fc200000100f00200000160008001a00040800000004000004", INIT_37 => X"0000101410250cf00008181425030000180000c32c01002800f0002000010020", INIT_38 => X"0a104c48444025383cc00008100c250000f20000000000140100141001001000", INIT_39 => X"184018ff0003180100050a48000500402f00f30f001010010010102021101000", INIT_3A => X"0010000a0a00101c12100d1b02001c4810100d1b02001c48003e140e1c121800", INIT_3B => X"0b2a0000004c2300140f000c001c102110140300ff57ff001000080300ff30ff", INIT_3C => X"4c000b0000004c102d21101414ff0014000aff1800000200c0001414ff001400", INIT_3D => X"20230f00004c000c00004c2300140f00f844252100142000122a2300140f0000", INIT_3E => X"10250cf000080804250000180360000c082504f8000840383c250000f8442521", INIT_3F => X"00080c082504f80008100c250000f1001010240010ff001000ff010000000d00" ) port map ( DO => block_do(0)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block0 block1: if (block_count > 1) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"00008f8faf000c8faf0000008f00008fafaf03afaf270003278f030000008f00", INIT_01 => X"8f0000003c8fac008fac008fac008f30008fafafafafaf03af270003278f8f03", INIT_02 => X"0010248f001428008faf24008faf00008f0030003000008f8c008f0010afac00", INIT_03 => X"10240014008f8f001024001000008f8c008f001024001000008f8c008f001024", INIT_04 => X"03af270003278f0300008faf03af270003278f0300001024001028008c008f00", INIT_05 => X"3c000c243c000c343c343caf24afaf03afafaf27000003278f030000343c8faf", INIT_06 => X"0004008c340010ac24ac343c24ae000c242424000c243cac008f343caf008c34", INIT_07 => X"8fae000c242424000c24000c0024008f000c243c0014248faf000c8faf008c24", INIT_08 => X"000000000003278f8f8f0300000c00142c008fac008f24af000c8f0010af2400", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000102040912000000", INIT_0F => X"fffffffffffffffffffffffffffffffffffffffffffffefcf9f2e4c992000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000606060606050000000000", INIT_13 => X"0000000000000000000000000000000000000000000000010101010101000000", INIT_14 => X"3d3d3d3d3d3d676620740a0a747320650a000000000000000000000000000000", INIT_15 => X"694c7363726d69546e616f6269546f6175206467730a00696920746c6c67730a", INIT_16 => X"4e490a007420696c54004546455000454d500a6469540030617261736d657061", INIT_17 => X"544c4c0a0a53200a4c2000454e490a0044414f4c41454e490a0044414f4c4145", INIT_18 => X"0000000000000000000054204945540a54204d0a542043422f440a2054494920", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000102040912000000000000000000000000000000", INIT_1F => X"fffffffffffffffffffffefcf9f2e4c992000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000606060606050000000000000000000000000000000000", INIT_23 => X"0000000000000000000000010101010101000000000000000000000000000000", INIT_24 => X"7566542055000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000072756570695300736e61756369670a0a727475526e2068616e", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"6200c2c3c20000c4c2430300c30200c2c5c4a0bebfbd00e0bdbec0620200c202", INIT_01 => X"c240026202c34000c24000c24300c24300c2c0c7c6c5c4a0bebd00e0bdbebfc0", INIT_02 => X"006202c300404200c2c24200c2c24300c2404202424300c24300c20000c04300", INIT_03 => X"0002006200c2c300000200404300c24300c200000200404300c24300c2000002", INIT_04 => X"a0bebd00e0bdbec00200c2c4a0bebd00e0bdbec000000002004042004200c200", INIT_05 => X"0200004402000044024502c202c5c4a0b0bebfbd0000e0bdbec002624202c3c4", INIT_06 => X"00400042020000400243630302020000040510000044024300c34202c2004242", INIT_07 => X"c20200000405100000040000400500c200004402006202c3c20000c4c2004202", INIT_08 => X"0000000000e0bdb0bebfc000000000404200c24300c302c20000c40000c24200", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"00000000000000000000000000000000010204091224489123468d1a34000000", INIT_0F => X"fffffffffffffffffffffffffffffefcf9f2e4c99224489123468d1a34000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000003030303030300000000000000", INIT_12 => X"02010000000000000000000000000000010101020515100b0500fb1a150f0a05", INIT_13 => X"0000000000000000000000000000000000000000000001504f4e4d4c4b050403", INIT_14 => X"0a3d3d3d3d3d0a747369540a656d707247000000000000000000000000000000", INIT_15 => X"6e69736379656e65737470696e656e63622f6920740a006f762f69697420740a", INIT_16 => X"554d0a0073746c206f00444144410053414c0a6f6e6500306e206c206220726c", INIT_17 => X"4949540a0a45500a4546005347460a0021534e414c52554d0a0021494e414c52", INIT_18 => X"0000000000000000000020544f52200a20544f0a2054545420450a00454f562f", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"00000000010204091224489123468d1a34000000000000000000000000000000", INIT_1F => X"fffffefcf9f2e4c99224489123468d1a34000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000003030303030300000000000000000000000000000000000000", INIT_22 => X"00000000010101020515100b0500fb1a150f0a05000000000000000000000000", INIT_23 => X"0000000000000000000001504f4e4d4c4b050403020100000000000000000000", INIT_24 => X"20203a5441000000000000000000000000000000000000000000000000000000", INIT_25 => X"00000000000000206d74616e65007420746e6f6e690a006b2074542074696420", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"100000000000070000101f00001000000000f00000ff00000000e8101400001f", INIT_01 => X"001814100f000000000000000000000000000000000000f000ff0000000000e8", INIT_02 => X"0000000000ff0000000000000000100000180010001000000000000000000000", INIT_03 => X"0000000000000000000000001000000000000000000000100000000000000000", INIT_04 => X"f000ff00000000e817000000f000ff00000000e8100000000000000000000000", INIT_05 => X"200000320000007801c20000000000f0000000ff0000000000e81010ff1f0000", INIT_06 => X"00000000800000007f00ff0f7f00000700007f00003200000000002000000000", INIT_07 => X"0000000700007f0000000001200030000000320000000000000008000000007f", INIT_08 => X"00000000000000000000e810000100ff0300000000007f000008000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0101010101010101010101010101010000000000000000000000000000000000", INIT_0B => X"0202020201010101010101010101010101010101010101010101010101010101", INIT_0C => X"0202020202020202020202020202020202020202020202020202020202020202", INIT_0D => X"0303030303030303030303030303030303030303030303030303030303030202", INIT_0E => X"0000000000000000010204091224489123468d1a3468d1a2458a152b56030303", INIT_0F => X"fffffffffffffefcf9f2e4c99224489123468d1a3468d1a2458a152b56000000", INIT_10 => X"0000000000000000000000000000000000080808080707000000000000ffffff", INIT_11 => X"000000000000000000000000000000000101039e9b9794918e0f0c0906030000", INIT_12 => X"46230000000000000000000095a8c0e00d50c1a1439e5b17d4914e4f0cc98643", INIT_13 => X"1212121212000000000000000000202429303a48619123c7a4815d3a17b08d69", INIT_14 => X"003d3d3d3d3d0069686e650073616c6165121212121212121212121212121212", INIT_15 => X"67730a65206d67730a69657467730a7474206e616954006e69206f63696d6954", INIT_16 => X"4d4550003a65656674002149215300542041006e6773003020746c73656e696c", INIT_17 => X"4f43494d0044410044410054205453000a53205443204d4550000a4c20544320", INIT_18 => X"0000000000000000000000454e414f420045524d00454f5253524100534e4920", INIT_19 => X"00000000000000000000000000000000000000000000000000001212ed515302", INIT_1A => X"0101010000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0101010101010101010101010101010101010101010101010101010101010101", INIT_1C => X"0202020202020202020202020202020202020202020202020101010101010101", INIT_1D => X"0303030303030303030303030303030303030202020202020202020202020202", INIT_1E => X"1224489123468d1a3468d1a2458a152b56030303030303030303030303030303", INIT_1F => X"9224489123468d1a3468d1a2458a152b56000000000000000000000001020409", INIT_20 => X"0000000000080808080707000000000000fffffffffffffffffffefcf9f2e4c9", INIT_21 => X"000000000101039e9b9794918e0f0c0906030000000000000000000000000000", INIT_22 => X"95a8c0e00d50c1a1439e5b17d4914e4f0cc98643000000000000000000000000", INIT_23 => X"0000202429303a48619123c7a4815d3a17b08d69462300000000000000000000", INIT_24 => X"6379204552121212121212121212121212121212121212121200000000000000", INIT_25 => X"0000000000000000622063676e000a7469696d676e4200737770205568732072", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"250014101400dc101025400020400024242025181ce000080804252500000c00", INIT_01 => X"20250224ff1000001c000018000014ff0010041c181410250cf0000820181c25", INIT_02 => X"0004010400ea080000000100000421000425ff2b010700000000140013000000", INIT_03 => X"0c04000400181c00140300042a002400001c001f0200042a0024000018002a01", INIT_04 => X"2504f80008080425420008082504f80008100c25250002050004020000002000", INIT_05 => X"0000ae6c000080407d000110013c38252c3034c80000080804254224feff0808", INIT_06 => X"002e000000003300fc00fffffc0000f90103fc00aea800000014300014000050", INIT_07 => X"100000f90103fc00980a0005250a251000aecc00001a011c1c009118180000fc", INIT_08 => X"0b0705030008382c30342525006000cae90010000020fc20009d180009100100", INIT_09 => X"9d97958b89837f716d6b67656159534f4947433d3b352f2b29251f1d1713110d", INIT_0A => X"5b514b3d393733251b19150f0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a3", INIT_0B => X"231d0b09fdf7f3ebe7dfd3cfcdc9c1bbb7b1afa5a399918d857f7b756f67615d", INIT_0C => X"efe7e3ddd7cfc5bdb3aba5a195938d878381776b69655f5957514b413b39332d", INIT_0D => X"d1cbc7b9b3ada9a1978f8b7773716d5f5b5955473d3b37352b291d130501f9f5", INIT_0E => X"010204091224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78e5dfd7", INIT_0F => X"f9f2e4c99224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78000000", INIT_10 => X"070001020301010000000101010102030718110a03fcf5231c150e0700fffefc", INIT_11 => X"0000010303010100010059647285a0c80b90212807e6c5a483a5846342210007", INIT_12 => X"8a4500030103030001000100ae6472856dc80b90212807e6c5a483a584634221", INIT_13 => X"38373635340005010300010001005d689c8b41d117a245c8833ef9b46f5914cf", INIT_14 => X"003d3d3d3d3d006e696773007420616c6e2b2c2d2e2f30313233343d3c3b3a39", INIT_15 => X"20740073616f2074006f722020740069727367646e65000a73646e6170756e65", INIT_16 => X"422052002073646161000a4c00530020545300652074000a3168656d72756d20", INIT_17 => X"4e4150550021530021490020544948000a4550495543422052000a4546495543", INIT_18 => X"0908070605040302010000535354504900535945005352415520440054205344", INIT_19 => X"6159534f4947433d3b352f2b29251f1d1713110d0b07050300002246cb153520", INIT_1A => X"0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a39d97958b89837f716d6b6765", INIT_1B => X"cdc9c1bbb7b1afa5a399918d857f7b756f67615d5b514b3d393733251b19150f", INIT_1C => X"95938d878381776b69655f5957514b413b39332d231d0b09fdf7f3ebe7dfd3cf", INIT_1D => X"73716d5f5b5955473d3b37352b291d130501f9f5efe7e3ddd7cfc5bdb3aba5a1", INIT_1E => X"3468d1a2458a152b56ac59b367cf9e3c78e5dfd7d1cbc7b9b3ada9a1978f8b77", INIT_1F => X"3468d1a2458a152b56ac59b367cf9e3c78000000010204091224489123468d1a", INIT_20 => X"010102030718110a03fcf5231c150e0700fffefcf9f2e4c99224489123468d1a", INIT_21 => X"7285a0c80b90212807e6c5a483a5846342210007070001020301010000000101", INIT_22 => X"ae6472856dc80b90212807e6c5a483a584634221000001030301010001005964", INIT_23 => X"01005d689c8b41d117a245c8833ef9b46f5914cf8a4500030103030001000100", INIT_24 => X"616f4953542b2c2d2e2f30313233343d3c3b3a39383736353400050103000100", INIT_25 => X"0000000100000000656e6b2064000a656f636d206e6500216f756f41652c7465", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block1 block2: if (block_count > 2) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block2 block3: if (block_count > 3) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block3 block4: if (block_count > 4) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block4 block5: if (block_count > 5) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block5 block6: if (block_count > 6) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block6 block7: if (block_count > 7) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block7 end; --architecture logic
--------------------------------------------------------------------- -- TITLE: Random Access Memory for Xilinx -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 11/06/05 -- FILENAME: ram_xilinx.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Implements Plasma internal RAM as RAMB for Spartan 3x -- -- Compile the MIPS C and assembly code into "test.axf". -- Run convert.exe to change "test.axf" to "code.txt" which -- will contain the hex values of the opcodes. -- Next run "ram_image ram_xilinx.vhd code.txt ram_image.vhd", -- to create the "ram_image.vhd" file that will have the opcodes -- correctly placed inside the INIT_00 => strings. -- Then include ram_image.vhd in the simulation/synthesis. -- -- Warning: Addresses 0x1000 - 0x1FFF are reserved for the cache -- if the DDR cache is enabled. --------------------------------------------------------------------- -- UPDATED: 09/07/10 Olivier Rinaudo ([email protected]) -- new behaviour: 8KB expandable to 64KB of internal RAM -- -- MEMORY MAP -- 0000..1FFF : 8KB 8KB block0 (upper 4KB used as DDR cache) -- 2000..3FFF : 8KB 16KB block1 -- 4000..5FFF : 8KB 24KB block2 -- 6000..7FFF : 8KB 32KB block3 -- 8000..9FFF : 8KB 40KB block4 -- A000..BFFF : 8KB 48KB block5 -- C000..DFFF : 8KB 56KB block6 -- E000..FFFF : 8KB 64KB block7 --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use work.mlite_pack.all; library UNISIM; use UNISIM.vcomponents.all; entity ram is generic(memory_type : string := "DEFAULT"; --Number of 8KB blocks of internal RAM, up to 64KB (1 to 8) block_count : integer := 1); port(clk : in std_logic; enable : in std_logic; reset : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0)); end; --entity ram architecture logic of ram is --type type mem32_vector IS ARRAY (NATURAL RANGE<>) OF std_logic_vector(31 downto 0); --Which 8KB block alias block_sel: std_logic_vector(2 downto 0) is address(15 downto 13); --Address within a 8KB block (without lower two bits) alias block_addr : std_logic_vector(10 downto 0) is address(12 downto 2); --Block enable with 1 bit per memory block signal block_enable: std_logic_vector(7 downto 0); --Block Data Out signal block_do: mem32_vector(7 downto 0); --Remember which block was selected signal block_sel_buf: std_logic_vector(2 downto 0); begin block_enable<= "00000001" when (enable='1') and (block_sel="000") else "00000010" when (enable='1') and (block_sel="001") else "00000100" when (enable='1') and (block_sel="010") else "00001000" when (enable='1') and (block_sel="011") else "00010000" when (enable='1') and (block_sel="100") else "00100000" when (enable='1') and (block_sel="101") else "01000000" when (enable='1') and (block_sel="110") else "10000000" when (enable='1') and (block_sel="111") else "00000000"; proc_blocksel: process (clk, block_sel) is begin if rising_edge(clk) then block_sel_buf <= block_sel; end if; end process; proc_do: process (block_do, block_sel_buf) is begin data_read <= block_do(conv_integer(block_sel_buf)); end process; -- BLOCKS generation block0: if (block_count > 0) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"afafafafafafafafafafafafafafafaf2308000c241400ac273c243c243c273c", INIT_01 => X"8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f230c008c8c3caf00af00af2340afaf", INIT_02 => X"acacacac0003373cac038cac8cac8cac8c243c40034040033423038f038f8f8f", INIT_03 => X"000300ac0300000034038c8c8c8c8c8c8c8c8c8c8c8c3403acacacacacacacac", INIT_04 => X"8c343c00af03af270003278f0300ac008f34af0000000014008f8fafaf03af27", INIT_05 => X"008f000c2400142480008f0010af03afaf270003278f0300ac008f3c00103000", INIT_06 => X"008f8f0010af24af03afaf270003278f8f030000140080008f000c000080af24", INIT_07 => X"03000004008faf24008f000c0024008f0010000c0024008f00102c008faf3000", INIT_08 => X"0c000080af24008f0010af27000c8f008f002727afafaf03afaf270003278f8f", INIT_09 => X"3c03af270003278f8f030000140080008fa0248faf24008f0014248024008f00", INIT_0A => X"0000000003278f8f030000008c3c0010000c0003afaf270003278f0330008c34", INIT_0B => X"243c000c343c243c24000c343c243c24000c243c000c243c000c243c03afaf27", INIT_0C => X"24243c243c243caf243caf24000c24243c243c243caf243caf24000c243c000c", INIT_0D => X"000c343c243c243c243caf243caf24000c343c243c243c243caf243caf24000c", INIT_0E => X"243c000c000c243c000c243c000c000c243c000c243c000c000c243c000c243c", INIT_0F => X"3c000c243c0010000c243c0014008c3c000c243c000c243c000c000c243c000c", INIT_10 => X"af240010af24afaf03afaf270003278f8f0300000c24000c0024008c3c000c24", INIT_11 => X"0c8f24000010008f001400008f8faf24008f0010af001400000014008f8f0010", INIT_12 => X"24008faf240010008f8c002400008f3c000c0024008c002400008f3c000c2400", INIT_13 => X"0c243c0010ac3c24008c3c000c243c0014248f001428008faf24008f000c24af", INIT_14 => X"0087000c24000c8faf00008f870010a7afafafaf03afaf270003278f8f030000", INIT_15 => X"0087a730240097af240010008f8c00008f000087000c24000c00008c00008f00", INIT_16 => X"000c243c0010ac3c24008c3c000c243c0014248f000c8f2400000c243c001428", INIT_17 => X"87000c24000c8faf0000008f870010a7afafafafaf03afaf270003278f8f0300", INIT_18 => X"87a730240097af240010008f8c00008f000087000c24000c00008c00008f0000", INIT_19 => X"008c00008f000087000c24000c8faf0000008f2400870010a7000c2400142800", INIT_1A => X"000c240014280087a730240097af240010008f8c00008f000087000c24000c00", INIT_1B => X"000c00008c00008f0000343c87000c24000c8faf0000000014008f870010a724", INIT_1C => X"24000c240014280087a730240097af240010008f8c00008f0000343c87000c24", INIT_1D => X"0c24000c00008c00008f0000343c87000c24000c8faf00000014008f870010a7", INIT_1E => X"2400000c243c0014280087a730240097af240010008f8c00008f0000343c8700", INIT_1F => X"af270003278f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c8f", INIT_20 => X"0c24000c00008c002400008f3c000c24000c8faf00008f8f0010afafaf2403af", INIT_21 => X"008f8f0010af000c24001428008faf24008faf240010008f8c002400008f3c00", INIT_22 => X"10008f8c002400008f3c000c24000c00008c002400008f3c000c24000c8faf00", INIT_23 => X"0010ac3c24008c3c000c243c0014248f000c243c001428008faf24008faf2400", INIT_24 => X"8f0000008fa000278f0000008f0010afaf03afaf270003278f8f0300000c243c", INIT_25 => X"00af008000278f0010af001428008faf24008fac008f002700008fa400270000", INIT_26 => X"10008f8c002400008f3c000c24000c0024008c002400008f3c000c24000c8f24", INIT_27 => X"24000c0024008c002400008f3c000c24000c8f2400af0084002700008faf2400", INIT_28 => X"3c000c24000c8f2400af008c002700008faf240010008f8c002400008f3c000c", INIT_29 => X"8faf24008faf240010008f8c002400008f3c000c24000c0024008c002400008f", INIT_2A => X"8f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c243c00142800", INIT_2B => X"000c24000c00008c3c000c24000c8faf00008f8fafaf24af2403afaf27000327", INIT_2C => X"8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f8c3c", INIT_2D => X"008f8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f", INIT_2E => X"240010008f8c243c000c24000c00008c243c000c24000c8faf00008faf240010", INIT_2F => X"008faf240010008f8c243c000c24000c00008c243c000c24000c8faf24008faf", INIT_30 => X"0014248f000c243caf240010008f8c243c000c00008c243c000c24000c8faf24", INIT_31 => X"28008c3caf03af27000003278f8f0300000c243c0010ac3c24008c3c000c243c", INIT_32 => X"a324af03af270003278f0324001000ac3c24008c3cac008f0024003c8c3c0010", INIT_33 => X"14003c8c340010240010248c3c00100083a4248fa3001000102400100094008f", INIT_34 => X"af270003278f0324a4008fa30010ac3cac243cac3cac008c3c240018008c3c00", INIT_35 => X"0010240010248c3c00100083a4248fa3001000102400100094008fa324afaf03", INIT_36 => X"3cac0024003c8c248c3c001028008c3c0004008f0010008faf008c34af008c34", INIT_37 => X"af008fafaf03af270003278f0324a4008fa30010ac243cac3cac3cac3c24008c", INIT_38 => X"10afafafafaf03afaf270003278f038f00140080a00080af24008faf24008f00", INIT_39 => X"8f8faf240010af240010248f0004008fa3001428008faf24008fa02400278f00", INIT_3A => X"008f001028008faf0000000014008f8faf00000014008f8f0010af24af000000", INIT_3B => X"1000008c008f00008f240014008fa000278f0000302430008f00100000302430", INIT_3C => X"8f0010008c008fa02400278faf24008f0014248f0000100004008faf24008f00", INIT_3D => X"2700248c008f0010ac008f00008f24000c8f0000008f2700100000008f248c00", INIT_3E => X"af03af270003278f0300ac343c343cafaf03af270003278f8f0300000c8f0000", INIT_3F => X"008fafaf03af270003278f038f0014008faf00008f24008faf302c008f0010af" ) port map ( DO => block_do(0)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"b8afaeadacabaaa9a8a7a6a5a4a3a2a1bd000000a560a4a0bd1d8404a5059c1c", INIT_01 => X"b9b8afaeadacabaaa9a8a7a6a5a4a3a2a1a50086c6c406bb00bb00ba5a1abfb9", INIT_02 => X"9392919000405a1a06e0a606a606a606a6a50584e0029b401bbd60bb60bbbabf", INIT_03 => X"00e000c4e0000085a2e09f9d9c9e979695949392919002e09f9d9c9e97969594", INIT_04 => X"42420200c4a0bebd00e0bdbec0004300c302c2000007624000c2c3c5c4a0bebd", INIT_05 => X"00c20000040062024300c20000c4a0bebfbd00e0bdbec0004300c30200404200", INIT_06 => X"00c2c30000c202c4a0bebfbd00e0bdbebfc0000040004200c20000400042c343", INIT_07 => X"c000004100c2c24200c20000404200c200000000404200c200404200c2c24243", INIT_08 => X"00400042c34300c20000c2c20000c440c660c2c3c6c5c4a0bebfbd00e0bdbebf", INIT_09 => X"02a0bebd00e0bdbebfc0000040004200c24303c2c24200c2006202434200c200", INIT_0A => X"00000000e0bdbebfc002020042020040000000a0bebfbd00e0bdbec042004242", INIT_0B => X"44020000440245020600004402450206000044020000440200004402a0bebfbd", INIT_0C => X"04450246024702a24202a202000004450246024702a24202a202000044020000", INIT_0D => X"00004402450246024702a24202a20200004402450246024702a24202a2020000", INIT_0E => X"4402000000004402000044020000000044020000440200000000440200004402", INIT_0F => X"0200004402000000004402004000420200004402000044020000000044020000", INIT_10 => X"c2020000c202c0c0a0bebfbd00e0bdbebfc00000000400004005004202000044", INIT_11 => X"00c40500004000c200406200c2c3c24200c20000c000400007624000c2c30000", INIT_12 => X"4200c2c202006200c24362420300c30200004005004262420300c30200000400", INIT_13 => X"004402000043024300420200004402006202c300404200c2c24200c2000004c2", INIT_14 => X"00c20000040000c4c24300c3c20000c0c0c6c5c4a0bebfbd00e0bdbebfc00000", INIT_15 => X"00c2c2424200c2c202006200c2436200c30200c200000400004000426200c302", INIT_16 => X"00004402000043024300420200004402006202c30000c4050000004402004042", INIT_17 => X"c20000040000c4c2006200c2c30000c0c0c7c6c5c4a0bebfbd00e0bdbebfc000", INIT_18 => X"c2c2424200c2c202006200c2436200c30200c200000400004000426200c30200", INIT_19 => X"00426200c30200c20000040000c4c2006200c24300c20000c000000400404200", INIT_1A => X"00000400404200c2c2424200c2c202006200c2436200c30200c2000004000040", INIT_1B => X"00004000426200c302624202c30000040000c4c2000007624000c3c20000c202", INIT_1C => X"0200000400404200c2c2424200c2c202006200c2436200c302624202c3000004", INIT_1D => X"000400004000426200c302624202c30000040000c4c20007624000c3c20000c2", INIT_1E => X"05000000440200404200c2c2424200c2c202006200c2436200c302624202c300", INIT_1F => X"bfbd00e0bdbebfc00000004402000043024300420200004402006202c30000c4", INIT_20 => X"0004000040004262420300c3020000040000c4c26200c2c30000c0c0c202a0be", INIT_21 => X"00c2c30000c000000400404200c2c24200c2c202006200c24362420300c30200", INIT_22 => X"6200c24362420300c302000004000040004262420300c3020000040000c4c262", INIT_23 => X"000043024300420200004402006202c30000440200404200c2c24200c2c20200", INIT_24 => X"c2030200c24382c4c2030200c20000c0c0a0bebfbd00e0bdbebfc00000004402", INIT_25 => X"00c2004262c3c20000c000404200c2c24200c24300c362c30200c24382c40200", INIT_26 => X"6200c24362420300c30200000400004005004262420300c3020000040000c405", INIT_27 => X"0400004005004262420300c3020000040000c40500c2004262c30200c2c20200", INIT_28 => X"020000040000c40500c2004262c30200c2c202006200c24362420300c3020000", INIT_29 => X"c2c24200c2c202006200c24362420300c30200000400004005004262420300c3", INIT_2A => X"bebfc00000004402000043024300420200004402006202c30000440200404200", INIT_2B => X"0000040000400042020000040000c4c26200c2c3c0c202c202a0bebfbd00e0bd", INIT_2C => X"434202000004000040004242020000040000c4c26200c2c3c202006200c24302", INIT_2D => X"00c2434202000004000040004242020000040000c4c26200c2c3c202006200c2", INIT_2E => X"02006200c2434202000004000040004242020000040000c4c20200c2c2020062", INIT_2F => X"00c2c202006200c2434202000004000040004242020000040000c4c24200c2c2", INIT_30 => X"006202c300004402c202006200c2434202000040004242020000040000c4c242", INIT_31 => X"42004202c4a0bebd0000e0bdbebfc00000004402000043024300420200004402", INIT_32 => X"c202c4a0bebd00e0bdbec0020000004302430042024300c36242030243020040", INIT_33 => X"40620243020000020062024302004000c24303c2c000000043030040004200c2", INIT_34 => X"bebd00e0bdbec0024000c2c00000400243030240024300630302004000420200", INIT_35 => X"0000020062024302004000c24303c2c000000043030040004200c2c202c0c4a0", INIT_36 => X"02438242040243024402004042004202004000c2004000c2c2004202c2004202", INIT_37 => X"c200c2c5c4a0bebd00e0bdbec0024000c2c00000430302400240024302430042", INIT_38 => X"00c0c7c6c5c4a0bebfbd00e0bdbec0c200400042430063c46400c3c34300c200", INIT_39 => X"c2c3c2020000c202006202c3004100c2c000404200c2c24200c2430362c3c200", INIT_3A => X"00c200404200c2c2000007624000c3c2c20007624000c3c20000c202c2006200", INIT_3B => X"4062004200c26200c203004000c26283c4c3020242424200c200000202424242", INIT_3C => X"c20040004200c2430362c3c2c24200c2006202c3000000004100c2c24200c200", INIT_3D => X"c362034200c200004300c26200c2030000c4406200c2c30040628200c2044300", INIT_3E => X"c4a0bebd00e0bdbec0004363034202c5c4a0bebd00e0bdbebfc0000000c44062", INIT_3F => X"00c2c5c4a0bebd00e0bdbec0c2004000c2c26200c34200c2c2424200c20000c0" ) port map ( DO => block_do(0)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"00000000000000000000000000000000ff00000800ff1800350035003300b200", INIT_01 => X"000000000000000000000000000000000000072000002000d800d800ff700000", INIT_02 => X"0000000000000010000000000000000000010060006060000000000000000000", INIT_03 => X"0000000000201000000000000000000000000000000000000000000000000000", INIT_04 => X"0000200000f000ff00000000e800000000800010100000000000000000f000ff", INIT_05 => X"0000000000000000000000000000f00000ff00000000e8000000002000ff0000", INIT_06 => X"0000000000000000f00000ff0000000000e80000ff0000000000002000000000", INIT_07 => X"e80000ff000000ff000000002000000000000000200000000000000000000010", INIT_08 => X"0020000000000000000000000007002800380000000000f00000ff0000000000", INIT_09 => X"20f000ff0000000000e80000ff0000000000000000ff000000000000ff000000", INIT_0A => X"0000000000000000e8161600002000ff000100f00000ff00000000e800000000", INIT_0B => X"2a00000256922700000002561227000000002a0000002a0000002a00f00000ff", INIT_0C => X"032800280028000028000000000200280028002800002800000000002a000000", INIT_0D => X"0002230029002900290000290000000002430028002900290000290000000002", INIT_0E => X"2a00000400002a0000002a00000500002a0000002a00000300002a0000002a00", INIT_0F => X"0000002b00000000002b00000000330000002b0000002b00000200002a000000", INIT_10 => X"0000000000000000f00000ff0000000000e8000000000001200030330000002b", INIT_11 => X"010000300000000000ff10000000000000000000000000100000000000000000", INIT_12 => X"0000000000000000000010241800000000012000300010241800000000000000", INIT_13 => X"002b00000033000000330000002b000000000000ff0300000000000000000000", INIT_14 => X"0000000000000000001000000000000000000000f00000ff0000000000e80000", INIT_15 => X"000000ff00000000000000000000100000100000000000000020000010000010", INIT_16 => X"00002b00000033000000330000002b0000000000000100003000002b0000ff00", INIT_17 => X"000000000000000010000000000000000000000000f00000ff0000000000e800", INIT_18 => X"0000ff0000000000000000000010000010000000000000002000001000001000", INIT_19 => X"0000100000100000000000000000001000000001000000000000000000ff0000", INIT_1A => X"00000000ff00000000ff00000000000000000000100000100000000000000020", INIT_1B => X"00002000001000001010ff3f0000000000000000101000000000000000000000", INIT_1C => X"0000000000ff00000000ff000000000000000000001000001010ff3f00000000", INIT_1D => X"000000002000001000001010ff3f000000000000000010000000000000000000", INIT_1E => X"003000002b0000ff00000000ff000000000000000000001000001010ff3f0000", INIT_1F => X"00ff0000000000e80000002b00000033000000330000002b0000000000000100", INIT_20 => X"000000002000001029180000000000000000000010000000000000000012f000", INIT_21 => X"00000000000000000000ff000000000000000000000000000010291800000000", INIT_22 => X"00000000102a180000000000000000200000102a180000000000000000000010", INIT_23 => X"000033000000330000002b000000000000002c0000ff00000000000000000000", INIT_24 => X"001c1c0000001000001e1e000000000000f00000ff0000000000e80000002b00", INIT_25 => X"3000000010000000000000ff0000000000000000000010001000000010001000", INIT_26 => X"00000000102c18000000000000000120003000102c1800000000000000010000", INIT_27 => X"00000120003000102c1800000000000000010000300000001000100000000000", INIT_28 => X"000000000001000030000000100010000000000000000000102c180000000000", INIT_29 => X"000000000000000000000000102c18000000000000000120003000102c180000", INIT_2A => X"0000e80000002b00000033000000330000002b000000000000002c0000ff0000", INIT_2B => X"000000000020002c0000000000000000100000000000430012f00000ff000000", INIT_2C => X"002c0000000000002000002c0000000000000000100000000000000000002c00", INIT_2D => X"0000002c0000000000002000002c000000000000000010000000000000000000", INIT_2E => X"0000000000002c0000000000002000002c000000000000000010000000000000", INIT_2F => X"0000000000000000002c0000000000002000002c000000000000000000000000", INIT_30 => X"0000000000002c00000000000000002c0000002000002c0000000000000000ff", INIT_31 => X"0000330000f000ff000000000000e80000002b00000033000000330000002b00", INIT_32 => X"000000f000ff00000000e8ff0000103300000033000000001035180033000000", INIT_33 => X"0010400080000000000000320000000000000000000000000000000000000000", INIT_34 => X"00ff00000000e8000000000000ff33003300003200000035007f000000330000", INIT_35 => X"00000000000033000000000000000000000000000000000000000000000000f0", INIT_36 => X"000010352000007f330000000000330000000000000000000000008000000080", INIT_37 => X"0000000000f000ff00000000e8000000000000ff330000330032003300000033", INIT_38 => X"000000000000f00000ff00000000e80000ff0000000000000000000000000000", INIT_39 => X"000000ff0000000000000000000000000000ff00000000000000000010000000", INIT_3A => X"0000000000000000101000000000000000100000000000000000000000100000", INIT_3B => X"0010000000001800000000000000001800001616000000000000001616000000", INIT_3C => X"00000000000000000010000000ff00000000ff0000000000ff000000ff000000", INIT_3D => X"0010000000000000000000180000000006002810000000000010100000000000", INIT_3E => X"00f000ff00000000e80000fc0000200000f000ff0000000000e8000006002810", INIT_3F => X"00000000f000ff00000000e80000ff000000100000ff00000000000000000000" ) port map ( DO => block_do(0)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"4c4844403c3834302c2824201c181410980e00ac04fd2a001800b0000000f001", INIT_01 => X"504c4844403c3834302c2824201c18141000cc2410200060125c1058fc005450", INIT_02 => X"0c08040000083c0048080c440840043c006000000800000801681360115c5854", INIT_03 => X"00080c000810121900082c2824201c1814100c08040000082c2824201c181410", INIT_04 => X"00200000082504f80008100c2500000000100012100d1b020014101410250cf0", INIT_05 => X"001800980d00040a000018001318251014e80008080425000000080000fa0200", INIT_06 => X"001020001e101c2025181ce00008181014250000e90000001800982500001801", INIT_07 => X"250000e0001010fc0010009825570014000700982530001400090a0014140f06", INIT_08 => X"9825000010010010001810140016a025a42514a8a8a4a025989c60000820181c", INIT_09 => X"002504f80008a0989c250000e400000010000d1010ff001000080a00ff001000", INIT_0A => X"000000000818101425030000000000fd003c00251014e8000808042501000020", INIT_0B => X"8000008878348c0002008878340c000100ae680000ae540000ae3c0025181ce0", INIT_0C => X"2184009c00b40010d800140200e7070c0024003c00106000140100ae680000ae", INIT_0D => X"00e7450174008c00a40010c800140400e72105fc0014002c00105000140300e7", INIT_0E => X"f800008b00ae680000aee000006300ae680000aec80000fe00ae680000aea800", INIT_0F => X"0000ae5000001300ae4800000700100000ae380000ae2800001400ae680000ae", INIT_10 => X"1403004b10031c18252024d8000820181c250000980a0005250a25100000ae5c", INIT_11 => X"05100a250026001400eb2a00101414020014000b140004100d1a020014100011", INIT_12 => X"0100181c0100030010002170800018000005250a250021708000180000983a00", INIT_13 => X"ae9c00000510000100100000ae7400000d011c00b2e800101002001000982018", INIT_14 => X"001000983a00d4181807002810002c1014302c28252024d80008282024250000", INIT_15 => X"001010ff0100101401000300180021002c80001000982000d425000021002c80", INIT_16 => X"00aee400000510000100100000aed800000d01140005300a2500aec40000d120", INIT_17 => X"1000983a00d418181218002810002d101434302c28252024d800082820242500", INIT_18 => X"1010ff0100101401000300180021002c80001000982000d425000021002c8000", INIT_19 => X"000021003080001000983a00d4181812180028230010002f1000980a00d00600", INIT_1A => X"00980a00ce06001010ff0100101401000300180021003080001000982000d425", INIT_1B => X"00d42500002100348021ffff1000983a00d4181812100d1a0200281000341001", INIT_1C => X"0100980a00c90a001010ff010010140100030018002100348021ffff10009820", INIT_1D => X"982000d42500002100388021ffff1000983a00d41818100d1a02002810003310", INIT_1E => X"0a2500aef00000ca0a001010ff010010140100030018002100388021ffff1000", INIT_1F => X"24d80008282024250000aee400000510000100100000aed800000d011400053c", INIT_20 => X"982000d425000021ec8000100000983a00d41c1c21001018002b101418342520", INIT_21 => X"001018002b1000980a00d20a00101001001014010003001c0021ec8000100000", INIT_22 => X"03001c0021148000100000982000d425000021148000100000983a00d41c1c23", INIT_23 => X"000510000100100000aed800000d011400ae140000d20a001010010010140100", INIT_24 => X"10030000100c21101003000010001f1014259094680008282024250000aee400", INIT_25 => X"2518000c21101000871000de0a0010100100103c001021108000101c21104000", INIT_26 => X"030018002158800010000098200005250a250021588000100000983a0005180a", INIT_27 => X"200005250a250021588000100000983a0005180a2518001c2110400010140100", INIT_28 => X"0000983a0005180a2518003c2110800010140100030018002158800010000098", INIT_29 => X"10100100101401000300180021588000100000980a0005250a25002158800010", INIT_2A => X"9094250000aee400000510000100100000aed800000d011400ae300000760a00", INIT_2B => X"00982000d42500800000983a00d41c1c240018141018211434252024d8000898", INIT_2C => X"04800000982000d4250004800000983a00d41c1c2500181410010003001c8000", INIT_2D => X"001c08800000982000d4250008800000983a00d41c1c2600181410010003001c", INIT_2E => X"010003001c0c800000982000d425000c800000983a00d41c1c27001410010003", INIT_2F => X"001410010003001c10800000982000d4250010800000983a00d41c1c12001410", INIT_30 => X"000d011000ae400010010003001c14800000d4250014800000983a00d41c1cee", INIT_31 => X"0f002400082504f8000008282024250000aee400000510000100100000aed800", INIT_32 => X"000110250cf00008080425ff0002252400010024000000082130800024000013", INIT_33 => X"0b24000000001f01000401f0000006000000321000002a000732000600000010", INIT_34 => X"14e80008100c25030000100000d82c00280100f00000003000fc000600240000", INIT_35 => X"003401000401280000060000005d1800003f00075d0006000000180001041825", INIT_36 => X"00002170800000fc200000100f00200000160008001a00040800000004000004", INIT_37 => X"0000101410250cf00008181425030000180000c32c01002800f0002000010020", INIT_38 => X"0a104c48444025383cc00008100c250000f20000000000140100141001001000", INIT_39 => X"184018ff0003180100050a48000500402f00f30f001010010010102021101000", INIT_3A => X"0010000a0a00101c12100d1b02001c4810100d1b02001c48003e140e1c121800", INIT_3B => X"0b2a0000004c2300140f000c001c102110140300ff57ff001000080300ff30ff", INIT_3C => X"4c000b0000004c102d21101414ff0014000aff1800000200c0001414ff001400", INIT_3D => X"20230f00004c000c00004c2300140f00f844252100142000122a2300140f0000", INIT_3E => X"10250cf000080804250000180360000c082504f8000840383c250000f8442521", INIT_3F => X"00080c082504f80008100c250000f1001010240010ff001000ff010000000d00" ) port map ( DO => block_do(0)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block0 block1: if (block_count > 1) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"00008f8faf000c8faf0000008f00008fafaf03afaf270003278f030000008f00", INIT_01 => X"8f0000003c8fac008fac008fac008f30008fafafafafaf03af270003278f8f03", INIT_02 => X"0010248f001428008faf24008faf00008f0030003000008f8c008f0010afac00", INIT_03 => X"10240014008f8f001024001000008f8c008f001024001000008f8c008f001024", INIT_04 => X"03af270003278f0300008faf03af270003278f0300001024001028008c008f00", INIT_05 => X"3c000c243c000c343c343caf24afaf03afafaf27000003278f030000343c8faf", INIT_06 => X"0004008c340010ac24ac343c24ae000c242424000c243cac008f343caf008c34", INIT_07 => X"8fae000c242424000c24000c0024008f000c243c0014248faf000c8faf008c24", INIT_08 => X"000000000003278f8f8f0300000c00142c008fac008f24af000c8f0010af2400", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000102040912000000", INIT_0F => X"fffffffffffffffffffffffffffffffffffffffffffffefcf9f2e4c992000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000606060606050000000000", INIT_13 => X"0000000000000000000000000000000000000000000000010101010101000000", INIT_14 => X"3d3d3d3d3d3d676620740a0a747320650a000000000000000000000000000000", INIT_15 => X"694c7363726d69546e616f6269546f6175206467730a00696920746c6c67730a", INIT_16 => X"4e490a007420696c54004546455000454d500a6469540030617261736d657061", INIT_17 => X"544c4c0a0a53200a4c2000454e490a0044414f4c41454e490a0044414f4c4145", INIT_18 => X"0000000000000000000054204945540a54204d0a542043422f440a2054494920", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000102040912000000000000000000000000000000", INIT_1F => X"fffffffffffffffffffffefcf9f2e4c992000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000606060606050000000000000000000000000000000000", INIT_23 => X"0000000000000000000000010101010101000000000000000000000000000000", INIT_24 => X"7566542055000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000072756570695300736e61756369670a0a727475526e2068616e", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"6200c2c3c20000c4c2430300c30200c2c5c4a0bebfbd00e0bdbec0620200c202", INIT_01 => X"c240026202c34000c24000c24300c24300c2c0c7c6c5c4a0bebd00e0bdbebfc0", INIT_02 => X"006202c300404200c2c24200c2c24300c2404202424300c24300c20000c04300", INIT_03 => X"0002006200c2c300000200404300c24300c200000200404300c24300c2000002", INIT_04 => X"a0bebd00e0bdbec00200c2c4a0bebd00e0bdbec000000002004042004200c200", INIT_05 => X"0200004402000044024502c202c5c4a0b0bebfbd0000e0bdbec002624202c3c4", INIT_06 => X"00400042020000400243630302020000040510000044024300c34202c2004242", INIT_07 => X"c20200000405100000040000400500c200004402006202c3c20000c4c2004202", INIT_08 => X"0000000000e0bdb0bebfc000000000404200c24300c302c20000c40000c24200", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"00000000000000000000000000000000010204091224489123468d1a34000000", INIT_0F => X"fffffffffffffffffffffffffffffefcf9f2e4c99224489123468d1a34000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000003030303030300000000000000", INIT_12 => X"02010000000000000000000000000000010101020515100b0500fb1a150f0a05", INIT_13 => X"0000000000000000000000000000000000000000000001504f4e4d4c4b050403", INIT_14 => X"0a3d3d3d3d3d0a747369540a656d707247000000000000000000000000000000", INIT_15 => X"6e69736379656e65737470696e656e63622f6920740a006f762f69697420740a", INIT_16 => X"554d0a0073746c206f00444144410053414c0a6f6e6500306e206c206220726c", INIT_17 => X"4949540a0a45500a4546005347460a0021534e414c52554d0a0021494e414c52", INIT_18 => X"0000000000000000000020544f52200a20544f0a2054545420450a00454f562f", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"00000000010204091224489123468d1a34000000000000000000000000000000", INIT_1F => X"fffffefcf9f2e4c99224489123468d1a34000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000003030303030300000000000000000000000000000000000000", INIT_22 => X"00000000010101020515100b0500fb1a150f0a05000000000000000000000000", INIT_23 => X"0000000000000000000001504f4e4d4c4b050403020100000000000000000000", INIT_24 => X"20203a5441000000000000000000000000000000000000000000000000000000", INIT_25 => X"00000000000000206d74616e65007420746e6f6e690a006b2074542074696420", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"100000000000070000101f00001000000000f00000ff00000000e8101400001f", INIT_01 => X"001814100f000000000000000000000000000000000000f000ff0000000000e8", INIT_02 => X"0000000000ff0000000000000000100000180010001000000000000000000000", INIT_03 => X"0000000000000000000000001000000000000000000000100000000000000000", INIT_04 => X"f000ff00000000e817000000f000ff00000000e8100000000000000000000000", INIT_05 => X"200000320000007801c20000000000f0000000ff0000000000e81010ff1f0000", INIT_06 => X"00000000800000007f00ff0f7f00000700007f00003200000000002000000000", INIT_07 => X"0000000700007f0000000001200030000000320000000000000008000000007f", INIT_08 => X"00000000000000000000e810000100ff0300000000007f000008000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0101010101010101010101010101010000000000000000000000000000000000", INIT_0B => X"0202020201010101010101010101010101010101010101010101010101010101", INIT_0C => X"0202020202020202020202020202020202020202020202020202020202020202", INIT_0D => X"0303030303030303030303030303030303030303030303030303030303030202", INIT_0E => X"0000000000000000010204091224489123468d1a3468d1a2458a152b56030303", INIT_0F => X"fffffffffffffefcf9f2e4c99224489123468d1a3468d1a2458a152b56000000", INIT_10 => X"0000000000000000000000000000000000080808080707000000000000ffffff", INIT_11 => X"000000000000000000000000000000000101039e9b9794918e0f0c0906030000", INIT_12 => X"46230000000000000000000095a8c0e00d50c1a1439e5b17d4914e4f0cc98643", INIT_13 => X"1212121212000000000000000000202429303a48619123c7a4815d3a17b08d69", INIT_14 => X"003d3d3d3d3d0069686e650073616c6165121212121212121212121212121212", INIT_15 => X"67730a65206d67730a69657467730a7474206e616954006e69206f63696d6954", INIT_16 => X"4d4550003a65656674002149215300542041006e6773003020746c73656e696c", INIT_17 => X"4f43494d0044410044410054205453000a53205443204d4550000a4c20544320", INIT_18 => X"0000000000000000000000454e414f420045524d00454f5253524100534e4920", INIT_19 => X"00000000000000000000000000000000000000000000000000001212ed515302", INIT_1A => X"0101010000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0101010101010101010101010101010101010101010101010101010101010101", INIT_1C => X"0202020202020202020202020202020202020202020202020101010101010101", INIT_1D => X"0303030303030303030303030303030303030202020202020202020202020202", INIT_1E => X"1224489123468d1a3468d1a2458a152b56030303030303030303030303030303", INIT_1F => X"9224489123468d1a3468d1a2458a152b56000000000000000000000001020409", INIT_20 => X"0000000000080808080707000000000000fffffffffffffffffffefcf9f2e4c9", INIT_21 => X"000000000101039e9b9794918e0f0c0906030000000000000000000000000000", INIT_22 => X"95a8c0e00d50c1a1439e5b17d4914e4f0cc98643000000000000000000000000", INIT_23 => X"0000202429303a48619123c7a4815d3a17b08d69462300000000000000000000", INIT_24 => X"6379204552121212121212121212121212121212121212121200000000000000", INIT_25 => X"0000000000000000622063676e000a7469696d676e4200737770205568732072", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"250014101400dc101025400020400024242025181ce000080804252500000c00", INIT_01 => X"20250224ff1000001c000018000014ff0010041c181410250cf0000820181c25", INIT_02 => X"0004010400ea080000000100000421000425ff2b010700000000140013000000", INIT_03 => X"0c04000400181c00140300042a002400001c001f0200042a0024000018002a01", INIT_04 => X"2504f80008080425420008082504f80008100c25250002050004020000002000", INIT_05 => X"0000ae6c000080407d000110013c38252c3034c80000080804254224feff0808", INIT_06 => X"002e000000003300fc00fffffc0000f90103fc00aea800000014300014000050", INIT_07 => X"100000f90103fc00980a0005250a251000aecc00001a011c1c009118180000fc", INIT_08 => X"0b0705030008382c30342525006000cae90010000020fc20009d180009100100", INIT_09 => X"9d97958b89837f716d6b67656159534f4947433d3b352f2b29251f1d1713110d", INIT_0A => X"5b514b3d393733251b19150f0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a3", INIT_0B => X"231d0b09fdf7f3ebe7dfd3cfcdc9c1bbb7b1afa5a399918d857f7b756f67615d", INIT_0C => X"efe7e3ddd7cfc5bdb3aba5a195938d878381776b69655f5957514b413b39332d", INIT_0D => X"d1cbc7b9b3ada9a1978f8b7773716d5f5b5955473d3b37352b291d130501f9f5", INIT_0E => X"010204091224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78e5dfd7", INIT_0F => X"f9f2e4c99224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78000000", INIT_10 => X"070001020301010000000101010102030718110a03fcf5231c150e0700fffefc", INIT_11 => X"0000010303010100010059647285a0c80b90212807e6c5a483a5846342210007", INIT_12 => X"8a4500030103030001000100ae6472856dc80b90212807e6c5a483a584634221", INIT_13 => X"38373635340005010300010001005d689c8b41d117a245c8833ef9b46f5914cf", INIT_14 => X"003d3d3d3d3d006e696773007420616c6e2b2c2d2e2f30313233343d3c3b3a39", INIT_15 => X"20740073616f2074006f722020740069727367646e65000a73646e6170756e65", INIT_16 => X"422052002073646161000a4c00530020545300652074000a3168656d72756d20", INIT_17 => X"4e4150550021530021490020544948000a4550495543422052000a4546495543", INIT_18 => X"0908070605040302010000535354504900535945005352415520440054205344", INIT_19 => X"6159534f4947433d3b352f2b29251f1d1713110d0b07050300002246cb153520", INIT_1A => X"0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a39d97958b89837f716d6b6765", INIT_1B => X"cdc9c1bbb7b1afa5a399918d857f7b756f67615d5b514b3d393733251b19150f", INIT_1C => X"95938d878381776b69655f5957514b413b39332d231d0b09fdf7f3ebe7dfd3cf", INIT_1D => X"73716d5f5b5955473d3b37352b291d130501f9f5efe7e3ddd7cfc5bdb3aba5a1", INIT_1E => X"3468d1a2458a152b56ac59b367cf9e3c78e5dfd7d1cbc7b9b3ada9a1978f8b77", INIT_1F => X"3468d1a2458a152b56ac59b367cf9e3c78000000010204091224489123468d1a", INIT_20 => X"010102030718110a03fcf5231c150e0700fffefcf9f2e4c99224489123468d1a", INIT_21 => X"7285a0c80b90212807e6c5a483a5846342210007070001020301010000000101", INIT_22 => X"ae6472856dc80b90212807e6c5a483a584634221000001030301010001005964", INIT_23 => X"01005d689c8b41d117a245c8833ef9b46f5914cf8a4500030103030001000100", INIT_24 => X"616f4953542b2c2d2e2f30313233343d3c3b3a39383736353400050103000100", INIT_25 => X"0000000100000000656e6b2064000a656f636d206e6500216f756f41652c7465", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block1 block2: if (block_count > 2) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block2 block3: if (block_count > 3) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block3 block4: if (block_count > 4) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block4 block5: if (block_count > 5) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block5 block6: if (block_count > 6) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block6 block7: if (block_count > 7) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block7 end; --architecture logic
--------------------------------------------------------------------- -- TITLE: Random Access Memory for Xilinx -- AUTHOR: Steve Rhoads ([email protected]) -- DATE CREATED: 11/06/05 -- FILENAME: ram_xilinx.vhd -- PROJECT: Plasma CPU core -- COPYRIGHT: Software placed into the public domain by the author. -- Software 'as is' without warranty. Author liable for nothing. -- DESCRIPTION: -- Implements Plasma internal RAM as RAMB for Spartan 3x -- -- Compile the MIPS C and assembly code into "test.axf". -- Run convert.exe to change "test.axf" to "code.txt" which -- will contain the hex values of the opcodes. -- Next run "ram_image ram_xilinx.vhd code.txt ram_image.vhd", -- to create the "ram_image.vhd" file that will have the opcodes -- correctly placed inside the INIT_00 => strings. -- Then include ram_image.vhd in the simulation/synthesis. -- -- Warning: Addresses 0x1000 - 0x1FFF are reserved for the cache -- if the DDR cache is enabled. --------------------------------------------------------------------- -- UPDATED: 09/07/10 Olivier Rinaudo ([email protected]) -- new behaviour: 8KB expandable to 64KB of internal RAM -- -- MEMORY MAP -- 0000..1FFF : 8KB 8KB block0 (upper 4KB used as DDR cache) -- 2000..3FFF : 8KB 16KB block1 -- 4000..5FFF : 8KB 24KB block2 -- 6000..7FFF : 8KB 32KB block3 -- 8000..9FFF : 8KB 40KB block4 -- A000..BFFF : 8KB 48KB block5 -- C000..DFFF : 8KB 56KB block6 -- E000..FFFF : 8KB 64KB block7 --------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use work.mlite_pack.all; library UNISIM; use UNISIM.vcomponents.all; entity ram is generic(memory_type : string := "DEFAULT"; --Number of 8KB blocks of internal RAM, up to 64KB (1 to 8) block_count : integer := 1); port(clk : in std_logic; enable : in std_logic; reset : in std_logic; write_byte_enable : in std_logic_vector(3 downto 0); address : in std_logic_vector(31 downto 2); data_write : in std_logic_vector(31 downto 0); data_read : out std_logic_vector(31 downto 0)); end; --entity ram architecture logic of ram is --type type mem32_vector IS ARRAY (NATURAL RANGE<>) OF std_logic_vector(31 downto 0); --Which 8KB block alias block_sel: std_logic_vector(2 downto 0) is address(15 downto 13); --Address within a 8KB block (without lower two bits) alias block_addr : std_logic_vector(10 downto 0) is address(12 downto 2); --Block enable with 1 bit per memory block signal block_enable: std_logic_vector(7 downto 0); --Block Data Out signal block_do: mem32_vector(7 downto 0); --Remember which block was selected signal block_sel_buf: std_logic_vector(2 downto 0); begin block_enable<= "00000001" when (enable='1') and (block_sel="000") else "00000010" when (enable='1') and (block_sel="001") else "00000100" when (enable='1') and (block_sel="010") else "00001000" when (enable='1') and (block_sel="011") else "00010000" when (enable='1') and (block_sel="100") else "00100000" when (enable='1') and (block_sel="101") else "01000000" when (enable='1') and (block_sel="110") else "10000000" when (enable='1') and (block_sel="111") else "00000000"; proc_blocksel: process (clk, block_sel) is begin if rising_edge(clk) then block_sel_buf <= block_sel; end if; end process; proc_do: process (block_do, block_sel_buf) is begin data_read <= block_do(conv_integer(block_sel_buf)); end process; -- BLOCKS generation block0: if (block_count > 0) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"afafafafafafafafafafafafafafafaf2308000c241400ac273c243c243c273c", INIT_01 => X"8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f230c008c8c3caf00af00af2340afaf", INIT_02 => X"acacacac0003373cac038cac8cac8cac8c243c40034040033423038f038f8f8f", INIT_03 => X"000300ac0300000034038c8c8c8c8c8c8c8c8c8c8c8c3403acacacacacacacac", INIT_04 => X"8c343c00af03af270003278f0300ac008f34af0000000014008f8fafaf03af27", INIT_05 => X"008f000c2400142480008f0010af03afaf270003278f0300ac008f3c00103000", INIT_06 => X"008f8f0010af24af03afaf270003278f8f030000140080008f000c000080af24", INIT_07 => X"03000004008faf24008f000c0024008f0010000c0024008f00102c008faf3000", INIT_08 => X"0c000080af24008f0010af27000c8f008f002727afafaf03afaf270003278f8f", INIT_09 => X"3c03af270003278f8f030000140080008fa0248faf24008f0014248024008f00", INIT_0A => X"0000000003278f8f030000008c3c0010000c0003afaf270003278f0330008c34", INIT_0B => X"243c000c343c243c24000c343c243c24000c243c000c243c000c243c03afaf27", INIT_0C => X"24243c243c243caf243caf24000c24243c243c243caf243caf24000c243c000c", INIT_0D => X"000c343c243c243c243caf243caf24000c343c243c243c243caf243caf24000c", INIT_0E => X"243c000c000c243c000c243c000c000c243c000c243c000c000c243c000c243c", INIT_0F => X"3c000c243c0010000c243c0014008c3c000c243c000c243c000c000c243c000c", INIT_10 => X"af240010af24afaf03afaf270003278f8f0300000c24000c0024008c3c000c24", INIT_11 => X"0c8f24000010008f001400008f8faf24008f0010af001400000014008f8f0010", INIT_12 => X"24008faf240010008f8c002400008f3c000c0024008c002400008f3c000c2400", INIT_13 => X"0c243c0010ac3c24008c3c000c243c0014248f001428008faf24008f000c24af", INIT_14 => X"0087000c24000c8faf00008f870010a7afafafaf03afaf270003278f8f030000", INIT_15 => X"0087a730240097af240010008f8c00008f000087000c24000c00008c00008f00", INIT_16 => X"000c243c0010ac3c24008c3c000c243c0014248f000c8f2400000c243c001428", INIT_17 => X"87000c24000c8faf0000008f870010a7afafafafaf03afaf270003278f8f0300", INIT_18 => X"87a730240097af240010008f8c00008f000087000c24000c00008c00008f0000", INIT_19 => X"008c00008f000087000c24000c8faf0000008f2400870010a7000c2400142800", INIT_1A => X"000c240014280087a730240097af240010008f8c00008f000087000c24000c00", INIT_1B => X"000c00008c00008f0000343c87000c24000c8faf0000000014008f870010a724", INIT_1C => X"24000c240014280087a730240097af240010008f8c00008f0000343c87000c24", INIT_1D => X"0c24000c00008c00008f0000343c87000c24000c8faf00000014008f870010a7", INIT_1E => X"2400000c243c0014280087a730240097af240010008f8c00008f0000343c8700", INIT_1F => X"af270003278f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c8f", INIT_20 => X"0c24000c00008c002400008f3c000c24000c8faf00008f8f0010afafaf2403af", INIT_21 => X"008f8f0010af000c24001428008faf24008faf240010008f8c002400008f3c00", INIT_22 => X"10008f8c002400008f3c000c24000c00008c002400008f3c000c24000c8faf00", INIT_23 => X"0010ac3c24008c3c000c243c0014248f000c243c001428008faf24008faf2400", INIT_24 => X"8f0000008fa000278f0000008f0010afaf03afaf270003278f8f0300000c243c", INIT_25 => X"00af008000278f0010af001428008faf24008fac008f002700008fa400270000", INIT_26 => X"10008f8c002400008f3c000c24000c0024008c002400008f3c000c24000c8f24", INIT_27 => X"24000c0024008c002400008f3c000c24000c8f2400af0084002700008faf2400", INIT_28 => X"3c000c24000c8f2400af008c002700008faf240010008f8c002400008f3c000c", INIT_29 => X"8faf24008faf240010008f8c002400008f3c000c24000c0024008c002400008f", INIT_2A => X"8f8f0300000c243c0010ac3c24008c3c000c243c0014248f000c243c00142800", INIT_2B => X"000c24000c00008c3c000c24000c8faf00008f8fafaf24af2403afaf27000327", INIT_2C => X"8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f8c3c", INIT_2D => X"008f8c243c000c24000c00008c243c000c24000c8faf00008f8faf240010008f", INIT_2E => X"240010008f8c243c000c24000c00008c243c000c24000c8faf00008faf240010", INIT_2F => X"008faf240010008f8c243c000c24000c00008c243c000c24000c8faf24008faf", INIT_30 => X"0014248f000c243caf240010008f8c243c000c00008c243c000c24000c8faf24", INIT_31 => X"28008c3caf03af27000003278f8f0300000c243c0010ac3c24008c3c000c243c", INIT_32 => X"a324af03af270003278f0324001000ac3c24008c3cac008f0024003c8c3c0010", INIT_33 => X"14003c8c340010240010248c3c00100083a4248fa3001000102400100094008f", INIT_34 => X"af270003278f0324a4008fa30010ac3cac243cac3cac008c3c240018008c3c00", INIT_35 => X"0010240010248c3c00100083a4248fa3001000102400100094008fa324afaf03", INIT_36 => X"3cac0024003c8c248c3c001028008c3c0004008f0010008faf008c34af008c34", INIT_37 => X"af008fafaf03af270003278f0324a4008fa30010ac243cac3cac3cac3c24008c", INIT_38 => X"10afafafafaf03afaf270003278f038f00140080a00080af24008faf24008f00", INIT_39 => X"8f8faf240010af240010248f0004008fa3001428008faf24008fa02400278f00", INIT_3A => X"008f001028008faf0000000014008f8faf00000014008f8f0010af24af000000", INIT_3B => X"1000008c008f00008f240014008fa000278f0000302430008f00100000302430", INIT_3C => X"8f0010008c008fa02400278faf24008f0014248f0000100004008faf24008f00", INIT_3D => X"2700248c008f0010ac008f00008f24000c8f0000008f2700100000008f248c00", INIT_3E => X"af03af270003278f0300ac343c343cafaf03af270003278f8f0300000c8f0000", INIT_3F => X"008fafaf03af270003278f038f0014008faf00008f24008faf302c008f0010af" ) port map ( DO => block_do(0)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"b8afaeadacabaaa9a8a7a6a5a4a3a2a1bd000000a560a4a0bd1d8404a5059c1c", INIT_01 => X"b9b8afaeadacabaaa9a8a7a6a5a4a3a2a1a50086c6c406bb00bb00ba5a1abfb9", INIT_02 => X"9392919000405a1a06e0a606a606a606a6a50584e0029b401bbd60bb60bbbabf", INIT_03 => X"00e000c4e0000085a2e09f9d9c9e979695949392919002e09f9d9c9e97969594", INIT_04 => X"42420200c4a0bebd00e0bdbec0004300c302c2000007624000c2c3c5c4a0bebd", INIT_05 => X"00c20000040062024300c20000c4a0bebfbd00e0bdbec0004300c30200404200", INIT_06 => X"00c2c30000c202c4a0bebfbd00e0bdbebfc0000040004200c20000400042c343", INIT_07 => X"c000004100c2c24200c20000404200c200000000404200c200404200c2c24243", INIT_08 => X"00400042c34300c20000c2c20000c440c660c2c3c6c5c4a0bebfbd00e0bdbebf", INIT_09 => X"02a0bebd00e0bdbebfc0000040004200c24303c2c24200c2006202434200c200", INIT_0A => X"00000000e0bdbebfc002020042020040000000a0bebfbd00e0bdbec042004242", INIT_0B => X"44020000440245020600004402450206000044020000440200004402a0bebfbd", INIT_0C => X"04450246024702a24202a202000004450246024702a24202a202000044020000", INIT_0D => X"00004402450246024702a24202a20200004402450246024702a24202a2020000", INIT_0E => X"4402000000004402000044020000000044020000440200000000440200004402", INIT_0F => X"0200004402000000004402004000420200004402000044020000000044020000", INIT_10 => X"c2020000c202c0c0a0bebfbd00e0bdbebfc00000000400004005004202000044", INIT_11 => X"00c40500004000c200406200c2c3c24200c20000c000400007624000c2c30000", INIT_12 => X"4200c2c202006200c24362420300c30200004005004262420300c30200000400", INIT_13 => X"004402000043024300420200004402006202c300404200c2c24200c2000004c2", INIT_14 => X"00c20000040000c4c24300c3c20000c0c0c6c5c4a0bebfbd00e0bdbebfc00000", INIT_15 => X"00c2c2424200c2c202006200c2436200c30200c200000400004000426200c302", INIT_16 => X"00004402000043024300420200004402006202c30000c4050000004402004042", INIT_17 => X"c20000040000c4c2006200c2c30000c0c0c7c6c5c4a0bebfbd00e0bdbebfc000", INIT_18 => X"c2c2424200c2c202006200c2436200c30200c200000400004000426200c30200", INIT_19 => X"00426200c30200c20000040000c4c2006200c24300c20000c000000400404200", INIT_1A => X"00000400404200c2c2424200c2c202006200c2436200c30200c2000004000040", INIT_1B => X"00004000426200c302624202c30000040000c4c2000007624000c3c20000c202", INIT_1C => X"0200000400404200c2c2424200c2c202006200c2436200c302624202c3000004", INIT_1D => X"000400004000426200c302624202c30000040000c4c20007624000c3c20000c2", INIT_1E => X"05000000440200404200c2c2424200c2c202006200c2436200c302624202c300", INIT_1F => X"bfbd00e0bdbebfc00000004402000043024300420200004402006202c30000c4", INIT_20 => X"0004000040004262420300c3020000040000c4c26200c2c30000c0c0c202a0be", INIT_21 => X"00c2c30000c000000400404200c2c24200c2c202006200c24362420300c30200", INIT_22 => X"6200c24362420300c302000004000040004262420300c3020000040000c4c262", INIT_23 => X"000043024300420200004402006202c30000440200404200c2c24200c2c20200", INIT_24 => X"c2030200c24382c4c2030200c20000c0c0a0bebfbd00e0bdbebfc00000004402", INIT_25 => X"00c2004262c3c20000c000404200c2c24200c24300c362c30200c24382c40200", INIT_26 => X"6200c24362420300c30200000400004005004262420300c3020000040000c405", INIT_27 => X"0400004005004262420300c3020000040000c40500c2004262c30200c2c20200", INIT_28 => X"020000040000c40500c2004262c30200c2c202006200c24362420300c3020000", INIT_29 => X"c2c24200c2c202006200c24362420300c30200000400004005004262420300c3", INIT_2A => X"bebfc00000004402000043024300420200004402006202c30000440200404200", INIT_2B => X"0000040000400042020000040000c4c26200c2c3c0c202c202a0bebfbd00e0bd", INIT_2C => X"434202000004000040004242020000040000c4c26200c2c3c202006200c24302", INIT_2D => X"00c2434202000004000040004242020000040000c4c26200c2c3c202006200c2", INIT_2E => X"02006200c2434202000004000040004242020000040000c4c20200c2c2020062", INIT_2F => X"00c2c202006200c2434202000004000040004242020000040000c4c24200c2c2", INIT_30 => X"006202c300004402c202006200c2434202000040004242020000040000c4c242", INIT_31 => X"42004202c4a0bebd0000e0bdbebfc00000004402000043024300420200004402", INIT_32 => X"c202c4a0bebd00e0bdbec0020000004302430042024300c36242030243020040", INIT_33 => X"40620243020000020062024302004000c24303c2c000000043030040004200c2", INIT_34 => X"bebd00e0bdbec0024000c2c00000400243030240024300630302004000420200", INIT_35 => X"0000020062024302004000c24303c2c000000043030040004200c2c202c0c4a0", INIT_36 => X"02438242040243024402004042004202004000c2004000c2c2004202c2004202", INIT_37 => X"c200c2c5c4a0bebd00e0bdbec0024000c2c00000430302400240024302430042", INIT_38 => X"00c0c7c6c5c4a0bebfbd00e0bdbec0c200400042430063c46400c3c34300c200", INIT_39 => X"c2c3c2020000c202006202c3004100c2c000404200c2c24200c2430362c3c200", INIT_3A => X"00c200404200c2c2000007624000c3c2c20007624000c3c20000c202c2006200", INIT_3B => X"4062004200c26200c203004000c26283c4c3020242424200c200000202424242", INIT_3C => X"c20040004200c2430362c3c2c24200c2006202c3000000004100c2c24200c200", INIT_3D => X"c362034200c200004300c26200c2030000c4406200c2c30040628200c2044300", INIT_3E => X"c4a0bebd00e0bdbec0004363034202c5c4a0bebd00e0bdbebfc0000000c44062", INIT_3F => X"00c2c5c4a0bebd00e0bdbec0c2004000c2c26200c34200c2c2424200c20000c0" ) port map ( DO => block_do(0)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"00000000000000000000000000000000ff00000800ff1800350035003300b200", INIT_01 => X"000000000000000000000000000000000000072000002000d800d800ff700000", INIT_02 => X"0000000000000010000000000000000000010060006060000000000000000000", INIT_03 => X"0000000000201000000000000000000000000000000000000000000000000000", INIT_04 => X"0000200000f000ff00000000e800000000800010100000000000000000f000ff", INIT_05 => X"0000000000000000000000000000f00000ff00000000e8000000002000ff0000", INIT_06 => X"0000000000000000f00000ff0000000000e80000ff0000000000002000000000", INIT_07 => X"e80000ff000000ff000000002000000000000000200000000000000000000010", INIT_08 => X"0020000000000000000000000007002800380000000000f00000ff0000000000", INIT_09 => X"20f000ff0000000000e80000ff0000000000000000ff000000000000ff000000", INIT_0A => X"0000000000000000e8161600002000ff000100f00000ff00000000e800000000", INIT_0B => X"2a00000256922700000002561227000000002a0000002a0000002a00f00000ff", INIT_0C => X"032800280028000028000000000200280028002800002800000000002a000000", INIT_0D => X"0002230029002900290000290000000002430028002900290000290000000002", INIT_0E => X"2a00000400002a0000002a00000500002a0000002a00000300002a0000002a00", INIT_0F => X"0000002b00000000002b00000000330000002b0000002b00000200002a000000", INIT_10 => X"0000000000000000f00000ff0000000000e8000000000001200030330000002b", INIT_11 => X"010000300000000000ff10000000000000000000000000100000000000000000", INIT_12 => X"0000000000000000000010241800000000012000300010241800000000000000", INIT_13 => X"002b00000033000000330000002b000000000000ff0300000000000000000000", INIT_14 => X"0000000000000000001000000000000000000000f00000ff0000000000e80000", INIT_15 => X"000000ff00000000000000000000100000100000000000000020000010000010", INIT_16 => X"00002b00000033000000330000002b0000000000000100003000002b0000ff00", INIT_17 => X"000000000000000010000000000000000000000000f00000ff0000000000e800", INIT_18 => X"0000ff0000000000000000000010000010000000000000002000001000001000", INIT_19 => X"0000100000100000000000000000001000000001000000000000000000ff0000", INIT_1A => X"00000000ff00000000ff00000000000000000000100000100000000000000020", INIT_1B => X"00002000001000001010ff3f0000000000000000101000000000000000000000", INIT_1C => X"0000000000ff00000000ff000000000000000000001000001010ff3f00000000", INIT_1D => X"000000002000001000001010ff3f000000000000000010000000000000000000", INIT_1E => X"003000002b0000ff00000000ff000000000000000000001000001010ff3f0000", INIT_1F => X"00ff0000000000e80000002b00000033000000330000002b0000000000000100", INIT_20 => X"000000002000001029180000000000000000000010000000000000000012f000", INIT_21 => X"00000000000000000000ff000000000000000000000000000010291800000000", INIT_22 => X"00000000102a180000000000000000200000102a180000000000000000000010", INIT_23 => X"000033000000330000002b000000000000002c0000ff00000000000000000000", INIT_24 => X"001c1c0000001000001e1e000000000000f00000ff0000000000e80000002b00", INIT_25 => X"3000000010000000000000ff0000000000000000000010001000000010001000", INIT_26 => X"00000000102c18000000000000000120003000102c1800000000000000010000", INIT_27 => X"00000120003000102c1800000000000000010000300000001000100000000000", INIT_28 => X"000000000001000030000000100010000000000000000000102c180000000000", INIT_29 => X"000000000000000000000000102c18000000000000000120003000102c180000", INIT_2A => X"0000e80000002b00000033000000330000002b000000000000002c0000ff0000", INIT_2B => X"000000000020002c0000000000000000100000000000430012f00000ff000000", INIT_2C => X"002c0000000000002000002c0000000000000000100000000000000000002c00", INIT_2D => X"0000002c0000000000002000002c000000000000000010000000000000000000", INIT_2E => X"0000000000002c0000000000002000002c000000000000000010000000000000", INIT_2F => X"0000000000000000002c0000000000002000002c000000000000000000000000", INIT_30 => X"0000000000002c00000000000000002c0000002000002c0000000000000000ff", INIT_31 => X"0000330000f000ff000000000000e80000002b00000033000000330000002b00", INIT_32 => X"000000f000ff00000000e8ff0000103300000033000000001035180033000000", INIT_33 => X"0010400080000000000000320000000000000000000000000000000000000000", INIT_34 => X"00ff00000000e8000000000000ff33003300003200000035007f000000330000", INIT_35 => X"00000000000033000000000000000000000000000000000000000000000000f0", INIT_36 => X"000010352000007f330000000000330000000000000000000000008000000080", INIT_37 => X"0000000000f000ff00000000e8000000000000ff330000330032003300000033", INIT_38 => X"000000000000f00000ff00000000e80000ff0000000000000000000000000000", INIT_39 => X"000000ff0000000000000000000000000000ff00000000000000000010000000", INIT_3A => X"0000000000000000101000000000000000100000000000000000000000100000", INIT_3B => X"0010000000001800000000000000001800001616000000000000001616000000", INIT_3C => X"00000000000000000010000000ff00000000ff0000000000ff000000ff000000", INIT_3D => X"0010000000000000000000180000000006002810000000000010100000000000", INIT_3E => X"00f000ff00000000e80000fc0000200000f000ff0000000000e8000006002810", INIT_3F => X"00000000f000ff00000000e80000ff000000100000ff00000000000000000000" ) port map ( DO => block_do(0)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"4c4844403c3834302c2824201c181410980e00ac04fd2a001800b0000000f001", INIT_01 => X"504c4844403c3834302c2824201c18141000cc2410200060125c1058fc005450", INIT_02 => X"0c08040000083c0048080c440840043c006000000800000801681360115c5854", INIT_03 => X"00080c000810121900082c2824201c1814100c08040000082c2824201c181410", INIT_04 => X"00200000082504f80008100c2500000000100012100d1b020014101410250cf0", INIT_05 => X"001800980d00040a000018001318251014e80008080425000000080000fa0200", INIT_06 => X"001020001e101c2025181ce00008181014250000e90000001800982500001801", INIT_07 => X"250000e0001010fc0010009825570014000700982530001400090a0014140f06", INIT_08 => X"9825000010010010001810140016a025a42514a8a8a4a025989c60000820181c", INIT_09 => X"002504f80008a0989c250000e400000010000d1010ff001000080a00ff001000", INIT_0A => X"000000000818101425030000000000fd003c00251014e8000808042501000020", INIT_0B => X"8000008878348c0002008878340c000100ae680000ae540000ae3c0025181ce0", INIT_0C => X"2184009c00b40010d800140200e7070c0024003c00106000140100ae680000ae", INIT_0D => X"00e7450174008c00a40010c800140400e72105fc0014002c00105000140300e7", INIT_0E => X"f800008b00ae680000aee000006300ae680000aec80000fe00ae680000aea800", INIT_0F => X"0000ae5000001300ae4800000700100000ae380000ae2800001400ae680000ae", INIT_10 => X"1403004b10031c18252024d8000820181c250000980a0005250a25100000ae5c", INIT_11 => X"05100a250026001400eb2a00101414020014000b140004100d1a020014100011", INIT_12 => X"0100181c0100030010002170800018000005250a250021708000180000983a00", INIT_13 => X"ae9c00000510000100100000ae7400000d011c00b2e800101002001000982018", INIT_14 => X"001000983a00d4181807002810002c1014302c28252024d80008282024250000", INIT_15 => X"001010ff0100101401000300180021002c80001000982000d425000021002c80", INIT_16 => X"00aee400000510000100100000aed800000d01140005300a2500aec40000d120", INIT_17 => X"1000983a00d418181218002810002d101434302c28252024d800082820242500", INIT_18 => X"1010ff0100101401000300180021002c80001000982000d425000021002c8000", INIT_19 => X"000021003080001000983a00d4181812180028230010002f1000980a00d00600", INIT_1A => X"00980a00ce06001010ff0100101401000300180021003080001000982000d425", INIT_1B => X"00d42500002100348021ffff1000983a00d4181812100d1a0200281000341001", INIT_1C => X"0100980a00c90a001010ff010010140100030018002100348021ffff10009820", INIT_1D => X"982000d42500002100388021ffff1000983a00d41818100d1a02002810003310", INIT_1E => X"0a2500aef00000ca0a001010ff010010140100030018002100388021ffff1000", INIT_1F => X"24d80008282024250000aee400000510000100100000aed800000d011400053c", INIT_20 => X"982000d425000021ec8000100000983a00d41c1c21001018002b101418342520", INIT_21 => X"001018002b1000980a00d20a00101001001014010003001c0021ec8000100000", INIT_22 => X"03001c0021148000100000982000d425000021148000100000983a00d41c1c23", INIT_23 => X"000510000100100000aed800000d011400ae140000d20a001010010010140100", INIT_24 => X"10030000100c21101003000010001f1014259094680008282024250000aee400", INIT_25 => X"2518000c21101000871000de0a0010100100103c001021108000101c21104000", INIT_26 => X"030018002158800010000098200005250a250021588000100000983a0005180a", INIT_27 => X"200005250a250021588000100000983a0005180a2518001c2110400010140100", INIT_28 => X"0000983a0005180a2518003c2110800010140100030018002158800010000098", INIT_29 => X"10100100101401000300180021588000100000980a0005250a25002158800010", INIT_2A => X"9094250000aee400000510000100100000aed800000d011400ae300000760a00", INIT_2B => X"00982000d42500800000983a00d41c1c240018141018211434252024d8000898", INIT_2C => X"04800000982000d4250004800000983a00d41c1c2500181410010003001c8000", INIT_2D => X"001c08800000982000d4250008800000983a00d41c1c2600181410010003001c", INIT_2E => X"010003001c0c800000982000d425000c800000983a00d41c1c27001410010003", INIT_2F => X"001410010003001c10800000982000d4250010800000983a00d41c1c12001410", INIT_30 => X"000d011000ae400010010003001c14800000d4250014800000983a00d41c1cee", INIT_31 => X"0f002400082504f8000008282024250000aee400000510000100100000aed800", INIT_32 => X"000110250cf00008080425ff0002252400010024000000082130800024000013", INIT_33 => X"0b24000000001f01000401f0000006000000321000002a000732000600000010", INIT_34 => X"14e80008100c25030000100000d82c00280100f00000003000fc000600240000", INIT_35 => X"003401000401280000060000005d1800003f00075d0006000000180001041825", INIT_36 => X"00002170800000fc200000100f00200000160008001a00040800000004000004", INIT_37 => X"0000101410250cf00008181425030000180000c32c01002800f0002000010020", INIT_38 => X"0a104c48444025383cc00008100c250000f20000000000140100141001001000", INIT_39 => X"184018ff0003180100050a48000500402f00f30f001010010010102021101000", INIT_3A => X"0010000a0a00101c12100d1b02001c4810100d1b02001c48003e140e1c121800", INIT_3B => X"0b2a0000004c2300140f000c001c102110140300ff57ff001000080300ff30ff", INIT_3C => X"4c000b0000004c102d21101414ff0014000aff1800000200c0001414ff001400", INIT_3D => X"20230f00004c000c00004c2300140f00f844252100142000122a2300140f0000", INIT_3E => X"10250cf000080804250000180360000c082504f8000840383c250000f8442521", INIT_3F => X"00080c082504f80008100c250000f1001010240010ff001000ff010000000d00" ) port map ( DO => block_do(0)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(0), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block0 block1: if (block_count > 1) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"00008f8faf000c8faf0000008f00008fafaf03afaf270003278f030000008f00", INIT_01 => X"8f0000003c8fac008fac008fac008f30008fafafafafaf03af270003278f8f03", INIT_02 => X"0010248f001428008faf24008faf00008f0030003000008f8c008f0010afac00", INIT_03 => X"10240014008f8f001024001000008f8c008f001024001000008f8c008f001024", INIT_04 => X"03af270003278f0300008faf03af270003278f0300001024001028008c008f00", INIT_05 => X"3c000c243c000c343c343caf24afaf03afafaf27000003278f030000343c8faf", INIT_06 => X"0004008c340010ac24ac343c24ae000c242424000c243cac008f343caf008c34", INIT_07 => X"8fae000c242424000c24000c0024008f000c243c0014248faf000c8faf008c24", INIT_08 => X"000000000003278f8f8f0300000c00142c008fac008f24af000c8f0010af2400", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000102040912000000", INIT_0F => X"fffffffffffffffffffffffffffffffffffffffffffffefcf9f2e4c992000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000606060606050000000000", INIT_13 => X"0000000000000000000000000000000000000000000000010101010101000000", INIT_14 => X"3d3d3d3d3d3d676620740a0a747320650a000000000000000000000000000000", INIT_15 => X"694c7363726d69546e616f6269546f6175206467730a00696920746c6c67730a", INIT_16 => X"4e490a007420696c54004546455000454d500a6469540030617261736d657061", INIT_17 => X"544c4c0a0a53200a4c2000454e490a0044414f4c41454e490a0044414f4c4145", INIT_18 => X"0000000000000000000054204945540a54204d0a542043422f440a2054494920", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000102040912000000000000000000000000000000", INIT_1F => X"fffffffffffffffffffffefcf9f2e4c992000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000606060606050000000000000000000000000000000000", INIT_23 => X"0000000000000000000000010101010101000000000000000000000000000000", INIT_24 => X"7566542055000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000072756570695300736e61756369670a0a727475526e2068616e", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"6200c2c3c20000c4c2430300c30200c2c5c4a0bebfbd00e0bdbec0620200c202", INIT_01 => X"c240026202c34000c24000c24300c24300c2c0c7c6c5c4a0bebd00e0bdbebfc0", INIT_02 => X"006202c300404200c2c24200c2c24300c2404202424300c24300c20000c04300", INIT_03 => X"0002006200c2c300000200404300c24300c200000200404300c24300c2000002", INIT_04 => X"a0bebd00e0bdbec00200c2c4a0bebd00e0bdbec000000002004042004200c200", INIT_05 => X"0200004402000044024502c202c5c4a0b0bebfbd0000e0bdbec002624202c3c4", INIT_06 => X"00400042020000400243630302020000040510000044024300c34202c2004242", INIT_07 => X"c20200000405100000040000400500c200004402006202c3c20000c4c2004202", INIT_08 => X"0000000000e0bdb0bebfc000000000404200c24300c302c20000c40000c24200", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"00000000000000000000000000000000010204091224489123468d1a34000000", INIT_0F => X"fffffffffffffffffffffffffffffefcf9f2e4c99224489123468d1a34000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000ffffff", INIT_11 => X"0000000000000000000000000000000000000003030303030300000000000000", INIT_12 => X"02010000000000000000000000000000010101020515100b0500fb1a150f0a05", INIT_13 => X"0000000000000000000000000000000000000000000001504f4e4d4c4b050403", INIT_14 => X"0a3d3d3d3d3d0a747369540a656d707247000000000000000000000000000000", INIT_15 => X"6e69736379656e65737470696e656e63622f6920740a006f762f69697420740a", INIT_16 => X"554d0a0073746c206f00444144410053414c0a6f6e6500306e206c206220726c", INIT_17 => X"4949540a0a45500a4546005347460a0021534e414c52554d0a0021494e414c52", INIT_18 => X"0000000000000000000020544f52200a20544f0a2054545420450a00454f562f", INIT_19 => X"00000000000000000000000000000000000000000000000000000000ff000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"00000000010204091224489123468d1a34000000000000000000000000000000", INIT_1F => X"fffffefcf9f2e4c99224489123468d1a34000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000ffffffffffffffffffffffffffffff", INIT_21 => X"0000000000000003030303030300000000000000000000000000000000000000", INIT_22 => X"00000000010101020515100b0500fb1a150f0a05000000000000000000000000", INIT_23 => X"0000000000000000000001504f4e4d4c4b050403020100000000000000000000", INIT_24 => X"20203a5441000000000000000000000000000000000000000000000000000000", INIT_25 => X"00000000000000206d74616e65007420746e6f6e690a006b2074542074696420", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"100000000000070000101f00001000000000f00000ff00000000e8101400001f", INIT_01 => X"001814100f000000000000000000000000000000000000f000ff0000000000e8", INIT_02 => X"0000000000ff0000000000000000100000180010001000000000000000000000", INIT_03 => X"0000000000000000000000001000000000000000000000100000000000000000", INIT_04 => X"f000ff00000000e817000000f000ff00000000e8100000000000000000000000", INIT_05 => X"200000320000007801c20000000000f0000000ff0000000000e81010ff1f0000", INIT_06 => X"00000000800000007f00ff0f7f00000700007f00003200000000002000000000", INIT_07 => X"0000000700007f0000000001200030000000320000000000000008000000007f", INIT_08 => X"00000000000000000000e810000100ff0300000000007f000008000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0101010101010101010101010101010000000000000000000000000000000000", INIT_0B => X"0202020201010101010101010101010101010101010101010101010101010101", INIT_0C => X"0202020202020202020202020202020202020202020202020202020202020202", INIT_0D => X"0303030303030303030303030303030303030303030303030303030303030202", INIT_0E => X"0000000000000000010204091224489123468d1a3468d1a2458a152b56030303", INIT_0F => X"fffffffffffffefcf9f2e4c99224489123468d1a3468d1a2458a152b56000000", INIT_10 => X"0000000000000000000000000000000000080808080707000000000000ffffff", INIT_11 => X"000000000000000000000000000000000101039e9b9794918e0f0c0906030000", INIT_12 => X"46230000000000000000000095a8c0e00d50c1a1439e5b17d4914e4f0cc98643", INIT_13 => X"1212121212000000000000000000202429303a48619123c7a4815d3a17b08d69", INIT_14 => X"003d3d3d3d3d0069686e650073616c6165121212121212121212121212121212", INIT_15 => X"67730a65206d67730a69657467730a7474206e616954006e69206f63696d6954", INIT_16 => X"4d4550003a65656674002149215300542041006e6773003020746c73656e696c", INIT_17 => X"4f43494d0044410044410054205453000a53205443204d4550000a4c20544320", INIT_18 => X"0000000000000000000000454e414f420045524d00454f5253524100534e4920", INIT_19 => X"00000000000000000000000000000000000000000000000000001212ed515302", INIT_1A => X"0101010000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0101010101010101010101010101010101010101010101010101010101010101", INIT_1C => X"0202020202020202020202020202020202020202020202020101010101010101", INIT_1D => X"0303030303030303030303030303030303030202020202020202020202020202", INIT_1E => X"1224489123468d1a3468d1a2458a152b56030303030303030303030303030303", INIT_1F => X"9224489123468d1a3468d1a2458a152b56000000000000000000000001020409", INIT_20 => X"0000000000080808080707000000000000fffffffffffffffffffefcf9f2e4c9", INIT_21 => X"000000000101039e9b9794918e0f0c0906030000000000000000000000000000", INIT_22 => X"95a8c0e00d50c1a1439e5b17d4914e4f0cc98643000000000000000000000000", INIT_23 => X"0000202429303a48619123c7a4815d3a17b08d69462300000000000000000000", INIT_24 => X"6379204552121212121212121212121212121212121212121200000000000000", INIT_25 => X"0000000000000000622063676e000a7469696d676e4200737770205568732072", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"250014101400dc101025400020400024242025181ce000080804252500000c00", INIT_01 => X"20250224ff1000001c000018000014ff0010041c181410250cf0000820181c25", INIT_02 => X"0004010400ea080000000100000421000425ff2b010700000000140013000000", INIT_03 => X"0c04000400181c00140300042a002400001c001f0200042a0024000018002a01", INIT_04 => X"2504f80008080425420008082504f80008100c25250002050004020000002000", INIT_05 => X"0000ae6c000080407d000110013c38252c3034c80000080804254224feff0808", INIT_06 => X"002e000000003300fc00fffffc0000f90103fc00aea800000014300014000050", INIT_07 => X"100000f90103fc00980a0005250a251000aecc00001a011c1c009118180000fc", INIT_08 => X"0b0705030008382c30342525006000cae90010000020fc20009d180009100100", INIT_09 => X"9d97958b89837f716d6b67656159534f4947433d3b352f2b29251f1d1713110d", INIT_0A => X"5b514b3d393733251b19150f0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a3", INIT_0B => X"231d0b09fdf7f3ebe7dfd3cfcdc9c1bbb7b1afa5a399918d857f7b756f67615d", INIT_0C => X"efe7e3ddd7cfc5bdb3aba5a195938d878381776b69655f5957514b413b39332d", INIT_0D => X"d1cbc7b9b3ada9a1978f8b7773716d5f5b5955473d3b37352b291d130501f9f5", INIT_0E => X"010204091224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78e5dfd7", INIT_0F => X"f9f2e4c99224489123468d1a3468d1a2458a152b56ac59b367cf9e3c78000000", INIT_10 => X"070001020301010000000101010102030718110a03fcf5231c150e0700fffefc", INIT_11 => X"0000010303010100010059647285a0c80b90212807e6c5a483a5846342210007", INIT_12 => X"8a4500030103030001000100ae6472856dc80b90212807e6c5a483a584634221", INIT_13 => X"38373635340005010300010001005d689c8b41d117a245c8833ef9b46f5914cf", INIT_14 => X"003d3d3d3d3d006e696773007420616c6e2b2c2d2e2f30313233343d3c3b3a39", INIT_15 => X"20740073616f2074006f722020740069727367646e65000a73646e6170756e65", INIT_16 => X"422052002073646161000a4c00530020545300652074000a3168656d72756d20", INIT_17 => X"4e4150550021530021490020544948000a4550495543422052000a4546495543", INIT_18 => X"0908070605040302010000535354504900535945005352415520440054205344", INIT_19 => X"6159534f4947433d3b352f2b29251f1d1713110d0b07050300002246cb153520", INIT_1A => X"0d0701fbf1efe9e5e3dfd3c7c5c1bfb5b3ada7a39d97958b89837f716d6b6765", INIT_1B => X"cdc9c1bbb7b1afa5a399918d857f7b756f67615d5b514b3d393733251b19150f", INIT_1C => X"95938d878381776b69655f5957514b413b39332d231d0b09fdf7f3ebe7dfd3cf", INIT_1D => X"73716d5f5b5955473d3b37352b291d130501f9f5efe7e3ddd7cfc5bdb3aba5a1", INIT_1E => X"3468d1a2458a152b56ac59b367cf9e3c78e5dfd7d1cbc7b9b3ada9a1978f8b77", INIT_1F => X"3468d1a2458a152b56ac59b367cf9e3c78000000010204091224489123468d1a", INIT_20 => X"010102030718110a03fcf5231c150e0700fffefcf9f2e4c99224489123468d1a", INIT_21 => X"7285a0c80b90212807e6c5a483a5846342210007070001020301010000000101", INIT_22 => X"ae6472856dc80b90212807e6c5a483a584634221000001030301010001005964", INIT_23 => X"01005d689c8b41d117a245c8833ef9b46f5914cf8a4500030103030001000100", INIT_24 => X"616f4953542b2c2d2e2f30313233343d3c3b3a39383736353400050103000100", INIT_25 => X"0000000100000000656e6b2064000a656f636d206e6500216f756f41652c7465", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(1)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(1), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block1 block2: if (block_count > 2) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(2)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(2), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block2 block3: if (block_count > 3) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(3)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(3), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block3 block4: if (block_count > 4) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(4)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(4), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block4 block5: if (block_count > 5) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(5)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(5), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block5 block6: if (block_count > 6) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(6)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(6), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block6 block7: if (block_count > 7) generate begin ram_byte3 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(31 downto 24), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(31 downto 24), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(3)); ram_byte2 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(23 downto 16), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(23 downto 16), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(2)); ram_byte1 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(15 downto 8), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(15 downto 8), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(1)); ram_byte0 : RAMB16_S9 generic map ( INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000", INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000" ) port map ( DO => block_do(7)(7 downto 0), DOP => open, ADDR => block_addr, CLK => clk, DI => data_write(7 downto 0), DIP => ZERO(0 downto 0), EN => block_enable(7), SSR => ZERO(0), WE => write_byte_enable(0)); end generate; --block7 end; --architecture logic
-- $Id: nexys3_fusp_dummy.vhd 1181 2019-07-08 17:00:50Z mueller $ -- SPDX-License-Identifier: GPL-3.0-or-later -- Copyright 2011- by Walter F.J. Mueller <[email protected]> -- ------------------------------------------------------------------------------ -- Module Name: nexys3_dummy - syn -- Description: nexys3 minimal target (base; serport loopback) -- -- Dependencies: - -- To test: tb_nexys3 -- Target Devices: generic -- Tool versions: xst 13.1; ghdl 0.29 -- -- Revision History: -- Date Rev Version Comment -- 2011-11-26 433 1.1 use nxcramlib -- 2011-11-25 432 1.0 Initial version (derived from nexys2_fusp_dummy) ------------------------------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use work.slvtypes.all; use work.nxcramlib.all; entity nexys3_fusp_dummy is -- NEXYS 3 dummy (base+fusp; loopback) -- implements nexys3_fusp_aif port ( I_CLK100 : in slbit; -- 100 MHz board clock I_RXD : in slbit; -- receive data (board view) O_TXD : out slbit; -- transmit data (board view) I_SWI : in slv8; -- n3 switches I_BTN : in slv5; -- n3 buttons O_LED : out slv8; -- n3 leds O_ANO_N : out slv4; -- 7 segment disp: anodes (act.low) O_SEG_N : out slv8; -- 7 segment disp: segments (act.low) O_MEM_CE_N : out slbit; -- cram: chip enable (act.low) O_MEM_BE_N : out slv2; -- cram: byte enables (act.low) O_MEM_WE_N : out slbit; -- cram: write enable (act.low) O_MEM_OE_N : out slbit; -- cram: output enable (act.low) O_MEM_ADV_N : out slbit; -- cram: address valid (act.low) O_MEM_CLK : out slbit; -- cram: clock O_MEM_CRE : out slbit; -- cram: command register enable I_MEM_WAIT : in slbit; -- cram: mem wait O_MEM_ADDR : out slv23; -- cram: address lines IO_MEM_DATA : inout slv16; -- cram: data lines O_PPCM_CE_N : out slbit; -- ppcm: ... O_PPCM_RST_N : out slbit; -- ppcm: ... O_FUSP_RTS_N : out slbit; -- fusp: rs232 rts_n I_FUSP_CTS_N : in slbit; -- fusp: rs232 cts_n I_FUSP_RXD : in slbit; -- fusp: rs232 rx O_FUSP_TXD : out slbit -- fusp: rs232 tx ); end nexys3_fusp_dummy; architecture syn of nexys3_fusp_dummy is begin O_TXD <= I_RXD; -- loop back O_FUSP_TXD <= I_FUSP_RXD; O_FUSP_RTS_N <= I_FUSP_CTS_N; CRAM : nx_cram_dummy -- connect CRAM to protection dummy port map ( O_MEM_CE_N => O_MEM_CE_N, O_MEM_BE_N => O_MEM_BE_N, O_MEM_WE_N => O_MEM_WE_N, O_MEM_OE_N => O_MEM_OE_N, O_MEM_ADV_N => O_MEM_ADV_N, O_MEM_CLK => O_MEM_CLK, O_MEM_CRE => O_MEM_CRE, I_MEM_WAIT => I_MEM_WAIT, O_MEM_ADDR => O_MEM_ADDR, IO_MEM_DATA => IO_MEM_DATA ); O_PPCM_CE_N <= '1'; -- keep parallel PCM memory disabled O_PPCM_RST_N <= '1'; -- end syn;
library ieee; use ieee.std_logic_1164.all; entity SyncReg is generic (n: integer := 4); port ( Din: in std_logic_vector(n-1 downto 0); EN: in std_logic; CLK: in std_logic; DOut: out std_logic_vector(n-1 downto 0) ); end SyncReg; architecture Struct of SyncReg is component DESync port ( D, E, CLK : in std_logic; Q : out std_logic ); end component; signal buf: std_logic_vector(n-1 downto 0); Begin sch: for i in n-1 downto 0 generate U_J: DESync port map(DIn(i), en, CLK, buf(i)); end generate; Dout <= buf; End Struct; Architecture Beh of SyncReg is signal reg: std_logic_vector(n-1 downto 0); Begin Main: process (Din, EN, CLK) begin if en = '1' then if (rising_edge(CLK)) then reg <= Din; end if; end if; end process; DOut <= reg; End Beh;
entity wave4 is end entity; library ieee; use ieee.std_logic_1164.all; architecture test of wave4 is type mem_t is array (natural range <>) of std_logic_vector(7 downto 0); signal mem : mem_t(0 to 9); signal dout : std_logic_vector(7 downto 0); signal addr : natural range 0 to 7; begin dout <= mem(addr); main: process is begin mem(2) <= X"01"; mem(5) <= X"55" after 1 ns; addr <= 5 after 10 ns; wait; end process; end architecture;
---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 10:45:34 10/22/2015 -- Design Name: -- Module Name: register16_with_we - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --use IEEE.NUMERIC_STD.ALL; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity register16_with_we is Port ( clk : in STD_LOGIC; reset : in STD_LOGIC; d : in STD_LOGIC_VECTOR (15 downto 0); q : out STD_LOGIC_VECTOR (15 downto 0); we : in STD_LOGIC); end register16_with_we; architecture Behavioral of register16_with_we is -- Intermediate Signals -- begin process (clk, reset) begin if reset = '1' then q <= "0000000000010011"; elsif rising_edge(clk) and we = '1' then q <= d; end if; end process; end Behavioral;
-- Automatically generated VHDL-93 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; use IEEE.MATH_REAL.ALL; use std.textio.all; use work.all; use work.packetprocessordf_types.all; entity packetprocessordf_moore is port(w3 : in std_logic_vector(28 downto 0); -- clock system1000 : in std_logic; -- asynchronous reset: active low system1000_rstn : in std_logic; s1 : out packetprocessordf_types.counterstate); end; architecture structural of packetprocessordf_moore is signal s1_app_arg : packetprocessordf_types.counterstate; signal s1_rec : packetprocessordf_types.counterstate; begin packetprocessordf_cnt_s1_app_arg : entity packetprocessordf_cnt port map (result => s1_app_arg ,s => s1_rec ,x => w3); -- register begin packetprocessordf_moore_register : process(system1000,system1000_rstn) begin if system1000_rstn = '0' then s1_rec <= (counterstate_sel0 => to_unsigned(0,11),counterstate_sel1 => to_unsigned(2047,11),counterstate_sel2 => to_unsigned(0,4),counterstate_sel3 => to_unsigned(0,16),counterstate_sel4 => std_logic_vector'("0" & "00000000"),counterstate_sel5 => false,counterstate_sel6 => packetprocessordf_types.array_of_tup3'((tup3_sel0 => to_unsigned(2047,11),tup3_sel1 => to_unsigned(0,8),tup3_sel2 => to_unsigned(0,8)),(tup3_sel0 => to_unsigned(2047,11),tup3_sel1 => to_unsigned(0,8),tup3_sel2 => to_unsigned(0,8)),(tup3_sel0 => to_unsigned(2047,11),tup3_sel1 => to_unsigned(0,8),tup3_sel2 => to_unsigned(0,8)),(tup3_sel0 => to_unsigned(2047,11),tup3_sel1 => to_unsigned(0,8),tup3_sel2 => to_unsigned(0,8))),counterstate_sel7 => to_unsigned(0,2),counterstate_sel8 => false); elsif rising_edge(system1000) then s1_rec <= s1_app_arg; end if; end process; -- register end s1 <= s1_rec; end;
-- Automatically generated VHDL-93 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; use IEEE.MATH_REAL.ALL; use std.textio.all; use work.all; use work.packetprocessordf_types.all; entity packetprocessordf_moore is port(w3 : in std_logic_vector(28 downto 0); -- clock system1000 : in std_logic; -- asynchronous reset: active low system1000_rstn : in std_logic; s1 : out packetprocessordf_types.counterstate); end; architecture structural of packetprocessordf_moore is signal s1_app_arg : packetprocessordf_types.counterstate; signal s1_rec : packetprocessordf_types.counterstate; begin packetprocessordf_cnt_s1_app_arg : entity packetprocessordf_cnt port map (result => s1_app_arg ,s => s1_rec ,x => w3); -- register begin packetprocessordf_moore_register : process(system1000,system1000_rstn) begin if system1000_rstn = '0' then s1_rec <= (counterstate_sel0 => to_unsigned(0,11),counterstate_sel1 => to_unsigned(2047,11),counterstate_sel2 => to_unsigned(0,4),counterstate_sel3 => to_unsigned(0,16),counterstate_sel4 => std_logic_vector'("0" & "00000000"),counterstate_sel5 => false,counterstate_sel6 => packetprocessordf_types.array_of_tup3'((tup3_sel0 => to_unsigned(2047,11),tup3_sel1 => to_unsigned(0,8),tup3_sel2 => to_unsigned(0,8)),(tup3_sel0 => to_unsigned(2047,11),tup3_sel1 => to_unsigned(0,8),tup3_sel2 => to_unsigned(0,8)),(tup3_sel0 => to_unsigned(2047,11),tup3_sel1 => to_unsigned(0,8),tup3_sel2 => to_unsigned(0,8)),(tup3_sel0 => to_unsigned(2047,11),tup3_sel1 => to_unsigned(0,8),tup3_sel2 => to_unsigned(0,8))),counterstate_sel7 => to_unsigned(0,2),counterstate_sel8 => false); elsif rising_edge(system1000) then s1_rec <= s1_app_arg; end if; end process; -- register end s1 <= s1_rec; end;