Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
945 Views

Nios talking with a my VHDL peripheral

I am trying to develop a system with my development kit which basically consists of: 

  • I provide my input data through the four pushbuttons to Nios 

  • Nios, with this information, accesses - through simple parallel accessement on, let´s say, addr# 1 - my peripheral 

  • My peripheral instantly (combinational circuit) provides a response through an addr# 2 

  • Nios gets such response and shows it through the eight leds 

 

 

My problem is that I am facing some dificulty to find on the documentation how an unknown device, written externally to Nios II (Nios system instantiated + simple VHDL circuit also instantiated, both at top level entity), can establish a communication with it.  

 

For instance, leds and the pushbuttons are available directly through HAL. 

 

Figure 1-1 of "Nios Hardware Development Tutorial" even shows this. My circuit is called "other logic" but, for simplification purpouses, the tutorial does not develop this other logic. 

 

Any tip woud be appreciated! Please, also indicate where can I find this case in the documentation
0 Kudos
4 Replies
Highlighted
Valued Contributor III
4 Views

Following Figure 1-1, the easiest and simplest way is to simply add (2) more PIO instances just like how the LED was handled. (one for your addr# 1 NIOS->peripheral, one for addr# 2 peripheral->NIOS). 

 

Then connect the PIO top level "conduit" wires to your VHDL peripheral. 

 

Getting beyond a trivial example, you would want to google for the topic of creating Qsys "components". 

e.g. 

https://www.youtube.com/watch?v=v6rhbvablo8 

https://www.altera.com/support/support-resources/design-examples/intellectual-property/embedded/nios... 

ftp://ftp.altera.com/up/pub/altera_material/13.0/tutorials/making_qsys_components.pdf
0 Kudos
Highlighted
Valued Contributor III
4 Views

 

--- Quote Start ---  

Following Figure 1-1, the easiest and simplest way is to simply add (2) more PIO instances just like how the LED was handled. (one for your addr# 1 NIOS->peripheral, one for addr# 2 peripheral->NIOS). 

 

Then connect the PIO top level "conduit" wires to your VHDL peripheral. 

 

Getting beyond a trivial example, you would want to google for the topic of creating Qsys "components". 

e.g. 

https://www.youtube.com/watch?v=v6rhbvablo8 

https://www.altera.com/support/support-resources/design-examples/intellectual-property/embedded/nios... 

ftp://ftp.altera.com/up/pub/altera_material/13.0/tutorials/making_qsys_components.pdf 

--- Quote End ---  

 

 

Thank you very much, ted!
0 Kudos
Highlighted
Valued Contributor III
4 Views

0 Kudos
Highlighted
Valued Contributor III
4 Views

 

--- Quote Start ---  

If you prefer a full Avalon peripheral: https://www.altera.com/support/support-resources/design-examples/intellectual-property/embedded/nios... 

--- Quote End ---  

 

 

Thank you derim
0 Kudos