next up previous contents
Next: Reservation Tables Up: SALTO Target Description Specifications Previous: Target Identification

Hardware Resources

In SALTO, a resource represents an element of the target architecture that can influence its performance. As a rule of thumb, anything hardware element that can form a bottleneck in instruction scheduling should be represented as a resource.

Resources are classified according to three criteria:

functionality
resources are used either to store data, or to manipulate it; typical storage resources are registers and the main memory, and are the only resources that can be read and written; resources that manipulate data can only be used (i.e., busy, or reserved) and, for our purposes, are called `` functional units'';
complexity
a basic resource corresponds to a precise component of the target hardware; composite resources consisting of several adjacent individual resources are also supported, in order to represent aggregate registers, treated as a single operand by some instructions;
genericity
resources with similar characteristics may have names that obey a systematic naming scheme, e.g., a prefix followed by a numerical suffix; resources sharing the same characteristics can be grouped into classes whose members can be substituted to each other when needed, even if they are not systematically named.

Basic Resources

Resources must be named. The choice of names is left to the designer of the description of the architecture, except for the reserved resource name "mem" which always denotes the ``main'' memory (NB: multiple memory resources can be defined.)

A resource is characterized by four properties:

The definition of a resource is made using the def_ress expression with the following syntax:

< def_ress>::=

 ( def_ress
  <res_or_class_name>
  [
    (type "<type>")0|1
    (width <width>)0|1
    (limit <limit>)0|1  
    ])  


< res_or_class_name>::=
 (name "<name>") |
     (base_name "<genname>" <first> <last>)


where

The reference to an already defined resource is made using the expression ress:

< resource_ref>::=

 ( ress
<res_or_class_name>)  

Example:

The definitions

; general registers r0 to r127
(def_ress (base_name "r" 0 127)
           [(type "reg") (width 32)])
; instruction decoders (issue units)
(def_ress "issue"
          [(type "functional_unit")
           (limit 5)])
; DSP ALU
(def_ress (name "dspalu")
          [(type "functional_unit")
           (limit 1)
	   (width 32)])
correspond respectively to a set of 128 32-bit registers named "r0" through "r127", a family of five instruction decoders which can be used interchangeably, and a unique DSP ALU with 32-bit data paths (N.B.: the replication limit of 1 must be explicit: the previous functional unit definition used a higher value, which would otherwise have been reused.)

Resource Aliases

Aliases (alternate names) of resources can be given using the alt_name expression. Aliases are most frequently used to reflect usage conventions of resources. The general form of the alias definition is

< alt_name>::=

 ( alt_name

"<name>" "<alias>")


where

Example:

The following are the aliases of the TM1000 registers

; register r2 (alias "rp") contains the return value of a function
(alt_name "r2" "rp")

; register r3 (alias "fp") is used as frame pointer by C/C++ programs
;  (see restriction in manual)
(alt_name "r3" "fp")

; register r4 (alias "sp") is the stack pointer (last word IN USE, growth
;  towards 0)
(alt_name "r4" "sp")

; register r5 (alias "rv") is the scalar return value register
(alt_name "r5" "rv")

Resource Classes

Resource classes provide a means of representing resources that are equivalent wrt. the renaming. Therefore, the classes should be defined in such a way that all resource of a class should be fully interchangeable.

A resource can belong to several classes, with different renaming and writability characteristics in each class. A resource class definition uses the following syntax:

< def_class>::=

 ( def_class
"<class_name>" "<type>"

[
(ress | class <res_or_class_name> [ (norename)0|1 (noallocate)0|1 ] )+ ])

where

References to an already defined class are made using the class expression:

< class_ref>::=

 ( class

<res_or_class_name> )


Example:

Below are the definitions of several register classes of the TM architecture:

; read-only registers
(def_class "RO_reg" "reg"
           [(ress (base_name "r" 0 1)   [(noallocate) (norename)])])

; writable registers
(def_class "DEST_reg" "reg"
           [
            (ress (base_name "r" 2 127) [])
           ])

; all registers
(def_class "GP_reg" "reg"
           [
            (class (name "RO_reg"))
            (class (name "DEST_reg"))
           ])

; C call parameters
(def_class "PARAM_reg" "reg"
           [
            (ress (base_name "r" 5 8) [(norename)])
           ])

Notes: names must be defined prior to the definition of resource classes, otherwise they will be ignored.


next up previous contents
Next: Reservation Tables Up: SALTO Target Description Specifications Previous: Target Identification

Erven Rohou
Fri Oct 17 09:15:29 MET DST 1997