Add support for variable of primitive data type 'bit'

Verilog allows user to define variables of primitive types. The patch
adds support for defining variables of type 'bit'. The data type 'bit'
is the only primitive data type which supports defining ranges.

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
This commit is contained in:
Prasad Joshi 2011-06-28 16:43:21 +01:00 committed by Stephen Williams
parent 1d016c4c81
commit f25b957006
2 changed files with 7 additions and 0 deletions

View File

@ -605,6 +605,12 @@ block_item_decl
if ($1) delete $1;
}
| attribute_list_opt K_bit unsigned_signed_opt range_opt
register_variable_list ';'
{
pform_set_net_range($5, $4, $3, IVL_VT_BOOL);
if ($1) delete $1;
}
/* Integer atom declarations are simpler in that they do not have
all the trappings of a general variable declaration. All of that
is implicit in the "integer" of the declaration. */

View File

@ -515,6 +515,7 @@ struct __vpiSignal* vpip_signal_from_handle(vpiHandle ref)
case vpiShortIntVar:
case vpiIntVar:
case vpiLongIntVar:
case vpiBitVar:
return (struct __vpiSignal*)ref;
default: