CTL0_FLAGA : IN STD_LOGIC ;
CTL1_FLAGB : IN STD_LOGIC ;
CTL2_FLAGC : IN STD_LOGIC ;
RDY0_SLRD : OUT STD_LOGIC ;
RDY1_SLWR : OUT STD_LOGIC ;
PA7_FLAGD : IN STD_LOGIC ;
PA6_PKTEND : OUT STD_LOGIC ;
PA5_FIFOADR1 : OUT STD_LOGIC ;
PA4_FIFOADR0 : OUT STD_LOGIC ;
PA2_SLOE : OUT STD_LOGIC ;
PA0_INT0 : IN STD_LOGIC ;
PA1_INT1 : IN STD_LOGIC ;
LED1 : OUT STD_LOGIC
);
END USB_FPGA;
ARCHITECTURE ARC_USB_FPGA OF USB_FPGA IS
--FIFO
TYPE fifo_arry IS ARRAY(0 to (FIFOLENTH-1)) OF bit_vector((FIFOWITH-1) DOWNTO 0);
SIGNAL fifomemory:fifo_arry;
SIGNAL fifowraddr,fifordaddr : NATURAL RANGE 0 TO (FIFOLENTH-1) ;
SIGNAL data2usb,data2fpga : STD_LOGIC_VECTOR((FIFOWITH-1) DOWNTO 0) ;
SIGNAL wrstate : NATURAL RANGE 0 TO PACKAGENUM ;
SIGNAL fifoadrcs : STD_LOGIC_VECTOR(1 DOWNTO 0) ;
SIGNAL slrdbuf,slwrbuf,sloebuf : STD_LOGIC ;