next up previous contents
Next: Integer Type Info Instantiation Up: The Integer Type Info Previous: Integer Type Info Variables

Integer Type Info Methods

Methods Description
'Class_Name'() Constructor to initialise the variables of the base classes. Note, the bounds of the integer type must be locally static. Therefore, they can be determined at compile time.
static int left() Returns the left bound of the integer type. Corresponds to the ``left'' VHDL attribute.
static int right() Returns the right bound of the integer type. Corresponds to the ``right'' VHDL attribute.
static int low() Returns the low bound of the integer type. Corresponds to the ``low'' VHDL attribute.
static int high() Returns the high bound of the integer type. Corresponds to the ``high'' VHDL attribute.
   

The bounds of the VHDL integer type can be determined at VHDL compile time (they must be locally static5.1). Hence the methods simply return a constant value. On the other hand the low, high, ...methods of the integer_info_base class on the other hand return the value of the corresponding class variables. Note, as all methods except constructors and destructors are static they cannot access any variables of the parent classes directly.

Example:

TYPE myint IS INTEGER 1000 DOWNTO -1;
is converted into the following type info class
class L3lib_Q4pack_I5myint : integer_info_base {
  public:
   static int low() { return -1; };
   static int high() { return 1000; }
   static int left() { return 1000; }
   static int right() { return -1; }

   L3lib_Q4pack_I5myint() : 
      integer_info_base(low(), high(), left(), right()) { }; 
   }
};


next up previous contents
Next: Integer Type Info Instantiation Up: The Integer Type Info Previous: Integer Type Info Variables

1998-11-17