--- 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__cordic is 
  Port (
    pi0,pi1,pi2,pi3,pi4, CLK: in std_logic;
    po0,po1,po2,po3: inout std_logic
  );
end Cookbook__cordic;

architecture Cookbook__cordic_behav of Cookbook__cordic 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,lo51,lo52,lo53,lo54,lo55,lo56,lo57,lo58,lo59,lo60,n192,n193,n194,n195,n196,n197,n198,n199,n200,n201,n202,n203,n204,n205,n206,n207,n208,n209,n210,n211,n212,n213,n214,n215,n216,n217,n218,n219,n220,n221,n222,n223,n224,n225,li57,li58,li59,li60,li00,li01,li02,li03,li04,li05,li06,li07,n238,n239,li08,n241,n242,n243,li09,li10,li11,li12,li13,li14,li15,li16,li17,li18,li19,li20,li21,li22,li23,li24,li25,li26,li27,li28,li29,li30,li31,li32,li33,li34,li35,li36,li37,li38,li39,li40,li41,li42,li43,li44,li45,li46,li47,li48,li49,li50,li51,li52,li53,li54,li55,li56,n292,n293,n294,n295,n296,n297,n298,n299,n300,n301,n302,n303,n304,n305,n306,n307,n308,n309,n310,n311,n312,n313,n314,n315,n316,n317,n318,n319,n320,n321,n322,n323: 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);
    DFF51: DFF port map (li51, CLK, lo51);
    DFF52: DFF port map (li52, CLK, lo52);
    DFF53: DFF port map (li53, CLK, lo53);
    DFF54: DFF port map (li54, CLK, lo54);
    DFF55: DFF port map (li55, CLK, lo55);
    DFF56: DFF port map (li56, CLK, lo56);
    DFF57: DFF port map (li57, CLK, lo57);
    DFF58: DFF port map (li58, CLK, lo58);
    DFF59: DFF port map (li59, CLK, lo59);
    DFF60: DFF port map (li60, CLK, lo60);
    n192 <= ( not lo00 and not lo01 )
      or ( lo00 and lo01 );
    n193 <= not (( not lo00 and not lo01 ));
    n194 <= ( not n193 and not lo02 )
      or ( n193 and lo02 );
    n195 <= not (( not n193 and not lo02 ));
    n196 <= ( not n195 and not lo03 )
      or ( n195 and lo03 );
    n197 <= ( not lo00 and lo57 )
      or ( lo00 and not lo57 );
    n198 <= ( not lo01 and lo58 )
      or ( lo01 and not lo58 );
    n199 <= ( not lo02 and lo59 )
      or ( lo02 and not lo59 );
    n200 <= ( not lo03 and lo60 )
      or ( lo03 and not lo60 );
    n201 <= not (( not n197 and not n198 ));
    n202 <= not (( not n199 and not n200 ));
    n203 <= not (( not n201 and not n202 ));
    n204 <= not (( not lo04 and n203 ));
    n205 <= not (( not lo00 and not lo01 ));
    n206 <= not (( not lo02 and not lo03 ));
    n207 <= not (( not n205 and not n206 ));
    n208 <= not (( not lo57 and not lo58 ));
    n209 <= not (( lo59 and lo60 ));
    n210 <= not (( not n208 and not n209 ));
    n211 <= ( not lo57 and lo58 )
      or ( lo57 and not lo58 );
    n212 <= ( lo57 and lo58 );
    n213 <= ( not n212 and lo59 )
      or ( n212 and not lo59 );
    n214 <= ( n212 and lo59 );
    n215 <= ( not n214 and lo60 )
      or ( n214 and not lo60 );
    n216 <= ( not lo57 and not lo05 );
    n217 <= ( n211 and not lo05 );
    n218 <= ( n213 and not lo05 );
    n219 <= ( n215 and not lo05 );
    n220 <= ( lo05 and n207 )
      or ( not n210 and not n207 );
    n221 <= ( n204 and n207 );
    n222 <= ( lo57 and n207 )
      or ( n216 and not n207 );
    n223 <= ( lo58 and n207 )
      or ( n217 and not n207 );
    n224 <= ( lo59 and n207 )
      or ( n218 and not n207 );
    n225 <= ( lo60 and n207 )
      or ( n219 and not n207 );
    li57 <= ( n222 and not pi0 );
    li58 <= ( n223 and not pi0 );
    li59 <= ( n224 and not pi0 );
    li60 <= ( n225 and not pi0 );
    li00 <= not (( lo00 and not pi0 ));
    li01 <= not (( not n192 and not pi0 ));
    li02 <= not (( not n194 and not pi0 ));
    li03 <= not (( not n196 and not pi0 ));
    li04 <= ( n221 and not pi0 );
    li05 <= ( n220 and not pi0 );
    li06 <= ( n307 and not pi0 );
    li07 <= ( n323 and not pi0 );
    n238 <= ( n242 and not pi4 )
      or ( not n243 and pi4 );
    n239 <= ( lo08 and n207 )
      or ( n238 and not n207 );
    li08 <= ( n239 and not pi0 );
    n241 <= ( pi1 and lo05 );
    n242 <= ( pi2 and lo05 );
    n243 <= ( pi3 and lo05 );
    li09 <= ( lo10 and not pi0 );
    li10 <= ( lo11 and not pi0 );
    li11 <= ( lo12 and not pi0 );
    li12 <= ( lo13 and not pi0 );
    li13 <= ( lo14 and not pi0 );
    li14 <= ( lo15 and not pi0 );
    li15 <= ( lo16 and not pi0 );
    li16 <= ( lo17 and not pi0 );
    li17 <= ( lo18 and not pi0 );
    li18 <= ( lo19 and not pi0 );
    li19 <= ( lo20 and not pi0 );
    li20 <= ( lo21 and not pi0 );
    li21 <= ( lo22 and not pi0 );
    li22 <= ( lo23 and not pi0 );
    li23 <= ( lo24 and not pi0 );
    li24 <= ( n241 and not pi0 );
    li25 <= ( lo26 and not pi0 );
    li26 <= ( lo27 and not pi0 );
    li27 <= ( lo28 and not pi0 );
    li28 <= ( lo29 and not pi0 );
    li29 <= ( lo30 and not pi0 );
    li30 <= ( lo31 and not pi0 );
    li31 <= ( lo32 and not pi0 );
    li32 <= ( lo33 and not pi0 );
    li33 <= ( lo34 and not pi0 );
    li34 <= ( lo35 and not pi0 );
    li35 <= ( lo36 and not pi0 );
    li36 <= ( lo37 and not pi0 );
    li37 <= ( lo38 and not pi0 );
    li38 <= ( lo39 and not pi0 );
    li39 <= ( lo40 and not pi0 );
    li40 <= ( n242 and not pi0 );
    li41 <= ( lo42 and not pi0 );
    li42 <= ( lo43 and not pi0 );
    li43 <= ( lo44 and not pi0 );
    li44 <= ( lo45 and not pi0 );
    li45 <= ( lo46 and not pi0 );
    li46 <= ( lo47 and not pi0 );
    li47 <= ( lo48 and not pi0 );
    li48 <= ( lo49 and not pi0 );
    li49 <= ( lo50 and not pi0 );
    li50 <= ( lo51 and not pi0 );
    li51 <= ( lo52 and not pi0 );
    li52 <= ( lo53 and not pi0 );
    li53 <= ( lo54 and not pi0 );
    li54 <= ( lo55 and not pi0 );
    li55 <= ( lo56 and not pi0 );
    li56 <= ( n243 and not pi0 );
    n292 <= ( lo09 and not lo57 )
      or ( lo10 and lo57 );
    n293 <= ( lo11 and not lo57 )
      or ( lo12 and lo57 );
    n294 <= ( n292 and not lo58 )
      or ( n293 and lo58 );
    n295 <= ( lo13 and not lo57 )
      or ( lo14 and lo57 );
    n296 <= ( lo15 and not lo57 )
      or ( lo16 and lo57 );
    n297 <= ( n295 and not lo58 )
      or ( n296 and lo58 );
    n298 <= ( n294 and not lo59 )
      or ( n297 and lo59 );
    n299 <= ( lo17 and not lo57 )
      or ( lo18 and lo57 );
    n300 <= ( lo19 and not lo57 )
      or ( lo20 and lo57 );
    n301 <= ( n299 and not lo58 )
      or ( n300 and lo58 );
    n302 <= ( lo21 and not lo57 )
      or ( lo22 and lo57 );
    n303 <= ( lo23 and not lo57 )
      or ( lo24 and lo57 );
    n304 <= ( n302 and not lo58 )
      or ( n303 and lo58 );
    n305 <= ( n301 and not lo59 )
      or ( n304 and lo59 );
    n306 <= ( n298 and not lo60 )
      or ( n305 and lo60 );
    n307 <= ( n306 and not lo04 )
      or ( lo06 and lo04 );
    n308 <= ( lo25 and not lo57 )
      or ( lo26 and lo57 );
    n309 <= ( lo27 and not lo57 )
      or ( lo28 and lo57 );
    n310 <= ( n308 and not lo58 )
      or ( n309 and lo58 );
    n311 <= ( lo29 and not lo57 )
      or ( lo30 and lo57 );
    n312 <= ( lo31 and not lo57 )
      or ( lo32 and lo57 );
    n313 <= ( n311 and not lo58 )
      or ( n312 and lo58 );
    n314 <= ( n310 and not lo59 )
      or ( n313 and lo59 );
    n315 <= ( lo33 and not lo57 )
      or ( lo34 and lo57 );
    n316 <= ( lo35 and not lo57 )
      or ( lo36 and lo57 );
    n317 <= ( n315 and not lo58 )
      or ( n316 and lo58 );
    n318 <= ( lo37 and not lo57 )
      or ( lo38 and lo57 );
    n319 <= ( lo39 and not lo57 )
      or ( lo40 and lo57 );
    n320 <= ( n318 and not lo58 )
      or ( n319 and lo58 );
    n321 <= ( n317 and not lo59 )
      or ( n320 and lo59 );
    n322 <= ( n314 and not lo60 )
      or ( n321 and lo60 );
    n323 <= ( n322 and not lo04 )
      or ( lo07 and lo04 );
    po0 <= ( lo05 );
    po1 <= ( lo09 );
    po2 <= ( lo25 );
    po3 <= ( lo41 );
end Cookbook__cordic_behav;
