Reference Parameters

Reference parameters are used to declare variables of a HASE supplied type (bit, bool, char, integer, unsigned integer, long, floating-point, string and range): or of a parameter type previously defined in the parameter library (PARAMLIB) section of the project definition file: When a reference parameter is declared in the PARAMS section of an entity, it may be preceded by a modifier (final, read_only or static)

^ rBool - Reference Boolean Parameter - RBOOL ( instance_name, initial_value)

The RBOOL declaration allows the user to create boolean parameters. Note that there is no corresponding BOOL definition in the parameter library because 'bool' is a standard type and is known to HASE. For this reason no type name is supplied to the RBOOL constructor.

Allows bitwise manipulation of an integer via the GUI

Example: RBOOL( my_flag, FALSE )


^ rChar - Reference Character Parameter - RCHAR ( instance_name, 'initial_char')

The RCHAR declaration enables the user to create character parameters. Note that there is no corresponding CHAR definition in the parameter library because 'char' is a standard type and is known to HASE. For this reason no type name is supplied to the RCHAR constructor.

Example: RCHAR ( mode, 'a' )
^ rInt - Reference Integer Parameter - RINT ( instance_name, initial_value)

The RINT declaration enables the user to create integer parameters. Note that there is no corresponding INT definition in the parameter library because 'integer' is a standard type and is known to HASE. For this reason no type name is supplied to the RINT constructor.

Integers normally appear in decimal format in the display. If the initial_value is prefaced by 0x, the value is displayed in hexadecimal with leading zeros suppressed; if the initial_value is prefaced by 0X, all 8 hexadecimal characters are displayed.

Examples: RINT ( clockPeriod, 10 ),   RINT ( CODEWORD, 0X0 )


^ rUint - Reference Unsigned Integer Parameter - RUINT ( instance_name, initial_value)

The RUINT declaration enables the user to create unsigned integer parameters. Note that there is no corresponding UINT definition in the parameter library because 'unsigned' is a standard type and is known to HASE. For this reason no type name is supplied to the RUINT constructor.

Unsigned integers can be displayed in decimal or hexadecimal format, as for integers (see RINT, above).

Example: RUINT ( memory_size, 12 )


^ rLong - Reference Long Integer Parameter - RLONG ( instance_name, initial_value)

The RLONG declaration enables the user to create long integer parameters. Note that there is no corresponding LONG definition in the parameter library because 'unsigned' is a standard type and is known to HASE. For this reason no type name is supplied to the RLONG constructor.

Long integers can be displayed in decimal or hexadecimal format, as for integers (see RINT, above).

Example: RLONG ( memory_size, 12 )


^ rFloat - Reference Floating-Point Parameter - RFLOAT ( instance_name, initial_value)

The RFLOAT construct provides a mechanism for creating floating-point variables in an architecture definition. There is no floating-point equivalent construct in the parameter library as, like integers, floating-point is a type known by HASE. For this reason no type name is supplied to the RFLOAT constructor.

Example: RFLOAT ( Average_Access_Time, 3.4 )


^ rString - Reference String Parameter - RSTRING ( instance_name, "initial_string", )

The RSTRING declaration provides a method of creating string parameters. There is no STRING equivalent construct in the parameter library as, like integers, string is a type known by HASE. For this reason no type name is supplied to the RSTRING constructor.

Example: RSTRING ( Cache_Associativity, "Fully_Associative" )
^ rRange - Reference Range Parameter - RRANGE ( instance_name, min, max, initial_value)

The RRANGE construct provides a mechanism to create an integer parameter, the value of which is constrained within boundaries. The initial default value is set to initial_value. The graphical interface is expected to show a slider allowing the user to alter the parameter value. It should not allow this parameter to be set to a value outwith the range defined by min and max boundaries. Although animation and experiment tools may prompt a warning message in case of out of bounds definition, there is no automatic checking during the simulation. Example: RRANGE ( access_time, 1, 10, 5 )
^ rEnum - Reference Enumerated Type Parameter - RENUM ( typename, instance_name, initial_state)

The RENUM declaration provides a mechanism for creating variables of an enumerated type (ENUM)previously defined in the parameter library.

If the enumerated parameter is to be displayed as a port icon, then the instance name should start with port and end with the name of the port to be changed. For example if an entity has a port named OUT then the parameters instance name should be portOUT.

Example: RENUM ( cache_state, secondary_cache, 0 )
^ rStruct - Reference Structure Parameter - RSTRUCT ( typename, instance_name)

The RSTRUCT declaration allows the creation of instances (variables) of a structure (STRUCT)previously defined in the parameter library.

Example: RSTRUCT ( Data_Packet, message )
^ rInstr - Reference Instruction Parameter - RINSTR ( typename, instance_name)

The RINSTR declaration gives a method of creating instances of an instruction set (INSTR) previously defined in the parameter library.

Example: RINSTR ( instr_set, SPARC_Instruction_Set )
^ rLink - Reference Link Parameter - RLINK ( typename, instance_name )

The RLINK construct enables the creation of a link parameter of a type (LINK) defined earlier in the parameter library.

Example: LINK ( DLink, link_data )
^ rArray - Reference Array Parameter - RARRAY ( typename, instance_name, no_of_elements )

The RARRAY construct provides a mechanism for declaring parameters of an array type (ARRAY) previously defined in the parameter library.

Example: RARRAY ( Memory, main_memory, 65536 )