--- 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__lfsr is 
  Port (
    , 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,po21,po22,po23,po24,po25,po26,po27,po28,po29,po30,po31: inout std_logic
  );
end Cookbook__lfsr;

architecture Cookbook__lfsr_behav of Cookbook__lfsr 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,li01,li02,li07,li08,li09,li10,li11,li00,li03,li04,li05,li06,li12,li13,li14,li15,li16,li17,li18,li19,li20,li21,li22,li23,li24,li25,li26,li27,li28,li29,li30,li31: 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);
    li01 <= ( not lo00 and lo31 )
      or ( lo00 and not lo31 );
    li02 <= ( not lo01 and lo31 )
      or ( lo01 and not lo31 );
    li07 <= ( not lo06 and lo31 )
      or ( lo06 and not lo31 );
    li08 <= ( not lo07 and lo31 )
      or ( lo07 and not lo31 );
    li09 <= ( not lo08 and lo31 )
      or ( lo08 and not lo31 );
    li10 <= ( not lo09 and lo31 )
      or ( lo09 and not lo31 );
    li11 <= ( not lo10 and lo31 )
      or ( lo10 and not lo31 );
    li00 <= ( not lo31 );
    li03 <= ( lo02 );
    li04 <= ( lo03 );
    li05 <= ( lo04 );
    li06 <= ( lo05 );
    li12 <= ( lo11 );
    li13 <= ( lo12 );
    li14 <= ( lo13 );
    li15 <= ( lo14 );
    li16 <= ( lo15 );
    li17 <= ( lo16 );
    li18 <= ( lo17 );
    li19 <= ( lo18 );
    li20 <= ( lo19 );
    li21 <= ( lo20 );
    li22 <= ( lo21 );
    li23 <= ( lo22 );
    li24 <= ( lo23 );
    li25 <= ( lo24 );
    li26 <= ( lo25 );
    li27 <= ( lo26 );
    li28 <= ( lo27 );
    li29 <= ( lo28 );
    li30 <= ( lo29 );
    li31 <= ( lo30 );
    po00 <= ( lo31 );
    po01 <= ( lo30 );
    po02 <= ( lo29 );
    po03 <= ( lo28 );
    po04 <= ( lo27 );
    po05 <= ( lo26 );
    po06 <= ( lo25 );
    po07 <= ( lo24 );
    po08 <= ( lo23 );
    po09 <= ( lo22 );
    po10 <= ( lo21 );
    po11 <= ( lo20 );
    po12 <= ( lo19 );
    po13 <= ( lo18 );
    po14 <= ( lo17 );
    po15 <= ( lo16 );
    po16 <= ( lo15 );
    po17 <= ( lo14 );
    po18 <= ( lo13 );
    po19 <= ( lo12 );
    po20 <= ( lo11 );
    po21 <= ( lo10 );
    po22 <= ( lo09 );
    po23 <= ( lo08 );
    po24 <= ( lo07 );
    po25 <= ( lo06 );
    po26 <= ( lo05 );
    po27 <= ( lo04 );
    po28 <= ( lo03 );
    po29 <= ( lo02 );
    po30 <= ( lo01 );
    po31 <= ( lo00 );
end Cookbook__lfsr_behav;
