Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1196 Discussions

Interfacing a MCU to a FPGA (Serial or Parallel)

Altera_Forum
Honored Contributor II
1,351 Views

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 II
499 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).

0 Kudos
Altera_Forum
Honored Contributor II
499 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.
0 Kudos
Reply