Sign in

username:

password:



Not a member?

Search Comp.Arch.FPGA



Search tips

fpga by Keywords

Altera | ASIC | CPLD | Cyclone | DCM | DDR | DSP | Ethernet | ISE | JTAG | Linux | LVDS | Microblaze | ML310 | Modelsim | NIOS | OPB | PCI | Quartus | RocketIO | SDRAM | Spartan | Spartan3 | SRAM | Stratix | Verilog | VHDL | Virtex | Virtex-4 | Virtex-II | Xilinx | XST

Ads

See Also

DSPEmbedded SystemsElectronics

Comp.Arch.FPGA | ML505 - How to read/write SRAM?

There are 7 messages in this thread.

You are currently looking at messages 0 to 7.

ML505 - How to read/write SRAM? - charlie78 - 2009-01-21 10:53:00

Hi all,
I'm an Italian student, I'm new in fpga and Microblaze implementation.
I saw many starting tutorials about ML505 Xilinx Platform and usa ofXilinx Platform Studio 10.1 and EDK.
In these tutorials I did not found any example of reading and writingoperation of the SRAM.
My code reside in BRAM and I would like to try to store some values inSRAM.
By BSB I implemented SRAM in my system connected to microblaze by SPLB andxps_mch_emc.
Now:
What are the instructions to read and write this memory?
It's a simply question but I can't find any answer... please help me.
Thanks (I apologize for my bad english)

Daniele


______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.



Re: ML505 - How to read/write SRAM? - Matthias Alles - 2009-01-22 02:45:00

Hi!

You just have to look where in the processor's memory map the SRAM is
located (in the EDK GUI). Then you just have to write or read from
addresses in that range. The address decoder will tell the SRAM
controller, that these accesses are meant for the SRAM memory.

Matthias

charlie78 schrieb:
> Hi all,
> I'm an Italian student, I'm new in fpga and Microblaze implementation.
> I saw many starting tutorials about ML505 Xilinx Platform and usa of
> Xilinx Platform Studio 10.1 and EDK.
> In these tutorials I did not found any example of reading and writing
> operation of the SRAM.
> My code reside in BRAM and I would like to try to store some values in
> SRAM.
> By BSB I implemented SRAM in my system connected to microblaze by SPLB and
> xps_mch_emc.
> Now:
> What are the instructions to read and write this memory?
> It's a simply question but I can't find any answer... please help me.
> Thanks (I apologize for my bad english)
> 
> Daniele
> 
> 

Re: ML505 - How to read/write SRAM? - 2009-01-22 03:11:00

Hi Daniele,

> What are the instructions to read and write this memory ?

There are 2 simple instructions to read / write directly to a memory
address:

Read:  "XIo_In32".
Write: "XIo_Out32".

check "..\EDK project\microblaze_0\include\xio.h".

Also controls the API of SRAM (XPS Multi-Channel External Memory in
"IP Catalog"), with the right button on the block in SRAM EDK.
"Driver" -> "View API Documentation".

I'm Italian.

Kappa.

______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.

Re: ML505 - How to read/write SRAM? - charlie78 - 2009-01-23 03:16:00

Thanks all!
I'm looking xio.h and xparameters.h files.
This morning I'll try to write and read sram...
I hope to achieve a good result.

Daniele

P.s.:
Kappa anche io sono italiano, non vorrei disturbarti
eccessivamente nč investirti del ruolo di 
docente, ma se dovessi avere dei problemi posso
far affidamento su di te?
Ho iniziato ad affacciarmi al mondo degli FPGA
da pochissimo (2 mesi) e dopo uno sguardo iniziale
a manuali di VHDL e a semplicissimi tutorials
sto cercando di entrare nella filosofia del campo.
Sto operando su una piattaforma ML505 e sto
cercando di prendere dimestichezza con i vari bus,
periferiche (buttons,switches,leds,memories...)
Intanto ti ringrazio per l'indirizzamento.
Saluti!

______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.

Re: ML505 - How to read/write SRAM? - charlie78 - 2009-01-23 04:29:00

#include "xparameters.h"
#include "stdio.h"
#include "xutil.h"
#include "fsl.h"
#include "xgpio_l.h"
#include "xio.h"
//====================================================
int main (void) {
Xuint32 segnale,Data,Data1,sum;
int i;
print("-- Inizo main() --\r\n\n");
do{
//riceve il primo valore dai dip switches
print("Digitare il primo dato attraverso i dip switches\r\n e premere unpush button per confermare\r\n\n");
do{
segnale = XGpio_mGetDataReg (XPAR_PUSH_BUTTONS_5BIT_BASEADDR, 1);
Data = XGpio_mGetDataReg (XPAR_DIP_SWITCHES_8BIT_BASEADDR,1);
}while(segnale == 0);
xil_printf("Dato letto da DIP_Switches_8Bit: 0x%x\r\n\n", Data);
// ciclo di ritardo per rilasciare gli switch

xio_out32(XPAR_SRAM_MEM0_BASEADDR,Data);
..

I COMPILED THE CODE AND THE RESULT IS:

Building target: TestApp_Memory.elf
mb-gcc -o TestApp_Memory.elf TestApp_Memory.o    -mno-xl-soft-mul-mxl-pattern-compare -mcpu=v7.10.a -L../../microblaze_0_sw_platform/microblaze_0/lib -xl-mode-executable  -T../../../TestApp_Memory/src/TestApp_Memory_LinkScr.ld
TestApp_Memory.o: In function `main':
/cygdrive/c/da_cancellare/SDK_projects/TestApp_Memory/Debug/../../../TestApp_Memory/src/Te
stApp_Memory.c:53:undefined reference to `xio_out32'
/cygdrive/c/da_cancellare/SDK_projects/TestApp_Memory/Debug/../../../TestApp_Memory/src/Te
stApp_Memory.c:60:undefined reference to `xio_in32'
collect2: ld returned 1 exit status
make: *** [TestApp_Memory.elf] Error 1
Build complete for project TestApp_Memory

WHAT'S WRONG?
Thanks...

Daniele
______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.

Re: ML505 - How to read/write SRAM? - 2009-01-23 11:53:00

Hi Daniele,

> WHAT'S WRONG?

I am not sure but I think that the compiler is "case sensitive" ...
then:

"xio_out32" --> "Xio_Out32"
"xio_in32"  --> "Xio_In32"

Kappa.
______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.

Re: ML505 - How to read/write SRAM? - charlie78 - 2009-01-26 03:09:00

>Hi Daniele,
>
>> WHAT'S WRONG?
>
>I am not sure but I think that the compiler is "case sensitive" ...
>then:
>
>"xio_out32" --> "Xio_Out32"
>"xio_in32"  --> "Xio_In32"
>
>Kappa.
>

Ok, thanks.
(ti ho aggiunto tra i contatti msn, grazie)

______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.