--- 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 cntr_updn is 
  Port (
    pi00,pi01,pi02,pi03,pi04,pi05,pi06,pi07,pi08,pi09,pi10,pi11,pi12,pi13,pi14,pi15,pi16,pi17,pi18,pi19,pi20,pi21, CLK: in std_logic;
    po00,po01,po02,po03,po04,po05,po06,po07,po08,po09,po10,po11,po12,po13,po14,po15: inout std_logic
  );
end cntr_updn;

architecture cntr_updn_behav of cntr_updn 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,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,n121,n122,n123,n124,n125,n126,n127,n128,n129,n130,n131,n132,n133,n134,n135,n136,n137,n138,n139,n140,n141,n142,n143,n144,n145,n146,n147,n148,n149,n150,n151,n152,li00,li01,li02,li03,li04,li05,li06,li07,li08,li09,li10,li11,li12,li13,li14,li15: 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);
    n86 <= '0';
    n87 <= '1';
    n88 <= ( not pi21 );
    n89 <= ( not n86 and not lo00 and n87 )
      or ( not n86 and lo00 and not n87 )
      or ( n86 and not lo00 and not n87 )
      or ( n86 and lo00 and n87 );
    n90 <= ( not n86 and lo00 and n87 )
      or ( n86 and not lo00 and n87 )
      or ( n86 and lo00 and not n87 )
      or ( n86 and lo00 and n87 );
    n91 <= ( not n90 and not lo01 and n88 )
      or ( not n90 and lo01 and not n88 )
      or ( n90 and not lo01 and not n88 )
      or ( n90 and lo01 and n88 );
    n92 <= ( not n90 and lo01 and n88 )
      or ( n90 and not lo01 and n88 )
      or ( n90 and lo01 and not n88 )
      or ( n90 and lo01 and n88 );
    n93 <= ( not n92 and not lo02 and n88 )
      or ( not n92 and lo02 and not n88 )
      or ( n92 and not lo02 and not n88 )
      or ( n92 and lo02 and n88 );
    n94 <= ( not n92 and lo02 and n88 )
      or ( n92 and not lo02 and n88 )
      or ( n92 and lo02 and not n88 )
      or ( n92 and lo02 and n88 );
    n95 <= ( not n94 and not lo03 and n88 )
      or ( not n94 and lo03 and not n88 )
      or ( n94 and not lo03 and not n88 )
      or ( n94 and lo03 and n88 );
    n96 <= ( not n94 and lo03 and n88 )
      or ( n94 and not lo03 and n88 )
      or ( n94 and lo03 and not n88 )
      or ( n94 and lo03 and n88 );
    n97 <= ( not n96 and not lo04 and n88 )
      or ( not n96 and lo04 and not n88 )
      or ( n96 and not lo04 and not n88 )
      or ( n96 and lo04 and n88 );
    n98 <= ( not n96 and lo04 and n88 )
      or ( n96 and not lo04 and n88 )
      or ( n96 and lo04 and not n88 )
      or ( n96 and lo04 and n88 );
    n99 <= ( not n98 and not lo05 and n88 )
      or ( not n98 and lo05 and not n88 )
      or ( n98 and not lo05 and not n88 )
      or ( n98 and lo05 and n88 );
    n100 <= ( not n98 and lo05 and n88 )
      or ( n98 and not lo05 and n88 )
      or ( n98 and lo05 and not n88 )
      or ( n98 and lo05 and n88 );
    n101 <= ( not n100 and not lo06 and n88 )
      or ( not n100 and lo06 and not n88 )
      or ( n100 and not lo06 and not n88 )
      or ( n100 and lo06 and n88 );
    n102 <= ( not n100 and lo06 and n88 )
      or ( n100 and not lo06 and n88 )
      or ( n100 and lo06 and not n88 )
      or ( n100 and lo06 and n88 );
    n103 <= ( not n102 and not lo07 and n88 )
      or ( not n102 and lo07 and not n88 )
      or ( n102 and not lo07 and not n88 )
      or ( n102 and lo07 and n88 );
    n104 <= ( not n102 and lo07 and n88 )
      or ( n102 and not lo07 and n88 )
      or ( n102 and lo07 and not n88 )
      or ( n102 and lo07 and n88 );
    n105 <= ( not n104 and not lo08 and n88 )
      or ( not n104 and lo08 and not n88 )
      or ( n104 and not lo08 and not n88 )
      or ( n104 and lo08 and n88 );
    n106 <= ( not n104 and lo08 and n88 )
      or ( n104 and not lo08 and n88 )
      or ( n104 and lo08 and not n88 )
      or ( n104 and lo08 and n88 );
    n107 <= ( not n106 and not lo09 and n88 )
      or ( not n106 and lo09 and not n88 )
      or ( n106 and not lo09 and not n88 )
      or ( n106 and lo09 and n88 );
    n108 <= ( not n106 and lo09 and n88 )
      or ( n106 and not lo09 and n88 )
      or ( n106 and lo09 and not n88 )
      or ( n106 and lo09 and n88 );
    n109 <= ( not n108 and not lo10 and n88 )
      or ( not n108 and lo10 and not n88 )
      or ( n108 and not lo10 and not n88 )
      or ( n108 and lo10 and n88 );
    n110 <= ( not n108 and lo10 and n88 )
      or ( n108 and not lo10 and n88 )
      or ( n108 and lo10 and not n88 )
      or ( n108 and lo10 and n88 );
    n111 <= ( not n110 and not lo11 and n88 )
      or ( not n110 and lo11 and not n88 )
      or ( n110 and not lo11 and not n88 )
      or ( n110 and lo11 and n88 );
    n112 <= ( not n110 and lo11 and n88 )
      or ( n110 and not lo11 and n88 )
      or ( n110 and lo11 and not n88 )
      or ( n110 and lo11 and n88 );
    n113 <= ( not n112 and not lo12 and n88 )
      or ( not n112 and lo12 and not n88 )
      or ( n112 and not lo12 and not n88 )
      or ( n112 and lo12 and n88 );
    n114 <= ( not n112 and lo12 and n88 )
      or ( n112 and not lo12 and n88 )
      or ( n112 and lo12 and not n88 )
      or ( n112 and lo12 and n88 );
    n115 <= ( not n114 and not lo13 and n88 )
      or ( not n114 and lo13 and not n88 )
      or ( n114 and not lo13 and not n88 )
      or ( n114 and lo13 and n88 );
    n116 <= ( not n114 and lo13 and n88 )
      or ( n114 and not lo13 and n88 )
      or ( n114 and lo13 and not n88 )
      or ( n114 and lo13 and n88 );
    n117 <= ( not n116 and not lo14 and n88 )
      or ( not n116 and lo14 and not n88 )
      or ( n116 and not lo14 and not n88 )
      or ( n116 and lo14 and n88 );
    n118 <= ( not n116 and lo14 and n88 )
      or ( n116 and not lo14 and n88 )
      or ( n116 and lo14 and not n88 )
      or ( n116 and lo14 and n88 );
    n119 <= ( not n118 and not lo15 and n88 )
      or ( not n118 and lo15 and not n88 )
      or ( n118 and not lo15 and not n88 )
      or ( n118 and lo15 and n88 );
    n121 <= ( n89 and not pi03 )
      or ( pi19 and pi03 );
    n122 <= ( n91 and not pi03 )
      or ( pi18 and pi03 );
    n123 <= ( n93 and not pi03 )
      or ( pi17 and pi03 );
    n124 <= ( n95 and not pi03 )
      or ( pi16 and pi03 );
    n125 <= ( n97 and not pi03 )
      or ( pi15 and pi03 );
    n126 <= ( n99 and not pi03 )
      or ( pi14 and pi03 );
    n127 <= ( n101 and not pi03 )
      or ( pi13 and pi03 );
    n128 <= ( n103 and not pi03 )
      or ( pi12 and pi03 );
    n129 <= ( n105 and not pi03 )
      or ( pi11 and pi03 );
    n130 <= ( n107 and not pi03 )
      or ( pi10 and pi03 );
    n131 <= ( n109 and not pi03 )
      or ( pi09 and pi03 );
    n132 <= ( n111 and not pi03 )
      or ( pi08 and pi03 );
    n133 <= ( n113 and not pi03 )
      or ( pi07 and pi03 );
    n134 <= ( n115 and not pi03 )
      or ( pi06 and pi03 );
    n135 <= ( n117 and not pi03 )
      or ( pi05 and pi03 );
    n136 <= ( n119 and not pi03 )
      or ( pi04 and pi03 );
    n137 <= ( n121 and not pi20 )
      or ( n86 and pi20 );
    n138 <= ( n122 and not pi20 )
      or ( n86 and pi20 );
    n139 <= ( n123 and not pi20 )
      or ( n86 and pi20 );
    n140 <= ( n124 and not pi20 )
      or ( n86 and pi20 );
    n141 <= ( n125 and not pi20 )
      or ( n86 and pi20 );
    n142 <= ( n126 and not pi20 )
      or ( n86 and pi20 );
    n143 <= ( n127 and not pi20 )
      or ( n86 and pi20 );
    n144 <= ( n128 and not pi20 )
      or ( n86 and pi20 );
    n145 <= ( n129 and not pi20 )
      or ( n86 and pi20 );
    n146 <= ( n130 and not pi20 )
      or ( n86 and pi20 );
    n147 <= ( n131 and not pi20 )
      or ( n86 and pi20 );
    n148 <= ( n132 and not pi20 )
      or ( n86 and pi20 );
    n149 <= ( n133 and not pi20 )
      or ( n86 and pi20 );
    n150 <= ( n134 and not pi20 )
      or ( n86 and pi20 );
    n151 <= ( n135 and not pi20 )
      or ( n86 and pi20 );
    n152 <= ( n136 and not pi20 )
      or ( n86 and pi20 );
    li00 <= ( lo00 and not pi01 )
      or ( n137 and pi01 );
    li01 <= ( lo01 and not pi01 )
      or ( n138 and pi01 );
    li02 <= ( lo02 and not pi01 )
      or ( n139 and pi01 );
    li03 <= ( lo03 and not pi01 )
      or ( n140 and pi01 );
    li04 <= ( lo04 and not pi01 )
      or ( n141 and pi01 );
    li05 <= ( lo05 and not pi01 )
      or ( n142 and pi01 );
    li06 <= ( lo06 and not pi01 )
      or ( n143 and pi01 );
    li07 <= ( lo07 and not pi01 )
      or ( n144 and pi01 );
    li08 <= ( lo08 and not pi01 )
      or ( n145 and pi01 );
    li09 <= ( lo09 and not pi01 )
      or ( n146 and pi01 );
    li10 <= ( lo10 and not pi01 )
      or ( n147 and pi01 );
    li11 <= ( lo11 and not pi01 )
      or ( n148 and pi01 );
    li12 <= ( lo12 and not pi01 )
      or ( n149 and pi01 );
    li13 <= ( lo13 and not pi01 )
      or ( n150 and pi01 );
    li14 <= ( lo14 and not pi01 )
      or ( n151 and pi01 );
    li15 <= ( lo15 and not pi01 )
      or ( n152 and pi01 );
    po00 <= ( lo15 );
    po01 <= ( lo14 );
    po02 <= ( lo13 );
    po03 <= ( lo12 );
    po04 <= ( lo11 );
    po05 <= ( lo10 );
    po06 <= ( lo09 );
    po07 <= ( lo08 );
    po08 <= ( lo07 );
    po09 <= ( lo06 );
    po10 <= ( lo05 );
    po11 <= ( lo04 );
    po12 <= ( lo03 );
    po13 <= ( lo02 );
    po14 <= ( lo01 );
    po15 <= ( lo00 );
end cntr_updn_behav;
