-----------------------------------------------------------------
-- added to make below compile
-----------------------------------------------------------------
entity test1 is
end test1;
architecture behave of test1 is
  signal x, a : bit;
begin
-----------------------------------------------------------------

PROCESS(x)
  SUBTYPE smallreal IS REAL RANGE -1.0E6 TO 1.0E6;
  VARIABLE q : real;
BEGIN
  q := smallreal'LEFT;
  -- use of 'left returns
  -- -1.0E6
END PROCESS;



PROCESS(a)
  TYPE bit_range IS ARRAY(31 DOWNTO 0) OF BIT;
  VARIABLE left_range, right_range, uprange, lowrange : integer;
BEGIN
  left_range  := bit_range'LEFT;
  -- returns 31

  right_range := bit_range'RIGHT;
  -- returns 0

  uprange     := bit_range'HIGH;
  -- returns 31

  lowrange    := bit_range'LOW;
  -- returns 0
END PROCESS;


PROCESS(a)
  TYPE bit4 IS ARRAY(0 TO 3) of BIT;
  TYPE bit_strange IS ARRAY(10 TO 20) OF BIT;
  VARIABLE len1, len2 : INTEGER;
BEGIN
  len1 := bit4'LENGTH;       -- returns 4
  len2 := bit_strange'LENGTH; -- returns 11
END PROCESS;




-------------------------------------------------------------------
end behave;
-------------------------------------------------------------------

