def _print_groupings(self, ofile): """ Prints the grouping list """ ofile.write(' <groupings>\n') for group in self._prj.get_grouping_list(): ofile.write(' <grouping name="%s" start="%x" hdl="%s"' % (group.name, group.base, group.hdl)) ofile.write(' title="%s"' % escape(clean_text(group.title))) ofile.write(' repeat="%d" repeat_offset="%d">\n' % (group.repeat, group.repeat_offset)) if group.docs: ofile.write("<overview>%s</overview>\n" % escape(clean_text(group.docs))) for item in group.register_sets: ofile.write(' <map set="%s" inst="%s" offset="%x" ' % (item.set, item.inst, item.offset)) ofile.write('repeat="%s" repeat_offset="%s"' % (item.repeat, item.repeat_offset)) if item.hdl: ofile.write(' hdl="%s"' % item.hdl) if item.no_uvm: ofile.write(' no_uvm="%s"' % int(item.no_uvm)) if item.no_decode: ofile.write(' no_decode="%s"' % int(item.no_decode)) if item.array: ofile.write(' array="%s"' % int(item.array)) if item.format: ofile.write(' format="%s"' % item.format) ofile.write("/>\n") for item in self._prj.get_group_exports(group.name): ofile.write(' <group_export option="%s" dest="%s"/>' % item) ofile.write(' </grouping>\n') ofile.write(' </groupings>\n')
def cleanup(data): "Remove some unicode characters with standard ASCII characters" return xml.sax.saxutils.escape(clean_text(data))
def cleanup(data): "Convert some unicode characters to standard ASCII" return xml.sax.saxutils.escape(clean_text(data))