Forum Discussion
Altera_Forum
Honored Contributor
16 years agoAddressing in hex file
Hello, I currently design a system with SOPC based on the Nios II processor. I checked the hex file generated by the Nios II IDE after compilation. At the beginning I have the following : ...
Altera_Forum
Honored Contributor
16 years agoif you talk about bytes and byteadr. you still think of an 8 bit cpu
nios is a 32bit cpu, so when accessing 32bit = 4bytes then the lowest 2 adr bit are 00 nios has an adr alignment of 4 means in bytes it uses byte adr 0 4 8 c 10 14 18 1c 20 ... to store 32bit so your 16kByte memory from 0xc000 up to 0xFFFF hast 16384 byte what is 4096 memory locations of 32bit you can't store 4 byte in 1 byte adr, but you can in 1 32bit wide memory about your first question, if you have FFFF in the adr field of the 02 record, then multiplyed by 16 you get 0xFFFF0 but you can't add 0xFFFF from the data record to it as this adr. mode will be maximum um 0xFFFFF what gives 20 Bit adr space. resp. 1MByte maximum So have a look at Type 05 Start Linear Address Record (used by epcs controler) that enables you to gain access to the full 32bit memory in linear mode Here again it starts with :020000020000fc and is followed by :040000000001703a51 :0400010004c00074c3 again :04 means 4 data bytes 0000 adr 00 type 0001703a data 51 checksum next line :04000100:04 means 4 data bytes 0001 adr (pay attention we are in 32 bit mode !) 00 type 04c00074 data c3 checksum