Japanese
FAQGeneral program
BackForward
FAQ/Program General

Work RAM High & Low



What is the difference between High-RAM and Low-RAM?

Q)
What is the difference between "High RAM" and "Low RAM"? I would appreciate it if you could give me an answer from a hardware perspective, such as wait cycles and RAM speed...
Also, I think that caching will be effective when actually using it, but how effective is caching on those RAMs?

A)
First, regarding the addresses where both are located, WORKRAM-H uses synchronous DRAM and is 1 Mbyte from 06000000H, and WORKRAM-L uses DRAM and is 1 Mbyte from 00200000H.

This is the address when caching, and during cache through, WORKRAM-H is 1Mbyte from 26000000H, and WORKRAM-L is 1MByte from 20200000H.
(Refer to HARDWARE MANUAL ■1.2 SCU Mapping )

For read operations, in WORKRAM-H, if there is a cache hit, the data can be read without waiting, but in the case of a cache miss, 16 bytes must be accessed.
With the synchronous DRAM used in WORKRAM-H, access in the event of a cache miss is extremely fast, and 16 bytes of information can be retrieved in about 7 clocks.
However, the WORKRAM-L space takes 14 (number of clocks per long word) x 4 clocks (56 clocks).

When writing 1 long word, it takes 4 clocks for WORKRAM-H and 14 clocks for WORKRAM-L (7 clocks for 1 word), but since a write buffer for 1 long word is provided, it can be written continuously. Writing is faster than this.

As mentioned above, the cache speeds of WORKRAM-H and WORKRAM-L are different, so it is recommended to place programs on the WORKRAM-H side as much as possible. Additionally, please note that WORKRAM-L cannot use SCU's DMA transfer (both the transfer destination and transfer source).

This is because this WORKRAM-L space is outside the control of SCU.
The best way to speed up SH2 programs is to write programs with pipeline processing in mind and efficient use of cache.


BackForward
FAQGeneral program
Copyright SEGA ENTERPRISES, LTD. 1997