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

How to pass generic to NIOS II

Hi Everyone 

 

I have a FPGA design with a NIOS II softcore in it which mainly handles peripheral devices but also does some security tasks like authentication of peripheral devices. Now for this authentication I need to know a key within the design with which I can authenticate the peripheral devices. The key is of 128 bits length and can be different for different peripheral devices. This depends on what device is attached to the FPGA. Since I don't want to change the code of the NIOS every time I recompile the design it would be nice if there is a possibility where I can pass the NIOS a generic with the key. Like this I could avoid to hardcode the key into the software of the NIOS. My general question is: Is it possible to pass a generic to the NIOS? And if not, is there any other way to pass the NIOS this kind of data for processing within the NIOS code? Or do I have to implement some kind of serial connection to my NIOS II core where I could pass the data?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
14 Views

Hi Camillo, 

 

you could store the key in an external ROM connected to Nios. 

Before starting Quartus Compile you can change the initialization file (.hex) matching the design. 

 

Jens
Altera_Forum
Honored Contributor I
14 Views

ok, I will try this one. This should be a good way how to solve this. Thanks for the suggestion!

Reply