Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

SOPC Component Editor

Altera_Forum
Honored Contributor II
983 Views

In a Nios processor system, in order to create a custom component to read a 16 bit word from a peripheral, I have used an 'Avalon-MM Tristate Slave' template from the SOPC builder (Ver 8.0) component editor.  

 

As I only require a single address (the base address) for the read, I removed the address signals from the template - this resulted in a Warning: 's0: Slave has data signal but no address signal'. Does this matter?  

 

Also, in address map, I note that 1K of address space has been allocated to this component (0x00000000 to 0x000003FF). Why is this?
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
257 Views

Even though you don't need it, you should add a single address bit to your interface. Also, I don't know how wide you made your data bus but you probably ought to make it 32-bits even though you are only using 16. Otherwise, the Avalon bus will execute two reads to your module every time the NIOS does a read. 

 

Try adding the address and see what that does. 

 

Now on top of this, the rules change a little bit when you are doing a tristate slave. 

Also, from the Avalon Interface Specifications document: 

 

 

--- Quote Start ---  

5.1.1. address Behavior 

For Avalon-MM tristate slaves, the address signal represents a byte  

address. The address signal can be shared among multiple off-chip  

devices which have differing data widths. If the Avalon-MM tristate slave  

port data width is greater than one byte, it is necessary to correctly map  

the address signals from the system interconnect fabric to the address  

lines on the slave peripheral.  

 

--- Quote End ---  

 

 

You should read the document if you haven't already: 

http://www.altera.com/literature/manual/mnl_avalon_spec.pdf 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
257 Views

 

--- Quote Start ---  

 

As I only require a single address (the base address) for the read, I removed the address signals from the template - this resulted in a Warning: 's0: Slave has data signal but no address signal'. Does this matter?  

--- Quote End ---  

 

 

Yes it does matter. The processor identifies the peripherals by address mapping so you need to specify an address line.  

 

 

--- Quote Start ---  

 

Also, in address map, I note that 1K of address space has been allocated to this component (0x00000000 to 0x000003FF). Why is this? 

--- Quote End ---  

 

 

Even if there is a single address that you want for your peripheral, there would always be atleast two addresses possible for the peripheral. This is because if you have only one address line, it will always result in two different addresses ('0' and '1' with appropriate prefixes; an enlargement of this space depends on specific processor bus arbitration rules). Since Nios has dedicated component signals, you need to bear with this ambiguity though it really doesn't affect the operation of either Nios or the peripheral.
0 Kudos
Altera_Forum
Honored Contributor II
257 Views

I tried specifying a single address line (even though section 5.1 (Table 5.1) of the Avalon Spec suggests that it isn't required). The allocated address space is still 1K - is this possibly just a feature of the Avalon bus as Vizziee suggests in his reply? 

A standard PIO port seems to allocated 16 address locations regardless of the width specified. 

 

Thanks for the reminder about the address mapping to the peripheral address lines. 

 

Tim
0 Kudos
Altera_Forum
Honored Contributor II
257 Views

 

--- Quote Start ---  

I tried specifying a single address line (even though section 5.1 (Table 5.1) of the Avalon Spec suggests that it isn't required). The allocated address space is still 1K - is this possibly just a feature of the Avalon bus as Vizziee suggests in his reply? 

A standard PIO port seems to allocated 16 address locations regardless of the width specified. 

 

Thanks for the reminder about the address mapping to the peripheral address lines. 

 

Tim 

--- Quote End ---  

 

 

Yes it is a feature of the Avalon bus. Unlike standard textbook address buses, it doesn't allocate space only by the number of bits allocated. It follows bus arbitration which would give more space to the peripheral.
0 Kudos
Reply