Author Topic: How to couple a FPGA and a MPU?  (Read 8849 times)

0 Members and 1 Guest are viewing this topic.

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: How to couple a FPGA and a MPU?
« Reply #25 on: July 25, 2017, 04:11:41 pm »
PCIe is a (standard) free core for Xilinx devices. But again: it all depends on engineering costs. Sure you can make cheap parts do what you want as well but is it (financially) worth the extra effort? The Zync solution may not be a bad one either.
Both chips I mentioned above are not BGA.

If I want to use PCIe I would go straight for iMX6Q + Cyclone V, or go with straight AXI with Cyclone V SoC, all in BGA packages. Here I am restricting myself to QFP only, hence the older ARM9 and Cyclone IV, as well as no PCIe.
Aha, you didn't mention that before. Does the MPU you have selected a synchronous parallel memory bus? That would be an easy way to connect it to the FPGA. The biggest problem with connecting parallel memory busses to an FPGA is that you have no real clock available for the memory I/O and you need to re-sample the signals into the FPGA's clock domain. I'm not saying it can't done but it is a nuisance to get right.
There is a parallel memory bus but I don't think it is synchronous. However the FPGA can request wait states so I can insert an asynchronous buffer in the bus interface (holding the processor in wait until the main logic can respond.)
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: How to couple a FPGA and a MPU?
« Reply #26 on: July 25, 2017, 04:22:41 pm »
Beware of the issues in the older SAM9 parts. The DMA for SDIO and SPI can underrun and the software can't do anything about it. Starting from 9263, the SDIO implemented a configuration bit, that stalls the SDIO clock when no data is available. I've had too many headaches with SAM9261.
I wonder if the problem is fixed in recent QFP SAM9260, and whether the Linux kernel contained a workaround or not.

Afaik, not. Atmel seemed to fix things in newer chips and not re-spin old stuff. They did not do any workarounds in kernel drivers either (last checked ~5 years ago). Once I asked them at Embedded World, they said that 926x is too old and they focus their developments on supporting new stuff and not working around old hw bugs and too bad that I had things that did not work, I should respin the boards with newer ICs. As I had to get the problems patched with a lot of devices already sold, I had to do some crazy workarounds. The SDIO controller had some other issues as well, sometimes it got stuck and sometimes it did not handle the busy signal from SD card properly. I had to mux the SDIO pins to SPI and do all the SD card communication over SPI to finally get it stable enough to avoid data corruptions on SD cards. Then I did DMA SPI through SRAM to avoid underruns due to high SDRAM usage.
For the SPI, the linux driver used any gpio as cs via gpio framework (not the controllers cs output).
As the SPI driver in linux is already DMA-accelerated, it is much simpler to write peripheral driver that uses SPI. Otherwise, you would have to mess with memory-to-memory dma yourself. If the bandwidth is sufficient, start with SPI. In future projects you can move on to either parallel bus or PCIe or whatever is faster.
Trying things out with eval kits and jumper wires is a good advice. Later as everything is worked out, you can spin your own board. There are plenty of FPGA boards, find one with similar FPGA (it may be larger, you can downscale to smaller FPGA quite easily). Then get yourself a SAM9260 EVK and wire up the two.
So how useable is the SDIO controller? Can I run Wi-Fi off it?

As of the SDRAM, I wonder if additional memory bandwidth can help, since I have 32-bit memory bus it should be able to move data across faster. Also since I don't have any AT91SAM9260 eval kit (the existing ones won't really help either, with either no EBI access, 16-bit memory, or too high a price tag) so I have to cook it up with my own board anyway.
« Last Edit: July 25, 2017, 04:25:23 pm by technix »
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: How to couple a FPGA and a MPU?
« Reply #27 on: July 25, 2017, 04:59:44 pm »
There is no final application other than playing with things.

I think what your opponent is trying to say is that it is impossible to design without goals. Engineering is about creating things. If you don't know what you want to create, how can you create it? And if you don't create anything, how can you possibly learn something? Engineering without a goal is about as stupid as shooting without a target.

There are lots of people who buy Arduinos (or whatever), daughter boards, put them all together, observe motors runnings, LEDs blinking (or whatever). They may have fun doing this, but they don't really learn anything. There's no goal in what they're doing and everything is good with their designs as soon as they have fun. You're trying to assume the same attitude at the higher level. But the level doesn't matter much. If having fun is your goal then anything goes, and anything is reasonable. How can anyone possibly tell you if your design is reasonable (or not reasonable) for having fun with?

If you really want to learn something, first learn how to set goals. This is where engineering starts.

 
The following users thanked this post: Someone


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf