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

entity Cookbook__bin_to_7seg is 
  Port (
    pi0,pi1,pi2,pi3: in std_logic;
    po0,po1,po2,po3,po4,po5,po6: inout std_logic
  );
end Cookbook__bin_to_7seg;

architecture Cookbook__bin_to_7seg_behav of Cookbook__bin_to_7seg is
signal n11,n12,n13,n14,n15,n16,n18,n19,n20,n21,n22,n24,n25,n26,n27,n29,n30,n31,n32,n33,n34,n36,n37,n38,n39,n41,n42,n43,n44,n45,n47,n48,n49,n50: std_logic;
begin
    n11 <= ( pi3 and not pi2 );
    n12 <= ( not pi3 and not pi2 );
    n13 <= ( n11 and not pi1 )
      or ( n12 and pi1 );
    n14 <= ( pi3 and pi2 );
    n15 <= ( pi3 and not pi2 );
    n16 <= ( n14 and not pi1 )
      or ( n15 and pi1 );
    po6 <= ( n13 and not pi0 )
      or ( n16 and pi0 );
    n18 <= ( not pi3 and pi2 )
      or ( pi3 and not pi2 );
    n19 <= ( n18 and pi1 );
    n20 <= ( pi3 and pi2 );
    n21 <= not (( pi3 and not pi2 ));
    n22 <= ( n20 and not pi1 )
      or ( n21 and pi1 );
    po5 <= ( n19 and not pi0 )
      or ( n22 and pi0 );
    n24 <= ( not pi3 and pi2 );
    n25 <= ( n24 and not pi1 );
    n26 <= not (( pi3 and not pi2 ));
    n27 <= ( n26 and pi1 );
    po4 <= ( n25 and not pi0 )
      or ( n27 and pi0 );
    n29 <= ( pi3 and not pi2 );
    n30 <= ( not pi3 and not pi2 )
      or ( pi3 and pi2 );
    n31 <= ( n29 and not pi1 )
      or ( n30 and pi1 );
    n32 <= ( not pi3 and pi2 )
      or ( pi3 and not pi2 );
    n33 <= ( pi3 and pi2 );
    n34 <= ( n32 and not pi1 )
      or ( n33 and pi1 );
    po3 <= ( n31 and not pi0 )
      or ( n34 and pi0 );
    n36 <= not (( not pi3 and pi2 ));
    n37 <= ( pi3 and not pi1 )
      or ( n36 and pi1 );
    n38 <= ( pi3 and not pi2 );
    n39 <= ( n38 and not pi1 );
    po2 <= ( n37 and not pi0 )
      or ( n39 and pi0 );
    n41 <= not (( not pi3 and not pi2 ));
    n42 <= ( pi3 and pi2 );
    n43 <= ( n41 and not pi1 )
      or ( n42 and pi1 );
    n44 <= ( pi3 and not pi2 );
    n45 <= ( n44 and pi1 );
    po1 <= ( n43 and not pi0 )
      or ( n45 and pi0 );
    n47 <= ( pi3 and pi2 );
    n48 <= ( not pi2 and not pi1 )
      or ( n47 and pi1 );
    n49 <= ( not pi3 and not pi2 );
    n50 <= ( n49 and pi1 );
    po0 <= ( n48 and not pi0 )
      or ( n50 and pi0 );
end Cookbook__bin_to_7seg_behav;
