usbpkg.vhd
来自「USBHostSlave is a USB 1.1 host and Devic」· VHDL 代码 · 共 50 行
VHD
50 行
LIBRARY std;USE std.textio.ALL;LIBRARY utilities; USE utilities.standard_utils.ALL;PACKAGE usbpkg IS constant PTIME: time := 1 us; -- packet time constant RTIME: time := 70 ns; -- turn around time constant MAXENDPT: natural := 32; -- maximum # of endpoints type ptype is (NONE, POUT, PIN, PACK,ERR); type upkt is RECORD id: ptype; dest : integer ; data: string(1 to 80); END RECORD; type upkt_vector is array (natural range <>) of upkt; function resolve_upkt (s : upkt_vector) return upkt; subtype pkt is resolve_upkt upkt; END usbpkg;PACKAGE BODY usbpkg IS -- dummy function, you need to fix this function resolve_upkt (s : upkt_vector) return upkt is begin return(s(0)); end resolve_upkt;end usbpkg;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?