Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Help creating a USB Device

Hello all, I have another beginner question. I've recently designed a Nios II system on the DE2 board with a custom cryptographic hashing function for use in a research application, and now I need to connect it to a PC via USB. I see that in SOPC builder, under USB, I have an evaluation licensed IP from SLS called the USB2.0HR. I added it to my system, and connected the avalon slave port to the Nios as the master. However I have several questions (probably with more to come later).

1) In the picture in the USB2.0HR documentation, I see that the avalon slave port is also connected to a DMA. I have never used a DMA, do I need one? I don't intend to do huge mass transfers on a streaming basis. I take 300 or so bytes in, process it, and send 200 or so bytes back out, and only when instructed to do so by the host PC.

2) After I generate the system in SOPC builder, I looked at the VHDL file for the system and saw these ports:

             
                 -- the_sls_avalon_usb20hr_0
                 signal Data_to_and_from_the_sls_avalon_usb20hr_0 : INOUT STD_LOGIC_VECTOR (7 DOWNTO 0);
                 signal LineState_to_the_sls_avalon_usb20hr_0 : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
                 signal OpMode_from_the_sls_avalon_usb20hr_0 : OUT STD_LOGIC_VECTOR (1 DOWNTO 0);
                 signal RxActive_to_the_sls_avalon_usb20hr_0 : IN STD_LOGIC;
                 signal RxError_to_the_sls_avalon_usb20hr_0 : IN STD_LOGIC;
                 signal RxValid_to_the_sls_avalon_usb20hr_0 : IN STD_LOGIC;
                 signal SuspendM_from_the_sls_avalon_usb20hr_0 : OUT STD_LOGIC;
                 signal TermSel_from_the_sls_avalon_usb20hr_0 : OUT STD_LOGIC;
                 signal TxReady_to_the_sls_avalon_usb20hr_0 : IN STD_LOGIC;
                 signal TxValid_from_the_sls_avalon_usb20hr_0 : OUT STD_LOGIC;
                 signal XcvSelect_from_the_sls_avalon_usb20hr_0 : OUT STD_LOGIC;
                 signal usb_vbus_to_the_sls_avalon_usb20hr_0 : IN STD_LOGIC

However, when I look at the pin table for the DE2 board, I don't see matching ports for almost any of these. I know that the DE2 uses the ISP1362 OTG controller, but I'm not sure if that's compatible with this IP. The ISP1362 has a 16-bit data bus instead of the 8-bit one shown above, and a number of other signals not related to these.

Anyone have any ideas on the next step?

Max

No RepliesBe the first to reply