OpenCores
URL https://opencores.org/ocsvn/usb11_phy_translation/usb11_phy_translation/trunk

Subversion Repositories usb11_phy_translation

[/] [usb11_phy_translation/] [trunk/] [usb_tx_phy.vhdl] - Diff between revs 2 and 3

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 3
Line 38... Line 38...
--          //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE          //         --
--          //  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE          //         --
--          //  POSSIBILITY OF SUCH DAMAGE.                                  //         --
--          //  POSSIBILITY OF SUCH DAMAGE.                                  //         --
--          //                                                               //         --
--          //                                                               //         --
--          ///////////////////////////////////////////////////////////////////         --
--          ///////////////////////////////////////////////////////////////////         --
--======================================================================================--
--======================================================================================--
 
--                                                                                      --
 
-- Change history                                                                       --
 
-- +-------+-----------+-------+------------------------------------------------------+ --
 
-- | Vers. | Date      | Autor | Comment                                              | --
 
-- +-------+-----------+-------+------------------------------------------------------+ --
 
-- |  1.0  |04 Feb 2011|  MN   | Initial version                                      | --
 
-- |  1.1  |23 Apr 2011|  MN   | Added missing 'rst' in process sensitivity lists     | --
 
-- |       |           |       | Added ELSE constructs in next_state process to       | --
 
-- |       |           |       |   prevent an undesired latch implementation.         | --
 
--======================================================================================--
 
 
library ieee;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_unsigned.all;
Line 212... Line 221...
  end process;
  end process;
 
 
  sft_done_e <= sft_done and not sft_done_r;
  sft_done_e <= sft_done and not sft_done_r;
 
 
  -- Out Data Hold Register
  -- Out Data Hold Register
  p_hold_reg: process (clk)
  p_hold_reg: process (clk, rst)
  begin
  begin
    if rst ='0' then
    if rst ='0' then
        hold_reg   <= X"00";
        hold_reg   <= X"00";
        hold_reg_d <= X"00";
        hold_reg_d <= X"00";
    elsif rising_edge(clk) then
    elsif rising_edge(clk) then
Line 389... Line 398...
      next_state <= IDLE_STATE;
      next_state <= IDLE_STATE;
    else
    else
      case (state) is
      case (state) is
        when IDLE_STATE => if TxValid_i ='1' then
        when IDLE_STATE => if TxValid_i ='1' then
                             next_state <= SOP_STATE;
                             next_state <= SOP_STATE;
 
                           ELSE
 
                             next_state <= IDLE_STATE;
                           end if;
                           end if;
        when SOP_STATE  => if sft_done_e ='1' then
        when SOP_STATE  => if sft_done_e ='1' then
                             next_state <= DATA_STATE;
                             next_state <= DATA_STATE;
 
                           ELSE
 
                             next_state <= SOP_STATE;
                           end if;
                           end if;
        when DATA_STATE => if data_done ='0' and sft_done_e ='1' then
        when DATA_STATE => if data_done ='0' and sft_done_e ='1' then
                             next_state <= EOP1_STATE;
                             next_state <= EOP1_STATE;
 
                           ELSE
 
                             next_state <= DATA_STATE;
                           end if;
                           end if;
        when EOP1_STATE => if eop_done ='1' then
        when EOP1_STATE => if eop_done ='1' then
                             next_state <= EOP2_STATE;
                             next_state <= EOP2_STATE;
 
                           ELSE
 
                             next_state <= EOP1_STATE;
                           end if;
                           end if;
        when EOP2_STATE => if eop_done ='0' and fs_ce ='1' then
        when EOP2_STATE => if eop_done ='0' and fs_ce ='1' then
                             next_state <= WAIT_STATE;
                             next_state <= WAIT_STATE;
 
                           ELSE
 
                             next_state <= EOP2_STATE;
                           end if;
                           end if;
        when others     => if fs_ce = '1' then   --is WAIT_STATE
        when WAIT_STATE => if fs_ce = '1' then
                             next_state <= IDLE_STATE;
                             next_state <= IDLE_STATE;
 
                           ELSE
 
                             next_state <= WAIT_STATE;
                           end if;
                           end if;
 
        when others     => next_state <= IDLE_STATE;
      end case;
      end case;
    end if;
    end if;
  end process;
  end process;
 
 
  ld_sop_d  <= TxValid_i  when state = IDLE_STATE else '0';
  ld_sop_d  <= TxValid_i  when state = IDLE_STATE else '0';

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.