library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity spi_shift is
  port (
    clk : in std_logic;
    rst : in std_logic;
    latch : in std_logic_vector (3 downto 0);
    byte_sel : in std_logic_vector (3 downto 0);
    len : in std_logic_vector (6 downto 0);
    lsb : in std_logic;
    go : in std_logic;
    pos_edge : in std_logic;
    neg_edge : in std_logic;
    rx_negedge : in std_logic;
    tx_negedge : in std_logic;
    p_in : in std_logic_vector (31 downto 0);
    s_clk : in std_logic;
    s_in : in std_logic;
    tip : out std_logic;
    last : out std_logic;
    p_out : out std_logic_vector (127 downto 0);
    s_out : out std_logic);
end entity spi_shift;

architecture rtl of spi_shift is
  signal cnt : std_logic_vector (7 downto 0);
  signal data : std_logic_vector (127 downto 0);
  signal tx_bit_pos : std_logic_vector (7 downto 0);
  signal rx_bit_pos : std_logic_vector (7 downto 0);
  signal rx_clk : std_logic;
  signal tx_clk : std_logic;
  signal n255_o : std_logic;
  signal n256_o : std_logic;
  signal n257_o : std_logic_vector (7 downto 0);
  signal n258_o : std_logic_vector (7 downto 0);
  signal n260_o : std_logic_vector (7 downto 0);
  signal n261_o : std_logic_vector (7 downto 0);
  signal n262_o : std_logic;
  signal n263_o : std_logic;
  signal n264_o : std_logic_vector (7 downto 0);
  signal n266_o : std_logic_vector (7 downto 0);
  signal n267_o : std_logic_vector (7 downto 0);
  signal n268_o : std_logic_vector (7 downto 0);
  signal n270_o : std_logic_vector (7 downto 0);
  signal n271_o : std_logic_vector (7 downto 0);
  signal n272_o : std_logic_vector (7 downto 0);
  signal n273_o : std_logic;
  signal n274_o : std_logic;
  signal n275_o : std_logic;
  signal n276_o : std_logic;
  signal n277_o : std_logic;
  signal n278_o : std_logic;
  signal n279_o : std_logic;
  signal n280_o : std_logic;
  signal n281_o : std_logic;
  signal n285_o : std_logic_vector (7 downto 0);
  signal n286_o : std_logic_vector (7 downto 0);
  signal n287_o : std_logic;
  signal n288_o : std_logic;
  signal n290_o : std_logic_vector (7 downto 0);
  signal n292_o : std_logic_vector (7 downto 0);
  signal n293_o : std_logic_vector (7 downto 0);
  signal n296_q : std_logic_vector (7 downto 0);
  signal n299_o : std_logic;
  signal n300_o : std_logic;
  signal n302_o : std_logic;
  signal n303_o : std_logic;
  signal n305_o : std_logic;
  signal n306_o : std_logic;
  signal n309_q : std_logic;
  signal n312_o : std_logic;
  signal n313_o : std_logic;
  signal n314_o : std_logic_vector (6 downto 0);
  signal n316_o : std_logic_vector (6 downto 0);
  signal n322_o : std_logic;
  signal n323_q : std_logic;
  signal n326_o : std_logic;
  signal n327_o : std_logic;
  signal n328_o : std_logic;
  signal n329_o : std_logic;
  signal n330_o : std_logic_vector (7 downto 0);
  signal n331_o : std_logic_vector (7 downto 0);
  signal n332_o : std_logic_vector (7 downto 0);
  signal n333_o : std_logic;
  signal n334_o : std_logic_vector (7 downto 0);
  signal n335_o : std_logic_vector (7 downto 0);
  signal n336_o : std_logic_vector (7 downto 0);
  signal n337_o : std_logic;
  signal n338_o : std_logic_vector (7 downto 0);
  signal n339_o : std_logic_vector (7 downto 0);
  signal n340_o : std_logic_vector (7 downto 0);
  signal n341_o : std_logic;
  signal n342_o : std_logic_vector (7 downto 0);
  signal n343_o : std_logic_vector (7 downto 0);
  signal n344_o : std_logic_vector (7 downto 0);
  signal n345_o : std_logic;
  signal n346_o : std_logic;
  signal n347_o : std_logic;
  signal n348_o : std_logic;
  signal n349_o : std_logic_vector (7 downto 0);
  signal n350_o : std_logic_vector (7 downto 0);
  signal n351_o : std_logic_vector (7 downto 0);
  signal n352_o : std_logic;
  signal n353_o : std_logic_vector (7 downto 0);
  signal n354_o : std_logic_vector (7 downto 0);
  signal n355_o : std_logic_vector (7 downto 0);
  signal n356_o : std_logic;
  signal n357_o : std_logic_vector (7 downto 0);
  signal n358_o : std_logic_vector (7 downto 0);
  signal n359_o : std_logic_vector (7 downto 0);
  signal n360_o : std_logic;
  signal n361_o : std_logic_vector (7 downto 0);
  signal n362_o : std_logic_vector (7 downto 0);
  signal n363_o : std_logic_vector (7 downto 0);
  signal n364_o : std_logic;
  signal n365_o : std_logic;
  signal n366_o : std_logic;
  signal n367_o : std_logic;
  signal n368_o : std_logic_vector (7 downto 0);
  signal n369_o : std_logic_vector (7 downto 0);
  signal n370_o : std_logic_vector (7 downto 0);
  signal n371_o : std_logic;
  signal n372_o : std_logic_vector (7 downto 0);
  signal n373_o : std_logic_vector (7 downto 0);
  signal n374_o : std_logic_vector (7 downto 0);
  signal n375_o : std_logic;
  signal n376_o : std_logic_vector (7 downto 0);
  signal n377_o : std_logic_vector (7 downto 0);
  signal n378_o : std_logic_vector (7 downto 0);
  signal n379_o : std_logic;
  signal n380_o : std_logic_vector (7 downto 0);
  signal n381_o : std_logic_vector (7 downto 0);
  signal n382_o : std_logic_vector (7 downto 0);
  signal n383_o : std_logic;
  signal n384_o : std_logic;
  signal n385_o : std_logic;
  signal n386_o : std_logic;
  signal n387_o : std_logic_vector (7 downto 0);
  signal n388_o : std_logic_vector (7 downto 0);
  signal n389_o : std_logic_vector (7 downto 0);
  signal n390_o : std_logic;
  signal n391_o : std_logic_vector (7 downto 0);
  signal n392_o : std_logic_vector (7 downto 0);
  signal n393_o : std_logic_vector (7 downto 0);
  signal n394_o : std_logic;
  signal n395_o : std_logic_vector (7 downto 0);
  signal n396_o : std_logic_vector (7 downto 0);
  signal n397_o : std_logic_vector (7 downto 0);
  signal n398_o : std_logic;
  signal n399_o : std_logic_vector (7 downto 0);
  signal n400_o : std_logic_vector (7 downto 0);
  signal n401_o : std_logic_vector (7 downto 0);
  signal n402_o : std_logic_vector (6 downto 0);
  signal n404_o : std_logic_vector (6 downto 0);
  signal n407_o : std_logic;
  signal n408_o : std_logic_vector (6 downto 0);
  signal n410_o : std_logic_vector (6 downto 0);
  signal n413_o : std_logic_vector (31 downto 0);
  signal n414_o : std_logic_vector (95 downto 0);
  signal n415_o : std_logic_vector (95 downto 0);
  signal n416_o : std_logic_vector (95 downto 0);
  signal n417_o : std_logic_vector (31 downto 0);
  signal n418_o : std_logic_vector (31 downto 0);
  signal n419_o : std_logic_vector (127 downto 0);
  signal n420_o : std_logic_vector (31 downto 0);
  signal n421_o : std_logic_vector (63 downto 0);
  signal n422_o : std_logic_vector (63 downto 0);
  signal n423_o : std_logic_vector (63 downto 0);
  signal n424_o : std_logic_vector (31 downto 0);
  signal n425_o : std_logic_vector (31 downto 0);
  signal n426_o : std_logic_vector (31 downto 0);
  signal n427_o : std_logic_vector (31 downto 0);
  signal n428_o : std_logic_vector (31 downto 0);
  signal n429_o : std_logic_vector (127 downto 0);
  signal n430_o : std_logic_vector (31 downto 0);
  signal n431_o : std_logic_vector (31 downto 0);
  signal n432_o : std_logic_vector (31 downto 0);
  signal n433_o : std_logic_vector (31 downto 0);
  signal n434_o : std_logic_vector (31 downto 0);
  signal n435_o : std_logic_vector (31 downto 0);
  signal n436_o : std_logic_vector (63 downto 0);
  signal n437_o : std_logic_vector (63 downto 0);
  signal n438_o : std_logic_vector (63 downto 0);
  signal n439_o : std_logic_vector (127 downto 0);
  signal n440_o : std_logic_vector (31 downto 0);
  signal n441_o : std_logic_vector (31 downto 0);
  signal n442_o : std_logic_vector (31 downto 0);
  signal n443_o : std_logic_vector (95 downto 0);
  signal n444_o : std_logic_vector (95 downto 0);
  signal n445_o : std_logic_vector (95 downto 0);
  signal n446_o : std_logic_vector (127 downto 0);
  signal n449_q : std_logic_vector (127 downto 0);
  signal n450_o : std_logic;
  signal n451_o : std_logic;
  signal n452_o : std_logic;
  signal n453_o : std_logic;
  signal n454_o : std_logic;
  signal n455_o : std_logic;
  signal n456_o : std_logic;
  signal n457_o : std_logic;
  signal n458_o : std_logic;
  signal n459_o : std_logic;
  signal n460_o : std_logic;
  signal n461_o : std_logic;
  signal n462_o : std_logic;
  signal n463_o : std_logic;
  signal n464_o : std_logic;
  signal n465_o : std_logic;
  signal n466_o : std_logic;
  signal n467_o : std_logic;
  signal n468_o : std_logic;
  signal n469_o : std_logic;
  signal n470_o : std_logic;
  signal n471_o : std_logic;
  signal n472_o : std_logic;
  signal n473_o : std_logic;
  signal n474_o : std_logic;
  signal n475_o : std_logic;
  signal n476_o : std_logic;
  signal n477_o : std_logic;
  signal n478_o : std_logic;
  signal n479_o : std_logic;
  signal n480_o : std_logic;
  signal n481_o : std_logic;
  signal n482_o : std_logic;
  signal n483_o : std_logic;
  signal n484_o : std_logic;
  signal n485_o : std_logic;
  signal n486_o : std_logic;
  signal n487_o : std_logic;
  signal n488_o : std_logic;
  signal n489_o : std_logic;
  signal n490_o : std_logic;
  signal n491_o : std_logic;
  signal n492_o : std_logic;
  signal n493_o : std_logic;
  signal n494_o : std_logic;
  signal n495_o : std_logic;
  signal n496_o : std_logic;
  signal n497_o : std_logic;
  signal n498_o : std_logic;
  signal n499_o : std_logic;
  signal n500_o : std_logic;
  signal n501_o : std_logic;
  signal n502_o : std_logic;
  signal n503_o : std_logic;
  signal n504_o : std_logic;
  signal n505_o : std_logic;
  signal n506_o : std_logic;
  signal n507_o : std_logic;
  signal n508_o : std_logic;
  signal n509_o : std_logic;
  signal n510_o : std_logic;
  signal n511_o : std_logic;
  signal n512_o : std_logic;
  signal n513_o : std_logic;
  signal n514_o : std_logic;
  signal n515_o : std_logic;
  signal n516_o : std_logic;
  signal n517_o : std_logic;
  signal n518_o : std_logic;
  signal n519_o : std_logic;
  signal n520_o : std_logic;
  signal n521_o : std_logic;
  signal n522_o : std_logic;
  signal n523_o : std_logic;
  signal n524_o : std_logic;
  signal n525_o : std_logic;
  signal n526_o : std_logic;
  signal n527_o : std_logic;
  signal n528_o : std_logic;
  signal n529_o : std_logic;
  signal n530_o : std_logic;
  signal n531_o : std_logic;
  signal n532_o : std_logic;
  signal n533_o : std_logic;
  signal n534_o : std_logic;
  signal n535_o : std_logic;
  signal n536_o : std_logic;
  signal n537_o : std_logic;
  signal n538_o : std_logic;
  signal n539_o : std_logic;
  signal n540_o : std_logic;
  signal n541_o : std_logic;
  signal n542_o : std_logic;
  signal n543_o : std_logic;
  signal n544_o : std_logic;
  signal n545_o : std_logic;
  signal n546_o : std_logic;
  signal n547_o : std_logic;
  signal n548_o : std_logic;
  signal n549_o : std_logic;
  signal n550_o : std_logic;
  signal n551_o : std_logic;
  signal n552_o : std_logic;
  signal n553_o : std_logic;
  signal n554_o : std_logic;
  signal n555_o : std_logic;
  signal n556_o : std_logic;
  signal n557_o : std_logic;
  signal n558_o : std_logic;
  signal n559_o : std_logic;
  signal n560_o : std_logic;
  signal n561_o : std_logic;
  signal n562_o : std_logic;
  signal n563_o : std_logic;
  signal n564_o : std_logic;
  signal n565_o : std_logic;
  signal n566_o : std_logic;
  signal n567_o : std_logic;
  signal n568_o : std_logic;
  signal n569_o : std_logic;
  signal n570_o : std_logic;
  signal n571_o : std_logic;
  signal n572_o : std_logic;
  signal n573_o : std_logic;
  signal n574_o : std_logic;
  signal n575_o : std_logic;
  signal n576_o : std_logic;
  signal n577_o : std_logic;
  signal n578_o : std_logic_vector (1 downto 0);
  signal n579_o : std_logic;
  signal n580_o : std_logic_vector (1 downto 0);
  signal n581_o : std_logic;
  signal n582_o : std_logic_vector (1 downto 0);
  signal n583_o : std_logic;
  signal n584_o : std_logic_vector (1 downto 0);
  signal n585_o : std_logic;
  signal n586_o : std_logic_vector (1 downto 0);
  signal n587_o : std_logic;
  signal n588_o : std_logic_vector (1 downto 0);
  signal n589_o : std_logic;
  signal n590_o : std_logic_vector (1 downto 0);
  signal n591_o : std_logic;
  signal n592_o : std_logic_vector (1 downto 0);
  signal n593_o : std_logic;
  signal n594_o : std_logic_vector (1 downto 0);
  signal n595_o : std_logic;
  signal n596_o : std_logic_vector (1 downto 0);
  signal n597_o : std_logic;
  signal n598_o : std_logic_vector (1 downto 0);
  signal n599_o : std_logic;
  signal n600_o : std_logic_vector (1 downto 0);
  signal n601_o : std_logic;
  signal n602_o : std_logic_vector (1 downto 0);
  signal n603_o : std_logic;
  signal n604_o : std_logic_vector (1 downto 0);
  signal n605_o : std_logic;
  signal n606_o : std_logic_vector (1 downto 0);
  signal n607_o : std_logic;
  signal n608_o : std_logic_vector (1 downto 0);
  signal n609_o : std_logic;
  signal n610_o : std_logic_vector (1 downto 0);
  signal n611_o : std_logic;
  signal n612_o : std_logic_vector (1 downto 0);
  signal n613_o : std_logic;
  signal n614_o : std_logic_vector (1 downto 0);
  signal n615_o : std_logic;
  signal n616_o : std_logic_vector (1 downto 0);
  signal n617_o : std_logic;
  signal n618_o : std_logic_vector (1 downto 0);
  signal n619_o : std_logic;
  signal n620_o : std_logic_vector (1 downto 0);
  signal n621_o : std_logic;
  signal n622_o : std_logic_vector (1 downto 0);
  signal n623_o : std_logic;
  signal n624_o : std_logic_vector (1 downto 0);
  signal n625_o : std_logic;
  signal n626_o : std_logic_vector (1 downto 0);
  signal n627_o : std_logic;
  signal n628_o : std_logic_vector (1 downto 0);
  signal n629_o : std_logic;
  signal n630_o : std_logic_vector (1 downto 0);
  signal n631_o : std_logic;
  signal n632_o : std_logic_vector (1 downto 0);
  signal n633_o : std_logic;
  signal n634_o : std_logic_vector (1 downto 0);
  signal n635_o : std_logic;
  signal n636_o : std_logic_vector (1 downto 0);
  signal n637_o : std_logic;
  signal n638_o : std_logic_vector (1 downto 0);
  signal n639_o : std_logic;
  signal n640_o : std_logic_vector (1 downto 0);
  signal n641_o : std_logic;
  signal n642_o : std_logic_vector (1 downto 0);
  signal n643_o : std_logic;
  signal n644_o : std_logic_vector (1 downto 0);
  signal n645_o : std_logic;
  signal n646_o : std_logic_vector (1 downto 0);
  signal n647_o : std_logic;
  signal n648_o : std_logic_vector (1 downto 0);
  signal n649_o : std_logic;
  signal n650_o : std_logic_vector (1 downto 0);
  signal n651_o : std_logic;
  signal n652_o : std_logic_vector (1 downto 0);
  signal n653_o : std_logic;
  signal n654_o : std_logic_vector (1 downto 0);
  signal n655_o : std_logic;
  signal n656_o : std_logic_vector (1 downto 0);
  signal n657_o : std_logic;
  signal n658_o : std_logic_vector (1 downto 0);
  signal n659_o : std_logic;
  signal n660_o : std_logic_vector (1 downto 0);
  signal n661_o : std_logic;
  signal n662_o : std_logic;
  signal n663_o : std_logic;
  signal n664_o : std_logic;
  signal n665_o : std_logic;
  signal n666_o : std_logic;
  signal n667_o : std_logic;
  signal n668_o : std_logic;
  signal n669_o : std_logic;
  signal n670_o : std_logic;
  signal n671_o : std_logic;
  signal n672_o : std_logic;
  signal n673_o : std_logic;
  signal n674_o : std_logic;
  signal n675_o : std_logic;
  signal n676_o : std_logic;
  signal n677_o : std_logic;
  signal n678_o : std_logic;
  signal n679_o : std_logic;
  signal n680_o : std_logic;
  signal n681_o : std_logic;
  signal n682_o : std_logic;
  signal n683_o : std_logic;
  signal n684_o : std_logic;
  signal n685_o : std_logic;
  signal n686_o : std_logic;
  signal n687_o : std_logic;
  signal n688_o : std_logic;
  signal n689_o : std_logic;
  signal n690_o : std_logic;
  signal n691_o : std_logic;
  signal n692_o : std_logic;
  signal n693_o : std_logic;
  signal n694_o : std_logic;
  signal n695_o : std_logic;
  signal n696_o : std_logic;
  signal n697_o : std_logic;
  signal n698_o : std_logic;
  signal n699_o : std_logic;
  signal n700_o : std_logic;
  signal n701_o : std_logic;
  signal n702_o : std_logic;
  signal n703_o : std_logic;
  signal n704_o : std_logic;
  signal n705_o : std_logic;
  signal n706_o : std_logic;
  signal n707_o : std_logic;
  signal n708_o : std_logic;
  signal n709_o : std_logic;
  signal n710_o : std_logic;
  signal n711_o : std_logic;
  signal n712_o : std_logic;
  signal n713_o : std_logic;
  signal n714_o : std_logic;
  signal n715_o : std_logic;
  signal n716_o : std_logic;
  signal n717_o : std_logic;
  signal n718_o : std_logic;
  signal n719_o : std_logic;
  signal n720_o : std_logic;
  signal n721_o : std_logic;
  signal n722_o : std_logic;
  signal n723_o : std_logic;
  signal n724_o : std_logic;
  signal n725_o : std_logic;
  signal n726_o : std_logic;
  signal n727_o : std_logic;
  signal n728_o : std_logic;
  signal n729_o : std_logic;
  signal n730_o : std_logic;
  signal n731_o : std_logic;
  signal n732_o : std_logic;
  signal n733_o : std_logic;
  signal n734_o : std_logic;
  signal n735_o : std_logic;
  signal n736_o : std_logic;
  signal n737_o : std_logic;
  signal n738_o : std_logic;
  signal n739_o : std_logic;
  signal n740_o : std_logic;
  signal n741_o : std_logic;
  signal n742_o : std_logic;
  signal n743_o : std_logic;
  signal n744_o : std_logic;
  signal n745_o : std_logic;
  signal n746_o : std_logic;
  signal n747_o : std_logic;
  signal n748_o : std_logic;
  signal n749_o : std_logic;
  signal n750_o : std_logic;
  signal n751_o : std_logic;
  signal n752_o : std_logic;
  signal n753_o : std_logic;
  signal n754_o : std_logic;
  signal n755_o : std_logic;
  signal n756_o : std_logic;
  signal n757_o : std_logic;
  signal n758_o : std_logic;
  signal n759_o : std_logic;
  signal n760_o : std_logic;
  signal n761_o : std_logic;
  signal n762_o : std_logic;
  signal n763_o : std_logic;
  signal n764_o : std_logic;
  signal n765_o : std_logic;
  signal n766_o : std_logic;
  signal n767_o : std_logic;
  signal n768_o : std_logic;
  signal n769_o : std_logic;
  signal n770_o : std_logic;
  signal n771_o : std_logic;
  signal n772_o : std_logic;
  signal n773_o : std_logic;
  signal n774_o : std_logic;
  signal n775_o : std_logic;
  signal n776_o : std_logic;
  signal n777_o : std_logic;
  signal n778_o : std_logic;
  signal n779_o : std_logic;
  signal n780_o : std_logic;
  signal n781_o : std_logic;
  signal n782_o : std_logic;
  signal n783_o : std_logic;
  signal n784_o : std_logic;
  signal n785_o : std_logic;
  signal n786_o : std_logic;
  signal n787_o : std_logic;
  signal n788_o : std_logic;
  signal n789_o : std_logic;
  signal n790_o : std_logic;
  signal n791_o : std_logic;
  signal n792_o : std_logic_vector (1 downto 0);
  signal n793_o : std_logic;
  signal n794_o : std_logic_vector (1 downto 0);
  signal n795_o : std_logic;
  signal n796_o : std_logic_vector (1 downto 0);
  signal n797_o : std_logic;
  signal n798_o : std_logic_vector (1 downto 0);
  signal n799_o : std_logic;
  signal n800_o : std_logic_vector (1 downto 0);
  signal n801_o : std_logic;
  signal n802_o : std_logic_vector (1 downto 0);
  signal n803_o : std_logic;
  signal n804_o : std_logic_vector (1 downto 0);
  signal n805_o : std_logic;
  signal n806_o : std_logic_vector (1 downto 0);
  signal n807_o : std_logic;
  signal n808_o : std_logic_vector (1 downto 0);
  signal n809_o : std_logic;
  signal n810_o : std_logic_vector (1 downto 0);
  signal n811_o : std_logic;
  signal n812_o : std_logic_vector (1 downto 0);
  signal n813_o : std_logic;
  signal n814_o : std_logic_vector (1 downto 0);
  signal n815_o : std_logic;
  signal n816_o : std_logic_vector (1 downto 0);
  signal n817_o : std_logic;
  signal n818_o : std_logic_vector (1 downto 0);
  signal n819_o : std_logic;
  signal n820_o : std_logic_vector (1 downto 0);
  signal n821_o : std_logic;
  signal n822_o : std_logic_vector (1 downto 0);
  signal n823_o : std_logic;
  signal n824_o : std_logic_vector (1 downto 0);
  signal n825_o : std_logic;
  signal n826_o : std_logic_vector (1 downto 0);
  signal n827_o : std_logic;
  signal n828_o : std_logic_vector (1 downto 0);
  signal n829_o : std_logic;
  signal n830_o : std_logic_vector (1 downto 0);
  signal n831_o : std_logic;
  signal n832_o : std_logic_vector (1 downto 0);
  signal n833_o : std_logic;
  signal n834_o : std_logic_vector (1 downto 0);
  signal n835_o : std_logic;
  signal n836_o : std_logic_vector (1 downto 0);
  signal n837_o : std_logic;
  signal n838_o : std_logic_vector (1 downto 0);
  signal n839_o : std_logic;
  signal n840_o : std_logic_vector (1 downto 0);
  signal n841_o : std_logic;
  signal n842_o : std_logic_vector (1 downto 0);
  signal n843_o : std_logic;
  signal n844_o : std_logic_vector (1 downto 0);
  signal n845_o : std_logic;
  signal n846_o : std_logic_vector (1 downto 0);
  signal n847_o : std_logic;
  signal n848_o : std_logic_vector (1 downto 0);
  signal n849_o : std_logic;
  signal n850_o : std_logic_vector (1 downto 0);
  signal n851_o : std_logic;
  signal n852_o : std_logic_vector (1 downto 0);
  signal n853_o : std_logic;
  signal n854_o : std_logic_vector (1 downto 0);
  signal n855_o : std_logic;
  signal n856_o : std_logic_vector (1 downto 0);
  signal n857_o : std_logic;
  signal n858_o : std_logic_vector (1 downto 0);
  signal n859_o : std_logic;
  signal n860_o : std_logic_vector (1 downto 0);
  signal n861_o : std_logic;
  signal n862_o : std_logic_vector (1 downto 0);
  signal n863_o : std_logic;
  signal n864_o : std_logic_vector (1 downto 0);
  signal n865_o : std_logic;
  signal n866_o : std_logic_vector (1 downto 0);
  signal n867_o : std_logic;
  signal n868_o : std_logic_vector (1 downto 0);
  signal n869_o : std_logic;
  signal n870_o : std_logic_vector (1 downto 0);
  signal n871_o : std_logic;
  signal n872_o : std_logic_vector (1 downto 0);
  signal n873_o : std_logic;
  signal n874_o : std_logic_vector (1 downto 0);
  signal n875_o : std_logic;
  signal n876_o : std_logic;
  signal n877_o : std_logic;
  signal n878_o : std_logic;
  signal n879_o : std_logic;
  signal n880_o : std_logic;
  signal n881_o : std_logic;
  signal n882_o : std_logic;
  signal n883_o : std_logic;
  signal n884_o : std_logic;
  signal n885_o : std_logic;
  signal n886_o : std_logic;
  signal n887_o : std_logic;
  signal n888_o : std_logic;
  signal n889_o : std_logic;
  signal n890_o : std_logic;
  signal n891_o : std_logic;
  signal n892_o : std_logic;
  signal n893_o : std_logic;
  signal n894_o : std_logic;
  signal n895_o : std_logic;
  signal n896_o : std_logic;
  signal n897_o : std_logic;
  signal n898_o : std_logic;
  signal n899_o : std_logic;
  signal n900_o : std_logic;
  signal n901_o : std_logic;
  signal n902_o : std_logic;
  signal n903_o : std_logic;
  signal n904_o : std_logic;
  signal n905_o : std_logic;
  signal n906_o : std_logic;
  signal n907_o : std_logic;
  signal n908_o : std_logic;
  signal n909_o : std_logic;
  signal n910_o : std_logic;
  signal n911_o : std_logic;
  signal n912_o : std_logic;
  signal n913_o : std_logic;
  signal n914_o : std_logic;
  signal n915_o : std_logic;
  signal n916_o : std_logic;
  signal n917_o : std_logic;
  signal n918_o : std_logic;
  signal n919_o : std_logic;
  signal n920_o : std_logic;
  signal n921_o : std_logic;
  signal n922_o : std_logic;
  signal n923_o : std_logic;
  signal n924_o : std_logic;
  signal n925_o : std_logic;
  signal n926_o : std_logic;
  signal n927_o : std_logic;
  signal n928_o : std_logic;
  signal n929_o : std_logic;
  signal n930_o : std_logic;
  signal n931_o : std_logic;
  signal n932_o : std_logic;
  signal n933_o : std_logic;
  signal n934_o : std_logic;
  signal n935_o : std_logic;
  signal n936_o : std_logic;
  signal n937_o : std_logic;
  signal n938_o : std_logic;
  signal n939_o : std_logic;
  signal n940_o : std_logic;
  signal n941_o : std_logic;
  signal n942_o : std_logic;
  signal n943_o : std_logic;
  signal n944_o : std_logic;
  signal n945_o : std_logic;
  signal n946_o : std_logic;
  signal n947_o : std_logic;
  signal n948_o : std_logic;
  signal n949_o : std_logic;
  signal n950_o : std_logic;
  signal n951_o : std_logic;
  signal n952_o : std_logic;
  signal n953_o : std_logic;
  signal n954_o : std_logic;
  signal n955_o : std_logic;
  signal n956_o : std_logic;
  signal n957_o : std_logic;
  signal n958_o : std_logic;
  signal n959_o : std_logic;
  signal n960_o : std_logic;
  signal n961_o : std_logic;
  signal n962_o : std_logic;
  signal n963_o : std_logic;
  signal n964_o : std_logic;
  signal n965_o : std_logic;
  signal n966_o : std_logic;
  signal n967_o : std_logic;
  signal n968_o : std_logic;
  signal n969_o : std_logic;
  signal n970_o : std_logic;
  signal n971_o : std_logic;
  signal n972_o : std_logic;
  signal n973_o : std_logic;
  signal n974_o : std_logic;
  signal n975_o : std_logic;
  signal n976_o : std_logic;
  signal n977_o : std_logic;
  signal n978_o : std_logic;
  signal n979_o : std_logic;
  signal n980_o : std_logic;
  signal n981_o : std_logic;
  signal n982_o : std_logic;
  signal n983_o : std_logic;
  signal n984_o : std_logic;
  signal n985_o : std_logic;
  signal n986_o : std_logic;
  signal n987_o : std_logic;
  signal n988_o : std_logic;
  signal n989_o : std_logic;
  signal n990_o : std_logic;
  signal n991_o : std_logic;
  signal n992_o : std_logic;
  signal n993_o : std_logic;
  signal n994_o : std_logic;
  signal n995_o : std_logic;
  signal n996_o : std_logic;
  signal n997_o : std_logic;
  signal n998_o : std_logic;
  signal n999_o : std_logic;
  signal n1000_o : std_logic;
  signal n1001_o : std_logic;
  signal n1002_o : std_logic;
  signal n1003_o : std_logic;
  signal n1004_o : std_logic;
  signal n1005_o : std_logic;
  signal n1006_o : std_logic;
  signal n1007_o : std_logic;
  signal n1008_o : std_logic;
  signal n1009_o : std_logic;
  signal n1010_o : std_logic;
  signal n1011_o : std_logic;
  signal n1012_o : std_logic;
  signal n1013_o : std_logic;
  signal n1014_o : std_logic;
  signal n1015_o : std_logic;
  signal n1016_o : std_logic;
  signal n1017_o : std_logic;
  signal n1018_o : std_logic;
  signal n1019_o : std_logic;
  signal n1020_o : std_logic;
  signal n1021_o : std_logic;
  signal n1022_o : std_logic;
  signal n1023_o : std_logic;
  signal n1024_o : std_logic;
  signal n1025_o : std_logic;
  signal n1026_o : std_logic;
  signal n1027_o : std_logic;
  signal n1028_o : std_logic;
  signal n1029_o : std_logic;
  signal n1030_o : std_logic;
  signal n1031_o : std_logic;
  signal n1032_o : std_logic;
  signal n1033_o : std_logic;
  signal n1034_o : std_logic;
  signal n1035_o : std_logic;
  signal n1036_o : std_logic;
  signal n1037_o : std_logic;
  signal n1038_o : std_logic;
  signal n1039_o : std_logic;
  signal n1040_o : std_logic;
  signal n1041_o : std_logic;
  signal n1042_o : std_logic;
  signal n1043_o : std_logic;
  signal n1044_o : std_logic;
  signal n1045_o : std_logic;
  signal n1046_o : std_logic;
  signal n1047_o : std_logic;
  signal n1048_o : std_logic;
  signal n1049_o : std_logic;
  signal n1050_o : std_logic;
  signal n1051_o : std_logic;
  signal n1052_o : std_logic;
  signal n1053_o : std_logic;
  signal n1054_o : std_logic;
  signal n1055_o : std_logic;
  signal n1056_o : std_logic;
  signal n1057_o : std_logic;
  signal n1058_o : std_logic;
  signal n1059_o : std_logic;
  signal n1060_o : std_logic;
  signal n1061_o : std_logic;
  signal n1062_o : std_logic;
  signal n1063_o : std_logic;
  signal n1064_o : std_logic;
  signal n1065_o : std_logic;
  signal n1066_o : std_logic;
  signal n1067_o : std_logic;
  signal n1068_o : std_logic;
  signal n1069_o : std_logic;
  signal n1070_o : std_logic;
  signal n1071_o : std_logic;
  signal n1072_o : std_logic;
  signal n1073_o : std_logic;
  signal n1074_o : std_logic;
  signal n1075_o : std_logic;
  signal n1076_o : std_logic;
  signal n1077_o : std_logic;
  signal n1078_o : std_logic;
  signal n1079_o : std_logic;
  signal n1080_o : std_logic;
  signal n1081_o : std_logic;
  signal n1082_o : std_logic;
  signal n1083_o : std_logic;
  signal n1084_o : std_logic;
  signal n1085_o : std_logic;
  signal n1086_o : std_logic;
  signal n1087_o : std_logic;
  signal n1088_o : std_logic;
  signal n1089_o : std_logic;
  signal n1090_o : std_logic;
  signal n1091_o : std_logic;
  signal n1092_o : std_logic;
  signal n1093_o : std_logic;
  signal n1094_o : std_logic;
  signal n1095_o : std_logic;
  signal n1096_o : std_logic;
  signal n1097_o : std_logic;
  signal n1098_o : std_logic;
  signal n1099_o : std_logic;
  signal n1100_o : std_logic;
  signal n1101_o : std_logic;
  signal n1102_o : std_logic;
  signal n1103_o : std_logic;
  signal n1104_o : std_logic;
  signal n1105_o : std_logic;
  signal n1106_o : std_logic;
  signal n1107_o : std_logic;
  signal n1108_o : std_logic;
  signal n1109_o : std_logic;
  signal n1110_o : std_logic;
  signal n1111_o : std_logic;
  signal n1112_o : std_logic;
  signal n1113_o : std_logic;
  signal n1114_o : std_logic;
  signal n1115_o : std_logic;
  signal n1116_o : std_logic;
  signal n1117_o : std_logic;
  signal n1118_o : std_logic;
  signal n1119_o : std_logic;
  signal n1120_o : std_logic;
  signal n1121_o : std_logic;
  signal n1122_o : std_logic;
  signal n1123_o : std_logic;
  signal n1124_o : std_logic;
  signal n1125_o : std_logic;
  signal n1126_o : std_logic;
  signal n1127_o : std_logic;
  signal n1128_o : std_logic;
  signal n1129_o : std_logic;
  signal n1130_o : std_logic;
  signal n1131_o : std_logic;
  signal n1132_o : std_logic;
  signal n1133_o : std_logic;
  signal n1134_o : std_logic;
  signal n1135_o : std_logic;
  signal n1136_o : std_logic;
  signal n1137_o : std_logic;
  signal n1138_o : std_logic;
  signal n1139_o : std_logic;
  signal n1140_o : std_logic;
  signal n1141_o : std_logic;
  signal n1142_o : std_logic;
  signal n1143_o : std_logic;
  signal n1144_o : std_logic;
  signal n1145_o : std_logic;
  signal n1146_o : std_logic;
  signal n1147_o : std_logic;
  signal n1148_o : std_logic;
  signal n1149_o : std_logic;
  signal n1150_o : std_logic;
  signal n1151_o : std_logic;
  signal n1152_o : std_logic;
  signal n1153_o : std_logic;
  signal n1154_o : std_logic;
  signal n1155_o : std_logic;
  signal n1156_o : std_logic;
  signal n1157_o : std_logic;
  signal n1158_o : std_logic;
  signal n1159_o : std_logic;
  signal n1160_o : std_logic;
  signal n1161_o : std_logic;
  signal n1162_o : std_logic;
  signal n1163_o : std_logic;
  signal n1164_o : std_logic;
  signal n1165_o : std_logic;
  signal n1166_o : std_logic;
  signal n1167_o : std_logic;
  signal n1168_o : std_logic;
  signal n1169_o : std_logic;
  signal n1170_o : std_logic;
  signal n1171_o : std_logic;
  signal n1172_o : std_logic;
  signal n1173_o : std_logic;
  signal n1174_o : std_logic;
  signal n1175_o : std_logic;
  signal n1176_o : std_logic;
  signal n1177_o : std_logic;
  signal n1178_o : std_logic;
  signal n1179_o : std_logic;
  signal n1180_o : std_logic;
  signal n1181_o : std_logic;
  signal n1182_o : std_logic;
  signal n1183_o : std_logic;
  signal n1184_o : std_logic;
  signal n1185_o : std_logic;
  signal n1186_o : std_logic;
  signal n1187_o : std_logic;
  signal n1188_o : std_logic;
  signal n1189_o : std_logic;
  signal n1190_o : std_logic;
  signal n1191_o : std_logic;
  signal n1192_o : std_logic;
  signal n1193_o : std_logic;
  signal n1194_o : std_logic;
  signal n1195_o : std_logic;
  signal n1196_o : std_logic;
  signal n1197_o : std_logic;
  signal n1198_o : std_logic;
  signal n1199_o : std_logic;
  signal n1200_o : std_logic;
  signal n1201_o : std_logic;
  signal n1202_o : std_logic;
  signal n1203_o : std_logic;
  signal n1204_o : std_logic;
  signal n1205_o : std_logic;
  signal n1206_o : std_logic;
  signal n1207_o : std_logic;
  signal n1208_o : std_logic;
  signal n1209_o : std_logic;
  signal n1210_o : std_logic;
  signal n1211_o : std_logic;
  signal n1212_o : std_logic;
  signal n1213_o : std_logic;
  signal n1214_o : std_logic;
  signal n1215_o : std_logic;
  signal n1216_o : std_logic;
  signal n1217_o : std_logic;
  signal n1218_o : std_logic;
  signal n1219_o : std_logic;
  signal n1220_o : std_logic;
  signal n1221_o : std_logic;
  signal n1222_o : std_logic;
  signal n1223_o : std_logic;
  signal n1224_o : std_logic;
  signal n1225_o : std_logic;
  signal n1226_o : std_logic;
  signal n1227_o : std_logic;
  signal n1228_o : std_logic;
  signal n1229_o : std_logic;
  signal n1230_o : std_logic;
  signal n1231_o : std_logic;
  signal n1232_o : std_logic;
  signal n1233_o : std_logic;
  signal n1234_o : std_logic;
  signal n1235_o : std_logic;
  signal n1236_o : std_logic;
  signal n1237_o : std_logic;
  signal n1238_o : std_logic;
  signal n1239_o : std_logic;
  signal n1240_o : std_logic;
  signal n1241_o : std_logic;
  signal n1242_o : std_logic;
  signal n1243_o : std_logic;
  signal n1244_o : std_logic;
  signal n1245_o : std_logic;
  signal n1246_o : std_logic;
  signal n1247_o : std_logic;
  signal n1248_o : std_logic;
  signal n1249_o : std_logic;
  signal n1250_o : std_logic;
  signal n1251_o : std_logic;
  signal n1252_o : std_logic;
  signal n1253_o : std_logic;
  signal n1254_o : std_logic;
  signal n1255_o : std_logic;
  signal n1256_o : std_logic;
  signal n1257_o : std_logic;
  signal n1258_o : std_logic;
  signal n1259_o : std_logic;
  signal n1260_o : std_logic;
  signal n1261_o : std_logic;
  signal n1262_o : std_logic;
  signal n1263_o : std_logic;
  signal n1264_o : std_logic;
  signal n1265_o : std_logic;
  signal n1266_o : std_logic;
  signal n1267_o : std_logic;
  signal n1268_o : std_logic;
  signal n1269_o : std_logic;
  signal n1270_o : std_logic;
  signal n1271_o : std_logic;
  signal n1272_o : std_logic;
  signal n1273_o : std_logic;
  signal n1274_o : std_logic;
  signal n1275_o : std_logic;
  signal n1276_o : std_logic;
  signal n1277_o : std_logic;
  signal n1278_o : std_logic;
  signal n1279_o : std_logic;
  signal n1280_o : std_logic;
  signal n1281_o : std_logic;
  signal n1282_o : std_logic;
  signal n1283_o : std_logic;
  signal n1284_o : std_logic;
  signal n1285_o : std_logic;
  signal n1286_o : std_logic;
  signal n1287_o : std_logic;
  signal n1288_o : std_logic;
  signal n1289_o : std_logic;
  signal n1290_o : std_logic;
  signal n1291_o : std_logic;
  signal n1292_o : std_logic;
  signal n1293_o : std_logic;
  signal n1294_o : std_logic;
  signal n1295_o : std_logic;
  signal n1296_o : std_logic;
  signal n1297_o : std_logic;
  signal n1298_o : std_logic;
  signal n1299_o : std_logic;
  signal n1300_o : std_logic;
  signal n1301_o : std_logic;
  signal n1302_o : std_logic;
  signal n1303_o : std_logic;
  signal n1304_o : std_logic;
  signal n1305_o : std_logic;
  signal n1306_o : std_logic;
  signal n1307_o : std_logic;
  signal n1308_o : std_logic;
  signal n1309_o : std_logic;
  signal n1310_o : std_logic;
  signal n1311_o : std_logic;
  signal n1312_o : std_logic;
  signal n1313_o : std_logic;
  signal n1314_o : std_logic;
  signal n1315_o : std_logic;
  signal n1316_o : std_logic;
  signal n1317_o : std_logic;
  signal n1318_o : std_logic;
  signal n1319_o : std_logic;
  signal n1320_o : std_logic;
  signal n1321_o : std_logic;
  signal n1322_o : std_logic;
  signal n1323_o : std_logic;
  signal n1324_o : std_logic;
  signal n1325_o : std_logic;
  signal n1326_o : std_logic;
  signal n1327_o : std_logic;
  signal n1328_o : std_logic;
  signal n1329_o : std_logic;
  signal n1330_o : std_logic;
  signal n1331_o : std_logic;
  signal n1332_o : std_logic;
  signal n1333_o : std_logic;
  signal n1334_o : std_logic;
  signal n1335_o : std_logic;
  signal n1336_o : std_logic;
  signal n1337_o : std_logic;
  signal n1338_o : std_logic;
  signal n1339_o : std_logic;
  signal n1340_o : std_logic;
  signal n1341_o : std_logic;
  signal n1342_o : std_logic;
  signal n1343_o : std_logic;
  signal n1344_o : std_logic;
  signal n1345_o : std_logic;
  signal n1346_o : std_logic;
  signal n1347_o : std_logic;
  signal n1348_o : std_logic;
  signal n1349_o : std_logic;
  signal n1350_o : std_logic;
  signal n1351_o : std_logic;
  signal n1352_o : std_logic;
  signal n1353_o : std_logic;
  signal n1354_o : std_logic;
  signal n1355_o : std_logic;
  signal n1356_o : std_logic;
  signal n1357_o : std_logic;
  signal n1358_o : std_logic;
  signal n1359_o : std_logic;
  signal n1360_o : std_logic;
  signal n1361_o : std_logic;
  signal n1362_o : std_logic;
  signal n1363_o : std_logic;
  signal n1364_o : std_logic;
  signal n1365_o : std_logic;
  signal n1366_o : std_logic;
  signal n1367_o : std_logic;
  signal n1368_o : std_logic;
  signal n1369_o : std_logic;
  signal n1370_o : std_logic;
  signal n1371_o : std_logic;
  signal n1372_o : std_logic;
  signal n1373_o : std_logic;
  signal n1374_o : std_logic;
  signal n1375_o : std_logic;
  signal n1376_o : std_logic;
  signal n1377_o : std_logic;
  signal n1378_o : std_logic;
  signal n1379_o : std_logic;
  signal n1380_o : std_logic;
  signal n1381_o : std_logic;
  signal n1382_o : std_logic;
  signal n1383_o : std_logic;
  signal n1384_o : std_logic;
  signal n1385_o : std_logic;
  signal n1386_o : std_logic;
  signal n1387_o : std_logic;
  signal n1388_o : std_logic;
  signal n1389_o : std_logic;
  signal n1390_o : std_logic;
  signal n1391_o : std_logic;
  signal n1392_o : std_logic;
  signal n1393_o : std_logic;
  signal n1394_o : std_logic;
  signal n1395_o : std_logic;
  signal n1396_o : std_logic;
  signal n1397_o : std_logic;
  signal n1398_o : std_logic;
  signal n1399_o : std_logic;
  signal n1400_o : std_logic_vector (127 downto 0);
begin
  tip <= n309_q;
  last <= n274_o;
  p_out <= data;
  s_out <= n323_q;
  -- spi_shift.v:81:34
  cnt <= n296_q; -- (signal)
  -- spi_shift.v:82:34
  data <= n449_q; -- (signal)
  -- spi_shift.v:83:34
  tx_bit_pos <= n261_o; -- (signal)
  -- spi_shift.v:84:34
  rx_bit_pos <= n272_o; -- (signal)
  -- spi_shift.v:85:34
  rx_clk <= n278_o; -- (signal)
  -- spi_shift.v:86:34
  tx_clk <= n281_o; -- (signal)
  -- spi_shift.v:90:32
  n255_o <= '1' when len /= (6 downto 0 => '0') else '0';
  -- spi_shift.v:90:30
  n256_o <= not n255_o;
  n257_o <= n256_o & len;
  -- spi_shift.v:90:44
  n258_o <= std_logic_vector (unsigned (n257_o) - unsigned (cnt));
  -- spi_shift.v:90:56
  n260_o <= std_logic_vector (unsigned (cnt) - unsigned'("00000001"));
  -- spi_shift.v:90:27
  n261_o <= n260_o when lsb = '0' else n258_o;
  -- spi_shift.v:91:32
  n262_o <= '1' when len /= (6 downto 0 => '0') else '0';
  -- spi_shift.v:91:30
  n263_o <= not n262_o;
  n264_o <= n263_o & len;
  -- spi_shift.v:91:64
  n266_o <= std_logic_vector (unsigned (cnt) + unsigned'("00000001"));
  -- spi_shift.v:91:58
  n267_o <= cnt when rx_negedge = '0' else n266_o;
  -- spi_shift.v:91:44
  n268_o <= std_logic_vector (unsigned (n264_o) - unsigned (n267_o));
  -- spi_shift.v:92:53
  n270_o <= std_logic_vector (unsigned (cnt) - unsigned'("00000001"));
  -- spi_shift.v:92:41
  n271_o <= n270_o when rx_negedge = '0' else cnt;
  -- spi_shift.v:91:27
  n272_o <= n271_o when lsb = '0' else n268_o;
  -- spi_shift.v:94:19
  n273_o <= '1' when cnt /= (7 downto 0 => '0') else '0';
  -- spi_shift.v:94:17
  n274_o <= not n273_o;
  -- spi_shift.v:96:31
  n275_o <= pos_edge when rx_negedge = '0' else neg_edge;
  -- spi_shift.v:96:58
  n276_o <= not n274_o;
  -- spi_shift.v:96:64
  n277_o <= n276_o or s_clk;
  -- spi_shift.v:96:54
  n278_o <= n275_o and n277_o;
  -- spi_shift.v:97:31
  n279_o <= pos_edge when tx_negedge = '0' else neg_edge;
  -- spi_shift.v:97:57
  n280_o <= not n274_o;
  -- spi_shift.v:97:54
  n281_o <= n279_o and n280_o;
  -- spi_shift.v:107:38
  n285_o <= std_logic_vector (unsigned (cnt) - unsigned'("00000001"));
  -- spi_shift.v:107:31
  n286_o <= cnt when pos_edge = '0' else n285_o;
  -- spi_shift.v:109:24
  n287_o <= '1' when len /= (6 downto 0 => '0') else '0';
  -- spi_shift.v:109:22
  n288_o <= not n287_o;
  n290_o <= '0' & len;
  -- spi_shift.v:109:30
  n292_o <= n290_o when n288_o = '0' else "10000000";
  -- spi_shift.v:106:9
  n293_o <= n292_o when n309_q = '0' else n286_o;
  -- spi_shift.v:100:3
  process (clk, rst)
  begin
    if rst = '1' then
      n296_q <= "00000000";
    elsif rising_edge (clk) then
      n296_q <= n293_o;
    end if;
  end process;
  -- spi_shift.v:118:17
  n299_o <= not n309_q;
  -- spi_shift.v:118:14
  n300_o <= go and n299_o;
  -- spi_shift.v:120:15
  n302_o <= n309_q and n274_o;
  -- spi_shift.v:120:23
  n303_o <= n302_o and pos_edge;
  -- spi_shift.v:120:8
  n305_o <= n309_q when n303_o = '0' else '0';
  -- spi_shift.v:118:8
  n306_o <= n305_o when n300_o = '0' else '1';
  -- spi_shift.v:114:3
  process (clk, rst)
  begin
    if rst = '1' then
      n309_q <= '0';
    elsif rising_edge (clk) then
      n309_q <= n306_o;
    end if;
  end process;
  -- spi_shift.v:130:31
  n312_o <= not n309_q;
  -- spi_shift.v:130:28
  n313_o <= tx_clk or n312_o;
  n314_o <= tx_bit_pos (6 downto 0);
  -- spi_shift.v:130:77
  n316_o <= std_logic_vector (unsigned (n314_o) - unsigned'("0000000"));
  -- spi_shift.v:125:3
  n322_o <= n323_q when n313_o = '0' else n663_o;
  -- spi_shift.v:125:3
  process (clk, rst)
  begin
    if rst = '1' then
      n323_q <= '0';
    elsif rising_edge (clk) then
      n323_q <= n322_o;
    end if;
  end process;
  n326_o <= latch (0);
  -- spi_shift.v:139:28
  n327_o <= not n309_q;
  -- spi_shift.v:139:25
  n328_o <= n326_o and n327_o;
  n329_o <= byte_sel (3);
  n330_o <= p_in (31 downto 24);
  n331_o <= data (31 downto 24);
  -- spi_shift.v:141:11
  n332_o <= n331_o when n329_o = '0' else n330_o;
  n333_o <= byte_sel (2);
  n334_o <= p_in (23 downto 16);
  n335_o <= data (23 downto 16);
  -- spi_shift.v:143:11
  n336_o <= n335_o when n333_o = '0' else n334_o;
  n337_o <= byte_sel (1);
  n338_o <= p_in (15 downto 8);
  n339_o <= data (15 downto 8);
  -- spi_shift.v:145:11
  n340_o <= n339_o when n337_o = '0' else n338_o;
  n341_o <= byte_sel (0);
  n342_o <= p_in (7 downto 0);
  n343_o <= data (7 downto 0);
  -- spi_shift.v:147:11
  n344_o <= n343_o when n341_o = '0' else n342_o;
  n345_o <= latch (1);
  -- spi_shift.v:150:28
  n346_o <= not n309_q;
  -- spi_shift.v:150:25
  n347_o <= n345_o and n346_o;
  n348_o <= byte_sel (3);
  n349_o <= p_in (31 downto 24);
  n350_o <= data (63 downto 56);
  -- spi_shift.v:152:11
  n351_o <= n350_o when n348_o = '0' else n349_o;
  n352_o <= byte_sel (2);
  n353_o <= p_in (23 downto 16);
  n354_o <= data (55 downto 48);
  -- spi_shift.v:154:11
  n355_o <= n354_o when n352_o = '0' else n353_o;
  n356_o <= byte_sel (1);
  n357_o <= p_in (15 downto 8);
  n358_o <= data (47 downto 40);
  -- spi_shift.v:156:11
  n359_o <= n358_o when n356_o = '0' else n357_o;
  n360_o <= byte_sel (0);
  n361_o <= p_in (7 downto 0);
  n362_o <= data (39 downto 32);
  -- spi_shift.v:158:11
  n363_o <= n362_o when n360_o = '0' else n361_o;
  n364_o <= latch (2);
  -- spi_shift.v:161:28
  n365_o <= not n309_q;
  -- spi_shift.v:161:25
  n366_o <= n364_o and n365_o;
  n367_o <= byte_sel (3);
  n368_o <= p_in (31 downto 24);
  n369_o <= data (95 downto 88);
  -- spi_shift.v:163:11
  n370_o <= n369_o when n367_o = '0' else n368_o;
  n371_o <= byte_sel (2);
  n372_o <= p_in (23 downto 16);
  n373_o <= data (87 downto 80);
  -- spi_shift.v:165:11
  n374_o <= n373_o when n371_o = '0' else n372_o;
  n375_o <= byte_sel (1);
  n376_o <= p_in (15 downto 8);
  n377_o <= data (79 downto 72);
  -- spi_shift.v:167:11
  n378_o <= n377_o when n375_o = '0' else n376_o;
  n379_o <= byte_sel (0);
  n380_o <= p_in (7 downto 0);
  n381_o <= data (71 downto 64);
  -- spi_shift.v:169:11
  n382_o <= n381_o when n379_o = '0' else n380_o;
  n383_o <= latch (3);
  -- spi_shift.v:172:28
  n384_o <= not n309_q;
  -- spi_shift.v:172:25
  n385_o <= n383_o and n384_o;
  n386_o <= byte_sel (3);
  n387_o <= p_in (31 downto 24);
  n388_o <= data (127 downto 120);
  -- spi_shift.v:174:11
  n389_o <= n388_o when n386_o = '0' else n387_o;
  n390_o <= byte_sel (2);
  n391_o <= p_in (23 downto 16);
  n392_o <= data (119 downto 112);
  -- spi_shift.v:176:11
  n393_o <= n392_o when n390_o = '0' else n391_o;
  n394_o <= byte_sel (1);
  n395_o <= p_in (15 downto 8);
  n396_o <= data (111 downto 104);
  -- spi_shift.v:178:11
  n397_o <= n396_o when n394_o = '0' else n395_o;
  n398_o <= byte_sel (0);
  n399_o <= p_in (7 downto 0);
  n400_o <= data (103 downto 96);
  -- spi_shift.v:180:11
  n401_o <= n400_o when n398_o = '0' else n399_o;
  n402_o <= rx_bit_pos (6 downto 0);
  -- spi_shift.v:184:110
  n404_o <= std_logic_vector (unsigned (n402_o) - unsigned'("0000000"));
  -- spi_shift.v:184:63
  n407_o <= n877_o when rx_clk = '0' else s_in;
  n408_o <= rx_bit_pos (6 downto 0);
  -- spi_shift.v:184:47
  n410_o <= std_logic_vector (unsigned (n408_o) - unsigned'("0000000"));
  n413_o <= n389_o & n393_o & n397_o & n401_o;
  n414_o <= n1400_o (95 downto 0);
  n415_o <= data (95 downto 0);
  -- spi_shift.v:172:12
  n416_o <= n414_o when n385_o = '0' else n415_o;
  n417_o <= n1400_o (127 downto 96);
  -- spi_shift.v:172:12
  n418_o <= n417_o when n385_o = '0' else n413_o;
  n419_o <= n418_o & n416_o;
  n420_o <= n370_o & n374_o & n378_o & n382_o;
  n421_o <= n419_o (63 downto 0);
  n422_o <= data (63 downto 0);
  -- spi_shift.v:161:12
  n423_o <= n421_o when n366_o = '0' else n422_o;
  n424_o <= n419_o (95 downto 64);
  -- spi_shift.v:161:12
  n425_o <= n424_o when n366_o = '0' else n420_o;
  n426_o <= n419_o (127 downto 96);
  n427_o <= data (127 downto 96);
  -- spi_shift.v:161:12
  n428_o <= n426_o when n366_o = '0' else n427_o;
  n429_o <= n428_o & n425_o & n423_o;
  n430_o <= n351_o & n355_o & n359_o & n363_o;
  n431_o <= n429_o (31 downto 0);
  n432_o <= data (31 downto 0);
  -- spi_shift.v:150:12
  n433_o <= n431_o when n347_o = '0' else n432_o;
  n434_o <= n429_o (63 downto 32);
  -- spi_shift.v:150:12
  n435_o <= n434_o when n347_o = '0' else n430_o;
  n436_o <= n429_o (127 downto 64);
  n437_o <= data (127 downto 64);
  -- spi_shift.v:150:12
  n438_o <= n436_o when n347_o = '0' else n437_o;
  n439_o <= n438_o & n435_o & n433_o;
  n440_o <= n332_o & n336_o & n340_o & n344_o;
  n441_o <= n439_o (31 downto 0);
  -- spi_shift.v:139:12
  n442_o <= n441_o when n328_o = '0' else n440_o;
  n443_o <= n439_o (127 downto 32);
  n444_o <= data (127 downto 32);
  -- spi_shift.v:139:12
  n445_o <= n443_o when n328_o = '0' else n444_o;
  n446_o <= n445_o & n442_o;
  -- spi_shift.v:135:5
  process (clk, rst)
  begin
    if rst = '1' then
      n449_q <= "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
    elsif rising_edge (clk) then
      n449_q <= n446_o;
    end if;
  end process;
  -- spi_shift.v:76:39
  n450_o <= data (0);
  -- spi_shift.v:73:34
  n451_o <= data (1);
  -- spi_shift.v:71:38
  n452_o <= data (2);
  -- spi_shift.v:70:37
  n453_o <= data (3);
  -- spi_shift.v:125:3
  n454_o <= data (4);
  -- spi_shift.v:137:7
  n455_o <= data (5);
  n456_o <= data (6);
  n457_o <= data (7);
  n458_o <= data (8);
  n459_o <= data (9);
  n460_o <= data (10);
  n461_o <= data (11);
  n462_o <= data (12);
  n463_o <= data (13);
  n464_o <= data (14);
  n465_o <= data (15);
  n466_o <= data (16);
  n467_o <= data (17);
  n468_o <= data (18);
  n469_o <= data (19);
  n470_o <= data (20);
  n471_o <= data (21);
  n472_o <= data (22);
  n473_o <= data (23);
  n474_o <= data (24);
  n475_o <= data (25);
  n476_o <= data (26);
  n477_o <= data (27);
  n478_o <= data (28);
  n479_o <= data (29);
  n480_o <= data (30);
  n481_o <= data (31);
  n482_o <= data (32);
  n483_o <= data (33);
  n484_o <= data (34);
  n485_o <= data (35);
  n486_o <= data (36);
  n487_o <= data (37);
  n488_o <= data (38);
  n489_o <= data (39);
  n490_o <= data (40);
  n491_o <= data (41);
  n492_o <= data (42);
  n493_o <= data (43);
  n494_o <= data (44);
  n495_o <= data (45);
  n496_o <= data (46);
  n497_o <= data (47);
  n498_o <= data (48);
  n499_o <= data (49);
  n500_o <= data (50);
  n501_o <= data (51);
  n502_o <= data (52);
  n503_o <= data (53);
  n504_o <= data (54);
  n505_o <= data (55);
  n506_o <= data (56);
  n507_o <= data (57);
  n508_o <= data (58);
  n509_o <= data (59);
  n510_o <= data (60);
  n511_o <= data (61);
  n512_o <= data (62);
  n513_o <= data (63);
  n514_o <= data (64);
  n515_o <= data (65);
  n516_o <= data (66);
  n517_o <= data (67);
  n518_o <= data (68);
  n519_o <= data (69);
  n520_o <= data (70);
  n521_o <= data (71);
  n522_o <= data (72);
  n523_o <= data (73);
  n524_o <= data (74);
  n525_o <= data (75);
  n526_o <= data (76);
  n527_o <= data (77);
  n528_o <= data (78);
  n529_o <= data (79);
  n530_o <= data (80);
  n531_o <= data (81);
  n532_o <= data (82);
  n533_o <= data (83);
  n534_o <= data (84);
  n535_o <= data (85);
  n536_o <= data (86);
  n537_o <= data (87);
  n538_o <= data (88);
  n539_o <= data (89);
  n540_o <= data (90);
  n541_o <= data (91);
  n542_o <= data (92);
  n543_o <= data (93);
  n544_o <= data (94);
  n545_o <= data (95);
  n546_o <= data (96);
  n547_o <= data (97);
  n548_o <= data (98);
  n549_o <= data (99);
  n550_o <= data (100);
  n551_o <= data (101);
  n552_o <= data (102);
  n553_o <= data (103);
  n554_o <= data (104);
  n555_o <= data (105);
  n556_o <= data (106);
  n557_o <= data (107);
  n558_o <= data (108);
  n559_o <= data (109);
  n560_o <= data (110);
  n561_o <= data (111);
  n562_o <= data (112);
  n563_o <= data (113);
  n564_o <= data (114);
  n565_o <= data (115);
  n566_o <= data (116);
  n567_o <= data (117);
  n568_o <= data (118);
  n569_o <= data (119);
  n570_o <= data (120);
  n571_o <= data (121);
  n572_o <= data (122);
  n573_o <= data (123);
  n574_o <= data (124);
  n575_o <= data (125);
  n576_o <= data (126);
  n577_o <= data (127);
  -- spi_shift.v:130:77
  n578_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n578_o select n579_o <=
    n450_o when "00",
    n451_o when "01",
    n452_o when "10",
    n453_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n580_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n580_o select n581_o <=
    n454_o when "00",
    n455_o when "01",
    n456_o when "10",
    n457_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n582_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n582_o select n583_o <=
    n458_o when "00",
    n459_o when "01",
    n460_o when "10",
    n461_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n584_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n584_o select n585_o <=
    n462_o when "00",
    n463_o when "01",
    n464_o when "10",
    n465_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n586_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n586_o select n587_o <=
    n466_o when "00",
    n467_o when "01",
    n468_o when "10",
    n469_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n588_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n588_o select n589_o <=
    n470_o when "00",
    n471_o when "01",
    n472_o when "10",
    n473_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n590_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n590_o select n591_o <=
    n474_o when "00",
    n475_o when "01",
    n476_o when "10",
    n477_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n592_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n592_o select n593_o <=
    n478_o when "00",
    n479_o when "01",
    n480_o when "10",
    n481_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n594_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n594_o select n595_o <=
    n482_o when "00",
    n483_o when "01",
    n484_o when "10",
    n485_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n596_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n596_o select n597_o <=
    n486_o when "00",
    n487_o when "01",
    n488_o when "10",
    n489_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n598_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n598_o select n599_o <=
    n490_o when "00",
    n491_o when "01",
    n492_o when "10",
    n493_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n600_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n600_o select n601_o <=
    n494_o when "00",
    n495_o when "01",
    n496_o when "10",
    n497_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n602_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n602_o select n603_o <=
    n498_o when "00",
    n499_o when "01",
    n500_o when "10",
    n501_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n604_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n604_o select n605_o <=
    n502_o when "00",
    n503_o when "01",
    n504_o when "10",
    n505_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n606_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n606_o select n607_o <=
    n506_o when "00",
    n507_o when "01",
    n508_o when "10",
    n509_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n608_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n608_o select n609_o <=
    n510_o when "00",
    n511_o when "01",
    n512_o when "10",
    n513_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n610_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n610_o select n611_o <=
    n514_o when "00",
    n515_o when "01",
    n516_o when "10",
    n517_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n612_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n612_o select n613_o <=
    n518_o when "00",
    n519_o when "01",
    n520_o when "10",
    n521_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n614_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n614_o select n615_o <=
    n522_o when "00",
    n523_o when "01",
    n524_o when "10",
    n525_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n616_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n616_o select n617_o <=
    n526_o when "00",
    n527_o when "01",
    n528_o when "10",
    n529_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n618_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n618_o select n619_o <=
    n530_o when "00",
    n531_o when "01",
    n532_o when "10",
    n533_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n620_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n620_o select n621_o <=
    n534_o when "00",
    n535_o when "01",
    n536_o when "10",
    n537_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n622_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n622_o select n623_o <=
    n538_o when "00",
    n539_o when "01",
    n540_o when "10",
    n541_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n624_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n624_o select n625_o <=
    n542_o when "00",
    n543_o when "01",
    n544_o when "10",
    n545_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n626_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n626_o select n627_o <=
    n546_o when "00",
    n547_o when "01",
    n548_o when "10",
    n549_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n628_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n628_o select n629_o <=
    n550_o when "00",
    n551_o when "01",
    n552_o when "10",
    n553_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n630_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n630_o select n631_o <=
    n554_o when "00",
    n555_o when "01",
    n556_o when "10",
    n557_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n632_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n632_o select n633_o <=
    n558_o when "00",
    n559_o when "01",
    n560_o when "10",
    n561_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n634_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n634_o select n635_o <=
    n562_o when "00",
    n563_o when "01",
    n564_o when "10",
    n565_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n636_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n636_o select n637_o <=
    n566_o when "00",
    n567_o when "01",
    n568_o when "10",
    n569_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n638_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n638_o select n639_o <=
    n570_o when "00",
    n571_o when "01",
    n572_o when "10",
    n573_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n640_o <= n316_o (1 downto 0);
  -- spi_shift.v:130:77
  with n640_o select n641_o <=
    n574_o when "00",
    n575_o when "01",
    n576_o when "10",
    n577_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n642_o <= n316_o (3 downto 2);
  -- spi_shift.v:130:77
  with n642_o select n643_o <=
    n579_o when "00",
    n581_o when "01",
    n583_o when "10",
    n585_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n644_o <= n316_o (3 downto 2);
  -- spi_shift.v:130:77
  with n644_o select n645_o <=
    n587_o when "00",
    n589_o when "01",
    n591_o when "10",
    n593_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n646_o <= n316_o (3 downto 2);
  -- spi_shift.v:130:77
  with n646_o select n647_o <=
    n595_o when "00",
    n597_o when "01",
    n599_o when "10",
    n601_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n648_o <= n316_o (3 downto 2);
  -- spi_shift.v:130:77
  with n648_o select n649_o <=
    n603_o when "00",
    n605_o when "01",
    n607_o when "10",
    n609_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n650_o <= n316_o (3 downto 2);
  -- spi_shift.v:130:77
  with n650_o select n651_o <=
    n611_o when "00",
    n613_o when "01",
    n615_o when "10",
    n617_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n652_o <= n316_o (3 downto 2);
  -- spi_shift.v:130:77
  with n652_o select n653_o <=
    n619_o when "00",
    n621_o when "01",
    n623_o when "10",
    n625_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n654_o <= n316_o (3 downto 2);
  -- spi_shift.v:130:77
  with n654_o select n655_o <=
    n627_o when "00",
    n629_o when "01",
    n631_o when "10",
    n633_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n656_o <= n316_o (3 downto 2);
  -- spi_shift.v:130:77
  with n656_o select n657_o <=
    n635_o when "00",
    n637_o when "01",
    n639_o when "10",
    n641_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n658_o <= n316_o (5 downto 4);
  -- spi_shift.v:130:77
  with n658_o select n659_o <=
    n643_o when "00",
    n645_o when "01",
    n647_o when "10",
    n649_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n660_o <= n316_o (5 downto 4);
  -- spi_shift.v:130:77
  with n660_o select n661_o <=
    n651_o when "00",
    n653_o when "01",
    n655_o when "10",
    n657_o when "11",
    'X' when others;
  -- spi_shift.v:130:77
  n662_o <= n316_o (6);
  -- spi_shift.v:130:77
  n663_o <= n659_o when n662_o = '0' else n661_o;
  -- spi_shift.v:130:77
  n664_o <= data (0);
  -- spi_shift.v:130:77
  n665_o <= data (1);
  n666_o <= data (2);
  n667_o <= data (3);
  n668_o <= data (4);
  n669_o <= data (5);
  n670_o <= data (6);
  n671_o <= data (7);
  n672_o <= data (8);
  n673_o <= data (9);
  n674_o <= data (10);
  n675_o <= data (11);
  n676_o <= data (12);
  n677_o <= data (13);
  n678_o <= data (14);
  n679_o <= data (15);
  n680_o <= data (16);
  n681_o <= data (17);
  n682_o <= data (18);
  n683_o <= data (19);
  n684_o <= data (20);
  n685_o <= data (21);
  n686_o <= data (22);
  n687_o <= data (23);
  n688_o <= data (24);
  n689_o <= data (25);
  n690_o <= data (26);
  n691_o <= data (27);
  n692_o <= data (28);
  n693_o <= data (29);
  n694_o <= data (30);
  n695_o <= data (31);
  n696_o <= data (32);
  n697_o <= data (33);
  n698_o <= data (34);
  n699_o <= data (35);
  n700_o <= data (36);
  n701_o <= data (37);
  n702_o <= data (38);
  n703_o <= data (39);
  n704_o <= data (40);
  n705_o <= data (41);
  n706_o <= data (42);
  n707_o <= data (43);
  n708_o <= data (44);
  n709_o <= data (45);
  n710_o <= data (46);
  n711_o <= data (47);
  n712_o <= data (48);
  n713_o <= data (49);
  n714_o <= data (50);
  n715_o <= data (51);
  n716_o <= data (52);
  n717_o <= data (53);
  n718_o <= data (54);
  n719_o <= data (55);
  n720_o <= data (56);
  n721_o <= data (57);
  n722_o <= data (58);
  n723_o <= data (59);
  n724_o <= data (60);
  n725_o <= data (61);
  n726_o <= data (62);
  n727_o <= data (63);
  n728_o <= data (64);
  n729_o <= data (65);
  n730_o <= data (66);
  n731_o <= data (67);
  n732_o <= data (68);
  n733_o <= data (69);
  n734_o <= data (70);
  n735_o <= data (71);
  n736_o <= data (72);
  n737_o <= data (73);
  n738_o <= data (74);
  n739_o <= data (75);
  n740_o <= data (76);
  n741_o <= data (77);
  n742_o <= data (78);
  n743_o <= data (79);
  n744_o <= data (80);
  n745_o <= data (81);
  n746_o <= data (82);
  n747_o <= data (83);
  n748_o <= data (84);
  n749_o <= data (85);
  n750_o <= data (86);
  n751_o <= data (87);
  n752_o <= data (88);
  n753_o <= data (89);
  n754_o <= data (90);
  n755_o <= data (91);
  n756_o <= data (92);
  n757_o <= data (93);
  n758_o <= data (94);
  n759_o <= data (95);
  n760_o <= data (96);
  n761_o <= data (97);
  n762_o <= data (98);
  n763_o <= data (99);
  n764_o <= data (100);
  n765_o <= data (101);
  n766_o <= data (102);
  n767_o <= data (103);
  n768_o <= data (104);
  n769_o <= data (105);
  n770_o <= data (106);
  n771_o <= data (107);
  n772_o <= data (108);
  n773_o <= data (109);
  n774_o <= data (110);
  n775_o <= data (111);
  n776_o <= data (112);
  n777_o <= data (113);
  n778_o <= data (114);
  n779_o <= data (115);
  n780_o <= data (116);
  n781_o <= data (117);
  n782_o <= data (118);
  n783_o <= data (119);
  n784_o <= data (120);
  n785_o <= data (121);
  n786_o <= data (122);
  n787_o <= data (123);
  n788_o <= data (124);
  n789_o <= data (125);
  n790_o <= data (126);
  n791_o <= data (127);
  -- spi_shift.v:184:110
  n792_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n792_o select n793_o <=
    n664_o when "00",
    n665_o when "01",
    n666_o when "10",
    n667_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n794_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n794_o select n795_o <=
    n668_o when "00",
    n669_o when "01",
    n670_o when "10",
    n671_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n796_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n796_o select n797_o <=
    n672_o when "00",
    n673_o when "01",
    n674_o when "10",
    n675_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n798_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n798_o select n799_o <=
    n676_o when "00",
    n677_o when "01",
    n678_o when "10",
    n679_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n800_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n800_o select n801_o <=
    n680_o when "00",
    n681_o when "01",
    n682_o when "10",
    n683_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n802_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n802_o select n803_o <=
    n684_o when "00",
    n685_o when "01",
    n686_o when "10",
    n687_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n804_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n804_o select n805_o <=
    n688_o when "00",
    n689_o when "01",
    n690_o when "10",
    n691_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n806_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n806_o select n807_o <=
    n692_o when "00",
    n693_o when "01",
    n694_o when "10",
    n695_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n808_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n808_o select n809_o <=
    n696_o when "00",
    n697_o when "01",
    n698_o when "10",
    n699_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n810_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n810_o select n811_o <=
    n700_o when "00",
    n701_o when "01",
    n702_o when "10",
    n703_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n812_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n812_o select n813_o <=
    n704_o when "00",
    n705_o when "01",
    n706_o when "10",
    n707_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n814_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n814_o select n815_o <=
    n708_o when "00",
    n709_o when "01",
    n710_o when "10",
    n711_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n816_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n816_o select n817_o <=
    n712_o when "00",
    n713_o when "01",
    n714_o when "10",
    n715_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n818_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n818_o select n819_o <=
    n716_o when "00",
    n717_o when "01",
    n718_o when "10",
    n719_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n820_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n820_o select n821_o <=
    n720_o when "00",
    n721_o when "01",
    n722_o when "10",
    n723_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n822_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n822_o select n823_o <=
    n724_o when "00",
    n725_o when "01",
    n726_o when "10",
    n727_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n824_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n824_o select n825_o <=
    n728_o when "00",
    n729_o when "01",
    n730_o when "10",
    n731_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n826_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n826_o select n827_o <=
    n732_o when "00",
    n733_o when "01",
    n734_o when "10",
    n735_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n828_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n828_o select n829_o <=
    n736_o when "00",
    n737_o when "01",
    n738_o when "10",
    n739_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n830_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n830_o select n831_o <=
    n740_o when "00",
    n741_o when "01",
    n742_o when "10",
    n743_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n832_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n832_o select n833_o <=
    n744_o when "00",
    n745_o when "01",
    n746_o when "10",
    n747_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n834_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n834_o select n835_o <=
    n748_o when "00",
    n749_o when "01",
    n750_o when "10",
    n751_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n836_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n836_o select n837_o <=
    n752_o when "00",
    n753_o when "01",
    n754_o when "10",
    n755_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n838_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n838_o select n839_o <=
    n756_o when "00",
    n757_o when "01",
    n758_o when "10",
    n759_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n840_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n840_o select n841_o <=
    n760_o when "00",
    n761_o when "01",
    n762_o when "10",
    n763_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n842_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n842_o select n843_o <=
    n764_o when "00",
    n765_o when "01",
    n766_o when "10",
    n767_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n844_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n844_o select n845_o <=
    n768_o when "00",
    n769_o when "01",
    n770_o when "10",
    n771_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n846_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n846_o select n847_o <=
    n772_o when "00",
    n773_o when "01",
    n774_o when "10",
    n775_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n848_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n848_o select n849_o <=
    n776_o when "00",
    n777_o when "01",
    n778_o when "10",
    n779_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n850_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n850_o select n851_o <=
    n780_o when "00",
    n781_o when "01",
    n782_o when "10",
    n783_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n852_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n852_o select n853_o <=
    n784_o when "00",
    n785_o when "01",
    n786_o when "10",
    n787_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n854_o <= n404_o (1 downto 0);
  -- spi_shift.v:184:110
  with n854_o select n855_o <=
    n788_o when "00",
    n789_o when "01",
    n790_o when "10",
    n791_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n856_o <= n404_o (3 downto 2);
  -- spi_shift.v:184:110
  with n856_o select n857_o <=
    n793_o when "00",
    n795_o when "01",
    n797_o when "10",
    n799_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n858_o <= n404_o (3 downto 2);
  -- spi_shift.v:184:110
  with n858_o select n859_o <=
    n801_o when "00",
    n803_o when "01",
    n805_o when "10",
    n807_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n860_o <= n404_o (3 downto 2);
  -- spi_shift.v:184:110
  with n860_o select n861_o <=
    n809_o when "00",
    n811_o when "01",
    n813_o when "10",
    n815_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n862_o <= n404_o (3 downto 2);
  -- spi_shift.v:184:110
  with n862_o select n863_o <=
    n817_o when "00",
    n819_o when "01",
    n821_o when "10",
    n823_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n864_o <= n404_o (3 downto 2);
  -- spi_shift.v:184:110
  with n864_o select n865_o <=
    n825_o when "00",
    n827_o when "01",
    n829_o when "10",
    n831_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n866_o <= n404_o (3 downto 2);
  -- spi_shift.v:184:110
  with n866_o select n867_o <=
    n833_o when "00",
    n835_o when "01",
    n837_o when "10",
    n839_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n868_o <= n404_o (3 downto 2);
  -- spi_shift.v:184:110
  with n868_o select n869_o <=
    n841_o when "00",
    n843_o when "01",
    n845_o when "10",
    n847_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n870_o <= n404_o (3 downto 2);
  -- spi_shift.v:184:110
  with n870_o select n871_o <=
    n849_o when "00",
    n851_o when "01",
    n853_o when "10",
    n855_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n872_o <= n404_o (5 downto 4);
  -- spi_shift.v:184:110
  with n872_o select n873_o <=
    n857_o when "00",
    n859_o when "01",
    n861_o when "10",
    n863_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n874_o <= n404_o (5 downto 4);
  -- spi_shift.v:184:110
  with n874_o select n875_o <=
    n865_o when "00",
    n867_o when "01",
    n869_o when "10",
    n871_o when "11",
    'X' when others;
  -- spi_shift.v:184:110
  n876_o <= n404_o (6);
  -- spi_shift.v:184:110
  n877_o <= n873_o when n876_o = '0' else n875_o;
  -- spi_shift.v:184:47
  n878_o <= n410_o (6);
  -- spi_shift.v:184:47
  n879_o <= not n878_o;
  -- spi_shift.v:184:47
  n880_o <= n410_o (5);
  -- spi_shift.v:184:47
  n881_o <= not n880_o;
  -- spi_shift.v:184:47
  n882_o <= n879_o and n881_o;
  -- spi_shift.v:184:47
  n883_o <= n879_o and n880_o;
  -- spi_shift.v:184:47
  n884_o <= n878_o and n881_o;
  -- spi_shift.v:184:47
  n885_o <= n878_o and n880_o;
  -- spi_shift.v:184:47
  n886_o <= n410_o (4);
  -- spi_shift.v:184:47
  n887_o <= not n886_o;
  -- spi_shift.v:184:47
  n888_o <= n882_o and n887_o;
  -- spi_shift.v:184:47
  n889_o <= n882_o and n886_o;
  -- spi_shift.v:184:47
  n890_o <= n883_o and n887_o;
  -- spi_shift.v:184:47
  n891_o <= n883_o and n886_o;
  -- spi_shift.v:184:47
  n892_o <= n884_o and n887_o;
  -- spi_shift.v:184:47
  n893_o <= n884_o and n886_o;
  -- spi_shift.v:184:47
  n894_o <= n885_o and n887_o;
  -- spi_shift.v:184:47
  n895_o <= n885_o and n886_o;
  -- spi_shift.v:184:47
  n896_o <= n410_o (3);
  -- spi_shift.v:184:47
  n897_o <= not n896_o;
  -- spi_shift.v:184:47
  n898_o <= n888_o and n897_o;
  -- spi_shift.v:184:47
  n899_o <= n888_o and n896_o;
  -- spi_shift.v:184:47
  n900_o <= n889_o and n897_o;
  -- spi_shift.v:184:47
  n901_o <= n889_o and n896_o;
  -- spi_shift.v:184:47
  n902_o <= n890_o and n897_o;
  -- spi_shift.v:184:47
  n903_o <= n890_o and n896_o;
  -- spi_shift.v:184:47
  n904_o <= n891_o and n897_o;
  -- spi_shift.v:184:47
  n905_o <= n891_o and n896_o;
  -- spi_shift.v:184:47
  n906_o <= n892_o and n897_o;
  -- spi_shift.v:184:47
  n907_o <= n892_o and n896_o;
  -- spi_shift.v:184:47
  n908_o <= n893_o and n897_o;
  -- spi_shift.v:184:47
  n909_o <= n893_o and n896_o;
  -- spi_shift.v:184:47
  n910_o <= n894_o and n897_o;
  -- spi_shift.v:184:47
  n911_o <= n894_o and n896_o;
  -- spi_shift.v:184:47
  n912_o <= n895_o and n897_o;
  -- spi_shift.v:184:47
  n913_o <= n895_o and n896_o;
  -- spi_shift.v:184:47
  n914_o <= n410_o (2);
  -- spi_shift.v:184:47
  n915_o <= not n914_o;
  -- spi_shift.v:184:47
  n916_o <= n898_o and n915_o;
  -- spi_shift.v:184:47
  n917_o <= n898_o and n914_o;
  -- spi_shift.v:184:47
  n918_o <= n899_o and n915_o;
  -- spi_shift.v:184:47
  n919_o <= n899_o and n914_o;
  -- spi_shift.v:184:47
  n920_o <= n900_o and n915_o;
  -- spi_shift.v:184:47
  n921_o <= n900_o and n914_o;
  -- spi_shift.v:184:47
  n922_o <= n901_o and n915_o;
  -- spi_shift.v:184:47
  n923_o <= n901_o and n914_o;
  -- spi_shift.v:184:47
  n924_o <= n902_o and n915_o;
  -- spi_shift.v:184:47
  n925_o <= n902_o and n914_o;
  -- spi_shift.v:184:47
  n926_o <= n903_o and n915_o;
  -- spi_shift.v:184:47
  n927_o <= n903_o and n914_o;
  -- spi_shift.v:184:47
  n928_o <= n904_o and n915_o;
  -- spi_shift.v:184:47
  n929_o <= n904_o and n914_o;
  -- spi_shift.v:184:47
  n930_o <= n905_o and n915_o;
  -- spi_shift.v:184:47
  n931_o <= n905_o and n914_o;
  -- spi_shift.v:184:47
  n932_o <= n906_o and n915_o;
  -- spi_shift.v:184:47
  n933_o <= n906_o and n914_o;
  -- spi_shift.v:184:47
  n934_o <= n907_o and n915_o;
  -- spi_shift.v:184:47
  n935_o <= n907_o and n914_o;
  -- spi_shift.v:184:47
  n936_o <= n908_o and n915_o;
  -- spi_shift.v:184:47
  n937_o <= n908_o and n914_o;
  -- spi_shift.v:184:47
  n938_o <= n909_o and n915_o;
  -- spi_shift.v:184:47
  n939_o <= n909_o and n914_o;
  -- spi_shift.v:184:47
  n940_o <= n910_o and n915_o;
  -- spi_shift.v:184:47
  n941_o <= n910_o and n914_o;
  -- spi_shift.v:184:47
  n942_o <= n911_o and n915_o;
  -- spi_shift.v:184:47
  n943_o <= n911_o and n914_o;
  -- spi_shift.v:184:47
  n944_o <= n912_o and n915_o;
  -- spi_shift.v:184:47
  n945_o <= n912_o and n914_o;
  -- spi_shift.v:184:47
  n946_o <= n913_o and n915_o;
  -- spi_shift.v:184:47
  n947_o <= n913_o and n914_o;
  -- spi_shift.v:184:47
  n948_o <= n410_o (1);
  -- spi_shift.v:184:47
  n949_o <= not n948_o;
  -- spi_shift.v:184:47
  n950_o <= n916_o and n949_o;
  -- spi_shift.v:184:47
  n951_o <= n916_o and n948_o;
  -- spi_shift.v:184:47
  n952_o <= n917_o and n949_o;
  -- spi_shift.v:184:47
  n953_o <= n917_o and n948_o;
  -- spi_shift.v:184:47
  n954_o <= n918_o and n949_o;
  -- spi_shift.v:184:47
  n955_o <= n918_o and n948_o;
  -- spi_shift.v:184:47
  n956_o <= n919_o and n949_o;
  -- spi_shift.v:184:47
  n957_o <= n919_o and n948_o;
  -- spi_shift.v:184:47
  n958_o <= n920_o and n949_o;
  -- spi_shift.v:184:47
  n959_o <= n920_o and n948_o;
  -- spi_shift.v:184:47
  n960_o <= n921_o and n949_o;
  -- spi_shift.v:184:47
  n961_o <= n921_o and n948_o;
  -- spi_shift.v:184:47
  n962_o <= n922_o and n949_o;
  -- spi_shift.v:184:47
  n963_o <= n922_o and n948_o;
  -- spi_shift.v:184:47
  n964_o <= n923_o and n949_o;
  -- spi_shift.v:184:47
  n965_o <= n923_o and n948_o;
  -- spi_shift.v:184:47
  n966_o <= n924_o and n949_o;
  -- spi_shift.v:184:47
  n967_o <= n924_o and n948_o;
  -- spi_shift.v:184:47
  n968_o <= n925_o and n949_o;
  -- spi_shift.v:184:47
  n969_o <= n925_o and n948_o;
  -- spi_shift.v:184:47
  n970_o <= n926_o and n949_o;
  -- spi_shift.v:184:47
  n971_o <= n926_o and n948_o;
  -- spi_shift.v:184:47
  n972_o <= n927_o and n949_o;
  -- spi_shift.v:184:47
  n973_o <= n927_o and n948_o;
  -- spi_shift.v:184:47
  n974_o <= n928_o and n949_o;
  -- spi_shift.v:184:47
  n975_o <= n928_o and n948_o;
  -- spi_shift.v:184:47
  n976_o <= n929_o and n949_o;
  -- spi_shift.v:184:47
  n977_o <= n929_o and n948_o;
  -- spi_shift.v:184:47
  n978_o <= n930_o and n949_o;
  -- spi_shift.v:184:47
  n979_o <= n930_o and n948_o;
  -- spi_shift.v:184:47
  n980_o <= n931_o and n949_o;
  -- spi_shift.v:184:47
  n981_o <= n931_o and n948_o;
  -- spi_shift.v:184:47
  n982_o <= n932_o and n949_o;
  -- spi_shift.v:184:47
  n983_o <= n932_o and n948_o;
  -- spi_shift.v:184:47
  n984_o <= n933_o and n949_o;
  -- spi_shift.v:184:47
  n985_o <= n933_o and n948_o;
  -- spi_shift.v:184:47
  n986_o <= n934_o and n949_o;
  -- spi_shift.v:184:47
  n987_o <= n934_o and n948_o;
  -- spi_shift.v:184:47
  n988_o <= n935_o and n949_o;
  -- spi_shift.v:184:47
  n989_o <= n935_o and n948_o;
  -- spi_shift.v:184:47
  n990_o <= n936_o and n949_o;
  -- spi_shift.v:184:47
  n991_o <= n936_o and n948_o;
  -- spi_shift.v:184:47
  n992_o <= n937_o and n949_o;
  -- spi_shift.v:184:47
  n993_o <= n937_o and n948_o;
  -- spi_shift.v:184:47
  n994_o <= n938_o and n949_o;
  -- spi_shift.v:184:47
  n995_o <= n938_o and n948_o;
  -- spi_shift.v:184:47
  n996_o <= n939_o and n949_o;
  -- spi_shift.v:184:47
  n997_o <= n939_o and n948_o;
  -- spi_shift.v:184:47
  n998_o <= n940_o and n949_o;
  -- spi_shift.v:184:47
  n999_o <= n940_o and n948_o;
  -- spi_shift.v:184:47
  n1000_o <= n941_o and n949_o;
  -- spi_shift.v:184:47
  n1001_o <= n941_o and n948_o;
  -- spi_shift.v:184:47
  n1002_o <= n942_o and n949_o;
  -- spi_shift.v:184:47
  n1003_o <= n942_o and n948_o;
  -- spi_shift.v:184:47
  n1004_o <= n943_o and n949_o;
  -- spi_shift.v:184:47
  n1005_o <= n943_o and n948_o;
  -- spi_shift.v:184:47
  n1006_o <= n944_o and n949_o;
  -- spi_shift.v:184:47
  n1007_o <= n944_o and n948_o;
  -- spi_shift.v:184:47
  n1008_o <= n945_o and n949_o;
  -- spi_shift.v:184:47
  n1009_o <= n945_o and n948_o;
  -- spi_shift.v:184:47
  n1010_o <= n946_o and n949_o;
  -- spi_shift.v:184:47
  n1011_o <= n946_o and n948_o;
  -- spi_shift.v:184:47
  n1012_o <= n947_o and n949_o;
  -- spi_shift.v:184:47
  n1013_o <= n947_o and n948_o;
  -- spi_shift.v:184:47
  n1014_o <= n410_o (0);
  -- spi_shift.v:184:47
  n1015_o <= not n1014_o;
  -- spi_shift.v:184:47
  n1016_o <= n950_o and n1015_o;
  -- spi_shift.v:184:47
  n1017_o <= n950_o and n1014_o;
  -- spi_shift.v:184:47
  n1018_o <= n951_o and n1015_o;
  -- spi_shift.v:184:47
  n1019_o <= n951_o and n1014_o;
  -- spi_shift.v:184:47
  n1020_o <= n952_o and n1015_o;
  -- spi_shift.v:184:47
  n1021_o <= n952_o and n1014_o;
  -- spi_shift.v:184:47
  n1022_o <= n953_o and n1015_o;
  -- spi_shift.v:184:47
  n1023_o <= n953_o and n1014_o;
  -- spi_shift.v:184:47
  n1024_o <= n954_o and n1015_o;
  -- spi_shift.v:184:47
  n1025_o <= n954_o and n1014_o;
  -- spi_shift.v:184:47
  n1026_o <= n955_o and n1015_o;
  -- spi_shift.v:184:47
  n1027_o <= n955_o and n1014_o;
  -- spi_shift.v:184:47
  n1028_o <= n956_o and n1015_o;
  -- spi_shift.v:184:47
  n1029_o <= n956_o and n1014_o;
  -- spi_shift.v:184:47
  n1030_o <= n957_o and n1015_o;
  -- spi_shift.v:184:47
  n1031_o <= n957_o and n1014_o;
  -- spi_shift.v:184:47
  n1032_o <= n958_o and n1015_o;
  -- spi_shift.v:184:47
  n1033_o <= n958_o and n1014_o;
  -- spi_shift.v:184:47
  n1034_o <= n959_o and n1015_o;
  -- spi_shift.v:184:47
  n1035_o <= n959_o and n1014_o;
  -- spi_shift.v:184:47
  n1036_o <= n960_o and n1015_o;
  -- spi_shift.v:184:47
  n1037_o <= n960_o and n1014_o;
  -- spi_shift.v:184:47
  n1038_o <= n961_o and n1015_o;
  -- spi_shift.v:184:47
  n1039_o <= n961_o and n1014_o;
  -- spi_shift.v:184:47
  n1040_o <= n962_o and n1015_o;
  -- spi_shift.v:184:47
  n1041_o <= n962_o and n1014_o;
  -- spi_shift.v:184:47
  n1042_o <= n963_o and n1015_o;
  -- spi_shift.v:184:47
  n1043_o <= n963_o and n1014_o;
  -- spi_shift.v:184:47
  n1044_o <= n964_o and n1015_o;
  -- spi_shift.v:184:47
  n1045_o <= n964_o and n1014_o;
  -- spi_shift.v:184:47
  n1046_o <= n965_o and n1015_o;
  -- spi_shift.v:184:47
  n1047_o <= n965_o and n1014_o;
  -- spi_shift.v:184:47
  n1048_o <= n966_o and n1015_o;
  -- spi_shift.v:184:47
  n1049_o <= n966_o and n1014_o;
  -- spi_shift.v:184:47
  n1050_o <= n967_o and n1015_o;
  -- spi_shift.v:184:47
  n1051_o <= n967_o and n1014_o;
  -- spi_shift.v:184:47
  n1052_o <= n968_o and n1015_o;
  -- spi_shift.v:184:47
  n1053_o <= n968_o and n1014_o;
  -- spi_shift.v:184:47
  n1054_o <= n969_o and n1015_o;
  -- spi_shift.v:184:47
  n1055_o <= n969_o and n1014_o;
  -- spi_shift.v:184:47
  n1056_o <= n970_o and n1015_o;
  -- spi_shift.v:184:47
  n1057_o <= n970_o and n1014_o;
  -- spi_shift.v:184:47
  n1058_o <= n971_o and n1015_o;
  -- spi_shift.v:184:47
  n1059_o <= n971_o and n1014_o;
  -- spi_shift.v:184:47
  n1060_o <= n972_o and n1015_o;
  -- spi_shift.v:184:47
  n1061_o <= n972_o and n1014_o;
  -- spi_shift.v:184:47
  n1062_o <= n973_o and n1015_o;
  -- spi_shift.v:184:47
  n1063_o <= n973_o and n1014_o;
  -- spi_shift.v:184:47
  n1064_o <= n974_o and n1015_o;
  -- spi_shift.v:184:47
  n1065_o <= n974_o and n1014_o;
  -- spi_shift.v:184:47
  n1066_o <= n975_o and n1015_o;
  -- spi_shift.v:184:47
  n1067_o <= n975_o and n1014_o;
  -- spi_shift.v:184:47
  n1068_o <= n976_o and n1015_o;
  -- spi_shift.v:184:47
  n1069_o <= n976_o and n1014_o;
  -- spi_shift.v:184:47
  n1070_o <= n977_o and n1015_o;
  -- spi_shift.v:184:47
  n1071_o <= n977_o and n1014_o;
  -- spi_shift.v:184:47
  n1072_o <= n978_o and n1015_o;
  -- spi_shift.v:184:47
  n1073_o <= n978_o and n1014_o;
  -- spi_shift.v:184:47
  n1074_o <= n979_o and n1015_o;
  -- spi_shift.v:184:47
  n1075_o <= n979_o and n1014_o;
  -- spi_shift.v:184:47
  n1076_o <= n980_o and n1015_o;
  -- spi_shift.v:184:47
  n1077_o <= n980_o and n1014_o;
  -- spi_shift.v:184:47
  n1078_o <= n981_o and n1015_o;
  -- spi_shift.v:184:47
  n1079_o <= n981_o and n1014_o;
  -- spi_shift.v:184:47
  n1080_o <= n982_o and n1015_o;
  -- spi_shift.v:184:47
  n1081_o <= n982_o and n1014_o;
  -- spi_shift.v:184:47
  n1082_o <= n983_o and n1015_o;
  -- spi_shift.v:184:47
  n1083_o <= n983_o and n1014_o;
  -- spi_shift.v:184:47
  n1084_o <= n984_o and n1015_o;
  -- spi_shift.v:184:47
  n1085_o <= n984_o and n1014_o;
  -- spi_shift.v:184:47
  n1086_o <= n985_o and n1015_o;
  -- spi_shift.v:184:47
  n1087_o <= n985_o and n1014_o;
  -- spi_shift.v:184:47
  n1088_o <= n986_o and n1015_o;
  -- spi_shift.v:184:47
  n1089_o <= n986_o and n1014_o;
  -- spi_shift.v:184:47
  n1090_o <= n987_o and n1015_o;
  -- spi_shift.v:184:47
  n1091_o <= n987_o and n1014_o;
  -- spi_shift.v:184:47
  n1092_o <= n988_o and n1015_o;
  -- spi_shift.v:184:47
  n1093_o <= n988_o and n1014_o;
  -- spi_shift.v:184:47
  n1094_o <= n989_o and n1015_o;
  -- spi_shift.v:184:47
  n1095_o <= n989_o and n1014_o;
  -- spi_shift.v:184:47
  n1096_o <= n990_o and n1015_o;
  -- spi_shift.v:184:47
  n1097_o <= n990_o and n1014_o;
  -- spi_shift.v:184:47
  n1098_o <= n991_o and n1015_o;
  -- spi_shift.v:184:47
  n1099_o <= n991_o and n1014_o;
  -- spi_shift.v:184:47
  n1100_o <= n992_o and n1015_o;
  -- spi_shift.v:184:47
  n1101_o <= n992_o and n1014_o;
  -- spi_shift.v:184:47
  n1102_o <= n993_o and n1015_o;
  -- spi_shift.v:184:47
  n1103_o <= n993_o and n1014_o;
  -- spi_shift.v:184:47
  n1104_o <= n994_o and n1015_o;
  -- spi_shift.v:184:47
  n1105_o <= n994_o and n1014_o;
  -- spi_shift.v:184:47
  n1106_o <= n995_o and n1015_o;
  -- spi_shift.v:184:47
  n1107_o <= n995_o and n1014_o;
  -- spi_shift.v:184:47
  n1108_o <= n996_o and n1015_o;
  -- spi_shift.v:184:47
  n1109_o <= n996_o and n1014_o;
  -- spi_shift.v:184:47
  n1110_o <= n997_o and n1015_o;
  -- spi_shift.v:184:47
  n1111_o <= n997_o and n1014_o;
  -- spi_shift.v:184:47
  n1112_o <= n998_o and n1015_o;
  -- spi_shift.v:184:47
  n1113_o <= n998_o and n1014_o;
  -- spi_shift.v:184:47
  n1114_o <= n999_o and n1015_o;
  -- spi_shift.v:184:47
  n1115_o <= n999_o and n1014_o;
  -- spi_shift.v:184:47
  n1116_o <= n1000_o and n1015_o;
  -- spi_shift.v:184:47
  n1117_o <= n1000_o and n1014_o;
  -- spi_shift.v:184:47
  n1118_o <= n1001_o and n1015_o;
  -- spi_shift.v:184:47
  n1119_o <= n1001_o and n1014_o;
  -- spi_shift.v:184:47
  n1120_o <= n1002_o and n1015_o;
  -- spi_shift.v:184:47
  n1121_o <= n1002_o and n1014_o;
  -- spi_shift.v:184:47
  n1122_o <= n1003_o and n1015_o;
  -- spi_shift.v:184:47
  n1123_o <= n1003_o and n1014_o;
  -- spi_shift.v:184:47
  n1124_o <= n1004_o and n1015_o;
  -- spi_shift.v:184:47
  n1125_o <= n1004_o and n1014_o;
  -- spi_shift.v:184:47
  n1126_o <= n1005_o and n1015_o;
  -- spi_shift.v:184:47
  n1127_o <= n1005_o and n1014_o;
  -- spi_shift.v:184:47
  n1128_o <= n1006_o and n1015_o;
  -- spi_shift.v:184:47
  n1129_o <= n1006_o and n1014_o;
  -- spi_shift.v:184:47
  n1130_o <= n1007_o and n1015_o;
  -- spi_shift.v:184:47
  n1131_o <= n1007_o and n1014_o;
  -- spi_shift.v:184:47
  n1132_o <= n1008_o and n1015_o;
  -- spi_shift.v:184:47
  n1133_o <= n1008_o and n1014_o;
  -- spi_shift.v:184:47
  n1134_o <= n1009_o and n1015_o;
  -- spi_shift.v:184:47
  n1135_o <= n1009_o and n1014_o;
  -- spi_shift.v:184:47
  n1136_o <= n1010_o and n1015_o;
  -- spi_shift.v:184:47
  n1137_o <= n1010_o and n1014_o;
  -- spi_shift.v:184:47
  n1138_o <= n1011_o and n1015_o;
  -- spi_shift.v:184:47
  n1139_o <= n1011_o and n1014_o;
  -- spi_shift.v:184:47
  n1140_o <= n1012_o and n1015_o;
  -- spi_shift.v:184:47
  n1141_o <= n1012_o and n1014_o;
  -- spi_shift.v:184:47
  n1142_o <= n1013_o and n1015_o;
  -- spi_shift.v:184:47
  n1143_o <= n1013_o and n1014_o;
  n1144_o <= data (0);
  -- spi_shift.v:184:47
  n1145_o <= n1144_o when n1016_o = '0' else n407_o;
  n1146_o <= data (1);
  -- spi_shift.v:184:47
  n1147_o <= n1146_o when n1017_o = '0' else n407_o;
  n1148_o <= data (2);
  -- spi_shift.v:184:47
  n1149_o <= n1148_o when n1018_o = '0' else n407_o;
  n1150_o <= data (3);
  -- spi_shift.v:184:47
  n1151_o <= n1150_o when n1019_o = '0' else n407_o;
  n1152_o <= data (4);
  -- spi_shift.v:184:47
  n1153_o <= n1152_o when n1020_o = '0' else n407_o;
  n1154_o <= data (5);
  -- spi_shift.v:184:47
  n1155_o <= n1154_o when n1021_o = '0' else n407_o;
  n1156_o <= data (6);
  -- spi_shift.v:184:47
  n1157_o <= n1156_o when n1022_o = '0' else n407_o;
  n1158_o <= data (7);
  -- spi_shift.v:184:47
  n1159_o <= n1158_o when n1023_o = '0' else n407_o;
  n1160_o <= data (8);
  -- spi_shift.v:184:47
  n1161_o <= n1160_o when n1024_o = '0' else n407_o;
  n1162_o <= data (9);
  -- spi_shift.v:184:47
  n1163_o <= n1162_o when n1025_o = '0' else n407_o;
  n1164_o <= data (10);
  -- spi_shift.v:184:47
  n1165_o <= n1164_o when n1026_o = '0' else n407_o;
  n1166_o <= data (11);
  -- spi_shift.v:184:47
  n1167_o <= n1166_o when n1027_o = '0' else n407_o;
  n1168_o <= data (12);
  -- spi_shift.v:184:47
  n1169_o <= n1168_o when n1028_o = '0' else n407_o;
  n1170_o <= data (13);
  -- spi_shift.v:184:47
  n1171_o <= n1170_o when n1029_o = '0' else n407_o;
  n1172_o <= data (14);
  -- spi_shift.v:184:47
  n1173_o <= n1172_o when n1030_o = '0' else n407_o;
  n1174_o <= data (15);
  -- spi_shift.v:184:47
  n1175_o <= n1174_o when n1031_o = '0' else n407_o;
  n1176_o <= data (16);
  -- spi_shift.v:184:47
  n1177_o <= n1176_o when n1032_o = '0' else n407_o;
  n1178_o <= data (17);
  -- spi_shift.v:184:47
  n1179_o <= n1178_o when n1033_o = '0' else n407_o;
  n1180_o <= data (18);
  -- spi_shift.v:184:47
  n1181_o <= n1180_o when n1034_o = '0' else n407_o;
  n1182_o <= data (19);
  -- spi_shift.v:184:47
  n1183_o <= n1182_o when n1035_o = '0' else n407_o;
  n1184_o <= data (20);
  -- spi_shift.v:184:47
  n1185_o <= n1184_o when n1036_o = '0' else n407_o;
  n1186_o <= data (21);
  -- spi_shift.v:184:47
  n1187_o <= n1186_o when n1037_o = '0' else n407_o;
  n1188_o <= data (22);
  -- spi_shift.v:184:47
  n1189_o <= n1188_o when n1038_o = '0' else n407_o;
  n1190_o <= data (23);
  -- spi_shift.v:184:47
  n1191_o <= n1190_o when n1039_o = '0' else n407_o;
  n1192_o <= data (24);
  -- spi_shift.v:184:47
  n1193_o <= n1192_o when n1040_o = '0' else n407_o;
  n1194_o <= data (25);
  -- spi_shift.v:184:47
  n1195_o <= n1194_o when n1041_o = '0' else n407_o;
  n1196_o <= data (26);
  -- spi_shift.v:184:47
  n1197_o <= n1196_o when n1042_o = '0' else n407_o;
  n1198_o <= data (27);
  -- spi_shift.v:184:47
  n1199_o <= n1198_o when n1043_o = '0' else n407_o;
  n1200_o <= data (28);
  -- spi_shift.v:184:47
  n1201_o <= n1200_o when n1044_o = '0' else n407_o;
  n1202_o <= data (29);
  -- spi_shift.v:184:47
  n1203_o <= n1202_o when n1045_o = '0' else n407_o;
  n1204_o <= data (30);
  -- spi_shift.v:184:47
  n1205_o <= n1204_o when n1046_o = '0' else n407_o;
  n1206_o <= data (31);
  -- spi_shift.v:184:47
  n1207_o <= n1206_o when n1047_o = '0' else n407_o;
  n1208_o <= data (32);
  -- spi_shift.v:184:47
  n1209_o <= n1208_o when n1048_o = '0' else n407_o;
  n1210_o <= data (33);
  -- spi_shift.v:184:47
  n1211_o <= n1210_o when n1049_o = '0' else n407_o;
  n1212_o <= data (34);
  -- spi_shift.v:184:47
  n1213_o <= n1212_o when n1050_o = '0' else n407_o;
  n1214_o <= data (35);
  -- spi_shift.v:184:47
  n1215_o <= n1214_o when n1051_o = '0' else n407_o;
  n1216_o <= data (36);
  -- spi_shift.v:184:47
  n1217_o <= n1216_o when n1052_o = '0' else n407_o;
  n1218_o <= data (37);
  -- spi_shift.v:184:47
  n1219_o <= n1218_o when n1053_o = '0' else n407_o;
  n1220_o <= data (38);
  -- spi_shift.v:184:47
  n1221_o <= n1220_o when n1054_o = '0' else n407_o;
  n1222_o <= data (39);
  -- spi_shift.v:184:47
  n1223_o <= n1222_o when n1055_o = '0' else n407_o;
  n1224_o <= data (40);
  -- spi_shift.v:184:47
  n1225_o <= n1224_o when n1056_o = '0' else n407_o;
  n1226_o <= data (41);
  -- spi_shift.v:184:47
  n1227_o <= n1226_o when n1057_o = '0' else n407_o;
  n1228_o <= data (42);
  -- spi_shift.v:184:47
  n1229_o <= n1228_o when n1058_o = '0' else n407_o;
  n1230_o <= data (43);
  -- spi_shift.v:184:47
  n1231_o <= n1230_o when n1059_o = '0' else n407_o;
  n1232_o <= data (44);
  -- spi_shift.v:184:47
  n1233_o <= n1232_o when n1060_o = '0' else n407_o;
  n1234_o <= data (45);
  -- spi_shift.v:184:47
  n1235_o <= n1234_o when n1061_o = '0' else n407_o;
  n1236_o <= data (46);
  -- spi_shift.v:184:47
  n1237_o <= n1236_o when n1062_o = '0' else n407_o;
  n1238_o <= data (47);
  -- spi_shift.v:184:47
  n1239_o <= n1238_o when n1063_o = '0' else n407_o;
  n1240_o <= data (48);
  -- spi_shift.v:184:47
  n1241_o <= n1240_o when n1064_o = '0' else n407_o;
  n1242_o <= data (49);
  -- spi_shift.v:184:47
  n1243_o <= n1242_o when n1065_o = '0' else n407_o;
  n1244_o <= data (50);
  -- spi_shift.v:184:47
  n1245_o <= n1244_o when n1066_o = '0' else n407_o;
  n1246_o <= data (51);
  -- spi_shift.v:184:47
  n1247_o <= n1246_o when n1067_o = '0' else n407_o;
  n1248_o <= data (52);
  -- spi_shift.v:184:47
  n1249_o <= n1248_o when n1068_o = '0' else n407_o;
  n1250_o <= data (53);
  -- spi_shift.v:184:47
  n1251_o <= n1250_o when n1069_o = '0' else n407_o;
  n1252_o <= data (54);
  -- spi_shift.v:184:47
  n1253_o <= n1252_o when n1070_o = '0' else n407_o;
  n1254_o <= data (55);
  -- spi_shift.v:184:47
  n1255_o <= n1254_o when n1071_o = '0' else n407_o;
  n1256_o <= data (56);
  -- spi_shift.v:184:47
  n1257_o <= n1256_o when n1072_o = '0' else n407_o;
  n1258_o <= data (57);
  -- spi_shift.v:184:47
  n1259_o <= n1258_o when n1073_o = '0' else n407_o;
  n1260_o <= data (58);
  -- spi_shift.v:184:47
  n1261_o <= n1260_o when n1074_o = '0' else n407_o;
  n1262_o <= data (59);
  -- spi_shift.v:184:47
  n1263_o <= n1262_o when n1075_o = '0' else n407_o;
  n1264_o <= data (60);
  -- spi_shift.v:184:47
  n1265_o <= n1264_o when n1076_o = '0' else n407_o;
  n1266_o <= data (61);
  -- spi_shift.v:184:47
  n1267_o <= n1266_o when n1077_o = '0' else n407_o;
  n1268_o <= data (62);
  -- spi_shift.v:184:47
  n1269_o <= n1268_o when n1078_o = '0' else n407_o;
  n1270_o <= data (63);
  -- spi_shift.v:184:47
  n1271_o <= n1270_o when n1079_o = '0' else n407_o;
  n1272_o <= data (64);
  -- spi_shift.v:184:47
  n1273_o <= n1272_o when n1080_o = '0' else n407_o;
  n1274_o <= data (65);
  -- spi_shift.v:184:47
  n1275_o <= n1274_o when n1081_o = '0' else n407_o;
  n1276_o <= data (66);
  -- spi_shift.v:184:47
  n1277_o <= n1276_o when n1082_o = '0' else n407_o;
  n1278_o <= data (67);
  -- spi_shift.v:184:47
  n1279_o <= n1278_o when n1083_o = '0' else n407_o;
  n1280_o <= data (68);
  -- spi_shift.v:184:47
  n1281_o <= n1280_o when n1084_o = '0' else n407_o;
  n1282_o <= data (69);
  -- spi_shift.v:184:47
  n1283_o <= n1282_o when n1085_o = '0' else n407_o;
  n1284_o <= data (70);
  -- spi_shift.v:184:47
  n1285_o <= n1284_o when n1086_o = '0' else n407_o;
  n1286_o <= data (71);
  -- spi_shift.v:184:47
  n1287_o <= n1286_o when n1087_o = '0' else n407_o;
  n1288_o <= data (72);
  -- spi_shift.v:184:47
  n1289_o <= n1288_o when n1088_o = '0' else n407_o;
  n1290_o <= data (73);
  -- spi_shift.v:184:47
  n1291_o <= n1290_o when n1089_o = '0' else n407_o;
  n1292_o <= data (74);
  -- spi_shift.v:184:47
  n1293_o <= n1292_o when n1090_o = '0' else n407_o;
  n1294_o <= data (75);
  -- spi_shift.v:184:47
  n1295_o <= n1294_o when n1091_o = '0' else n407_o;
  n1296_o <= data (76);
  -- spi_shift.v:184:47
  n1297_o <= n1296_o when n1092_o = '0' else n407_o;
  n1298_o <= data (77);
  -- spi_shift.v:184:47
  n1299_o <= n1298_o when n1093_o = '0' else n407_o;
  n1300_o <= data (78);
  -- spi_shift.v:184:47
  n1301_o <= n1300_o when n1094_o = '0' else n407_o;
  n1302_o <= data (79);
  -- spi_shift.v:184:47
  n1303_o <= n1302_o when n1095_o = '0' else n407_o;
  n1304_o <= data (80);
  -- spi_shift.v:184:47
  n1305_o <= n1304_o when n1096_o = '0' else n407_o;
  n1306_o <= data (81);
  -- spi_shift.v:184:47
  n1307_o <= n1306_o when n1097_o = '0' else n407_o;
  n1308_o <= data (82);
  -- spi_shift.v:184:47
  n1309_o <= n1308_o when n1098_o = '0' else n407_o;
  n1310_o <= data (83);
  -- spi_shift.v:184:47
  n1311_o <= n1310_o when n1099_o = '0' else n407_o;
  n1312_o <= data (84);
  -- spi_shift.v:184:47
  n1313_o <= n1312_o when n1100_o = '0' else n407_o;
  n1314_o <= data (85);
  -- spi_shift.v:184:47
  n1315_o <= n1314_o when n1101_o = '0' else n407_o;
  n1316_o <= data (86);
  -- spi_shift.v:184:47
  n1317_o <= n1316_o when n1102_o = '0' else n407_o;
  n1318_o <= data (87);
  -- spi_shift.v:184:47
  n1319_o <= n1318_o when n1103_o = '0' else n407_o;
  n1320_o <= data (88);
  -- spi_shift.v:184:47
  n1321_o <= n1320_o when n1104_o = '0' else n407_o;
  n1322_o <= data (89);
  -- spi_shift.v:184:47
  n1323_o <= n1322_o when n1105_o = '0' else n407_o;
  n1324_o <= data (90);
  -- spi_shift.v:184:47
  n1325_o <= n1324_o when n1106_o = '0' else n407_o;
  n1326_o <= data (91);
  -- spi_shift.v:184:47
  n1327_o <= n1326_o when n1107_o = '0' else n407_o;
  n1328_o <= data (92);
  -- spi_shift.v:184:47
  n1329_o <= n1328_o when n1108_o = '0' else n407_o;
  n1330_o <= data (93);
  -- spi_shift.v:184:47
  n1331_o <= n1330_o when n1109_o = '0' else n407_o;
  n1332_o <= data (94);
  -- spi_shift.v:184:47
  n1333_o <= n1332_o when n1110_o = '0' else n407_o;
  n1334_o <= data (95);
  -- spi_shift.v:184:47
  n1335_o <= n1334_o when n1111_o = '0' else n407_o;
  n1336_o <= data (96);
  -- spi_shift.v:184:47
  n1337_o <= n1336_o when n1112_o = '0' else n407_o;
  n1338_o <= data (97);
  -- spi_shift.v:184:47
  n1339_o <= n1338_o when n1113_o = '0' else n407_o;
  n1340_o <= data (98);
  -- spi_shift.v:184:47
  n1341_o <= n1340_o when n1114_o = '0' else n407_o;
  n1342_o <= data (99);
  -- spi_shift.v:184:47
  n1343_o <= n1342_o when n1115_o = '0' else n407_o;
  n1344_o <= data (100);
  -- spi_shift.v:184:47
  n1345_o <= n1344_o when n1116_o = '0' else n407_o;
  n1346_o <= data (101);
  -- spi_shift.v:184:47
  n1347_o <= n1346_o when n1117_o = '0' else n407_o;
  n1348_o <= data (102);
  -- spi_shift.v:184:47
  n1349_o <= n1348_o when n1118_o = '0' else n407_o;
  n1350_o <= data (103);
  -- spi_shift.v:184:47
  n1351_o <= n1350_o when n1119_o = '0' else n407_o;
  n1352_o <= data (104);
  -- spi_shift.v:184:47
  n1353_o <= n1352_o when n1120_o = '0' else n407_o;
  n1354_o <= data (105);
  -- spi_shift.v:184:47
  n1355_o <= n1354_o when n1121_o = '0' else n407_o;
  n1356_o <= data (106);
  -- spi_shift.v:184:47
  n1357_o <= n1356_o when n1122_o = '0' else n407_o;
  n1358_o <= data (107);
  -- spi_shift.v:184:47
  n1359_o <= n1358_o when n1123_o = '0' else n407_o;
  n1360_o <= data (108);
  -- spi_shift.v:184:47
  n1361_o <= n1360_o when n1124_o = '0' else n407_o;
  n1362_o <= data (109);
  -- spi_shift.v:184:47
  n1363_o <= n1362_o when n1125_o = '0' else n407_o;
  n1364_o <= data (110);
  -- spi_shift.v:184:47
  n1365_o <= n1364_o when n1126_o = '0' else n407_o;
  n1366_o <= data (111);
  -- spi_shift.v:184:47
  n1367_o <= n1366_o when n1127_o = '0' else n407_o;
  n1368_o <= data (112);
  -- spi_shift.v:184:47
  n1369_o <= n1368_o when n1128_o = '0' else n407_o;
  n1370_o <= data (113);
  -- spi_shift.v:184:47
  n1371_o <= n1370_o when n1129_o = '0' else n407_o;
  n1372_o <= data (114);
  -- spi_shift.v:184:47
  n1373_o <= n1372_o when n1130_o = '0' else n407_o;
  n1374_o <= data (115);
  -- spi_shift.v:184:47
  n1375_o <= n1374_o when n1131_o = '0' else n407_o;
  n1376_o <= data (116);
  -- spi_shift.v:184:47
  n1377_o <= n1376_o when n1132_o = '0' else n407_o;
  n1378_o <= data (117);
  -- spi_shift.v:184:47
  n1379_o <= n1378_o when n1133_o = '0' else n407_o;
  n1380_o <= data (118);
  -- spi_shift.v:184:47
  n1381_o <= n1380_o when n1134_o = '0' else n407_o;
  n1382_o <= data (119);
  -- spi_shift.v:184:47
  n1383_o <= n1382_o when n1135_o = '0' else n407_o;
  n1384_o <= data (120);
  -- spi_shift.v:184:47
  n1385_o <= n1384_o when n1136_o = '0' else n407_o;
  n1386_o <= data (121);
  -- spi_shift.v:184:47
  n1387_o <= n1386_o when n1137_o = '0' else n407_o;
  n1388_o <= data (122);
  -- spi_shift.v:184:47
  n1389_o <= n1388_o when n1138_o = '0' else n407_o;
  n1390_o <= data (123);
  -- spi_shift.v:184:47
  n1391_o <= n1390_o when n1139_o = '0' else n407_o;
  n1392_o <= data (124);
  -- spi_shift.v:184:47
  n1393_o <= n1392_o when n1140_o = '0' else n407_o;
  n1394_o <= data (125);
  -- spi_shift.v:184:47
  n1395_o <= n1394_o when n1141_o = '0' else n407_o;
  n1396_o <= data (126);
  -- spi_shift.v:184:47
  n1397_o <= n1396_o when n1142_o = '0' else n407_o;
  n1398_o <= data (127);
  -- spi_shift.v:184:47
  n1399_o <= n1398_o when n1143_o = '0' else n407_o;
  n1400_o <= n1399_o & n1397_o & n1395_o & n1393_o & n1391_o & n1389_o & n1387_o & n1385_o & n1383_o & n1381_o & n1379_o & n1377_o & n1375_o & n1373_o & n1371_o & n1369_o & n1367_o & n1365_o & n1363_o & n1361_o & n1359_o & n1357_o & n1355_o & n1353_o & n1351_o & n1349_o & n1347_o & n1345_o & n1343_o & n1341_o & n1339_o & n1337_o & n1335_o & n1333_o & n1331_o & n1329_o & n1327_o & n1325_o & n1323_o & n1321_o & n1319_o & n1317_o & n1315_o & n1313_o & n1311_o & n1309_o & n1307_o & n1305_o & n1303_o & n1301_o & n1299_o & n1297_o & n1295_o & n1293_o & n1291_o & n1289_o & n1287_o & n1285_o & n1283_o & n1281_o & n1279_o & n1277_o & n1275_o & n1273_o & n1271_o & n1269_o & n1267_o & n1265_o & n1263_o & n1261_o & n1259_o & n1257_o & n1255_o & n1253_o & n1251_o & n1249_o & n1247_o & n1245_o & n1243_o & n1241_o & n1239_o & n1237_o & n1235_o & n1233_o & n1231_o & n1229_o & n1227_o & n1225_o & n1223_o & n1221_o & n1219_o & n1217_o & n1215_o & n1213_o & n1211_o & n1209_o & n1207_o & n1205_o & n1203_o & n1201_o & n1199_o & n1197_o & n1195_o & n1193_o & n1191_o & n1189_o & n1187_o & n1185_o & n1183_o & n1181_o & n1179_o & n1177_o & n1175_o & n1173_o & n1171_o & n1169_o & n1167_o & n1165_o & n1163_o & n1161_o & n1159_o & n1157_o & n1155_o & n1153_o & n1151_o & n1149_o & n1147_o & n1145_o;
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity spi_clgen is
  port (
    clk_in : in std_logic;
    rst : in std_logic;
    enable : in std_logic;
    go : in std_logic;
    last_clk : in std_logic;
    divider : in std_logic_vector (15 downto 0);
    clk_out : out std_logic;
    pos_edge : out std_logic;
    neg_edge : out std_logic);
end entity spi_clgen;

architecture rtl of spi_clgen is
  signal cnt : std_logic_vector (15 downto 0);
  signal cnt_zero : std_logic;
  signal cnt_one : std_logic;
  signal n196_o : std_logic;
  signal n198_o : std_logic;
  signal n201_o : std_logic;
  signal n202_o : std_logic;
  signal n204_o : std_logic_vector (15 downto 0);
  signal n205_o : std_logic_vector (15 downto 0);
  signal n208_q : std_logic_vector (15 downto 0);
  signal n211_o : std_logic;
  signal n212_o : std_logic;
  signal n213_o : std_logic;
  signal n214_o : std_logic;
  signal n215_o : std_logic;
  signal n219_o : std_logic;
  signal n220_q : std_logic;
  signal n224_o : std_logic;
  signal n225_o : std_logic;
  signal n226_o : std_logic;
  signal n227_o : std_logic;
  signal n228_o : std_logic;
  signal n229_o : std_logic;
  signal n230_o : std_logic;
  signal n231_o : std_logic;
  signal n232_o : std_logic;
  signal n233_o : std_logic;
  signal n234_o : std_logic;
  signal n235_o : std_logic;
  signal n236_o : std_logic;
  signal n237_o : std_logic;
  signal n238_o : std_logic;
  signal n239_o : std_logic;
  signal n240_o : std_logic;
  signal n241_o : std_logic;
  signal n242_o : std_logic;
  signal n243_o : std_logic;
  signal n244_o : std_logic;
  signal n249_q : std_logic;
  signal n250_q : std_logic;
begin
  clk_out <= n220_q;
  pos_edge <= n249_q;
  neg_edge <= n250_q;
  -- spi_clgen.v:69:36
  cnt <= n208_q; -- (signal)
  -- spi_clgen.v:70:36
  cnt_zero <= n196_o; -- (signal)
  -- spi_clgen.v:71:36
  cnt_one <= n198_o; -- (signal)
  -- spi_clgen.v:74:25
  n196_o <= '1' when cnt = "0000000000000000" else '0';
  -- spi_clgen.v:75:25
  n198_o <= '1' when cnt = "0000000000000001" else '0';
  -- spi_clgen.v:84:12
  n201_o <= not enable;
  -- spi_clgen.v:84:20
  n202_o <= n201_o or cnt_zero;
  -- spi_clgen.v:87:26
  n204_o <= std_logic_vector (unsigned (cnt) - unsigned'("0000000000000001"));
  -- spi_clgen.v:84:9
  n205_o <= n204_o when n202_o = '0' else divider;
  -- spi_clgen.v:78:3
  process (clk_in, rst)
  begin
    if rst = '1' then
      n208_q <= "1111111111111111";
    elsif rising_edge (clk_in) then
      n208_q <= n205_o;
    end if;
  end process;
  -- spi_clgen.v:97:30
  n211_o <= enable and cnt_zero;
  -- spi_clgen.v:97:46
  n212_o <= not last_clk;
  -- spi_clgen.v:97:56
  n213_o <= n212_o or n220_q;
  -- spi_clgen.v:97:42
  n214_o <= n211_o and n213_o;
  -- spi_clgen.v:97:71
  n215_o <= not n220_q;
  -- spi_clgen.v:92:3
  n219_o <= n220_q when n214_o = '0' else n215_o;
  -- spi_clgen.v:92:3
  process (clk_in, rst)
  begin
    if rst = '1' then
      n220_q <= '0';
    elsif rising_edge (clk_in) then
      n220_q <= n219_o;
    end if;
  end process;
  -- spi_clgen.v:110:37
  n224_o <= not n220_q;
  -- spi_clgen.v:110:34
  n225_o <= enable and n224_o;
  -- spi_clgen.v:110:46
  n226_o <= n225_o and cnt_one;
  -- spi_clgen.v:110:64
  n227_o <= '1' when divider /= (15 downto 0 => '0') else '0';
  -- spi_clgen.v:110:62
  n228_o <= not n227_o;
  -- spi_clgen.v:110:74
  n229_o <= n228_o and n220_q;
  -- spi_clgen.v:110:58
  n230_o <= n226_o or n229_o;
  -- spi_clgen.v:110:92
  n231_o <= '1' when divider /= (15 downto 0 => '0') else '0';
  -- spi_clgen.v:110:90
  n232_o <= not n231_o;
  -- spi_clgen.v:110:102
  n233_o <= n232_o and go;
  -- spi_clgen.v:110:111
  n234_o <= not enable;
  -- spi_clgen.v:110:108
  n235_o <= n233_o and n234_o;
  -- spi_clgen.v:110:86
  n236_o <= n230_o or n235_o;
  -- spi_clgen.v:111:34
  n237_o <= enable and n220_q;
  -- spi_clgen.v:111:45
  n238_o <= n237_o and cnt_one;
  -- spi_clgen.v:111:63
  n239_o <= '1' when divider /= (15 downto 0 => '0') else '0';
  -- spi_clgen.v:111:61
  n240_o <= not n239_o;
  -- spi_clgen.v:111:76
  n241_o <= not n220_q;
  -- spi_clgen.v:111:73
  n242_o <= n240_o and n241_o;
  -- spi_clgen.v:111:85
  n243_o <= n242_o and enable;
  -- spi_clgen.v:111:57
  n244_o <= n238_o or n243_o;
  -- spi_clgen.v:101:3
  process (clk_in, rst)
  begin
    if rst = '1' then
      n249_q <= '0';
    elsif rising_edge (clk_in) then
      n249_q <= n236_o;
    end if;
  end process;
  -- spi_clgen.v:101:3
  process (clk_in, rst)
  begin
    if rst = '1' then
      n250_q <= '0';
    elsif rising_edge (clk_in) then
      n250_q <= n244_o;
    end if;
  end process;
end rtl;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity spi_top is
  generic (
    SPI_DIVIDER_LEN   : integer := 16;
    SPI_MAX_CHAR      : integer := 128;
    SPI_CHAR_LEN_BITS : integer := 7;
    SPI_SS_NB         : integer := 8
  );
  port (
    wb_clk_i : in std_logic;
    wb_rst_i : in std_logic;
    wb_adr_i : in std_logic_vector (4 downto 0);
    wb_dat_i : in std_logic_vector (31 downto 0);
    wb_sel_i : in std_logic_vector (3 downto 0);
    wb_we_i : in std_logic;
    wb_stb_i : in std_logic;
    wb_cyc_i : in std_logic;
    miso_pad_i : in std_logic;
    wb_dat_o : out std_logic_vector (31 downto 0);
    wb_ack_o : out std_logic;
    wb_err_o : out std_logic;
    int_o : out std_logic;
    ss_pad_o : out std_logic_vector(0 downto 0);
    sclk_pad_o : out std_logic;
    mosi_pad_o : out std_logic);
end entity spi_top;

architecture rtl of spi_top is
  signal divider : std_logic_vector (15 downto 0);
  signal ctrl : std_logic_vector (13 downto 0);
  signal ss : std_logic;
  signal wb_dat : std_logic_vector (31 downto 0);
  signal rx : std_logic_vector (127 downto 0);
  signal rx_negedge : std_logic;
  signal tx_negedge : std_logic;
  signal char_len : std_logic_vector (6 downto 0);
  signal go : std_logic;
  signal lsb : std_logic;
  signal ie : std_logic;
  signal ass : std_logic;
  signal spi_divider_sel : std_logic;
  signal spi_ctrl_sel : std_logic;
  signal spi_tx_sel : std_logic_vector (3 downto 0);
  signal spi_ss_sel : std_logic;
  signal tip : std_logic;
  signal pos_edge : std_logic;
  signal neg_edge : std_logic;
  signal last_bit : std_logic;
  signal n7_o : std_logic;
  signal n8_o : std_logic_vector (2 downto 0);
  signal n9_o : std_logic_vector (31 downto 0);
  signal n11_o : std_logic;
  signal n12_o : std_logic;
  signal n13_o : std_logic;
  signal n14_o : std_logic_vector (2 downto 0);
  signal n15_o : std_logic_vector (31 downto 0);
  signal n17_o : std_logic;
  signal n18_o : std_logic;
  signal n19_o : std_logic;
  signal n20_o : std_logic_vector (2 downto 0);
  signal n21_o : std_logic_vector (31 downto 0);
  signal n23_o : std_logic;
  signal n24_o : std_logic;
  signal n25_o : std_logic;
  signal n26_o : std_logic_vector (2 downto 0);
  signal n27_o : std_logic_vector (31 downto 0);
  signal n29_o : std_logic;
  signal n30_o : std_logic;
  signal n31_o : std_logic;
  signal n32_o : std_logic_vector (2 downto 0);
  signal n33_o : std_logic_vector (31 downto 0);
  signal n35_o : std_logic;
  signal n36_o : std_logic;
  signal n37_o : std_logic;
  signal n38_o : std_logic_vector (2 downto 0);
  signal n39_o : std_logic_vector (31 downto 0);
  signal n41_o : std_logic;
  signal n42_o : std_logic;
  signal n43_o : std_logic;
  signal n44_o : std_logic_vector (2 downto 0);
  signal n45_o : std_logic_vector (31 downto 0);
  signal n47_o : std_logic;
  signal n48_o : std_logic;
  signal n49_o : std_logic_vector (2 downto 0);
  signal n50_o : std_logic_vector (31 downto 0);
  signal n51_o : std_logic_vector (31 downto 0);
  signal n52_o : std_logic_vector (31 downto 0);
  signal n53_o : std_logic_vector (31 downto 0);
  signal n54_o : std_logic_vector (31 downto 0);
  signal n56_o : std_logic_vector (31 downto 0);
  signal n58_o : std_logic_vector (31 downto 0);
  signal n60_o : std_logic_vector (31 downto 0);
  signal n63_o : std_logic;
  signal n64_o : std_logic_vector (31 downto 0);
  signal n66_o : std_logic;
  signal n67_o : std_logic_vector (31 downto 0);
  signal n69_o : std_logic;
  signal n70_o : std_logic_vector (31 downto 0);
  signal n72_o : std_logic;
  signal n73_o : std_logic_vector (31 downto 0);
  signal n75_o : std_logic;
  signal n76_o : std_logic_vector (31 downto 0);
  signal n78_o : std_logic;
  signal n79_o : std_logic_vector (31 downto 0);
  signal n81_o : std_logic;
  signal n82_o : std_logic_vector (31 downto 0);
  signal n87_q : std_logic_vector (31 downto 0);
  signal n90_o : std_logic;
  signal n91_o : std_logic;
  signal n92_o : std_logic;
  signal n95_q : std_logic;
  constant n96_o : std_logic := '0';
  signal n99_o : std_logic;
  signal n100_o : std_logic;
  signal n101_o : std_logic;
  signal n104_o : std_logic;
  signal n105_o : std_logic;
  signal n108_q : std_logic;
  signal n111_o : std_logic;
  signal n112_o : std_logic;
  signal n113_o : std_logic;
  signal n114_o : std_logic;
  signal n115_o : std_logic_vector (7 downto 0);
  signal n116_o : std_logic_vector (7 downto 0);
  signal n117_o : std_logic_vector (7 downto 0);
  signal n118_o : std_logic;
  signal n119_o : std_logic_vector (7 downto 0);
  signal n120_o : std_logic_vector (7 downto 0);
  signal n121_o : std_logic_vector (7 downto 0);
  signal n122_o : std_logic_vector (15 downto 0);
  signal n126_o : std_logic_vector (15 downto 0);
  signal n127_q : std_logic_vector (15 downto 0);
  signal n130_o : std_logic;
  signal n131_o : std_logic;
  signal n132_o : std_logic;
  signal n133_o : std_logic;
  signal n134_o : std_logic_vector (7 downto 0);
  signal n135_o : std_logic;
  signal n137_o : std_logic_vector (7 downto 0);
  signal n138_o : std_logic_vector (7 downto 0);
  signal n139_o : std_logic_vector (7 downto 0);
  signal n140_o : std_logic_vector (7 downto 0);
  signal n141_o : std_logic;
  signal n142_o : std_logic_vector (5 downto 0);
  signal n143_o : std_logic_vector (5 downto 0);
  signal n144_o : std_logic_vector (5 downto 0);
  signal n145_o : std_logic;
  signal n146_o : std_logic;
  signal n148_o : std_logic;
  signal n149_o : std_logic;
  signal n150_o : std_logic_vector (13 downto 0);
  signal n151_o : std_logic_vector (7 downto 0);
  signal n152_o : std_logic_vector (7 downto 0);
  signal n153_o : std_logic_vector (7 downto 0);
  signal n154_o : std_logic;
  signal n155_o : std_logic;
  signal n156_o : std_logic_vector (4 downto 0);
  signal n157_o : std_logic_vector (4 downto 0);
  signal n158_o : std_logic_vector (4 downto 0);
  signal n159_o : std_logic_vector (13 downto 0);
  signal n162_q : std_logic_vector (13 downto 0);
  signal n163_o : std_logic;
  signal n164_o : std_logic;
  signal n165_o : std_logic;
  signal n166_o : std_logic_vector (6 downto 0);
  signal n167_o : std_logic;
  signal n168_o : std_logic;
  signal n169_o : std_logic;
  signal n172_o : std_logic;
  signal n173_o : std_logic;
  signal n174_o : std_logic;
  signal n175_o : std_logic;
  signal n176_o : std_logic;
  signal n177_o : std_logic;
  signal n181_o : std_logic;
  signal n182_q : std_logic;
  signal n183_o : std_logic;
  signal n184_o : std_logic;
  signal n185_o : std_logic;
  signal n186_o : std_logic;
  signal n187_o : std_logic;
  signal n188_o : std_logic;
  signal clgen_clk_out : std_logic;
  signal clgen_pos_edge : std_logic;
  signal clgen_neg_edge : std_logic;
  signal shift_tip : std_logic;
  signal shift_last : std_logic;
  signal shift_p_out : std_logic_vector (127 downto 0);
  signal shift_s_out : std_logic;
  signal n189_o : std_logic_vector (3 downto 0);
  signal n190_o : std_logic_vector (3 downto 0);
  signal n191_o : std_logic_vector (3 downto 0);
begin
  wb_dat_o <= n87_q;
  wb_ack_o <= n95_q;
  wb_err_o <= n96_o;
  int_o <= n108_q;
  ss_pad_o(0) <= n188_o;
  sclk_pad_o <= clgen_clk_out;
  mosi_pad_o <= shift_s_out;
  -- spi_top.v:97:36
  divider <= n127_q; -- (signal)
  -- spi_top.v:98:36
  ctrl <= n162_q; -- (signal)
  -- spi_top.v:100:36
  ss <= n182_q; -- (signal)
  -- spi_top.v:102:36
  wb_dat <= n82_o; -- (signal)
  -- spi_top.v:103:36
  rx <= shift_p_out; -- (signal)
  -- spi_top.v:104:36
  rx_negedge <= n163_o; -- (signal)
  -- spi_top.v:105:36
  tx_negedge <= n164_o; -- (signal)
  -- spi_top.v:106:36
  char_len <= n166_o; -- (signal)
  -- spi_top.v:107:36
  go <= n165_o; -- (signal)
  -- spi_top.v:108:36
  lsb <= n167_o; -- (signal)
  -- spi_top.v:109:36
  ie <= n168_o; -- (signal)
  -- spi_top.v:110:36
  ass <= n169_o; -- (signal)
  -- spi_top.v:111:36
  spi_divider_sel <= n12_o; -- (signal)
  -- spi_top.v:112:36
  spi_ctrl_sel <= n18_o; -- (signal)
  -- spi_top.v:113:36
  spi_tx_sel <= n191_o; -- (signal)
  -- spi_top.v:114:36
  spi_ss_sel <= n48_o; -- (signal)
  -- spi_top.v:115:36
  tip <= shift_tip; -- (signal)
  -- spi_top.v:116:36
  pos_edge <= clgen_pos_edge; -- (signal)
  -- spi_top.v:117:36
  neg_edge <= clgen_neg_edge; -- (signal)
  -- spi_top.v:118:36
  last_bit <= shift_last; -- (signal)
  -- spi_top.v:122:37
  n7_o <= wb_cyc_i and wb_stb_i;
  n8_o <= wb_adr_i (4 downto 2);
  -- spi_defines.v:134:36
  n9_o <= "00000000000000000000000000000" & n8_o;  --  uext
  -- spi_top.v:122:75
  n11_o <= '1' when n9_o = "00000000000000000000000000000101" else '0';
  -- spi_top.v:122:48
  n12_o <= n7_o and n11_o;
  -- spi_top.v:123:37
  n13_o <= wb_cyc_i and wb_stb_i;
  n14_o <= wb_adr_i (4 downto 2);
  -- spi_defines.v:134:36
  n15_o <= "00000000000000000000000000000" & n14_o;  --  uext
  -- spi_top.v:123:75
  n17_o <= '1' when n15_o = "00000000000000000000000000000100" else '0';
  -- spi_top.v:123:48
  n18_o <= n13_o and n17_o;
  -- spi_top.v:124:37
  n19_o <= wb_cyc_i and wb_stb_i;
  n20_o <= wb_adr_i (4 downto 2);
  -- spi_defines.v:134:36
  n21_o <= "00000000000000000000000000000" & n20_o;  --  uext
  -- spi_top.v:124:75
  n23_o <= '1' when n21_o = "00000000000000000000000000000000" else '0';
  -- spi_top.v:124:48
  n24_o <= n19_o and n23_o;
  -- spi_top.v:125:37
  n25_o <= wb_cyc_i and wb_stb_i;
  n26_o <= wb_adr_i (4 downto 2);
  -- spi_defines.v:134:36
  n27_o <= "00000000000000000000000000000" & n26_o;  --  uext
  -- spi_top.v:125:75
  n29_o <= '1' when n27_o = "00000000000000000000000000000001" else '0';
  -- spi_top.v:125:48
  n30_o <= n25_o and n29_o;
  -- spi_top.v:126:37
  n31_o <= wb_cyc_i and wb_stb_i;
  n32_o <= wb_adr_i (4 downto 2);
  -- spi_defines.v:134:36
  n33_o <= "00000000000000000000000000000" & n32_o;  --  uext
  -- spi_top.v:126:75
  n35_o <= '1' when n33_o = "00000000000000000000000000000010" else '0';
  -- spi_top.v:126:48
  n36_o <= n31_o and n35_o;
  -- spi_top.v:127:37
  n37_o <= wb_cyc_i and wb_stb_i;
  n38_o <= wb_adr_i (4 downto 2);
  -- spi_defines.v:134:36
  n39_o <= "00000000000000000000000000000" & n38_o;  --  uext
  -- spi_top.v:127:75
  n41_o <= '1' when n39_o = "00000000000000000000000000000011" else '0';
  -- spi_top.v:127:48
  n42_o <= n37_o and n41_o;
  -- spi_top.v:128:37
  n43_o <= wb_cyc_i and wb_stb_i;
  n44_o <= wb_adr_i (4 downto 2);
  -- spi_defines.v:134:36
  n45_o <= "00000000000000000000000000000" & n44_o;  --  uext
  -- spi_top.v:128:75
  n47_o <= '1' when n45_o = "00000000000000000000000000000110" else '0';
  -- spi_top.v:128:48
  n48_o <= n43_o and n47_o;
  n49_o <= wb_adr_i (4 downto 2);
  -- spi_defines.v:134:36
  n50_o <= "00000000000000000000000000000" & n49_o;  --  uext
  n51_o <= rx (31 downto 0);
  n52_o <= rx (63 downto 32);
  n53_o <= rx (95 downto 64);
  n54_o <= rx (127 downto 96);
  n56_o <= "000000000000000000" & ctrl;
  n58_o <= "0000000000000000" & divider;
  n60_o <= "0000000000000000000000000000000" & ss;
  -- spi_defines.v:149:33
  n63_o <= '1' when std_logic_vector'("00000000000000000000000000000110") = n50_o else '0';
  -- spi_defines.v:149:33
  n64_o <= (31 downto 0 => 'X') when n63_o = '0' else n60_o;
  -- spi_defines.v:148:33
  n66_o <= '1' when std_logic_vector'("00000000000000000000000000000101") = n50_o else '0';
  -- spi_defines.v:148:33
  n67_o <= n64_o when n66_o = '0' else n58_o;
  -- spi_defines.v:147:33
  n69_o <= '1' when std_logic_vector'("00000000000000000000000000000100") = n50_o else '0';
  -- spi_defines.v:147:33
  n70_o <= n67_o when n69_o = '0' else n56_o;
  -- spi_defines.v:142:33
  n72_o <= '1' when std_logic_vector'("00000000000000000000000000000011") = n50_o else '0';
  -- spi_defines.v:142:33
  n73_o <= n70_o when n72_o = '0' else n54_o;
  -- spi_defines.v:141:33
  n75_o <= '1' when std_logic_vector'("00000000000000000000000000000010") = n50_o else '0';
  -- spi_defines.v:141:33
  n76_o <= n73_o when n75_o = '0' else n53_o;
  -- spi_defines.v:140:33
  n78_o <= '1' when std_logic_vector'("00000000000000000000000000000001") = n50_o else '0';
  -- spi_defines.v:140:33
  n79_o <= n76_o when n78_o = '0' else n52_o;
  -- spi_defines.v:139:33
  n81_o <= '1' when std_logic_vector'("00000000000000000000000000000000") = n50_o else '0';
  -- spi_defines.v:139:33
  n82_o <= n79_o when n81_o = '0' else n51_o;
  -- spi_top.v:180:3
  process (wb_clk_i, wb_rst_i)
  begin
    if wb_rst_i = '1' then
      n87_q <= "00000000000000000000000000000000";
    elsif rising_edge (wb_clk_i) then
      n87_q <= wb_dat;
    end if;
  end process;
  -- spi_top.v:194:32
  n90_o <= wb_cyc_i and wb_stb_i;
  -- spi_top.v:194:45
  n91_o <= not n95_q;
  -- spi_top.v:194:43
  n92_o <= n90_o and n91_o;
  -- spi_top.v:189:3
  process (wb_clk_i, wb_rst_i)
  begin
    if wb_rst_i = '1' then
      n95_q <= '0';
    elsif rising_edge (wb_clk_i) then
      n95_q <= n92_o;
    end if;
  end process;
  -- spi_top.v:205:17
  n99_o <= ie and tip;
  -- spi_top.v:205:24
  n100_o <= n99_o and last_bit;
  -- spi_top.v:205:36
  n101_o <= n100_o and pos_edge;
  -- spi_top.v:207:10
  n104_o <= n108_q when n95_q = '0' else '0';
  -- spi_top.v:205:10
  n105_o <= n104_o when n101_o = '0' else '1';
  -- spi_top.v:201:3
  process (wb_clk_i, wb_rst_i)
  begin
    if wb_rst_i = '1' then
      n108_q <= '0';
    elsif rising_edge (wb_clk_i) then
      n108_q <= n105_o;
    end if;
  end process;
  -- spi_top.v:227:32
  n111_o <= spi_divider_sel and wb_we_i;
  -- spi_top.v:227:46
  n112_o <= not tip;
  -- spi_top.v:227:43
  n113_o <= n111_o and n112_o;
  n114_o <= wb_sel_i (0);
  n115_o <= wb_dat_i (7 downto 0);
  n116_o <= divider (7 downto 0);
  -- spi_top.v:229:9
  n117_o <= n116_o when n114_o = '0' else n115_o;
  n118_o <= wb_sel_i (1);
  n119_o <= wb_dat_i (15 downto 8);
  n120_o <= divider (15 downto 8);
  -- spi_top.v:231:9
  n121_o <= n120_o when n118_o = '0' else n119_o;
  n122_o <= n121_o & n117_o;
  -- spi_top.v:223:5
  n126_o <= divider when n113_o = '0' else n122_o;
  -- spi_top.v:223:5
  process (wb_clk_i, wb_rst_i)
  begin
    if wb_rst_i = '1' then
      n127_q <= "0000000000000000";
    elsif rising_edge (wb_clk_i) then
      n127_q <= n126_o;
    end if;
  end process;
  -- spi_top.v:279:26
  n130_o <= spi_ctrl_sel and wb_we_i;
  -- spi_top.v:279:40
  n131_o <= not tip;
  -- spi_top.v:279:37
  n132_o <= n130_o and n131_o;
  n133_o <= wb_sel_i (0);
  n134_o <= wb_dat_i (7 downto 0);
  n135_o <= ctrl (0);
  n137_o <= "0000000" & n135_o;
  -- spi_top.v:282:42
  n138_o <= n134_o or n137_o;
  n139_o <= ctrl (7 downto 0);
  -- spi_top.v:281:9
  n140_o <= n139_o when n133_o = '0' else n138_o;
  n141_o <= wb_sel_i (1);
  n142_o <= wb_dat_i (13 downto 8);
  n143_o <= ctrl (13 downto 8);
  -- spi_top.v:283:9
  n144_o <= n143_o when n141_o = '0' else n142_o;
  -- spi_top.v:286:17
  n145_o <= tip and last_bit;
  -- spi_top.v:286:29
  n146_o <= n145_o and pos_edge;
  n148_o <= ctrl (8);
  -- spi_top.v:286:10
  n149_o <= n148_o when n146_o = '0' else '0';
  n150_o <= n144_o & n140_o;
  n151_o <= n150_o (7 downto 0);
  n152_o <= ctrl (7 downto 0);
  -- spi_top.v:279:10
  n153_o <= n152_o when n132_o = '0' else n151_o;
  n154_o <= n150_o (8);
  -- spi_top.v:279:10
  n155_o <= n149_o when n132_o = '0' else n154_o;
  n156_o <= n150_o (13 downto 9);
  n157_o <= ctrl (13 downto 9);
  -- spi_top.v:279:10
  n158_o <= n157_o when n132_o = '0' else n156_o;
  n159_o <= n158_o & n155_o & n153_o;
  -- spi_top.v:275:3
  process (wb_clk_i, wb_rst_i)
  begin
    if wb_rst_i = '1' then
      n162_q <= "00000000000000";
    elsif rising_edge (wb_clk_i) then
      n162_q <= n159_o;
    end if;
  end process;
  -- spi_top.v:277:5
  n163_o <= ctrl (9);
  n164_o <= ctrl (10);
  n165_o <= ctrl (8);
  n166_o <= ctrl (6 downto 0);
  n167_o <= ctrl (11);
  n168_o <= ctrl (12);
  n169_o <= ctrl (13);
  -- spi_top.v:304:26
  n172_o <= spi_ss_sel and wb_we_i;
  -- spi_top.v:304:40
  n173_o <= not tip;
  -- spi_top.v:304:37
  n174_o <= n172_o and n173_o;
  n175_o <= wb_sel_i (0);
  -- spi_top.v:304:45
  n176_o <= n174_o and n175_o;
  n177_o <= wb_dat_i (0);
  -- spi_top.v:300:5
  n181_o <= ss when n176_o = '0' else n177_o;
  -- spi_top.v:300:5
  process (wb_clk_i, wb_rst_i)
  begin
    if wb_rst_i = '1' then
      n182_q <= '0';
    elsif rising_edge (wb_clk_i) then
      n182_q <= n181_o;
    end if;
  end process;
  -- spi_top.v:360:44
  n183_o <= tip and ass;
  -- spi_top.v:360:27
  n184_o <= ss and n183_o;
  -- spi_top.v:360:72
  n185_o <= not ass;
  -- spi_top.v:360:59
  n186_o <= ss and n185_o;
  -- spi_top.v:360:53
  n187_o <= n184_o or n186_o;
  -- spi_top.v:360:21
  n188_o <= not n187_o;
  -- spi_top.v:362:50
  clgen : entity work.spi_clgen port map (
    clk_in => wb_clk_i,
    rst => wb_rst_i,
    enable => go,
    go => tip,
    last_clk => last_bit,
    divider => divider,
    clk_out => clgen_clk_out,
    pos_edge => clgen_pos_edge,
    neg_edge => clgen_neg_edge);
  -- spi_top.v:367:83
  shift : entity work.spi_shift port map (
    clk => wb_clk_i,
    rst => wb_rst_i,
    latch => n190_o,
    byte_sel => wb_sel_i,
    len => char_len,
    lsb => lsb,
    go => go,
    pos_edge => pos_edge,
    neg_edge => neg_edge,
    rx_negedge => rx_negedge,
    tx_negedge => tx_negedge,
    p_in => wb_dat_i,
    s_clk => clgen_clk_out,
    s_in => miso_pad_i,
    tip => shift_tip,
    last => shift_last,
    p_out => shift_p_out,
    s_out => shift_s_out);
  n189_o <= wb_we_i & wb_we_i & wb_we_i & wb_we_i;
  -- spi_top.v:369:43
  n190_o <= spi_tx_sel and n189_o;
  n191_o <= n42_o & n36_o & n30_o & n24_o;
end rtl;

