Author Topic: Advice for fpga programming  (Read 3213 times)

0 Members and 1 Guest are viewing this topic.

Offline adige777Topic starter

  • Newbie
  • Posts: 1
  • Country: tr
Advice for fpga programming
« on: April 04, 2018, 08:37:26 am »
Hello everybody
I am newbee for fpga programming ,trying to make a project and I would like to use Artix-7 cmod 35T kit, vhdl  and vivado.
My goal is getting all required data from PC side over uart rx  save datas bram or any other memory unit. After that I have to convert that received data as parallel format and send it via gpio pins. But this process must be very quick .

To achieve this my plan is:

1- Add a microblaze processor
2- Uart lite module
3- Add a bram module
4- Add a axi gpio module

Getting requied data from pc via  uartlite module,write that received data to bram via microblaze. But after this stage I don't need to microblaze anymore. And I want to write received datas to gpio pins
as soon as possible. Is there a way to send datas in bram to axi gpio sequentially without using microblaze? Or can you advice me any other quick way to achive this purpose?

Best regards 


 
 

Online asmi

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: ca
Re: Advice for fpga programming
« Reply #1 on: April 04, 2018, 02:15:03 pm »
I'm not exactly sure what are you trying to achieve. "UART" and "very quick" doesn't live well in a single sentence as UART is incredibly slow by FPGA standards.
If it's some sort of bridge, I would implement it straight in the code without using any softcores or pre-made components, as it's very simple. Using softcore sounds like a total overkill in this case - unless I'm missing something. Not sure what would you need BRAM for though :-//
Give us some more details on what exactly you're trying to implement, and how quick is "very quick".

Offline jamiechi

  • Contributor
  • Posts: 16
  • Country: us
Re: Advice for fpga programming
« Reply #2 on: April 04, 2018, 05:12:49 pm »
Sounds like you are using an Arty board from Digilent. If I wanted to download serial data at high speed to my FPGA project, then I might use the EZ-USB FX3 devboard from Cypress. It has io pins that you could connect directly to your FPGA dev board and transfer the data at high speed. The board is currently available at Cypress and other distributers for around 50$ US.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3583
  • Country: ca
Re: Advice for fpga programming
« Reply #3 on: April 04, 2018, 05:26:43 pm »
When people who are somehow familiar with CPU/MCU are getting into FPGA, they tend to hold to want they know, so they build MicroBlaze, use the FPGA as MCU and feel good about it. However, FPGA is not MCU and to figure out what it is, the best way is to get rid of MicroBlaze or anything which remotely reminds you of MCUs, and start working with FPGA as with FPGA (as opposed to FPGA as MCU). Start from writing VHDL or Verilog code to blink a LED. UART to parallel is just few steps from LED blinking, however the link between PC and FPGA through FTDI chip is very slow, so leave all hope of making it quick.
 

Online asmi

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: ca
Re: Advice for fpga programming
« Reply #4 on: April 04, 2018, 05:28:58 pm »
Sounds like you are using an Arty board from Digilent.
He said he's using cmod 35T
If I wanted to download serial data at high speed to my FPGA project, then I might use the EZ-USB FX3 devboard from Cypress. It has io pins that you could connect directly to your FPGA dev board and transfer the data at high speed. The board is currently available at Cypress and other distributers for around 50$ US.
That is extremely wasteful way of doing this. FT601 is only about $10 and requires no programming of the chip. But that is if you need USB 3 speed. If USB 2 FS is good enough (and it certainly is for UART speeds), there is enough very cheap USB->UART ICs. My personal favourite is FT234XD because it's quite cheap (about $2 for single quantity) and is specialized to this specific function, meaning there is nothing to set up, pre-program, etc., and it's in tiny 3x3 mm 0.45 mm pitch DFN package. Or, if it's too small for you, FT230X is essentially same thing (and the price is the same too) with some more GPIOs exposed, and it's available in more "conventional" SSOP-16 and QFN-16 packages.

Online asmi

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: ca
Re: Advice for fpga programming
« Reply #5 on: April 04, 2018, 05:32:53 pm »
however the link between PC and FPGA through FTDI chip is very slow, so leave all hope of making it quick.
It depends on how quick is "very quick" ;) Quite a number of MCU folks I know think that 1Mbps is "very quick" :-DD
FT-X'es I mentioned above support up to 3Mbps which is certainly quick for UART.

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17841
  • Country: fr
Re: Advice for fpga programming
« Reply #6 on: April 04, 2018, 05:41:26 pm »
Yeah define quick.

FTDI's UART connection supports up to 3Mbps without a hitch.
With asynchronous parallel mode, high-speed, you'll get ~8 MBytes/s.
With synchronous parallel mode, high-speed, you'll get ~30 MBytes.s.

I have no experience with USB 3.0, super-speed FTDI chips, but you may be able to get like 10 times this. Isn't that fast enough?
As a note, to get that kind of speed out of a super-speed FTDI chip on an FPGA, it takes a seasoned HDL designer. Certaintly not for the beginner. But asynchronous parallel mode on a FT232H/FT2232H is reasonably easy.

 

Online asmi

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: ca
Re: Advice for fpga programming
« Reply #7 on: April 04, 2018, 06:15:23 pm »
I have no experience with USB 3.0, super-speed FTDI chips, but you may be able to get like 10 times this. Isn't that fast enough?
I have done some tests with FT601 and Artix-7 on my board - in 1 IN/1 OUT configuration I was getting about 330 MBytes/s of real bandwidth - meaning that was a rate I was actually getting the data from FTDI API, with all overheads are already factored in. So your assumption is about right.
« Last Edit: April 04, 2018, 06:19:14 pm by asmi »
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3583
  • Country: ca
Re: Advice for fpga programming
« Reply #8 on: April 04, 2018, 08:20:52 pm »
You can easily do 3Mbaud on PIC16F1454, 6Mbaud is also possible to accomplish. Theoretically you can do 12Mbaud, but practically it is not very easy - I guess you might be able to do it in one direction (TX easier than RX, of course), but it would be a hard work.

A solid MCU with DMA can probably go up to 50Mbaud or so.

I think the FT2232H chip on the OP's board is only wired for UART which is spec'ed at 12Mbaud, so the best speed the UART can accomplish could be characterized as slightly above PIC16 levels.

Of course, it's always possible to use exposed pins for a custom interfaces - then you can go much faster.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->