code: def quartus_add_interface_port(self, buff: List[str], intfName: str, signal,
                                     logicName: str, packager: "IpCorePackager"):
          
          d = signal._direction
          if d == INTF_DIRECTION.MASTER:
              dir_ = "Output"
          elif d == INTF_DIRECTION.SLAVE:
              dir_ = "Input"
          else:
              raise ValueError(d)
  
          _, width, _ = packager.getTypeWidth(packager.getInterfaceType(signal), do_eval=True)
  
          buff.append("add_interface_port %s %s %s %s %s" % (
              intfName,
              packager.getInterfacePhysicalName(signal),
              logicName,
              dir_,
              width
          ))
docs: Add subinterface to Quartus interface
  
          :param buff: line buffer for output
          :param intfName: name of top interface
          :param signal: subinterface to create port for
          :param logicName: name of port in Quartus