PARAMLIB - The Parameter Library

The parameter library is used to create the type definitions of parameters used by the project. HASE supplies five built-in types (integer, floating-point, string, unsigned int and char) from which more complex types can be created, for example structures, enumerated and ranges. Once types have been defined in the parameter library, instances of these types can then be created in the GLOBALS section and within entity declarations in the ENTITYLIB.
ENUM ( typename, [ enumerate : icon, ... ] )
STRUCT ( typename, [ reference_parameter , ... ] )
INSTR ( typename, [ (tag, reference_parameter ) , ... ] , class_enum )
BIT ( typename, no_of_bits )
LINK ( typename, [ ( tag, reference_parameter : icon), ... ] )
ARRAY ( typename, type_of_elements )

Enum - Enumerated Type Parameter - ENUM ( typename, [ enumerate : icon, ... ] )

The ENUM declaration enables the creation of an enumerated type similar to those found in C & C++. It provides a means of enumerating a finite set of elements.
Example: ENUM ( cache_state, [ cache_hit : hit_icon, cache_miss : miss_icon ] )
Struct - Structure Parameter - STRUCT ( typename, [ reference_parameter , ... ] )

The STRUCT construct allows the creation of data structures, similar to the struct declaration in C & C++. This mechanism provides a means to aggregate variables of different types. Example: STRUCT ( Data_Packet, [ RINT (Packet_No, 0) , RINT (Packet_Data, 0) ] )
Instr - Instruction Parameter - INSTR ( typename, [ (tag, reference_parameter ) , ... ] , class_enum )

Instruction sets are typically defined in architecture manuals as being divided into several different classes such as load/store, ALU and control instructions. The INSTR construct allows an instruction set, which groups instructions into different classes, to be defined within HASE. Example: INSTR ( instr_set, [ (LOAD, RSTRUCT( ld_format, ld_field ) ,
STORE, RSTRUCT( st_format, st_field ),
ALU, RSTRUCT (alu_format, alu_field ) ] , instruction_class )

Bit - Bit Parameter - BIT ( typename, no_of_bits )

The BIT construct allows a bit type to be defined. This is similar to the integer type except that the value is displayed as a bit pattern. Example: BIT ( Register_Contents, 32 )
Link - LINK ( typename, [ ( tag , reference_parameter : icon), ... ] )

Example: LINK ( DLink, [ ( MEM_R, RINT ( Address, 0) ),
( MEM_W, RSTRUCT ( Info, I ) : PktIcon ) ] )

PROJECT(
PREAMBLE(
NAME "project_name"
DIRECTORY "working_directory"
AUTHOR "project_author"
VERSION ver
DESCRIPTION "project_description"
COMPILER "compiler_name"
LINK "linker_name"
LIBRARY "library_options"
EXTERN lib1, ...
)
PARAMLIB(parameter, ...)
GLOBALS(reference_parameter, ...)
ENTITYLIB( entity_definition | higher_entity_definition | mesh_entity | abstract_entity, ...)
STRUCTURE(architecture_entity | communication_channel , ... )
)