Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

type_array Class Reference

VHDL uses the concept of "array of type". More...

#include <type.h>

Inheritance diagram for type_array:

Inheritance graph
[legend]
Collaboration diagram for type_array:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 type_array ()
const uchar get_num_dims (void)
void set_num_dims (uint ndim)
const uint get_array_size (void)
void set_array__ize (uint s)
const pTypeRange get_array_range (void)
void set_array_range (pTypeRange r)
const pType get_array_base_type (void)
void set_array_base_type (pType tBase)
const uint get_ty_kind (void)

Private Attributes

uchar num_dims
uint size
pTypeRange range
pType base_type

Detailed Description

VHDL uses the concept of "array of type".

A multi-dimensional array is an "array of array". As a result, a multi-dimensional array is a recursive data structure. The current "top" represents the current highest dimension.

A note on array indexes:

If array A has three dimension, it will be index by A(k, j, i). Incrementing "i" will reference sequential array elements. So, assuming that all bounds start at zero, the index expression will be

index = i + ((j + (k * size_dim2)) * size_dim2)

?? Should the "delta" from zero also be included here, to aid in generating code for index expressions. ??

Definition at line 424 of file type.h.


Constructor & Destructor Documentation

type_array::type_array  )  [inline]
 

Definition at line 432 of file type.h.

References base_type, NULL, num_dims, range, and size.

00432                  : type()
00433     {
00434         num_dims = 0;
00435         size = 0;
00436         range = NULL;
00437         base_type = NULL;
00438     } // type_array constructor


Member Function Documentation

const pType type_array::get_array_base_type void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 467 of file type.h.

References base_type.

00468     {
00469         return base_type;
00470     }

const pTypeRange type_array::get_array_range void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 458 of file type.h.

References range.

00459     {
00460         return range;
00461     }

const uint type_array::get_array_size void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 449 of file type.h.

References size, and uint.

00450     {
00451         return size;
00452     }

const uchar type_array::get_num_dims void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 440 of file type.h.

References num_dims, and uchar.

00441     { 
00442         return num_dims; 
00443     }

const uint type_array::get_ty_kind void   )  [inline, virtual]
 

Reimplemented from type.

Definition at line 476 of file type.h.

References ty_array, and uint.

00477     {
00478         return ty_array;
00479     }

void type_array::set_array__ize uint  s  )  [inline]
 

Definition at line 453 of file type.h.

References size.

00454     {
00455         size = s;
00456     }

void type_array::set_array_base_type pType  tBase  )  [inline, virtual]
 

Reimplemented from type.

Definition at line 471 of file type.h.

References base_type.

00472     {
00473         base_type = tBase;
00474     }

void type_array::set_array_range pTypeRange  r  )  [inline, virtual]
 

Reimplemented from type.

Definition at line 462 of file type.h.

References range.

00463     {
00464         range = r;
00465     }

void type_array::set_num_dims uint  ndim  )  [inline, virtual]
 

Reimplemented from type.

Definition at line 444 of file type.h.

References num_dims, and uchar.

00445     { 
00446         num_dims = (uchar)ndim; 
00447     }


Member Data Documentation

pType type_array::base_type [private]
 

Definition at line 429 of file type.h.

Referenced by get_array_base_type(), set_array_base_type(), and type_array().

uchar type_array::num_dims [private]
 

Definition at line 426 of file type.h.

Referenced by get_num_dims(), set_num_dims(), and type_array().

pTypeRange type_array::range [private]
 

Definition at line 428 of file type.h.

Referenced by get_array_range(), set_array_range(), and type_array().

uint type_array::size [private]
 

Definition at line 427 of file type.h.

Referenced by get_array_size(), set_array__ize(), and type_array().


The documentation for this class was generated from the following file:
Generated on Wed Mar 31 21:16:13 2004 for Data Structures for a VHDL Compiler by doxygen 1.3.3