#include <type.h>
Inheritance diagram for type:
Public Member Functions | |
type (void) | |
void * | operator new (unsigned int num_bytes) |
void * | operator new (unsigned int num_bytes, pool *mem_pool) |
void | operator delete (void *addr) |
const uint | get_width (void) |
void | set_width (uint w) |
virtual const uint | get_ty_kind (void) |
virtual void | set_unit (uint unit) |
virtual uint | get_unit (void) |
virtual void | set_lhs (int l) |
virtual const int | get_lhs (void) |
virtual void | set_rhs (int r) |
const int | get_rhs (void) |
virtual void | set_dir (uint dir) |
virtual const uint | get_dir (void) |
virtual void | set_range (int l, int r, uint dir) |
virtual void | set_box (void) |
virtual void | unset_box (void) |
virtual const Boolean | is_box (void) |
virtual const uchar | get_num_dims (void) |
virtual void | set_num_dims (uint ndim) |
virtual const uint | get_array_size (void) |
virtual void | set_array_size (uint s) |
virtual const pTypeRange | get_array_range (void) |
virtual void | set_array_range (pTypeRange r) |
virtual const pType | get_array_base_type (void) |
virtual void | set_array_base_type (pType tBase) |
virtual void | dealloc () |
virtual const uint | get_rec_size (void) |
virtual void | put_rec_size (uint s) |
virtual pSym | find_elem (STRING name) |
virtual void | add_elem (pSym sym) |
virtual const pType | get_file_base_type (void) |
virtual void | set_file_base_type (pType tBase) |
Private Attributes | |
uint | width |
if its an array, this width is the elem width |
VHDL types come in two forms: named and unnamed. A named type has the form
type short_range is range 0..15;Named types are entered into the symbol table like any other type.An unnamed type is created in a variable declartion. For example,
variable short_val : array short_range of BIT;A named type is simply a symbol that points to an unnamed type. Unnamed types are stored in an unnamed type pool. Variables that share the same named type (e.g., INTEGER or NATURAL) will point to the same type in the type pool. It should also be possible for two variables, declared with the same nunamed type to share the same type, but this is not done currently. For example, the declarations for high_word and low_word could share the same type.variable high_word : array (0 to 31) of BIT; variable low_word : array (0 to 31) of BIT;
Memory Allocation
New for symbols is only called from the symbol table. New for types is only called from the type table. If new compilers are not available, this localized code will have to be modified.
Definition at line 70 of file type.h.
Constructor & Destructor Documentation
|
Definition at line 76 of file type.h. References width.
00077 { 00078 width = 0; 00079 } |
|
Reimplemented in type_record. Definition at line 243 of file type.h. References FALSE.
00244 { 00245 assert( FALSE ); 00246 } |
|
Reimplemented in type_record. Definition at line 223 of file type.h. References FALSE.
00224 { 00225 assert( FALSE ); 00226 } |
|
Reimplemented in type_record. Definition at line 238 of file type.h.
00239 { 00240 assert( FALSE ); 00241 return NULL; 00242 } |
|
Reimplemented in type_array. Definition at line 211 of file type.h.
00212 { 00213 assert( FALSE ); 00214 return NULL; 00215 } |
|
Reimplemented in type_array. Definition at line 202 of file type.h.
00203 { 00204 assert( FALSE ); 00205 return NULL; 00206 } |
|
Reimplemented in type_array. Definition at line 193 of file type.h.
00194 {
00195 assert( FALSE );
00196 return 0;
00197 }
|
|
Reimplemented in type_range. Definition at line 157 of file type.h.
00158 {
00159 assert( FALSE );
00160 return 0;
00161 }
|
|
Reimplemented in type_file. Definition at line 250 of file type.h.
00251 { 00252 assert( FALSE ); 00253 return NULL; 00254 } // get_base_type |
|
Reimplemented in type_range. Definition at line 137 of file type.h. References FALSE.
00138 {
00139 assert( FALSE );
00140 return 0;
00141 }
|
|
Reimplemented in type_array. Definition at line 184 of file type.h.
00185 {
00186 assert( FALSE );
00187 return 0;
00188 }
|
|
Reimplemented in type_record. Definition at line 228 of file type.h.
00229 {
00230 assert( FALSE );
00231 return 0;
00232 }
|
|
Reimplemented in type_range. Definition at line 147 of file type.h. References FALSE.
00148 {
00149 assert( FALSE );
00150 return 0;
00151 }
|
|
Reimplemented in type_time, type_range, type_real, type_array, type_record, and type_file. Definition at line 112 of file type.h. References bad_type, and uint.
00113 { 00114 return bad_type; 00115 } |
|
Reimplemented in type_time. Definition at line 125 of file type.h.
00126 {
00127 assert( FALSE );
00128 return 0;
00129 }
|
|
Definition at line 99 of file type.h.
00100 { 00101 return width; 00102 } // get_width |
|
Reimplemented in type_range. Definition at line 176 of file type.h. References Boolean, and FALSE.
00177 { 00178 assert( FALSE ); 00179 return FALSE; 00180 } |
|
Definition at line 97 of file type.h.
00097 {/* do nothing */}
|
|
Definition at line 90 of file type.h. References pool::GetMem().
00091 { 00092 return mem_pool->GetMem( num_bytes ); 00093 } |
|
Definition at line 84 of file type.h.
00085 { 00086 assert( FALSE ); 00087 return NULL; 00088 } |
|
Reimplemented in type_record. Definition at line 233 of file type.h. References FALSE.
00234 { 00235 assert( FALSE ); 00236 } |
|
Reimplemented in type_array. Definition at line 216 of file type.h. References FALSE.
00217 { 00218 assert( FALSE ); 00219 } |
|
Reimplemented in type_array. Definition at line 207 of file type.h. References FALSE.
00208 { 00209 assert( FALSE ); 00210 } |
|
Definition at line 198 of file type.h. References FALSE.
00199 { 00200 assert( FALSE ); 00201 } |
|
Reimplemented in type_range. Definition at line 168 of file type.h. References FALSE.
00169 { 00170 assert( FALSE ); 00171 } |
|
Reimplemented in type_range. Definition at line 153 of file type.h. References FALSE.
00154 { 00155 assert( FALSE ); 00156 } |
|
Reimplemented in type_file. Definition at line 255 of file type.h. References FALSE.
00256 {
00257 assert( FALSE );
00258 } // set_base_type
|
|
Reimplemented in type_range. Definition at line 133 of file type.h. References FALSE.
00134 { 00135 assert( FALSE ); 00136 } |
|
Reimplemented in type_array. Definition at line 189 of file type.h. References FALSE.
00190 { 00191 assert( FALSE ); 00192 } |
|
Reimplemented in type_range. Definition at line 163 of file type.h. References FALSE.
00164 { 00165 assert( FALSE ); 00166 } |
|
Reimplemented in type_range. Definition at line 143 of file type.h. References FALSE.
00144 { 00145 assert( FALSE ); 00146 } |
|
Reimplemented in type_time. Definition at line 121 of file type.h. References FALSE.
00122 { 00123 assert( FALSE ); 00124 } |
|
Definition at line 104 of file type.h. References width.
00105 { 00106 width = w; 00107 } // set_width |
|
Reimplemented in type_range. Definition at line 172 of file type.h. References FALSE.
00173 { 00174 assert( FALSE ); 00175 } |
|
if its an array, this width is the elem width
Definition at line 73 of file type.h. Referenced by get_width(), set_width(), and type(). |