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 : :020000020000FC Which means that the address will not be on 16 bits but on 20 bits (four 0 are added at the end) (cf http://en.wikipedia.org/wiki/intel_hex) (http://en.wikipedia.org/wiki/intel_hex%29). --- Quote Start --- 02, extended segment address record, segment-base address. Used when 16 bits are not enough, identical to 80x86 real mode addressing. The address specified by the 02 record is multiplied by 16 (shifted 4 bits left) and added to the subsequent 00 record addresses. This allows addressing of up to a megabyte of address space. The address field of this record has to be 0000, the byte count is 02 (the segment is 16-bit). The least significant hex digit of the segment address is always 0. --- Quote End --- The next lines of the hex file are : :20000000008400141001483A10BFF80400BFFD1600400034087008140800683A0000000066 :20000800008400141000003310BFF80400BFFD1606C00074DEC0001406800074D690B1144F :200010000080003410B0B41400C0003418F0B41410C00326100000151080010410FFFD36DB :20001800000C0880000C16C0003FFF06DEFFFF04DF000015D839883A0005883ADF000017AA ... The first address is 0x00000, the second is 0x00080, the third 0x00100, ..., so there are 128 addresses between each address . However, there are only 32 bytes of data on each line. So I don't understand very well the organisation, and what are the data between addresses 0x00020 and 0x00080 for example. Does someone have a explanation for that ? Thanks in advance. Jérôme