File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -854,6 +854,18 @@ class verilog_inst_baset : public verilog_module_itemt
854854 return operands ();
855855 }
856856
857+ bool positional_port_connections () const
858+ {
859+ return !named_port_connections ();
860+ }
861+
862+ bool named_port_connections () const
863+ {
864+ auto &connections = this ->connections ();
865+ return connections.empty () ||
866+ connections.front ().id () == ID_named_port_connection;
867+ }
868+
857869 protected:
858870 using exprt::operands;
859871 };
Original file line number Diff line number Diff line change @@ -1419,7 +1419,7 @@ void verilog_synthesist::instantiate_ports(
14191419
14201420 // named port connection?
14211421
1422- if (inst.connections (). front (). id () == ID_named_port_connection )
1422+ if (inst.named_port_connections () )
14231423 {
14241424 const irept::subt &ports = symbol.type .find (ID_ports).get_sub ();
14251425
Original file line number Diff line number Diff line change @@ -110,9 +110,7 @@ void verilog_typecheckt::typecheck_port_connections(
110110 }
111111
112112 // named port connection?
113- if (
114- inst.connections ().empty () ||
115- inst.connections ().front ().id () == ID_named_port_connection)
113+ if (inst.named_port_connections ())
116114 {
117115 // We don't require that all ports are connected.
118116
You can’t perform that action at this time.
0 commit comments