--- 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 ISCAS__s298 is 
  Port (
    pi0,pi1,pi2, CLK: in std_logic;
    po0,po1,po2,po3,po4,po5: inout std_logic
  );
end ISCAS__s298;

architecture ISCAS__s298_behav of ISCAS__s298 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,li00,li01,li02,li03,li04,li05,li06,li07,li08,li09,li10,li11,li12,li13,n71,n72,n73,n74,n75,n76,n77,n78,n79,n80,n81,n82,n83,n84,n85,n86,n87,n88,n89,n90,n91,n92,n93,n94,n95,n96,n97,n98,n99,n100,n101,n102,n103,n104,n105,n106,n107,n108,n109,n110,n111,n112,n113,n114,n115,n116,n117,n118,n119,n120,n121,n122,n123,n124,n125,n126,n127,n128,n129,n130,n131: 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);
    po0 <= ( lo08 );
    po1 <= ( lo10 );
    po2 <= ( lo06 );
    po3 <= ( lo09 );
    po4 <= ( lo11 );
    po5 <= ( lo07 );
    li00 <= ( not lo00 and not pi0 );
    li01 <= ( not n74 and not n75 and not n76 and not pi0 );
    li02 <= ( not n77 and not n78 and not n79 and not pi0 );
    li03 <= ( not n81 and not n126 );
    li04 <= ( not n83 and not n85 and not n131 );
    li05 <= ( not n87 and not n89 and not pi0 );
    li06 <= ( not n94 and not n95 and not n96 and not n71 );
    li07 <= ( not n97 and not n98 and not n127 );
    li08 <= ( not n99 and not n128 );
    li09 <= ( not n101 and not n129 );
    li10 <= ( not n103 and not n104 );
    li11 <= ( not n105 and not n130 );
    li12 <= ( not n106 and not n107 and not pi0 );
    li13 <= ( not n108 and not n109 and not pi0 );
    n71 <= ( not n90 and not n91 );
    n72 <= ( not pi0 and not lo04 );
    n73 <= ( not lo13 and not pi0 );
    n74 <= ( lo00 and not lo02 and lo03 );
    n75 <= ( lo00 and lo01 );
    n76 <= ( not lo00 and not lo01 );
    n77 <= ( lo00 and lo01 and lo02 );
    n78 <= ( not lo00 and not lo02 );
    n79 <= ( not lo01 and not lo02 );
    n80 <= not (( lo02 and lo01 and lo00 ));
    n81 <= ( not lo03 and n80 );
    n82 <= ( lo04 and lo03 );
    n83 <= ( not lo02 and not lo01 and lo00 and n82 );
    n84 <= not (( lo03 and not lo02 and not lo01 and lo00 ));
    n85 <= ( not lo04 and not lo13 and n84 );
    n86 <= ( not lo04 and lo03 );
    n87 <= ( not lo02 and lo01 and not lo12 and n86 );
    n88 <= not (( not lo02 and not lo01 and lo12 and n86 ));
    n89 <= ( not lo05 and n88 );
    n90 <= ( not lo02 and lo01 and not lo12 and n86 );
    n91 <= ( not lo05 and n88 );
    n92 <= ( lo02 and lo04 and lo09 );
    n93 <= ( not lo01 and not lo02 and lo04 );
    n94 <= ( lo04 and not lo06 );
    n95 <= ( not lo03 and not lo04 );
    n96 <= ( not lo02 and not lo03 );
    n97 <= ( not lo07 and lo03 );
    n98 <= ( not lo04 and lo03 );
    n99 <= ( not lo08 and lo04 and lo02 );
    n100 <= ( not n92 and not n93 );
    n101 <= ( not lo03 and not n71 and n100 );
    n102 <= not (( n115 and n116 and n117 and lo04 ));
    n103 <= ( not n71 and n102 );
    n104 <= ( lo00 and n71 );
    n105 <= ( not lo11 and lo04 );
    n106 <= ( not pi2 and not lo12 );
    n107 <= ( pi2 and lo12 );
    n108 <= ( not pi1 and not lo13 );
    n109 <= ( pi1 and lo13 );
    n110 <= not (( lo00 and lo01 and lo02 and lo03 ));
    n111 <= not (( lo00 and not lo01 and not lo02 ));
    n112 <= not (( not lo01 and not lo02 and not lo03 and lo04 ));
    n113 <= not (( lo03 and not lo08 ));
    n114 <= not (( lo03 and not lo04 ));
    n115 <= not (( lo01 and not lo02 and not lo03 ));
    n116 <= not (( lo02 and not lo10 ));
    n117 <= not (( lo03 and not lo10 ));
    n118 <= not (( not n71 and lo03 and lo04 and not lo09 ));
    n119 <= not (( n71 and lo00 ));
    n120 <= not (( lo03 and not lo04 ));
    n121 <= not (( not lo01 and not lo04 ));
    n122 <= not (( not lo02 and not lo03 ));
    n123 <= not (( not lo01 and not lo02 and not lo03 and lo04 ));
    n124 <= not (( lo01 and lo02 and not lo04 ));
    n125 <= not (( lo02 and lo04 and not lo07 ));
    n126 <= not (( n110 and n111 and not pi0 ));
    n127 <= not (( n123 and n124 and n125 and not n71 ));
    n128 <= not (( n112 and n113 and n114 and not n71 ));
    n129 <= not (( n118 and n119 ));
    n130 <= not (( n120 and n121 and n122 and not n71 ));
    n131 <= ( not n72 and not n73 );
end ISCAS__s298_behav;
