Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
876 Views

Interfacing a MCU to a FPGA (Serial or Parallel)

Hello 

 

Has anyone any experience of interfacing a MCU to a Cyclone IV or V? 

 

I don't want to build a SoC or anything that complex, just some simple lab exercises that "robustly" interface a MCU to an FPGA.  

 

the focus will be interfacing. SPI / I2C are two options (although there is no off-the-shelf component I can find). Our ARM MCU also has a "flexible memory controller" (FMC) which can interface to SRAM etc. The asynchronous modes are interesting as it would force students to address metastability issues. 

 

I've found some VHDL examples online, but I cannot easily validate their reliability (unless someone else has). Are there any SPI or I2C library components available via Altera? (I looked but could not see anything obvious). 

 

Regards
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
24 Views

It would be a good exercise for your students to design a SPI slave from scratch that can be used to communicate with the MCU (instead of using IP). I2C would work as well, but it would not be my first choice for a MCU/FPGA interface (too slow vs. SPI, and the protocol is a little trickier).

Altera_Forum
Honored Contributor I
24 Views

In an ideal world, I would agree, but they have a lot to do already (in other words I need to think about this idea carefully). For sure it would mean they would understand the basics of SPI by the end of it. There is something to be said for using validated and tested IP however.  

 

Agreed about I2C.
Reply