--- 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__pipeline_add_msb 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,pi32,pi33,pi34,pi35,pi36,pi37,pi38,pi39, CLK: in std_logic;
    po00,po01,po02,po03,po04,po05,po06,po07,po08,po09,po10,po11,po12,po13,po14,po15,po16,po17,po18,po19,po20: inout std_logic
  );
end Cookbook__pipeline_add_msb;

architecture Cookbook__pipeline_add_msb_behav of Cookbook__pipeline_add_msb 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,lo17,lo18,lo19,lo20,lo21,lo22,lo23,lo24,lo25,lo26,lo27,lo28,lo29,lo30,lo31,lo32,lo33,lo34,lo35,lo36,lo37,lo38,lo39,lo40,lo41,lo42,lo43,lo44,lo45,lo46,lo47,lo48,lo49,lo50,li40,n215,li41,n217,li42,n219,li43,n221,li44,n223,li45,n225,li46,n227,li47,n229,li48,n231,li49,li50,li30,n235,li31,n237,li32,n239,li33,n241,li34,n243,li35,n245,li36,n247,li37,n249,li38,n251,li00,li01,li02,li03,li04,li05,li06,li07,li08,li09,li10,li11,li12,li13,li14,li15,li16,li17,li18,li19,li20,li21,li22,li23,li24,li25,li26,li27,li28,li29,li39: 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);
    DFF17: DFF port map (li17, CLK, lo17);
    DFF18: DFF port map (li18, CLK, lo18);
    DFF19: DFF port map (li19, CLK, lo19);
    DFF20: DFF port map (li20, CLK, lo20);
    DFF21: DFF port map (li21, CLK, lo21);
    DFF22: DFF port map (li22, CLK, lo22);
    DFF23: DFF port map (li23, CLK, lo23);
    DFF24: DFF port map (li24, CLK, lo24);
    DFF25: DFF port map (li25, CLK, lo25);
    DFF26: DFF port map (li26, CLK, lo26);
    DFF27: DFF port map (li27, CLK, lo27);
    DFF28: DFF port map (li28, CLK, lo28);
    DFF29: DFF port map (li29, CLK, lo29);
    DFF30: DFF port map (li30, CLK, lo30);
    DFF31: DFF port map (li31, CLK, lo31);
    DFF32: DFF port map (li32, CLK, lo32);
    DFF33: DFF port map (li33, CLK, lo33);
    DFF34: DFF port map (li34, CLK, lo34);
    DFF35: DFF port map (li35, CLK, lo35);
    DFF36: DFF port map (li36, CLK, lo36);
    DFF37: DFF port map (li37, CLK, lo37);
    DFF38: DFF port map (li38, CLK, lo38);
    DFF39: DFF port map (li39, CLK, lo39);
    DFF40: DFF port map (li40, CLK, lo40);
    DFF41: DFF port map (li41, CLK, lo41);
    DFF42: DFF port map (li42, CLK, lo42);
    DFF43: DFF port map (li43, CLK, lo43);
    DFF44: DFF port map (li44, CLK, lo44);
    DFF45: DFF port map (li45, CLK, lo45);
    DFF46: DFF port map (li46, CLK, lo46);
    DFF47: DFF port map (li47, CLK, lo47);
    DFF48: DFF port map (li48, CLK, lo48);
    DFF49: DFF port map (li49, CLK, lo49);
    DFF50: DFF port map (li50, CLK, lo50);
    li40 <= ( not pi19 and pi39 )
      or ( pi19 and not pi39 );
    n215 <= ( pi19 and pi39 );
    li41 <= ( not n215 and not pi18 and pi38 )
      or ( not n215 and pi18 and not pi38 )
      or ( n215 and not pi18 and not pi38 )
      or ( n215 and pi18 and pi38 );
    n217 <= ( n215 and pi18 )
      or ( n215 and pi38 )
      or ( pi18 and pi38 );
    li42 <= ( not n217 and not pi17 and pi37 )
      or ( not n217 and pi17 and not pi37 )
      or ( n217 and not pi17 and not pi37 )
      or ( n217 and pi17 and pi37 );
    n219 <= ( n217 and pi17 )
      or ( n217 and pi37 )
      or ( pi17 and pi37 );
    li43 <= ( not n219 and not pi16 and pi36 )
      or ( not n219 and pi16 and not pi36 )
      or ( n219 and not pi16 and not pi36 )
      or ( n219 and pi16 and pi36 );
    n221 <= ( n219 and pi16 )
      or ( n219 and pi36 )
      or ( pi16 and pi36 );
    li44 <= ( not n221 and not pi15 and pi35 )
      or ( not n221 and pi15 and not pi35 )
      or ( n221 and not pi15 and not pi35 )
      or ( n221 and pi15 and pi35 );
    n223 <= ( n221 and pi15 )
      or ( n221 and pi35 )
      or ( pi15 and pi35 );
    li45 <= ( not n223 and not pi14 and pi34 )
      or ( not n223 and pi14 and not pi34 )
      or ( n223 and not pi14 and not pi34 )
      or ( n223 and pi14 and pi34 );
    n225 <= ( n223 and pi14 )
      or ( n223 and pi34 )
      or ( pi14 and pi34 );
    li46 <= ( not n225 and not pi13 and pi33 )
      or ( not n225 and pi13 and not pi33 )
      or ( n225 and not pi13 and not pi33 )
      or ( n225 and pi13 and pi33 );
    n227 <= ( n225 and pi13 )
      or ( n225 and pi33 )
      or ( pi13 and pi33 );
    li47 <= ( not n227 and not pi12 and pi32 )
      or ( not n227 and pi12 and not pi32 )
      or ( n227 and not pi12 and not pi32 )
      or ( n227 and pi12 and pi32 );
    n229 <= ( n227 and pi12 )
      or ( n227 and pi32 )
      or ( pi12 and pi32 );
    li48 <= ( not n229 and not pi11 and pi31 )
      or ( not n229 and pi11 and not pi31 )
      or ( n229 and not pi11 and not pi31 )
      or ( n229 and pi11 and pi31 );
    n231 <= ( n229 and pi11 )
      or ( n229 and pi31 )
      or ( pi11 and pi31 );
    li49 <= ( not n231 and not pi10 and pi30 )
      or ( not n231 and pi10 and not pi30 )
      or ( n231 and not pi10 and not pi30 )
      or ( n231 and pi10 and pi30 );
    li50 <= ( n231 and pi10 )
      or ( n231 and pi30 )
      or ( pi10 and pi30 );
    li30 <= ( not lo50 and not lo00 and lo10 )
      or ( not lo50 and lo00 and not lo10 )
      or ( lo50 and not lo00 and not lo10 )
      or ( lo50 and lo00 and lo10 );
    n235 <= ( lo50 and lo00 )
      or ( lo50 and lo10 )
      or ( lo00 and lo10 );
    li31 <= ( not n235 and not lo01 and lo11 )
      or ( not n235 and lo01 and not lo11 )
      or ( n235 and not lo01 and not lo11 )
      or ( n235 and lo01 and lo11 );
    n237 <= ( n235 and lo01 )
      or ( n235 and lo11 )
      or ( lo01 and lo11 );
    li32 <= ( not n237 and not lo02 and lo12 )
      or ( not n237 and lo02 and not lo12 )
      or ( n237 and not lo02 and not lo12 )
      or ( n237 and lo02 and lo12 );
    n239 <= ( n237 and lo02 )
      or ( n237 and lo12 )
      or ( lo02 and lo12 );
    li33 <= ( not n239 and not lo03 and lo13 )
      or ( not n239 and lo03 and not lo13 )
      or ( n239 and not lo03 and not lo13 )
      or ( n239 and lo03 and lo13 );
    n241 <= ( n239 and lo03 )
      or ( n239 and lo13 )
      or ( lo03 and lo13 );
    li34 <= ( not n241 and not lo04 and lo14 )
      or ( not n241 and lo04 and not lo14 )
      or ( n241 and not lo04 and not lo14 )
      or ( n241 and lo04 and lo14 );
    n243 <= ( n241 and lo04 )
      or ( n241 and lo14 )
      or ( lo04 and lo14 );
    li35 <= ( not n243 and not lo05 and lo15 )
      or ( not n243 and lo05 and not lo15 )
      or ( n243 and not lo05 and not lo15 )
      or ( n243 and lo05 and lo15 );
    n245 <= ( n243 and lo05 )
      or ( n243 and lo15 )
      or ( lo05 and lo15 );
    li36 <= ( not n245 and not lo06 and lo16 )
      or ( not n245 and lo06 and not lo16 )
      or ( n245 and not lo06 and not lo16 )
      or ( n245 and lo06 and lo16 );
    n247 <= ( n245 and lo06 )
      or ( n245 and lo16 )
      or ( lo06 and lo16 );
    li37 <= ( not n247 and not lo07 and lo17 )
      or ( not n247 and lo07 and not lo17 )
      or ( n247 and not lo07 and not lo17 )
      or ( n247 and lo07 and lo17 );
    n249 <= ( n247 and lo07 )
      or ( n247 and lo17 )
      or ( lo07 and lo17 );
    li38 <= ( not n249 and not lo08 and lo18 )
      or ( not n249 and lo08 and not lo18 )
      or ( n249 and not lo08 and not lo18 )
      or ( n249 and lo08 and lo18 );
    n251 <= ( n249 and lo08 )
      or ( n249 and lo18 )
      or ( lo08 and lo18 );
    po20 <= ( not n251 and not lo09 and lo19 )
      or ( not n251 and lo09 and not lo19 )
      or ( n251 and not lo09 and not lo19 )
      or ( n251 and lo09 and lo19 );
    li00 <= ( pi09 );
    li01 <= ( pi08 );
    li02 <= ( pi07 );
    li03 <= ( pi06 );
    li04 <= ( pi05 );
    li05 <= ( pi04 );
    li06 <= ( pi03 );
    li07 <= ( pi02 );
    li08 <= ( pi01 );
    li09 <= ( pi00 );
    li10 <= ( pi29 );
    li11 <= ( pi28 );
    li12 <= ( pi27 );
    li13 <= ( pi26 );
    li14 <= ( pi25 );
    li15 <= ( pi24 );
    li16 <= ( pi23 );
    li17 <= ( pi22 );
    li18 <= ( pi21 );
    li19 <= ( pi20 );
    li20 <= ( lo40 );
    li21 <= ( lo41 );
    li22 <= ( lo42 );
    li23 <= ( lo43 );
    li24 <= ( lo44 );
    li25 <= ( lo45 );
    li26 <= ( lo46 );
    li27 <= ( lo47 );
    li28 <= ( lo48 );
    li29 <= ( lo49 );
    li39 <= ( po20 );
    po00 <= ( lo39 );
    po01 <= ( lo38 );
    po02 <= ( lo37 );
    po03 <= ( lo36 );
    po04 <= ( lo35 );
    po05 <= ( lo34 );
    po06 <= ( lo33 );
    po07 <= ( lo32 );
    po08 <= ( lo31 );
    po09 <= ( lo30 );
    po10 <= ( lo29 );
    po11 <= ( lo28 );
    po12 <= ( lo27 );
    po13 <= ( lo26 );
    po14 <= ( lo25 );
    po15 <= ( lo24 );
    po16 <= ( lo23 );
    po17 <= ( lo22 );
    po18 <= ( lo21 );
    po19 <= ( lo20 );
end Cookbook__pipeline_add_msb_behav;
