EmbDev.net

Forum: FPGA, VHDL & Verilog USB interface


Author: Lukas 1e+007 (Company: Soundsystem Brabant) (forester)
Posted on:

Rate this post
0 useful
not useful
Hello,

I just got a SoC board, and I want to make some music with it.
The music making part I know very well from doing SIMD, and im confident 
this will work out for me using VHDL.

But.. to get started I'm really having a hard time getting to 
implementing a usb port. Also with the design aspect. This being around 
the first thing intended to do on it, and it has a lot of odds and ends 
that I was actually hoping would be sort of standard implement and go 
type stuff.

So i have a couple of questions, I have like the USB251xb and 
USB3300-EZK controllers. But it may be more valuable in the end to do 
the bare wire aproach..Right?

Also I read that the power demand of devices is sent as a command at the 
presence of a connected usb device. So is this doable via a live pin on 
the FPGA, or as a space saver ultimately always better handled by the 
controller?

Or is there a good piece of code to fit the controllers in place, that I 
can make in a quartus module?

: Edited by User
Author: Lattice User (Guest)
Posted on:

Rate this post
0 useful
not useful
Lukas Blersch wrote:
>
> So i have a couple of questions, I have like the USB251xb and
> USB3300-EZK controllers. But it may be more valuable in the end to do
> the bare wire aproach..Right?
>
Wrong.

Since you asked here, i am assumimng you are looking for a FPGA based 
implementation.
Bare wire is possible for low speed, but at full speed you will already 
have trouble to recover the clock, not even speaking of high speed.


USB251xb is an USB hub. This doesn't isolate you from the bare wire.

USB3300 is an USB transceiver with ULPI interface, and can be easily 
interfaced to a FPGA. But be aware that the USB3300 only implements the 
lower physical layer. Higher parts like framing, is still needed to be 
done in the FPGA.

You can buy IP Cores for that, or try to implement it your self, a huge 
task even for someone with a lot of knowldege in FPGA design and USB 
details.

Author: Lukas 1e+007 (Company: Soundsystem Brabant) (forester)
Posted on:
Attached files:

Rate this post
0 useful
not useful
So, framing implies that the 10 bit signal gets passed but a lot of the 
maintenance gets done by the controller itself?

I see now why this is left out..

Also I found this http://jorisvr.nl/usb/
It covers all layers right, "Only a bit to much foreign pins to find for 
my experience level"..


Also I typed along with a tutorial, (I guess better suited to work with 
a board) but I get a compiler error at page UART3 line 23.. Saying ""="" 
Operator has no synthesizable outcome.

Author: Lattice User (Guest)
Posted on:

Rate this post
0 useful
not useful
Lukas Blersch wrote:
>
> Also I found this http://jorisvr.nl/usb/
> It covers all layers right, "Only a bit to much foreign pins to find for
> my experience level"..

Very nice :-)

But it only covers an UART implementation, USB Audio is a much tougher 
beast.

Also it requires an UTMI Interface, the USB3300 tranceiver implements an 
ULPI interface (ULPI stands for UTMI+ Low Pin Interface).

Main differenz boils down to UTMI using signals to control the 
transceiver and ULPI using commands.

Author: Lukas 1e+007 (Company: Soundsystem Brabant) (forester)
Posted on:

Rate this post
0 useful
not useful
It's MIDI mainly, and maybe some configuration via a dedicated ui.
Tho its cool to keep in mind, Roland Aria has got that bounce to disk 
feature.

But how to get a basic implementation going, lets say an input? How to 
make sense of it all? :|

: Edited by User
Author: Lattice User (Guest)
Posted on:

Rate this post
0 useful
not useful
Lukas Lukas wrote:
> It's MIDI mainly, and maybe some configuration via a dedicated ui.
> Tho its cool to keep in mind, Roland Aria has got that bounce to disk
> feature.
>
> But how to get a basic implementation going, lets say an input? How to
> make sense of it all? :|

Start with reading
http://www.usb.org/developers/docs/devclass_docs/midi10.pdf

Next try to implment it on an µC with an USB interfaces, (i.e. AVR, PIC 
....)

If that is working you may think of redoing it on the FPGA.

Author: Lukas 1e+007 (Company: Soundsystem Brabant) (forester)
Posted on:

Rate this post
0 useful
not useful
I actually know the MIDI protocol enough to map it out once I can get 
the numbers in, and want to do it on the FPGA because that is my 
objective..

The thing is USB.. From the attachment posted (not the link) I should be 
able to get two or three quartus modules once I figure out the compiler 
error. (10327 VHDL error at UART03.vhd(23): can't determine definition 
of operator ""="" -- found 0 possible definitions) So it's yust to get 
values in to a logic analizer.

Author: Lattice User (Guest)
Posted on:

Rate this post
0 useful
not useful
Lukas Lukas wrote:
> I actually know the MIDI protocol enough to map it out once I can get
> the numbers in, and want to do it on the FPGA because that is my
> objective..
>
The link i have provided, is not about the MIDI protocol, but about the 
USB descriptors a MIDI device has to present to be recognised as such.
The USB Part from Joris implements a USB serial adapter using the CDC 
device class.

> The thing is USB.. From the attachment posted (not the link) I should be
> able to get two or three quartus modules once I figure out the compiler
> error. (10327 VHDL error at UART03.vhd(23): can't determine definition
> of operator ""="" -- found 0 possible definitions) So it's yust to get
> values in to a logic analizer.

RX_LINE is a vector, but you are comparing it to a single value.

Attach your code directly as .vhdl, or even when it is small place it 
between
[vhdl] ... [/vhdl]
in the posting.
This way you get a faster response from the real VHDL experts here.

Author: Lukas 1e+007 (Company: Soundsystem Brabant) (forester)
Posted on:

Rate this post
0 useful
not useful
Thanks for taking the time!
I see now it's comparing the vector to the symbol..Ill go and have a 
read "probably the last thing ill get done today is to read the pdf"

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.