Пример #1
0
 def asElem(self):
     e = mkSpiElm("modelParameter")
     e.attrib["spirit:dataType"] = self.datatype
     appendStrElements(e, self,
                       reqPropNames=['name', "displayName"])
     e.append(self.value.asElem())
     return e
Пример #2
0
 def asElem(self):
     e = mkSpiElm("view")
     appendStrElements(e, self,
                       reqPropNames=self._requiredVal,
                       optPropNames=self._optionalVal)
     e.append(self.fileSetRef.asElem())
     return e
Пример #3
0
    def xml(self):
        # Vivado 2015.2 bug - order of all elements is NOT optional
        for prefix, uri in ns.items():
            etree.register_namespace(prefix, uri)
        c = mkSpiElm("component")
        appendStrElements(c, self, self._strValues[:-1])
        if arr_any(self.busInterfaces, lambda intf: hasattr(intf, "_bi")):
            bi = appendSpiElem(c, "busInterfaces")
            for intf in self.busInterfaces:  # for all interfaces which have bus interface class
                if hasattr(intf, "_bi"):
                    bi.append(intf._bi.asElem())

        c.append(self.model.asElem())
        self._xmlFileSets(c)

        appendStrElements(c, self, [self._strValues[-1]])
        self._xmlParameters(c)
        c.append(
            self.vendorExtensions.asElem(self.name + "_v" + self.version,
                                         revision=str(int(time()))))

        return c
Пример #4
0
 def asElem(self):
     e = mkSpiElm("file")
     appendStrElements(e, self, self._strValues)
     return e