FPGARelated.com
Forums

how can i save my received data into the SDRAM?

Started by ARRON May 13, 2005
I have receive large character data from RS232, i want to save it in the SDRAM memory, i find the SDRAM is 8M*32, but the character is 8bits,not 32bits, if i write a character into an Unit of SDRAM, next 24bits memory is wasted, and i find some data is not correct, how can i use the SDRAM correctly and efficiently?
either
a) use 4 chip or bank selects as some SDRAM's have.
b) use a read-modify-write cycle

"ARRON" <mlpei279@gmail.com> wrote in message
news:ee8e3ab.-1@webx.sUN8CHnE...
> I have receive large character data from RS232, i want to save it in the
SDRAM memory, i find the SDRAM is 8M*32, but the character is 8bits,not 32bits, if i write a character into an Unit of SDRAM, next 24bits memory is wasted, and i find some data is not correct, how can i use the SDRAM correctly and efficiently?
The SDRAM has been in my XILINX FPGA board, I can't change the SDRAM's layout, I mean how can i do some change in software of EDK. Thanks for your advice.
"ARRON" <mlpei279@gmail.com> wrote in message 
news:ee8e3ab.1@webx.sUN8CHnE...
> The SDRAM has been in my XILINX FPGA board, I can't change the SDRAM's > layout, I mean how can i do some change in software of EDK. Thanks for > your advice.
write your software such that it does a byte write not a word write.
Mike Lewis wrote:
> "ARRON" <mlpei279@gmail.com> wrote in message > news:ee8e3ab.1@webx.sUN8CHnE... > > The SDRAM has been in my XILINX FPGA board, I can't change the
SDRAM's Your Won't waste 24 bit of SDRAM if your buffer 4 bytes and then write to SDRAM and let the software application know about this ....
I have defined the type "Unchar32",a structure of 32bits data, and i changed the SDRAM address to "Unchar32" pointer type and assign it to Unchar32 pointer variable "SdramAddr",then i write the data to SDRAM by assign the each domain of "SdramAddr",but I receive the same wrong data as i write the SDRAM directly,what is the matter?