71 --keep track of miso/mosi bit counts for data alignmnet
72 PROCESS(ss_n, clk)
73 BEGIN
74 IF(ss_n = '1' OR reset_n = '0') THEN --this slave is not selected or being reset
75 bit_cnt '1', OTHERS = '0'); --reset miso/mosi bit count
76 ELSE --this slave is selected
77 IF(rising_edge(clk)) THEN --new bit on miso/mosi
78 bit_cnt