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 agothats what i tries to explain.
the adr field is always only 16bit so you must take these 16 bit and shift them to get the correct address. 32bit data means you have to shift twice. the adr is a 32bit asdr and not a 8 bit adr. 0008 will be 0x00020 in 8 bit adr mode. i guess your mistake is that you shift the complete information and not only the 16 bit adr field. lets have a look at your line (:020000020000FC). :02 Extended Segment Address Record 0000 adr 02 type 0000 segment FC checksum this means take the adr 0000 multiply by 16 and add that result to all adr. you get from the data records to calculate the target adr.