01-08-2011 06:58 AM
I am using a custom board which contains a spartan 3an fpga. I would like to have a tutorial that contains how to configure xps_mch_emc version 3.01.a for working with an external SRAM module, knowing that I am using Microblaze 7.30.a and that I am using ISE12.1. If possible, this tutorial shall tell how to appropriately enable/disable the cache memory.
01-08-2011 10:09 PM
You can build a BSB design on a development board with Cache being enabled.
This would give an MCH_EMC instance with corresponding parameters.
Check the Example provided in the Datasheet to understand how to integrate the core with a SRAM.
01-10-2011 12:50 AM
Thanks for your response.
1-Unforunately, I can not find a Xilinx board with the same type of SRAM fitted on it.
2- I have initially checked the example in the datasheet and applied all what it says, but I am having a problem with running the code from SRAM. The problem is as follows:
-For the same project that runs on the internal BRAM with a stack of size 1KB, it doesn't run on the fitted SRAM except with a stack of minimum size 100KB
-When I try to debug the project, the program counter does not point at the main() function address, it contains a random address. I don't know whether it starts from the _start label an then gets lost, or if it is lost from the beginning.
(N.B. this only works when the PLB interface is disabled and the cache memory is also disabled. When any of them is enabled, the project does't run)
01-12-2011 04:19 AM
In the EMC datasheet, there is a section talks about how to connect a SRAM to EMC. Check that out and make sure you have made the right connections. Especially pay attention to the address lines.
The EMC core itself is simple enough to use, as long as you have the right connections, it should work. if it's asynchronous SRAM, you need set the timing parameters too.
01-15-2011 11:53 AM
When I debug my project on hardware, and looked at the memory contents, I discovered that the branch instructions at the reset vector, interrupt vector are not the same as the ones written in the .elf file. This only happens when I download the code to run on the SRAM. In contrast when I run it on the BRAm, everything goes fine. Please if anyone has experiened this problem post a reply.
01-17-2011 02:22 PM
Since your application runs fine out of BRAM, have you written a test application that will run out of the BRAM memory to do a full memory test of the SRAM? It sounds like the data is not reading/writing into the external memory correctly, and you should ideally verify that you can read/write to all regions of the external memory from your microblaze processor.
If you have already done this type of test and can verify that the sw application reads/writes to all locations correctly, then you could next try XMD. You can use the mwr and mrd commands to check that you can successfully read/write to the external memory offset correctly.
Lastly, you can do an objdump of the contents of your elf and compare this to a readback from the external memory to see if you can spot the exact locations of memory that are corrupted. This will help to verify if it is the entire application that is incorrect, or just a few regions of the memory that are wrong.
01-21-2011 01:31 PM
I looked at the memory contents using the GUI of the SDK Debug view. I found that the branch instruction at the reset vector, which is in the BRAM(in my priject it is the boot memory), to be corrupted. That also applies to the branch instruction at the interrupt vector, which is also at the BRAM. When I copy their correct values from the .elf dump, everything goes fine (The copying is done also using the GUI of the SDK Debug view). Please if anyone has had such a problem, reply.
07-06-2011 03:38 AM
I m new to EDK. I hv 2 program SRAM i.e. write n read to it. I dnt knw hw to do d same. which API's and functions 2 use. hw to set the clk. n othergnals or variables lyk OEN, CEN, WEN.