FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6566 Discussions

SOPC Builder, VIP control, SPI

Altera_Forum
Honored Contributor II
1,351 Views

I have a VIP chain pieced together in SOPC Builder. We'd like to change the settings for the VIP blocks via an external (to the FPGA) SPI master. I am confused on how to do this. Can I do this directly from SPI bus to the VIP? Or do I need to instantiate a Nios? There are two different "SPI" devices in SOPC: An Avalon-ST SPI and a SPI (3 Wire Serial). I'm not sure which one to use or do I need both? 

 

Ideally I'd like to just install a SPI block between the outside world and the VIP blocks and hopefully these get memory mapped somehow - is this doable? 

 

I'd rather not add a Nios because of the learning curve/time. But if this is how it has to be done then so be it. Any help would be appreciated. Thanks.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
477 Views

You have a few options: 

1 - Use SoPC Builder. Create an Avalon MM Master component that will take in your SPI commands and convert them to avalon reads and writes to write to your components. You could also do the SPI decoding outside SoPC builder and just export an Avalon MM Master port outside SoPC builder that you can read/write. 

2 - Don't use SoPC builder. If you're not using a NIOS, you can certainly use the VIP without SoPC builder. Then you just come up with your own scheme for reading/writing the avalon slave ports on the various components. This would be my first choice in your case. 

3 - Use a NIOS. In your case, this would be my last choice. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
477 Views

There a SPI to Avalon-MM component (http://www.altera.com/literature/hb/nios2/qts_qii55011.pdf). It sounds like this would work perfectly...no?

0 Kudos
Altera_Forum
Honored Contributor II
477 Views

Yeah it looks like it'll work. I didn't even know that one existed. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
477 Views

Thanks for the advice guys. I'm piecing it together outside of SOPC Builder now. I'll see how that goes.

0 Kudos
Reply