--- VHDL generated by LogSynth framework (c) Petr Fiser
Library IEEE;
use IEEE.std_logic_1164.all;

entity DFF is
  Port ( D, CLK: in std_logic;
     Q: out std_logic);
end DFF;

architecture Behavior of DFF is
begin
  process(CLK)
  begin
    if CLK'event and CLK = '1' then
      Q <= D;
    end if;
  end process;
end Behavior;

Library IEEE;
use IEEE.std_logic_1164.all;

entity Cookbook__adder_tree_node is 
  Port (
    pi00,pi01,pi02,pi03,pi04,pi05,pi06,pi07,pi08,pi09,pi10,pi11,pi12,pi13,pi14,pi15,pi16,pi17,pi18,pi19,pi20,pi21,pi22,pi23,pi24,pi25,pi26,pi27,pi28,pi29,pi30,pi31, CLK: in std_logic;
    po00,po01,po02,po03,po04,po05,po06,po07,po08,po09,po10,po11,po12,po13,po14,po15,po16: inout std_logic
  );
end Cookbook__adder_tree_node;

architecture Cookbook__adder_tree_node_behav of Cookbook__adder_tree_node is
component DFF
  Port ( D, CLK: in std_logic;
     Q: out std_logic);
end component;

signal lo00,lo01,lo02,lo03,lo04,lo05,lo06,lo07,lo08,lo09,lo10,lo11,lo12,lo13,lo14,lo15,lo16,li00,li01,n102,li02,n104,li03,n106,li04,n108,li05,n110,li06,n112,li07,n114,li08,n116,li09,n118,li10,n120,li11,n122,li12,n124,li13,n126,li14,n128,li15,n130,li16: std_logic;
begin
    DFF0: DFF port map (li00, CLK, lo00);
    DFF1: DFF port map (li01, CLK, lo01);
    DFF2: DFF port map (li02, CLK, lo02);
    DFF3: DFF port map (li03, CLK, lo03);
    DFF4: DFF port map (li04, CLK, lo04);
    DFF5: DFF port map (li05, CLK, lo05);
    DFF6: DFF port map (li06, CLK, lo06);
    DFF7: DFF port map (li07, CLK, lo07);
    DFF8: DFF port map (li08, CLK, lo08);
    DFF9: DFF port map (li09, CLK, lo09);
    DFF10: DFF port map (li10, CLK, lo10);
    DFF11: DFF port map (li11, CLK, lo11);
    DFF12: DFF port map (li12, CLK, lo12);
    DFF13: DFF port map (li13, CLK, lo13);
    DFF14: DFF port map (li14, CLK, lo14);
    DFF15: DFF port map (li15, CLK, lo15);
    DFF16: DFF port map (li16, CLK, lo16);
    li00 <= ( pi15 );
    li01 <= ( not pi14 and pi31 )
      or ( pi14 and not pi31 );
    n102 <= ( pi14 and pi31 );
    li02 <= ( not n102 and not pi13 and pi30 )
      or ( not n102 and pi13 and not pi30 )
      or ( n102 and not pi13 and not pi30 )
      or ( n102 and pi13 and pi30 );
    n104 <= ( n102 and pi13 )
      or ( n102 and pi30 )
      or ( pi13 and pi30 );
    li03 <= ( not n104 and not pi12 and pi29 )
      or ( not n104 and pi12 and not pi29 )
      or ( n104 and not pi12 and not pi29 )
      or ( n104 and pi12 and pi29 );
    n106 <= ( n104 and pi12 )
      or ( n104 and pi29 )
      or ( pi12 and pi29 );
    li04 <= ( not n106 and not pi11 and pi28 )
      or ( not n106 and pi11 and not pi28 )
      or ( n106 and not pi11 and not pi28 )
      or ( n106 and pi11 and pi28 );
    n108 <= ( n106 and pi11 )
      or ( n106 and pi28 )
      or ( pi11 and pi28 );
    li05 <= ( not n108 and not pi10 and pi27 )
      or ( not n108 and pi10 and not pi27 )
      or ( n108 and not pi10 and not pi27 )
      or ( n108 and pi10 and pi27 );
    n110 <= ( n108 and pi10 )
      or ( n108 and pi27 )
      or ( pi10 and pi27 );
    li06 <= ( not n110 and not pi09 and pi26 )
      or ( not n110 and pi09 and not pi26 )
      or ( n110 and not pi09 and not pi26 )
      or ( n110 and pi09 and pi26 );
    n112 <= ( n110 and pi09 )
      or ( n110 and pi26 )
      or ( pi09 and pi26 );
    li07 <= ( not n112 and not pi08 and pi25 )
      or ( not n112 and pi08 and not pi25 )
      or ( n112 and not pi08 and not pi25 )
      or ( n112 and pi08 and pi25 );
    n114 <= ( n112 and pi08 )
      or ( n112 and pi25 )
      or ( pi08 and pi25 );
    li08 <= ( not n114 and not pi07 and pi24 )
      or ( not n114 and pi07 and not pi24 )
      or ( n114 and not pi07 and not pi24 )
      or ( n114 and pi07 and pi24 );
    n116 <= ( n114 and pi07 )
      or ( n114 and pi24 )
      or ( pi07 and pi24 );
    li09 <= ( not n116 and not pi06 and pi23 )
      or ( not n116 and pi06 and not pi23 )
      or ( n116 and not pi06 and not pi23 )
      or ( n116 and pi06 and pi23 );
    n118 <= ( n116 and pi06 )
      or ( n116 and pi23 )
      or ( pi06 and pi23 );
    li10 <= ( not n118 and not pi05 and pi22 )
      or ( not n118 and pi05 and not pi22 )
      or ( n118 and not pi05 and not pi22 )
      or ( n118 and pi05 and pi22 );
    n120 <= ( n118 and pi05 )
      or ( n118 and pi22 )
      or ( pi05 and pi22 );
    li11 <= ( not n120 and not pi04 and pi21 )
      or ( not n120 and pi04 and not pi21 )
      or ( n120 and not pi04 and not pi21 )
      or ( n120 and pi04 and pi21 );
    n122 <= ( n120 and pi04 )
      or ( n120 and pi21 )
      or ( pi04 and pi21 );
    li12 <= ( not n122 and not pi03 and pi20 )
      or ( not n122 and pi03 and not pi20 )
      or ( n122 and not pi03 and not pi20 )
      or ( n122 and pi03 and pi20 );
    n124 <= ( n122 and pi03 )
      or ( n122 and pi20 )
      or ( pi03 and pi20 );
    li13 <= ( not n124 and not pi02 and pi19 )
      or ( not n124 and pi02 and not pi19 )
      or ( n124 and not pi02 and not pi19 )
      or ( n124 and pi02 and pi19 );
    n126 <= ( n124 and pi02 )
      or ( n124 and pi19 )
      or ( pi02 and pi19 );
    li14 <= ( not n126 and not pi01 and pi18 )
      or ( not n126 and pi01 and not pi18 )
      or ( n126 and not pi01 and not pi18 )
      or ( n126 and pi01 and pi18 );
    n128 <= ( n126 and pi01 )
      or ( n126 and pi18 )
      or ( pi01 and pi18 );
    li15 <= ( not n128 and not pi00 and pi17 )
      or ( not n128 and pi00 and not pi17 )
      or ( n128 and not pi00 and not pi17 )
      or ( n128 and pi00 and pi17 );
    n130 <= ( n128 and pi00 )
      or ( n128 and pi17 )
      or ( pi00 and pi17 );
    li16 <= ( not n130 and not pi00 and pi16 )
      or ( not n130 and pi00 and not pi16 )
      or ( n130 and not pi00 and not pi16 )
      or ( n130 and pi00 and pi16 );
    po00 <= ( lo16 );
    po01 <= ( lo15 );
    po02 <= ( lo14 );
    po03 <= ( lo13 );
    po04 <= ( lo12 );
    po05 <= ( lo11 );
    po06 <= ( lo10 );
    po07 <= ( lo09 );
    po08 <= ( lo08 );
    po09 <= ( lo07 );
    po10 <= ( lo06 );
    po11 <= ( lo05 );
    po12 <= ( lo04 );
    po13 <= ( lo03 );
    po14 <= ( lo02 );
    po15 <= ( lo01 );
    po16 <= ( lo00 );
end Cookbook__adder_tree_node_behav;
