Forum Discussion
7 Replies
- ShengN_altera
Super Contributor
Hi,
May I know does your problem resolved?
- ShengN_altera
Super Contributor
Could you provide design for taking a look?
- Annu
New Contributor
My RAM is accessed by a Processor where processor is trying to write byte by byte But My RAM is word based. If we try writing byte by byte, does it corrupts the RAM
- ShengN_altera
Super Contributor
Yes, a word-based RAM expects aligned word writes, not arbitrary byte writes — unless byte enable is properly handled. You have to properly use the byte enable like for example (2'b11 for 16 bits)
Take an example:
Assume:
- RAM width = 16-bit (2 bytes)
- Addressing = word-based
Address mapping:
Processor addr RAM addr Byte lane 0 word 0 low byte 1 word 0 high byte 2 word 1 low byte 3 word 1 high byte If your design:
- Always writes full word
- OR only enables byteena[0] (
If byte enable is missing or wrong)
Then:
Address Result Even (0,2,...) writes lower byte Odd (1,3,...) upper byte ignored You may check the waveform for byteenable from this doc https://cdrdv2-public.intel.com/654378/ug_ram.pdf (page 39)
- kmalaww
New Contributor
I’ve seen similar issues in my own projects as well. I faced something like this while working ong Grade Calculator for Students. In my case, it was related to configuration and input mapping, so that may be worth checking.
- kmalaww
New Contributor
I’ve seen a similar issue before. I’m also facing something similar while working on Secrets Behind the Destiny Matrix. In most cases, it’s related to configuration, address mapping, or input settings. It may be worth checking those areas first.
- kmalaww
New Contributor
ssdsd