亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? usb_new_pck_handlers.vhdl

?? 實現USB接口功能的VHDL和verilog完整源代碼
?? VHDL
字號:
-------------------------------------------------------------------------------------
---- File >>> usb_new_pck_handlers.vhdl 
---- Iden >>>							980305-13:47:42
----
---- Project:           USB Developement
---- Customer:          Philips_ITCL
----
---- VHDL Design Unit:  package PCK_HANDLERS
---- Written by:        Geert Verbruggen
----                    Easics nv
----                    http://www.easics.com      
----                    mailto: vhdl@easics.be
----
---- Creation Date:     Thu, 05 Mar 1998
----
---- Purpose:
----
---- Revision history:
----
-------------------------------------------------------------------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;

library work;
use work.PCK_GENERAL.all;
use work.PCK_USB.all;
use work.PCK_CONFIGURATION.all;

package PCK_HANDLERS is

  --------------------------------------------------
  --       Connection to SIE Interface            --
  --------------------------------------------------

  -- DOC_BEGIN: Interfaces between the SIE Interface and the Handlers
  -- Two different interfaces are used to transfer data and control signals:
  --   * From the SIE Interface to the handlers
  --   * From the handlers to the SIE Interface
  --
  -- The interfaces consist of a single signal of type record. The
  -- following sections give an overview of the record.
  --
  --
  --   DOC_BEGIN: From the SIE Interface to the handlers
  --   The following type describes the signals in the interface that
  --   are used to transfer data and control signals from the SIE Interface
  --   module to all the handlers.

  type T_SIE_to_Handlers is record
    FrameNumber: eleven_bits;
    LastError: T_PACKET_ERROR_ENUM;

    Handler: integer range 0 to N_HANDLERS-1;
    Endpoint: integer range 0 to MAX_ENDPOINT_NR;

    Interrupts: S_Interrupt_bool;

    RxData: byte;
    RxDataValid: boolean;

    TxDataFetched: boolean;

    StartOfTransfer: boolean;
    SetupPacket: boolean;
    EndOfTransfer: boolean;
    Success: boolean;
    NAKed: boolean;
    N_Data: integer range 0 to MAX_OVERFLOW_SIZE;
    Error: boolean;
  end record;
  --   DOC_END


  --   DOC_BEGIN: From the handlers to the SIE Interface
  --   The following type describes the signals in the interface that
  --   are used to transfer data and control signals from the handlers
  --   module to the SIE Interface.

  type T_Device_7bit is array(0 to N_DEVICES-1) of seven_bits;

  type T_Handlers_to_SIE is record
    
    USBAddress: T_Device_7bit;
    DeviceEnabled: S_Device_bool;
    DeviceConfigured: S_Device_bool;

    Interrupts: S_Interrupt_bool;
    RemoteWakeUp:     boolean;
    NeedClock:        boolean;

    TxData: byte; 
    TxDataValid: boolean;

    DataPID: integer range 0 to 1;
    Disabled: boolean;
    Stalled: boolean;
    Accepted: boolean;
    IntMode: boolean;
    
  end record;
  --   DOC_END
  -- DOC_END

  function HandlersToSIEDefault return T_Handlers_to_SIE;

  procedure SIEConnector(
			  ID: integer;
			  signal Output: out T_Handlers_to_SIE;
			  signal Input: in T_Handlers_to_SIE;
			  signal Common: in T_SIE_to_Handlers;

			  signal Own: in T_Handlers_to_SIE;
			  signal HandlerSelected: out boolean
			);

  procedure DummySIEConnector(
			  ID: integer;
			  signal Output: out T_Handlers_to_SIE;
			  signal Input: in T_Handlers_to_SIE;

			  signal Own: in T_Handlers_to_SIE
			);


  -------------------------------------------------
  --       Connection to UC Interface            --
  -------------------------------------------------

  -- DOC_BEGIN: Interfaces between the UC Interface and the Handlers
  -- Two different interfaces are used to transfer data and control signals.
  -- The UC Interface indicates the module that handles the interface
  -- to the micro-controller.
  --   * From the UC Interface to the handlers
  --   * From the handlers to the UC Interface
  --
  -- The interfaces consist of a single signal of type record. The
  -- following sections give an overview of the record.
  --
  --
  --   DOC_BEGIN: From the UC Interface to the handlers
  --   The following type describes the signals in the interface that
  --   are used to transfer data and control signals from the UC Interface
  --   module to all the handlers.

  constant N_UC_ADDRESSES: integer := 2;

  type T_Handlers_to_UC is record
    Ready: boolean;
    Data: byte;
  end record;
  --   DOC_END


  --   DOC_BEGIN: From the handlers to the SIE Interface
  --   The following type describes the signals in the interface that
  --   are used to transfer data and control signals from the handlers
  --   module to the SIE Interface.

  type T_UC_to_Handlers is record
    Data: byte;
    Write: boolean;
    Read: boolean;
    Address: integer range 0 to 1;
  end record;
  --   DOC_END
  -- DOC_END


  function HandlersToUCDefault return T_Handlers_to_UC; 

  procedure UCConnector(signal Output: out T_Handlers_to_UC;
			signal Input:   in T_Handlers_to_UC;

			signal Own:     in T_Handlers_to_UC;
			signal Selected:in boolean);


  -------------------------------------------------
  --       Connection to PI - Handler            --
  -------------------------------------------------
  subtype S_Toggle is integer range 0 to 1;
  type T_ToggleArray is array (integer range 0 to N_ENDPOINTS-1) of S_Toggle;
  subtype S_Full is booleans(1 downto 0);
  type T_Full is array (integer range 0 to N_ENDPOINTS -1) of S_Full;

  type T_EPBufferInfo is record
      UCToggle: T_ToggleArray;
      USBToggle: T_ToggleArray;
      Full: T_Full;
  end record;


end PCK_HANDLERS;


package body PCK_HANDLERS is

  procedure SIEConnector(
			  ID: integer;
			  signal Output: out T_Handlers_to_SIE;
			  signal Input: in T_Handlers_to_SIE;
			  signal Common: in T_SIE_to_Handlers;

			  signal Own: in T_Handlers_to_SIE;
			  signal HandlerSelected: out boolean
			) is

    variable Selected: boolean;
    variable Index: integer;
		  
  begin
    Output.USBAddress <= Input.USBAddress;
    Output.DeviceEnabled <= Input.DeviceEnabled;
    Output.DeviceConfigured <= Input.DeviceConfigured;
    Output.TxData <= Input.TxData;
    Output.TxDataValid <= Input.TxDataValid;
    Output.DataPID <= Input.DataPID;
    Output.Stalled <= Input.Stalled;
    Output.Accepted <= Input.Accepted;
    Output.Interrupts <= Input.Interrupts;
    Output.Disabled <= Input.Disabled;
    Output.IntMode <= Input.IntMode;

    Selected := (Common.Handler = ID);
    HandlerSelected <= Selected;

    if Selected then
      Output.TxData <= Own.TxData;
      Output.TxDataValid <= Own.TxDataValid;
      Output.DataPID <= Own.DataPID;
      Output.Stalled <= Own.Stalled;
      Output.Accepted <= Own.Accepted;
      Output.Disabled <= Own.Disabled;
      Output.IntMode <= Own.IntMode;
    end if;

    Output.NeedClock <= Input.NeedClock or Own.NeedClock;
    Output.RemoteWakeUp <= Input.RemoteWakeUp or Own.RemoteWakeUp;

    Index := 0;
    for i in 0 to N_DEVICES-1 loop
      if (ADDRESS_HANDLER(i) = ID) then
	Output.USBAddress(i) <= Own.USBAddress(Index);
	Index := Index+1;
      end if;
    end loop;


    Index := 0;
    for i in 0 to N_DEVICES-1 loop
      if (ENABLE_HANDLER(i) = ID) then
	Output.DeviceEnabled(i) <= Own.DeviceEnabled(Index);
	Index := Index+1;
      end if;
    end loop;

    Index := 0;
    for i in 0 to N_DEVICES-1 loop
      if (CONFIG_HANDLER(i) = ID) then
	Output.DeviceConfigured(i) <= Own.DeviceConfigured(Index);
	Index := Index+1;
      end if;
    end loop;

    Index := 0;
    for i in 0 to N_INTR_BITS-1 loop
      if (INTR_HANDLER(i) = ID) then
	Output.Interrupts(i) <= Own.Interrupts(Index);
	Index := Index+1;
      end if;
    end loop;

  end SIEConnector;

  procedure DummySIEConnector(
			  ID: integer;
			  signal Output: out T_Handlers_to_SIE;
			  signal Input: in T_Handlers_to_SIE;

			  signal Own: in T_Handlers_to_SIE
			) is

    variable Index: integer;
		  
  begin
    Output.USBAddress <= Input.USBAddress;
    Output.DeviceEnabled <= Input.DeviceEnabled;
    Output.DeviceConfigured <= Input.DeviceConfigured;
    Output.Interrupts <= Input.Interrupts;
    Output.TxData <= Input.TxData;
    Output.TxDataValid <= Input.TxDataValid;
    Output.DataPID <= Input.DataPID;
    Output.Stalled <= Input.Stalled;
    Output.Disabled <= Input.Disabled;
    Output.Accepted <= Input.Accepted;
    Output.IntMode <= Input.IntMode;

    Output.NeedClock <= Input.NeedClock or Own.NeedClock;
    Output.RemoteWakeUp <= Input.RemoteWakeUp or Own.RemoteWakeUp;

    Index := 0;
    for i in 0 to N_DEVICES-1 loop
      if (ADDRESS_HANDLER(i) = ID) then
	Output.USBAddress(i) <= Own.USBAddress(Index);
	Output.DeviceEnabled(i) <= Own.DeviceEnabled(Index);
	Index := Index+1;
      end if;
    end loop;

    Index := 0;
    for i in 0 to N_DEVICES-1 loop
      if (CONFIG_HANDLER(i) = ID) then
	Output.DeviceConfigured(i) <= Own.DeviceConfigured(Index);
	Index := Index+1;
      end if;
    end loop;

    Index := 0;
    for i in 0 to N_INTR_BITS-1 loop
      if (INTR_HANDLER(i) = ID) then
	Output.Interrupts(i) <= Own.Interrupts(Index);
	Index := Index+1;
      end if;
    end loop;

  end DummySIEConnector;

  procedure UCConnector(signal Output: out T_Handlers_to_UC;
			signal Input:   in T_Handlers_to_UC;

			signal Own:     in T_Handlers_to_UC;
			signal Selected:in boolean) is
  begin
    Output.Ready <= Input.Ready and Own.Ready;
    Output.Data <= Input.Data;

    if Selected then
      Output.Data <= Own.Data;
      if Input.Data /= byte'(others => '0') then
	assert (FALSE) report "2 Handlers driving UC bus" severity warning;
      end if;
    end if;
  end UCConnector;


  function HandlersToSIEDefault return T_Handlers_to_SIE is
    variable ReturnValue: T_Handlers_to_SIE;
  begin
    ReturnValue.USBAddress := (others=>(others=>'0'));
    ReturnValue.DeviceEnabled := (others=>FALSE);
    ReturnValue.DeviceConfigured := (others=>FALSE);
    ReturnValue.Interrupts := (others=>FALSE);
    ReturnValue.TxData := (others => '0');
    ReturnValue.TxDataValid := FALSE;
    ReturnValue.DataPID := 0;
    ReturnValue.Stalled := FALSE;
    ReturnValue.Accepted := FALSE;
    ReturnValue.IntMode := FALSE;
    ReturnValue.NeedClock := FALSE;
    ReturnValue.RemoteWakeUp := FALSE;

    return ReturnValue;
  end;

  function HandlersToUCDefault return T_Handlers_to_UC is 
    variable ReturnValue: T_Handlers_to_UC;
  begin
    ReturnValue.Data := (others => '0');
    ReturnValue.Ready := TRUE;

    return ReturnValue;
  end;

end PCK_HANDLERS;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青草成人在线观看| 午夜精品一区二区三区三上悠亚 | 91精品国产综合久久蜜臀| 蜜臀av一级做a爰片久久| 国产日产亚洲精品系列| 欧美日韩一区二区三区四区五区| 精品一区二区国语对白| 依依成人精品视频| 国产欧美日韩三区| 91麻豆精品国产91久久久资源速度| 国产成人免费在线视频| 午夜电影久久久| 综合色天天鬼久久鬼色| 亚洲精品在线观| 欧美日本视频在线| av成人免费在线观看| 美女国产一区二区| 夜夜夜精品看看| 欧美国产精品专区| 26uuu色噜噜精品一区二区| 在线观看亚洲一区| 成人美女在线观看| 国产一区视频在线看| 日韩制服丝袜先锋影音| 亚洲欧美日韩电影| 国产午夜亚洲精品羞羞网站| 日韩欧美国产麻豆| 欧美日韩中文另类| 色婷婷综合视频在线观看| 高清不卡一区二区在线| 久久精品国产**网站演员| caoporm超碰国产精品| 国产精品乡下勾搭老头1| 日本不卡一二三| 亚洲国产欧美在线| 一区二区三区加勒比av| 中文字幕五月欧美| 国产精品蜜臀av| 国产精品网曝门| 国产午夜精品一区二区三区四区| 欧美变态口味重另类| 日韩西西人体444www| 91精品在线免费观看| 欧美日韩国产一级| 欧美日韩专区在线| 欧美伦理视频网站| 5566中文字幕一区二区电影| 欧美色图天堂网| 精品视频1区2区3区| 欧美在线一区二区三区| 欧美又粗又大又爽| 欧美日韩久久一区| 911精品产国品一二三产区| 欧美日韩三级一区| 欧美顶级少妇做爰| 日韩一区二区免费视频| 日韩亚洲国产中文字幕欧美| 欧美一级在线观看| 精品久久久久久久人人人人传媒 | 粉嫩欧美一区二区三区高清影视| 国产一区啦啦啦在线观看| 国内精品久久久久影院色| 国产成人在线看| 99久久99久久精品免费观看 | 日韩午夜激情视频| 欧美一区二区日韩| 久久久久国产精品厨房| 国产精品无码永久免费888| 专区另类欧美日韩| 亚洲国产日产av| 日韩av电影一区| 精品一区二区三区在线观看国产| 欧美大片顶级少妇| 国产人伦精品一区二区| 亚洲欧美日韩久久| 日韩国产精品久久| 国产毛片一区二区| 91色.com| 91精品免费观看| 久久久91精品国产一区二区精品| 国产精品久久久久久久久久久免费看| 亚洲精品老司机| 日产国产高清一区二区三区| 黑人精品欧美一区二区蜜桃 | 激情图区综合网| 国产suv精品一区二区883| 日本高清不卡一区| 欧美videofree性高清杂交| 国产精品毛片无遮挡高清| 亚洲国产精品久久久男人的天堂| 激情五月激情综合网| 色狠狠av一区二区三区| 日韩免费视频线观看| 亚洲欧洲日韩综合一区二区| 日本欧美久久久久免费播放网| 懂色av噜噜一区二区三区av| 欧美视频一区二区三区| 久久久久久**毛片大全| 亚洲成人综合在线| 国产不卡视频在线观看| 欧美丰满少妇xxxbbb| 国产精品美女视频| 麻豆国产精品777777在线| 91视视频在线观看入口直接观看www | 91影院在线观看| 91精品久久久久久蜜臀| 最新国产精品久久精品| 久久国内精品自在自线400部| 99久久精品国产精品久久| 欧美成人a在线| 亚洲综合小说图片| 欧美不卡123| 亚洲va欧美va国产va天堂影院| 丁香五精品蜜臀久久久久99网站| 欧美日本一道本在线视频| 国产精品二三区| 精品一区二区三区在线视频| 欧美三电影在线| 国产精品高清亚洲| 国产精品综合久久| 日韩欧美中文字幕制服| 亚洲午夜av在线| 99亚偷拍自图区亚洲| 国产亚洲一区二区三区在线观看| 日韩和欧美一区二区| 在线观看国产一区二区| 国产精品美女久久久久aⅴ | 精品一区二区综合| 91精品国产入口| 亚洲国产一区二区三区青草影视| 成人黄色在线视频| 久久精品在这里| 激情综合色播激情啊| 欧美一区二区三区性视频| 亚洲第一综合色| 欧美亚洲国产一区二区三区va| 亚洲人成在线播放网站岛国| av不卡免费电影| 国产精品私房写真福利视频| 国产精品中文欧美| 久久久精品国产99久久精品芒果| 国内精品久久久久影院薰衣草| 欧美岛国在线观看| 久久99国产精品尤物| 日韩精品一区二区三区蜜臀| 免费在线观看成人| 日韩欧美视频一区| 精品无人区卡一卡二卡三乱码免费卡 | 国产欧美一区二区精品性色| 国产精品资源在线| 国产精品视频九色porn| 成人在线视频首页| 中文字幕一区二区三区蜜月| 成人丝袜高跟foot| 欧美激情自拍偷拍| 国产自产v一区二区三区c| 日本一区二区在线不卡| 国产一区二区三区香蕉 | 91色视频在线| 国产精品成人一区二区艾草| 国产高清无密码一区二区三区| 精品国产乱码久久| 国产高清在线观看免费不卡| 久久久久9999亚洲精品| 国产麻豆欧美日韩一区| 精品99一区二区| 不卡av免费在线观看| 中文字幕亚洲区| 中文字幕乱码日本亚洲一区二区| 九色|91porny| 久久久精品2019中文字幕之3| 国产精品资源站在线| 国产日韩精品久久久| 国产露脸91国语对白| 中文字幕制服丝袜成人av| www.成人在线| 亚洲欧美日韩系列| 欧美性色aⅴ视频一区日韩精品| 日本三级亚洲精品| 日韩欧美国产不卡| 国产一本一道久久香蕉| 精品欧美乱码久久久久久| 成人app在线观看| 久久这里只有精品6| 成人综合婷婷国产精品久久 | 99热在这里有精品免费| 亚洲男人天堂av网| 欧美日韩成人激情| 精品一区二区影视| 伊人婷婷欧美激情| 日韩视频国产视频| 国产91丝袜在线18| 国产精品欧美一级免费| 欧美精品久久一区二区三区| 韩国一区二区三区| 中文字幕综合网| 2023国产精品视频| 色综合天天综合色综合av| 日韩精品一级二级| 久久精品日产第一区二区三区高清版|