Handle atom2 types in modules input/output ports.
This commit is contained in:
parent
9c634e1640
commit
162e3aac3a
40
parse.y
40
parse.y
|
|
@ -534,8 +534,8 @@ block_item_decl
|
|||
all the trappings of a general variable declaration. All of that
|
||||
is implicit in the "integer" of the declaration. */
|
||||
|
||||
| attribute_list_opt K_integer register_variable_list ';'
|
||||
{ pform_set_reg_integer($3);
|
||||
| attribute_list_opt K_integer signed_unsigned_opt register_variable_list ';'
|
||||
{ pform_set_reg_integer($4);
|
||||
if ($1) delete $1;
|
||||
}
|
||||
|
||||
|
|
@ -1917,6 +1917,24 @@ port_declaration
|
|||
delete[]$7;
|
||||
$$ = ptmp;
|
||||
}
|
||||
| attribute_list_opt K_input atom2_type signed_unsigned_opt IDENTIFIER
|
||||
{ Module::port_t*ptmp;
|
||||
perm_string name = lex_strings.make($5);
|
||||
ptmp = pform_module_port_reference(name, @2.text,
|
||||
@2.first_line);
|
||||
pform_module_define_port(@2, name, NetNet::PINPUT,
|
||||
NetNet::UNRESOLVED_WIRE, IVL_VT_BOOL,
|
||||
$4, 0, $1);
|
||||
port_declaration_context.port_type = NetNet::PINPUT;
|
||||
port_declaration_context.port_net_type = NetNet::UNRESOLVED_WIRE;
|
||||
port_declaration_context.var_type = IVL_VT_BOOL;
|
||||
port_declaration_context.sign_flag = $4;
|
||||
delete port_declaration_context.range;
|
||||
port_declaration_context.range = 0;
|
||||
delete $1;
|
||||
delete[]$5;
|
||||
$$ = ptmp;
|
||||
}
|
||||
| attribute_list_opt
|
||||
K_inout net_type_opt primitive_type_opt signed_opt range_opt IDENTIFIER
|
||||
{ Module::port_t*ptmp;
|
||||
|
|
@ -1992,6 +2010,24 @@ port_declaration
|
|||
delete[]$7;
|
||||
$$ = ptmp;
|
||||
}
|
||||
| attribute_list_opt K_output atom2_type signed_unsigned_opt IDENTIFIER
|
||||
{ Module::port_t*ptmp;
|
||||
perm_string name = lex_strings.make($5);
|
||||
ptmp = pform_module_port_reference(name, @2.text,
|
||||
@2.first_line);
|
||||
pform_module_define_port(@2, name, NetNet::POUTPUT,
|
||||
NetNet::IMPLICIT_REG, IVL_VT_BOOL,
|
||||
$4, 0, $1);
|
||||
port_declaration_context.port_type = NetNet::POUTPUT;
|
||||
port_declaration_context.port_net_type = NetNet::IMPLICIT_REG;
|
||||
port_declaration_context.var_type = IVL_VT_BOOL;
|
||||
port_declaration_context.sign_flag = $4;
|
||||
delete port_declaration_context.range;
|
||||
port_declaration_context.range = 0;
|
||||
delete $1;
|
||||
delete[]$5;
|
||||
$$ = ptmp;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue