📄 leaves.vhd
字号:
U22: XXOR1 port map(A(I),B(I),CARRY(I),PHI,SUM(I));end generate U2;U1: BLOCK1A port map(PBIT,CARRY(0),CARRY(64),PHI,COUT);end XORSTAGE;-- The DBLC-tree: All levels encapsulatedlibrary ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLCTREE_64 isport( PIN:in std_logic_vector(0 to 63); GIN:in std_logic_vector(0 to 64); PHI:in std_logic; GOUT:out std_logic_vector(0 to 64); POUT:out std_logic_vector(0 to 0));end DBLCTREE_64;architecture DBLCTREE of DBLCTREE_64 issignal INTPROP_0: std_logic_vector(0 to 62);signal INTGEN_0: std_logic_vector(0 to 64);signal INTPROP_1: std_logic_vector(0 to 60);signal INTGEN_1: std_logic_vector(0 to 64);signal INTPROP_2: std_logic_vector(0 to 56);signal INTGEN_2: std_logic_vector(0 to 64);signal INTPROP_3: std_logic_vector(0 to 48);signal INTGEN_3: std_logic_vector(0 to 64);signal INTPROP_4: std_logic_vector(0 to 32);signal INTGEN_4: std_logic_vector(0 to 64);begin -- Architecture DBLCTREEU_0: DBLC_0_64 port map(PIN=>PIN,GIN=>GIN,PHI=>PHI,POUT=>INTPROP_0,GOUT=>INTGEN_0);U_1: DBLC_1_64 port map(PIN=>INTPROP_0,GIN=>INTGEN_0,PHI=>PHI,POUT=>INTPROP_1,GOUT=>INTGEN_1);U_2: DBLC_2_64 port map(PIN=>INTPROP_1,GIN=>INTGEN_1,PHI=>PHI,POUT=>INTPROP_2,GOUT=>INTGEN_2);U_3: DBLC_3_64 port map(PIN=>INTPROP_2,GIN=>INTGEN_2,PHI=>PHI,POUT=>INTPROP_3,GOUT=>INTGEN_3);U_4: DBLC_4_64 port map(PIN=>INTPROP_3,GIN=>INTGEN_3,PHI=>PHI,POUT=>INTPROP_4,GOUT=>INTGEN_4);U_5: DBLC_5_64 port map(PIN=>INTPROP_4,GIN=>INTGEN_4,PHI=>PHI,POUT=>POUT,GOUT=>GOUT);end DBLCTREE;library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLCADDER_64_64 isport( OPA:in std_logic_vector(0 to 63); OPB:in std_logic_vector(0 to 63); CIN:in std_logic; PHI:in std_logic; SUM:out std_logic_vector(0 to 63); COUT:out std_logic);end DBLCADDER_64_64;architecture DBLCADDER of DBLCADDER_64_64 issignal INTPROP: std_logic_vector(0 to 63);signal INTGEN: std_logic_vector(0 to 64);signal PBIT:std_logic_vector(0 to 0);signal CARRY: std_logic_vector(0 to 64);begin -- Architecture DBLCADDERU1: PRESTAGE_64 port map(OPA,OPB,CIN,PHI,INTPROP,INTGEN);U2: DBLCTREE_64 port map(INTPROP,INTGEN,PHI,CARRY,PBIT);U3: XORSTAGE_64 port map(OPA(0 to 63),OPB(0 to 63),PBIT(0),PHI,CARRY(0 to 64),SUM,COUT);end DBLCADDER;-------------------------------------------------------------- END: Architectures used with the DBLC adder------------------------------------------------------------library ieee;use ieee.std_logic_1164.all;entity XXOR2 isport( A,B,GIN,PHI:in std_logic; SUM:out std_logic);end XXOR2;architecture XXOR_true of XXOR2 isbegin SUM <= (A xor B) xor GIN;end XXOR_true;---- Modgen adder created Fri Aug 16 14:47:23 2002--library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLC_0_32 isport( PIN: in std_logic_vector(0 to 31); GIN: in std_logic_vector(0 to 32); PHI: in std_logic; POUT: out std_logic_vector(0 to 30); GOUT: out std_logic_vector(0 to 32));end DBLC_0_32;architecture DBLC_0 of DBLC_0_32 isbegin -- Architecture DBLC_0U1: for I in 0 to 0 generate U11: INVBLOCK port map(GIN(I),PHI,GOUT(I));end generate U1;U2: for I in 1 to 1 generate U21: BLOCK1A port map(PIN(I-1),GIN(I-1),GIN(I),PHI,GOUT(I));end generate U2;U3: for I in 2 to 32 generate U31: BLOCK1 port map(PIN(I-2),PIN(I-1),GIN(I-1),GIN(I),PHI,POUT(I-2),GOUT(I));end generate U3;end DBLC_0;-- The DBLC-tree: Level 1library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLC_1_32 isport( PIN: in std_logic_vector(0 to 30); GIN: in std_logic_vector(0 to 32); PHI: in std_logic; POUT: out std_logic_vector(0 to 28); GOUT: out std_logic_vector(0 to 32));end DBLC_1_32;architecture DBLC_1 of DBLC_1_32 isbegin -- Architecture DBLC_1U1: for I in 0 to 1 generate U11: INVBLOCK port map(GIN(I),PHI,GOUT(I));end generate U1;U2: for I in 2 to 3 generate U21: BLOCK2A port map(PIN(I-2),GIN(I-2),GIN(I),PHI,GOUT(I));end generate U2;U3: for I in 4 to 32 generate U31: BLOCK2 port map(PIN(I-4),PIN(I-2),GIN(I-2),GIN(I),PHI,POUT(I-4),GOUT(I));end generate U3;end DBLC_1;-- The DBLC-tree: Level 2library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLC_2_32 isport( PIN: in std_logic_vector(0 to 28); GIN: in std_logic_vector(0 to 32); PHI: in std_logic; POUT: out std_logic_vector(0 to 24); GOUT: out std_logic_vector(0 to 32));end DBLC_2_32;architecture DBLC_2 of DBLC_2_32 isbegin -- Architecture DBLC_2U1: for I in 0 to 3 generate U11: INVBLOCK port map(GIN(I),PHI,GOUT(I));end generate U1;U2: for I in 4 to 7 generate U21: BLOCK1A port map(PIN(I-4),GIN(I-4),GIN(I),PHI,GOUT(I));end generate U2;U3: for I in 8 to 32 generate U31: BLOCK1 port map(PIN(I-8),PIN(I-4),GIN(I-4),GIN(I),PHI,POUT(I-8),GOUT(I));end generate U3;end DBLC_2;-- The DBLC-tree: Level 3library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLC_3_32 isport( PIN: in std_logic_vector(0 to 24); GIN: in std_logic_vector(0 to 32); PHI: in std_logic; POUT: out std_logic_vector(0 to 16); GOUT: out std_logic_vector(0 to 32));end DBLC_3_32;architecture DBLC_3 of DBLC_3_32 isbegin -- Architecture DBLC_3U1: for I in 0 to 7 generate U11: INVBLOCK port map(GIN(I),PHI,GOUT(I));end generate U1;U2: for I in 8 to 15 generate U21: BLOCK2A port map(PIN(I-8),GIN(I-8),GIN(I),PHI,GOUT(I));end generate U2;U3: for I in 16 to 32 generate U31: BLOCK2 port map(PIN(I-16),PIN(I-8),GIN(I-8),GIN(I),PHI,POUT(I-16),GOUT(I));end generate U3;end DBLC_3;-- The DBLC-tree: Level 4library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLC_4_32 isport( PIN: in std_logic_vector(0 to 16); GIN: in std_logic_vector(0 to 32); PHI: in std_logic; POUT: out std_logic_vector(0 to 0); GOUT: out std_logic_vector(0 to 32));end DBLC_4_32;architecture DBLC_4 of DBLC_4_32 isbegin -- Architecture DBLC_4 GOUT(0 to 15) <= GIN(0 to 15);U2: for I in 16 to 31 generate U21: BLOCK1A port map(PIN(I-16),GIN(I-16),GIN(I),PHI,GOUT(I));end generate U2;U3: for I in 32 to 32 generate U31: BLOCK1 port map(PIN(I-32),PIN(I-16),GIN(I-16),GIN(I),PHI,POUT(I-32),GOUT(I));end generate U3;end DBLC_4;library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity XORSTAGE_32 isport( A: in std_logic_vector(0 to 31); B: in std_logic_vector(0 to 31); PBIT, PHI: in std_logic; CARRY: in std_logic_vector(0 to 32); SUM: out std_logic_vector(0 to 31); COUT: out std_logic);end XORSTAGE_32;architecture XORSTAGE of XORSTAGE_32 isbegin -- XORSTAGEU2:for I in 0 to 15 generate U22: XXOR1 port map(A(I),B(I),CARRY(I),PHI,SUM(I));end generate U2;U3:for I in 16 to 31 generate U33: XXOR2 port map(A(I),B(I),CARRY(I),PHI,SUM(I));end generate U3;U1: BLOCK2A port map(PBIT,CARRY(0),CARRY(32),PHI,COUT);end XORSTAGE;library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity PRESTAGE_32 isport( A: in std_logic_vector(0 to 31); B: in std_logic_vector(0 to 31); CIN: in std_logic; PHI: in std_logic; POUT: out std_logic_vector(0 to 31); GOUT: out std_logic_vector(0 to 32));end PRESTAGE_32;architecture PRESTAGE of PRESTAGE_32 isbegin -- PRESTAGEU1:for I in 0 to 31 generate U11: BLOCK0 port map(A(I),B(I),PHI,POUT(I),GOUT(I+1));end generate U1;U2: INVBLOCK port map(CIN,PHI,GOUT(0));end PRESTAGE;-- The DBLC-tree: All levels encapsulatedlibrary ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLCTREE_32 isport( PIN:in std_logic_vector(0 to 31); GIN:in std_logic_vector(0 to 32); PHI:in std_logic; GOUT:out std_logic_vector(0 to 32); POUT:out std_logic_vector(0 to 0));end DBLCTREE_32;architecture DBLCTREE of DBLCTREE_32 issignal INTPROP_0: std_logic_vector(0 to 30);signal INTGEN_0: std_logic_vector(0 to 32);signal INTPROP_1: std_logic_vector(0 to 28);signal INTGEN_1: std_logic_vector(0 to 32);signal INTPROP_2: std_logic_vector(0 to 24);signal INTGEN_2: std_logic_vector(0 to 32);signal INTPROP_3: std_logic_vector(0 to 16);signal INTGEN_3: std_logic_vector(0 to 32);begin -- Architecture DBLCTREEU_0: DBLC_0_32 port map(PIN=>PIN,GIN=>GIN,PHI=>PHI,POUT=>INTPROP_0,GOUT=>INTGEN_0);U_1: DBLC_1_32 port map(PIN=>INTPROP_0,GIN=>INTGEN_0,PHI=>PHI,POUT=>INTPROP_1,GOUT=>INTGEN_1);U_2: DBLC_2_32 port map(PIN=>INTPROP_1,GIN=>INTGEN_1,PHI=>PHI,POUT=>INTPROP_2,GOUT=>INTGEN_2);U_3: DBLC_3_32 port map(PIN=>INTPROP_2,GIN=>INTGEN_2,PHI=>PHI,POUT=>INTPROP_3,GOUT=>INTGEN_3);U_4: DBLC_4_32 port map(PIN=>INTPROP_3,GIN=>INTGEN_3,PHI=>PHI,POUT=>POUT,GOUT=>GOUT);end DBLCTREE;library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLCADDER_32_32 isport( OPA:in std_logic_vector(0 to 31); OPB:in std_logic_vector(0 to 31); CIN:in std_logic; PHI:in std_logic; SUM:out std_logic_vector(0 to 31); COUT:out std_logic);end DBLCADDER_32_32;architecture DBLCADDER of DBLCADDER_32_32 issignal INTPROP: std_logic_vector(0 to 31);signal INTGEN: std_logic_vector(0 to 32);signal PBIT:std_logic_vector(0 to 0);signal CARRY: std_logic_vector(0 to 32);begin -- Architecture DBLCADDERU1: PRESTAGE_32 port map(OPA,OPB,CIN,PHI,INTPROP,INTGEN);U2: DBLCTREE_32 port map(INTPROP,INTGEN,PHI,CARRY,PBIT);U3: XORSTAGE_32 port map(OPA(0 to 31),OPB(0 to 31),PBIT(0),PHI,CARRY(0 to 32),SUM,COUT);end DBLCADDER;-------------------------------------------------------------- END: Architectures used with the DBLC adder------------------------------------------------------------library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity PRESTAGE_128 isport( A: in std_logic_vector(0 to 127); B: in std_logic_vector(0 to 127); CIN: in std_logic; PHI: in std_logic; POUT: out std_logic_vector(0 to 127); GOUT: out std_logic_vector(0 to 128));end PRESTAGE_128;architecture PRESTAGE of PRESTAGE_128 isbegin -- PRESTAGEU1:for I in 0 to 127 generate U11: BLOCK0 port map(A(I),B(I),PHI,POUT(I),GOUT(I+1));end generate U1;U2: INVBLOCK port map(CIN,PHI,GOUT(0));end PRESTAGE;-- The DBLC-tree: Level 0library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLC_0_128 isport( PIN: in std_logic_vector(0 to 127); GIN: in std_logic_vector(0 to 128); PHI: in std_logic; POUT: out std_logic_vector(0 to 126); GOUT: out std_logic_vector(0 to 128));end DBLC_0_128;architecture DBLC_0 of DBLC_0_128 isbegin -- Architecture DBLC_0U1: for I in 0 to 0 generate U11: INVBLOCK port map(GIN(I),PHI,GOUT(I));end generate U1;U2: for I in 1 to 1 generate U21: BLOCK1A port map(PIN(I-1),GIN(I-1),GIN(I),PHI,GOUT(I));end generate U2;U3: for I in 2 to 128 generate U31: BLOCK1 port map(PIN(I-2),PIN(I-1),GIN(I-1),GIN(I),PHI,POUT(I-2),GOUT(I));end generate U3;end DBLC_0;-- The DBLC-tree: Level 1library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLC_1_128 isport( PIN: in std_logic_vector(0 to 126); GIN: in std_logic_vector(0 to 128); PHI: in std_logic; POUT: out std_logic_vector(0 to 124); GOUT: out std_logic_vector(0 to 128));end DBLC_1_128;architecture DBLC_1 of DBLC_1_128 isbegin -- Architecture DBLC_1U1: for I in 0 to 1 generate U11: INVBLOCK port map(GIN(I),PHI,GOUT(I));end generate U1;U2: for I in 2 to 3 generate U21: BLOCK2A port map(PIN(I-2),GIN(I-2),GIN(I),PHI,GOUT(I));end generate U2;U3: for I in 4 to 128 generate U31: BLOCK2 port map(PIN(I-4),PIN(I-2),GIN(I-2),GIN(I),PHI,POUT(I-4),GOUT(I));end generate U3;end DBLC_1;-- The DBLC-tree: Level 2library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLC_2_128 isport( PIN: in std_logic_vector(0 to 124); GIN: in std_logic_vector(0 to 128); PHI: in std_logic; POUT: out std_logic_vector(0 to 120); GOUT: out std_logic_vector(0 to 128));end DBLC_2_128;architecture DBLC_2 of DBLC_2_128 isbegin -- Architecture DBLC_2U1: for I in 0 to 3 generate U11: INVBLOCK port map(GIN(I),PHI,GOUT(I));end generate U1;U2: for I in 4 to 7 generate U21: BLOCK1A port map(PIN(I-4),GIN(I-4),GIN(I),PHI,GOUT(I));end generate U2;U3: for I in 8 to 128 generate U31: BLOCK1 port map(PIN(I-8),PIN(I-4),GIN(I-4),GIN(I),PHI,POUT(I-8),GOUT(I));end generate U3;end DBLC_2;-- The DBLC-tree: Level 3library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.blocks.all;entity DBLC_3_128 isport( PIN: in std_logic_vector(0 to 120); GIN: in std_logic_vector(0 to 128); PHI: in std_logic; POUT: out std_logic_vector(0 to 112); GOUT: out std_logic_vector(0 to 128));end DBLC_3_128;architecture DBLC_3 of DBLC_3_128 isbegin -- Architecture DBLC_3U1: for I in 0 to 7 generate U11: INVBLOCK port map(GIN(I),PHI,GOUT(I));end generate U1;U2: for I in 8 to 15 generate U21: BLOCK2A port map(PIN(I-8),GIN(I-8),GIN(I),PHI,GOUT(I));end generate U2;U3: for I in 16 to 128 generate U31: BLOCK2 port map(PIN(I-16),PIN(I-8),GIN(I-8),GIN(I),PHI,POUT(I-16),GOUT(I));end generate U3;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -