
Philips Semiconductors
DSPCPU Operations for TM1300
PRODUCT SPECIFICATION
A-3
Allocate a cache block
pseudo-op for allocd(0)
SYNTAX
[ IF rguard ] alloc(d) rsrc1
FUNCTION
if
rguard
then {
cache_block_mask = ~(cache_block_size -1)]
allocate adata cache block with [(rsrc1 + 0) & cache_block_mask] address
}
ATTRIBUTES
Function unit
Operation code
Number of operands
Modifier
Modifier range
Latency
Issue slots
dmemspec
213
1
-
-
-
5
DESCRIPTION
The alloc operation is a pseudo operation transformed by the scheduler into an allocd(0) with the same arguments.
(Note: pseudo operations cannot be used in assembly files.)
The alloc operation allocate a cache block with the address computed from
[(rsrc1 + 0) & cache_block_mask]
and sets
the status of this cache block as valid. No data is fetched from main memory for this operation. The allocated cache
block data is undefined after this operation. It is the responsibility of the programmer to update the allocated cache
block by store operations.
Refer to the ‘cache architecture’ section for details on the cache block size.
The alloc operation optionally takes a guard, specified in rguard. If a guard is present, its LSB controls the execution
of the alloc operation. If the LSB of rguard is 1, alloc operation is executed; otherwise, it is not executed.
EXAMPLES
Initial Values
Operation
Result
r10 = 0xabcd,
cache_block_size = 0x40
alloc r10
Allocates a cache block for the address space from
0xabc0 to 0x0xabff without fetching the data from
main memory; The data in this address space is
undefined.
since guard is false, alloc operation is not executed
r10 = 0xabcd, r11 = 0,
cache_block_size = 0x40
r10 = 0xac0f, r11 = 1,
cache_block_size = 0x40
IF r11 alloc r10
IF r11 alloc r10
Allocates a cache block for the address space from
0xac00 to 0xac3f without fetching the data from main
memory; the data in this address space is undefined.
SEE ALSO
allocd allocr allocx
alloc