-- Shawn Nematbakhsh -- UNIX DES Password Cracker -- LCD output entity library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_ARITH.all; entity LCD is port( clk: in std_logic; rst: in std_logic; ASCII: in std_logic_vector(63 downto 0); ACK: in std_logic; rdy: in std_logic; D: out std_logic; REC: out std_logic); end LCD; --}} End of automatically maintained section architecture arch of LCD is type STATE_TYPE is (WAITING,foo,waitz,OUTPUT,WAIT_FOR_LOW_ACK,FINISHED); signal exe_state: STATE_TYPE; signal data_shift : std_logic_vector(63 downto 0); signal j: UNSIGNED(3 downto 0); constant C0_56 : std_logic_vector (63 downto 0) := "0000000000000000000000000000000000000000000000000000000000000000"; signal v: UNSIGNED(6 downto 0); begin process(clk,rst) begin if(rst='1') then D <= '0'; v <= conv_unsigned(0,7); REC <= '0'; data_shift <= "0000000000000000000000000000000000000000000000000000000000000000"; exe_state <= WAITING; elsif(clk='1' and clk'event) then case exe_state is when WAITING => data_shift <= ASCII; if(rdy = '1') then exe_state <= OUTPUT; else exe_state <= WAITING; end if; when foo => D <=data_shift(63); j <= "0000"; exe_state <= waitz; when waitz => j <= j + '1'; if(j = conv_unsigned(15,4)) then exe_state <= output; else exe_state <= waitz; end if; when output => REC<='1'; if(ACK='0') then exe_state <= output; elsif(v = conv_unsigned(64,7)) then exe_state <= FINISHED; else REC <= '0'; v<= v + '1'; data_shift <= data_shift(62 downto 0) & '0'; exe_state <= WAIT_FOR_LOW_ACK; end if; when WAIT_FOR_LOW_ACK => if(ACK = '0') then exe_state <= foo; else exe_state <= WAIT_FOR_LOW_ACK; end if; when FINISHED => exe_state <= FINISHED; end case; end if; end process; end arch;