Last active
August 7, 2019 06:48
-
-
Save duck2/fc6a11097006db6a904c8db2a8cdcd0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
Copyright 2018 Jeppe Johansen | |
XML 1.0 Schema for rr_graph structure developed based on documentation here: | |
http://vtr-verilog-to-routing.readthedocs.io/en/latest/vpr/file_formats.html#routing-resource-graph-file-format-xml | |
--> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:complexType name="channel"> | |
<xs:attribute name="chan_width_max" type="xs:int" use="required"/> | |
<xs:attribute name="x_min" type="xs:int" use="required"/> | |
<xs:attribute name="y_min" type="xs:int" use="required"/> | |
<xs:attribute name="x_max" type="xs:int" use="required"/> | |
<xs:attribute name="y_max" type="xs:int" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="x_list"> | |
<xs:attribute name="index" type="xs:unsignedInt" use="required"/> | |
<xs:attribute name="info" type="xs:int" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="y_list"> | |
<xs:attribute name="index" type="xs:unsignedInt" use="required"/> | |
<xs:attribute name="info" type="xs:int" use="required"/> | |
</xs:complexType> | |
<xs:simpleType name="switch_type"> | |
<xs:restriction base="xs:string"> | |
<xs:enumeration value="mux"/> | |
<xs:enumeration value="tristate"/> | |
<xs:enumeration value="pass_gate"/> | |
<xs:enumeration value="short"/> | |
<xs:enumeration value="buffer"/> | |
</xs:restriction> | |
</xs:simpleType> | |
<xs:complexType name="timing"> | |
<xs:attribute name="R" type="xs:float"/> | |
<xs:attribute name="Cin" type="xs:float"/> | |
<xs:attribute name="Cinternal" type="xs:float"/> | |
<xs:attribute name="Cout" type="xs:float"/> | |
<xs:attribute name="Tdel" type="xs:float"/> | |
</xs:complexType> | |
<xs:complexType name="sizing"> | |
<xs:attribute name="mux_trans_size" type="xs:float" use="required"/> | |
<xs:attribute name="buf_size" type="xs:float" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="switch"> | |
<xs:all> | |
<xs:element name="timing" type="timing" minOccurs="0"/> | |
<xs:element name="sizing" type="sizing"/> | |
</xs:all> | |
<xs:attribute name="id" type="xs:int" use="required"/> | |
<xs:attribute name="name" type="xs:string" use="required"/> | |
<xs:attribute name="type" type="switch_type"/> | |
</xs:complexType> | |
<xs:complexType name="segment_timing"> | |
<xs:attribute name="R_per_meter" type="xs:float"/> | |
<xs:attribute name="C_per_meter" type="xs:float"/> | |
</xs:complexType> | |
<xs:complexType name="segment"> | |
<xs:all> | |
<xs:element name="timing" type="segment_timing" minOccurs="0"/> | |
</xs:all> | |
<xs:attribute name="id" type="xs:int" use="required"/> | |
<xs:attribute name="name" type="xs:string" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="pin"> | |
<xs:simpleContent> | |
<xs:extension base="xs:string"> | |
<xs:attribute name="ptc" type="xs:int" use="required"/> | |
</xs:extension> | |
</xs:simpleContent> | |
</xs:complexType> | |
<xs:complexType name="pin_class"> | |
<xs:sequence> | |
<xs:element name="pin" type="pin" maxOccurs="unbounded"/> | |
</xs:sequence> | |
<xs:attribute name="type" type="pin_type" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="meta"> | |
<xs:simpleContent> | |
<xs:extension base="xs:string"> | |
<xs:attribute name="name" type="xs:string" use="required"/> | |
</xs:extension> | |
</xs:simpleContent> | |
</xs:complexType> | |
<xs:complexType name="metadata"> | |
<xs:sequence> | |
<xs:element name="meta" type="meta" maxOccurs="unbounded"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:complexType name="block_type"> | |
<xs:sequence> | |
<xs:element name="pin_class" type="pin_class" minOccurs="0" maxOccurs="unbounded"/> | |
</xs:sequence> | |
<xs:attribute name="id" type="xs:int" use="required"/> | |
<xs:attribute name="name" type="xs:string" use="required"/> | |
<xs:attribute name="width" type="xs:int" use="required"/> | |
<xs:attribute name="height" type="xs:int" use="required"/> | |
</xs:complexType> | |
<xs:simpleType name="pin_type"> | |
<xs:restriction base="xs:string"> | |
<xs:enumeration value="OPEN"/> | |
<xs:enumeration value="OUTPUT"/> | |
<xs:enumeration value="INPUT"/> | |
</xs:restriction> | |
</xs:simpleType> | |
<xs:complexType name="grid_loc"> | |
<xs:attribute name="x" type="xs:int" use="required"/> | |
<xs:attribute name="y" type="xs:int" use="required"/> | |
<xs:attribute name="block_type_id" type="xs:int" use="required"/> | |
<xs:attribute name="width_offset" type="xs:int" use="required"/> | |
<xs:attribute name="height_offset" type="xs:int" use="required"/> | |
</xs:complexType> | |
<xs:simpleType name="node_type"> | |
<xs:restriction base="xs:string"> | |
<xs:enumeration value="CHANX"/> | |
<xs:enumeration value="CHANY"/> | |
<xs:enumeration value="SOURCE"/> | |
<xs:enumeration value="SINK"/> | |
<xs:enumeration value="OPIN"/> | |
<xs:enumeration value="IPIN"/> | |
</xs:restriction> | |
</xs:simpleType> | |
<xs:simpleType name="node_direction"> | |
<xs:restriction base="xs:string"> | |
<xs:enumeration value="INC_DIR"/> | |
<xs:enumeration value="DEC_DIR"/> | |
<xs:enumeration value="BI_DIR"/> | |
</xs:restriction> | |
</xs:simpleType> | |
<xs:simpleType name="loc_side"> | |
<xs:restriction base="xs:string"> | |
<xs:enumeration value="LEFT"/> | |
<xs:enumeration value="RIGHT"/> | |
<xs:enumeration value="TOP"/> | |
<xs:enumeration value="BOTTOM"/> | |
</xs:restriction> | |
</xs:simpleType> | |
<xs:complexType name="node_loc"> | |
<xs:attribute name="xlow" type="xs:int" use="required"/> | |
<xs:attribute name="ylow" type="xs:int" use="required"/> | |
<xs:attribute name="xhigh" type="xs:int" use="required"/> | |
<xs:attribute name="yhigh" type="xs:int" use="required"/> | |
<xs:attribute name="side" type="loc_side"/> | |
<xs:attribute name="ptc" type="xs:int" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="node_timing"> | |
<xs:attribute name="R" type="xs:float" use="required"/> | |
<xs:attribute name="C" type="xs:float" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="node_segment"> | |
<xs:attribute name="segment_id" type="xs:int" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="node"> | |
<xs:all> | |
<xs:element name="loc" type="node_loc"/> | |
<xs:element name="timing" type="node_timing" minOccurs="0"/> | |
<xs:element name="segment" type="node_segment" minOccurs="0"/> | |
<xs:element name="metadata" type="metadata" minOccurs="0"/> | |
</xs:all> | |
<xs:attribute name="id" type="xs:unsignedInt" use="required"/> | |
<xs:attribute name="type" type="node_type" use="required"/> | |
<xs:attribute name="direction" type="node_direction"/> | |
<xs:attribute name="capacity" type="xs:unsignedInt" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="edge"> | |
<xs:all> | |
<xs:element name="metadata" type="metadata" minOccurs="0"/> | |
</xs:all> | |
<xs:attribute name="id" type="xs:unsignedInt"/> | |
<xs:attribute name="src_node" type="xs:unsignedInt" use="required"/> | |
<xs:attribute name="sink_node" type="xs:unsignedInt" use="required"/> | |
<xs:attribute name="switch_id" type="xs:unsignedInt" use="required"/> | |
</xs:complexType> | |
<xs:complexType name="channels"> | |
<xs:sequence> | |
<xs:element name="channel" type="channel"/> | |
<xs:element name="x_list" type="x_list" maxOccurs="unbounded"/> | |
<xs:element name="y_list" type="y_list" maxOccurs="unbounded"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:complexType name="switches"> | |
<xs:sequence> | |
<xs:element name="switch" type="switch" maxOccurs="unbounded"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:complexType name="segments"> | |
<xs:sequence> | |
<xs:element name="segment" type="segment" maxOccurs="unbounded"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:complexType name="block_types"> | |
<xs:sequence> | |
<xs:element name="block_type" type="block_type" maxOccurs="unbounded"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:complexType name="grid_locs"> | |
<xs:sequence> | |
<xs:element name="grid_loc" type="grid_loc" maxOccurs="unbounded"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:complexType name="rr_nodes"> | |
<xs:choice maxOccurs="unbounded"> | |
<xs:element name="node" type="node"/> | |
</xs:choice> | |
</xs:complexType> | |
<xs:complexType name="rr_edges"> | |
<xs:choice maxOccurs="unbounded"> | |
<xs:element name="edge" type="edge"/> | |
</xs:choice> | |
</xs:complexType> | |
<xs:element name="rr_graph"> | |
<xs:complexType> | |
<xs:all> | |
<xs:element name="channels" type="channels"/> | |
<xs:element name="switches" type="switches"/> | |
<xs:element name="segments" type="segments"/> | |
<xs:element name="block_types" type="block_types"/> | |
<xs:element name="grid" type="grid_locs"/> | |
<xs:element name="rr_nodes" type="rr_nodes"/> | |
<xs:element name="rr_edges" type="rr_edges"/> | |
</xs:all> | |
<xs:attribute name="tool_name" type="xs:string"/> | |
<xs:attribute name="tool_version" type="xs:string"/> | |
<xs:attribute name="tool_comment" type="xs:string"/> | |
</xs:complexType> | |
</xs:element> | |
</xs:schema> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment