def asignTopUnit(self, top, topName):
        """
        Set hwt unit as template for component
        """
        self._top = top
        self.name = topName
        pack = self._packager
        self.model.addDefaultViews(topName, pack.iterParams(top))

        for intf in pack.iterInterfaces(self._top):
            self.registerInterface(intf)
            if intf._isExtern:
                self.busInterfaces.append(intf)

        self.busInterfaces.sort(key=lambda x: x._name)
        for intf in self.busInterfaces:
            biClass = None
            try:
                biClass = intf._getIpCoreIntfClass()
            except IntfIpMetaNotSpecified:
                pass
            if biClass is not None:
                bi = BusInterface.fromBiClass(intf, biClass, self._packager)
                intf._bi = bi
                bi.busType.postProcess(self, self._packager, intf)

        # generate component parameters
        compNameParam = Parameter()
        compNameParam.name = "Component_Name"
        compNameParam.value = Value()
        v = compNameParam.value
        v.id = "PARAM_VALUE.Component_Name"
        v.resolve = "user"
        v.text = self.name
        self.parameters.append(compNameParam)
        # generic as parameters
        for _p in pack.iterParams(self._top):
            p = Parameter()
            p.name = pack.getParamPhysicalName(_p)
            p.value = self._packager.paramToIpValue(
                "PARAM_VALUE.", _p, Value.RESOLVE_USER)
            self.parameters.append(p)
Set hwt unit as template for component