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

entity Cookbook__sum_of_3bit_pair is 
  Port (
    pi0,pi1,pi2,pi3,pi4,pi5: in std_logic;
    po0,po1,po2,po3: inout std_logic
  );
end Cookbook__sum_of_3bit_pair;

architecture Cookbook__sum_of_3bit_pair_behav of Cookbook__sum_of_3bit_pair is
signal n10,n11,n12,n13,n14,n15,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n36,n37,n38,n39,n40,n41,n42,n43,n44,n45,n46,n47,n48,n49,n50,n51,n52,n53,n54,n55,n57,n58,n59,n60,n61,n62,n63,n64,n65,n66,n67,n68,n69,n70,n71,n72: std_logic;
begin
    n10 <= ( not pi5 and pi2 )
      or ( pi5 and not pi2 );
    n11 <= ( not pi5 and pi2 )
      or ( pi5 and not pi2 );
    n12 <= ( n10 and not pi1 )
      or ( n11 and pi1 );
    n13 <= ( not pi5 and pi2 )
      or ( pi5 and not pi2 );
    n14 <= ( not pi5 and pi2 )
      or ( pi5 and not pi2 );
    n15 <= ( n13 and not pi1 )
      or ( n14 and pi1 );
    po3 <= ( n12 and not pi0 )
      or ( n15 and pi0 );
    n17 <= ( not pi5 and pi4 )
      or ( pi5 and not pi4 );
    n18 <= ( not pi5 and pi4 )
      or ( pi5 and not pi4 );
    n19 <= ( n17 and not pi3 )
      or ( n18 and pi3 );
    n20 <= ( pi4 and not pi2 )
      or ( n19 and pi2 );
    n21 <= ( not pi5 and not pi4 )
      or ( pi5 and pi4 );
    n22 <= ( not pi5 and not pi4 )
      or ( pi5 and pi4 );
    n23 <= ( n21 and not pi3 )
      or ( n22 and pi3 );
    n24 <= ( not pi4 and not pi2 )
      or ( n23 and pi2 );
    n25 <= ( n20 and not pi1 )
      or ( n24 and pi1 );
    n26 <= ( not pi5 and pi4 )
      or ( pi5 and not pi4 );
    n27 <= ( not pi5 and pi4 )
      or ( pi5 and not pi4 );
    n28 <= ( n26 and not pi3 )
      or ( n27 and pi3 );
    n29 <= ( pi4 and not pi2 )
      or ( n28 and pi2 );
    n30 <= ( not pi5 and not pi4 )
      or ( pi5 and pi4 );
    n31 <= ( not pi5 and not pi4 )
      or ( pi5 and pi4 );
    n32 <= ( n30 and not pi3 )
      or ( n31 and pi3 );
    n33 <= ( not pi4 and not pi2 )
      or ( n32 and pi2 );
    n34 <= ( n29 and not pi1 )
      or ( n33 and pi1 );
    po2 <= ( n25 and not pi0 )
      or ( n34 and pi0 );
    n36 <= ( pi5 and pi4 );
    n37 <= not (( pi5 and pi4 ));
    n38 <= ( n36 and not pi3 )
      or ( n37 and pi3 );
    n39 <= ( pi3 and not pi2 )
      or ( n38 and pi2 );
    n40 <= ( not pi4 and pi3 )
      or ( pi4 and not pi3 );
    n41 <= not (( not pi5 and not pi4 ));
    n42 <= ( not pi5 and not pi4 );
    n43 <= ( n41 and not pi3 )
      or ( n42 and pi3 );
    n44 <= ( n40 and not pi2 )
      or ( n43 and pi2 );
    n45 <= ( n39 and not pi1 )
      or ( n44 and pi1 );
    n46 <= not (( pi5 and pi4 ));
    n47 <= ( pi5 and pi4 );
    n48 <= ( n46 and not pi3 )
      or ( n47 and pi3 );
    n49 <= ( not pi3 and not pi2 )
      or ( n48 and pi2 );
    n50 <= ( not pi4 and not pi3 )
      or ( pi4 and pi3 );
    n51 <= ( not pi5 and not pi4 );
    n52 <= not (( not pi5 and not pi4 ));
    n53 <= ( n51 and not pi3 )
      or ( n52 and pi3 );
    n54 <= ( n50 and not pi2 )
      or ( n53 and pi2 );
    n55 <= ( n49 and not pi1 )
      or ( n54 and pi1 );
    po1 <= ( n45 and not pi0 )
      or ( n55 and pi0 );
    n57 <= ( pi5 and pi4 );
    n58 <= ( n57 and pi3 );
    n59 <= ( n58 and pi2 );
    n60 <= ( pi4 and pi3 );
    n61 <= not (( not pi5 and not pi4 ));
    n62 <= ( n61 and pi3 );
    n63 <= ( n60 and not pi2 )
      or ( n62 and pi2 );
    n64 <= ( n59 and not pi1 )
      or ( n63 and pi1 );
    n65 <= ( pi5 and pi4 );
    n66 <= not (( not n65 and not pi3 ));
    n67 <= ( pi3 and not pi2 )
      or ( n66 and pi2 );
    n68 <= not (( not pi4 and not pi3 ));
    n69 <= not (( not pi5 and not pi4 ));
    n70 <= not (( not n69 and not pi3 ));
    n71 <= ( n68 and not pi2 )
      or ( n70 and pi2 );
    n72 <= ( n67 and not pi1 )
      or ( n71 and pi1 );
    po0 <= ( n64 and not pi0 )
      or ( n72 and pi0 );
end Cookbook__sum_of_3bit_pair_behav;
