I have a question. Can anyone here answer this question for me? I have a flash part with only byte wide (8-bit) data lines connected to the spartan part. Address location starts from 0xF1000000 to 0xF13FFFFF. No data-width matching is set, and there is no other device on the same address/data bus. Something curious happens when I try to access within the flash locations it as a UNSIGNED CHAR. I wrote a routine to print out the the char to the serial port console when I query a location such as fr81000000 0x81000000 - 0xFF Okay so that's no problem, but when i query the following locations, I get these odd readings 0x80FFFFFC - 0x00 0x80FFFFFD - 0xFF 0x80FFFFFE - 0xFF 0x80FFFFFF - 0xFF 0x80FFFFFF - 0xFF . [I tried a few locations within the flash mapped area and they all returned 0xFF, so I'm assuming it's good] . 0x813FFFFA - 0xFF 0x813FFFFB - 0xFF 0x813FFFFC - 0xFF 0x803FFFFD - 0x00 0x803FFFFE - 0x00 0x803FFFFF - 0x00 Note the reason I read in 0xFF is due to the fact that I haven't written anything to it. I'm just reading from it. Besides, I can't write to it properly anyway, until I get this sorted out. Now when I read from the flash memory locations as UNSIGNED INT, it's acts differently. 0x80FFFFFE - 0x00000000 0x80FFFFFF - 0x00000000 0x81000000 - 0xFF000000 0x81000001 - 0xFFFF0000 0x81000002 - 0xFF00FF00 0x81000003 - 0xFF0000FF 0x81000004 - 0xFF000000 0x81000005 - 0xFFFF0000 0x81000006 - 0xFF00FF00 0x81000007 - 0xFF0000FF . . . 0x813FFFFC- 0xFF000000 0x813FFFFD- 0xFFFF0000 0x813FFFFE- 0xFF00FF00 0x813FFFFF- 0xFF0000FF 0x81400000 - 0x00000000 0x81400001 - 0x00000000 0x81400002 - 0x00000000 I assume this has something to do with the fact that it mirrors the locations in the byte lanes. My question is what do I have to do to get the data read back to show in the MSB? Why does it show the data properly when I'm reading it in as UNSIGNED INT? Any suggestions? I've attached the MHS, UCF file. Thanks (See attached file: system.mhs)(See attached file: system.ucf) ***CONFIDENTIALITY NOTICE*** This communication (and any attachment) is confidential. It should only be read by the person(s) to whom it is addressed. If you have received this communication in error, please notify the sender by reply and delete this communication. *****************************************
Attachment:
system.mhs
Description: Binary data
Attachment:
system.ucf
Description: Binary data