7 using the scripts ram, 1 loading scripts ram, Using the scripts ram – Avago Technologies LSI53C1010 User Manual
Page 228: Loading scripts ram
![background image](https://www.manualsdir.com/files/864554/content/doc228.png)
9-30
SCRIPTS Programming Topics
9.7 Using the SCRIPTS RAM
Many of the chips supported by the SCRIPTS processor contain internal,
general purpose RAM. Please refer to your chip technical manual for
your chip’s specifications. This RAM stores SCRIPTS instructions and
I/O data structure information, but is not limited to this type of
information. When the chip fetches SCRIPTS instructions or Table
Indirect information from the internal RAM, the fetches remain internal to
the chip and do not use the PCI bus. Other types of access to the RAM
by chip with internal RAM use the PCI bus, as if they were external
accesses. This section discusses loading SCRIPTS and Table Indirect
information into the SCRIPTS RAM and other programming techniques
for using internal RAM.
The RAM can be relocated anywhere in the 32-bit address (64-bit in
newer chips) space by the PCI system BIOS. The RAM Base Address
register, located in the chip’s PCI configuration space, contains the
internal RAM base address. This register is similar to the ROM Base
Address register in the PCI Configuration register set. To simplify loading
SCRIPTS instructions, the RAM base address appears in the
SCRATCHB register when bit 3 of the CTEST2 register is set. The RAM
is byte accessible from the PCI bus and is visible to any bus mastering
device on the bus. Accesses made externally, that is by the CPU, follow
the same timing sequence as a standard slave register access, except
that the required target wait states drops from 5 to 3.
9.7.1 Loading SCRIPTS RAM
SCRIPTS instructions can be loaded into the internal RAM in one of two
ways. You can simply copy the instructions into the RAM with the CPU.
Alternatively, you can use a MOVE MEMORY instruction, which copies
the SCRIPTS instructions from their initial location in host memory to the
SCRIPTS RAM. This method is especially useful in the Intel processor
real mode of operation because the SCRIPTS RAM is generally mapped
by the PCI system BIOS outside the region where the processor can
access it. The syntax of the move instruction is:
MOVE MEM Script_Inst_Bytes, SRC_Phys_Addr, \
Script_RAM_Phys_Addr