@@ -1376,17 +1376,17 @@ Function: verilog_synthesist::instantiate_ports
13761376
13771377void verilog_synthesist::instantiate_ports (
13781378 const irep_idt &instance,
1379- const exprt &inst,
1379+ const verilog_instt::instancet &inst,
13801380 const symbolt &symbol,
13811381 const replace_mapt &replace_map,
13821382 transt &trans)
13831383{
1384- if (inst.operands ().size ()== 0 )
1384+ if (inst.connections ().size () == 0 )
13851385 return ;
13861386
13871387 // named port connection?
13881388
1389- if (to_multi_ary_expr ( inst). op0 (). id () == ID_named_port_connection )
1389+ if (inst. named_connections () )
13901390 {
13911391 const irept::subt &ports = symbol.type .find (ID_ports).get_sub ();
13921392
@@ -1397,7 +1397,7 @@ void verilog_synthesist::instantiate_ports(
13971397 to_symbol_expr ((const exprt &)(port)).get_identifier ());
13981398
13991399 // no requirement that all ports are connected
1400- for (const auto &o_it : inst.operands ())
1400+ for (const auto &o_it : inst.connections ())
14011401 {
14021402 if (o_it.operands ().size ()==2 )
14031403 {
@@ -1418,17 +1418,17 @@ void verilog_synthesist::instantiate_ports(
14181418 {
14191419 const irept::subt &ports = symbol.type .find (ID_ports).get_sub ();
14201420
1421- if (inst.operands ().size ()!= ports.size ())
1421+ if (inst.connections ().size () != ports.size ())
14221422 {
14231423 throw errort ().with_location (inst.source_location ())
14241424 << " wrong number of ports: expected " << ports.size () << " but got "
1425- << inst.operands ().size ();
1425+ << inst.connections ().size ();
14261426 }
14271427
14281428 irept::subt::const_iterator p_it=
14291429 ports.begin ();
14301430
1431- for (const auto &o_it : inst.operands ())
1431+ for (const auto &o_it : inst.connections ())
14321432 {
14331433 DATA_INVARIANT (o_it.is_not_nil (), " all ports must be connected" );
14341434
0 commit comments