Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12590 Discussions

Acess data wordwise from Nios II

Altera_Forum
Honored Contributor II
972 Views

Hello, 

 

I have a 16 bit wide Flash memory and a 32 bit wide RAM attached to the Nios II. In the evaluation kit (Altera Embedded Systems Development Kit, Cyclone III Edition) address bit 0 is omitted for the Flash memory and address bits 0 and 1 are omitted for the RAM. 

 

How can I make sure the data is only addressed wordwise? Or will the Nios II by default address the memory wordwise? 

 

 

Regards 

Martin
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
278 Views

If anybody has the same question here is the response I got from the Altera support: 

 

For masters, the address signal represents a byte address. The value of the address must be aligned to the data width. To write to specific bytes within a data word, the master must use the byteenable signal. For slaves, the inter-connect translates the byte address into a word address in the slave’s address space so that each slave access is for a word of data from the perspective of the slave. For example, address= 0 selects the first word of the slave and address 1 selects the second word of the slave. 

 

Please refer to the following user guide page 30 "Avalon MM salve addressing". 

http://www.altera.com/literature/manual/mnl_avalon_spec.pdf
0 Kudos
Reply