From 962c0af1b620652e791d56285a8e207c56c10043 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 10 Jan 2022 10:02:39 +0100 Subject: [PATCH] Don't set information not needed on enum signals When creating a PWire for a enum type the signedness as well as whether the base type is an integer is assigned to the wire. But this information is never queried again. When creating the netenum_t this information is directly taken from the enum_type_t. The signedness and integer information of the PWire is only used when elaborating a netvector_t. Removing this makes the pfrom_set_enum() function similar to those for other types and will allow us to consolidate them in follow up patches. Signed-off-by: Lars-Peter Clausen --- pform.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pform.cc b/pform.cc index 374040291..749c3249d 100644 --- a/pform.cc +++ b/pform.cc @@ -3535,14 +3535,6 @@ static void pform_set_enum(const struct vlltype&li, enum_type_t*enum_type, PWire*cur = pform_get_make_wire_in_scope(li, name, net_type, NetNet::NOT_A_PORT, enum_type->base_type); assert(cur); - cur->set_signed(enum_type->signed_flag); - - //XXXXcur->set_range(*enum_type->range, SR_NET); - // If this is an integer enumeration switch the wire to an integer. - if (enum_type->integer_flag) { - bool res = cur->set_wire_type(NetNet::INTEGER); - assert(res); - } pform_bind_attributes(cur->attributes, attr, true); }