Made switch_name optional. Added the metadata tags. Moved pack_pattern to subtags of interconnect. Flattened types in routing_resource.xsd. Signed-off-by: Jeppe Johansen <jeppe@j-software.dk>
diff --git a/fpga_architecture.xsd b/fpga_architecture.xsd index 3656cdf..682cd06 100644 --- a/fpga_architecture.xsd +++ b/fpga_architecture.xsd
@@ -7,6 +7,26 @@ --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <!-- Metadata --> + <xs:complexType name="meta"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="name" type="xs:string" use="required"/> + <xs:attribute name="xoffset" type="xs:int"/> + <xs:attribute name="x_offset" type="xs:int"/> + <xs:attribute name="yoffset" type="xs:int"/> + <xs:attribute name="y_offset" type="xs:int"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + + <xs:complexType name="metadata"> + <xs:sequence> + <xs:element name="meta" type="meta" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + + <!-- Actual definitions --> <xs:complexType name="port"> <xs:attribute name="name" type="xs:string" use="required" /> <xs:attribute name="is_clock" type="xs:boolean" /> @@ -50,6 +70,9 @@ </xs:complexType> <xs:complexType name="single"> + <xs:sequence> + <xs:element name="metadata" type="metadata" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> <xs:attribute name="type" type="xs:string" use="required"/> <xs:attribute name="priority" type="xs:int" use="required"/> <xs:attribute name="x" type="xs:string" use="required"/> @@ -326,24 +349,26 @@ </xs:group> <xs:complexType name="interconnect_type"> - <xs:group ref="timing_group" minOccurs="0"/> + <xs:choice maxOccurs="unbounded"> + <xs:element name="pack_pattern" type="pack_pattern"/> + <xs:group ref="timing_group" minOccurs="0"/> + </xs:choice> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="input" type="xs:string" use="required"/> <xs:attribute name="output" type="xs:string" use="required"/> </xs:complexType> + + <xs:complexType name="pack_pattern"> + <xs:attribute name="name" type="xs:string" use="required"/> + <xs:attribute name="in_port" type="xs:string" use="required"/> + <xs:attribute name="out_port" type="xs:string" use="required"/> + </xs:complexType> <xs:complexType name="interconnect"> <xs:choice maxOccurs="unbounded"> <xs:element name="complete" type="interconnect_type"/> <xs:element name="direct" type="interconnect_type"/> <xs:element name="mux" type="interconnect_type"/> - <xs:element name="pack_pattern"> - <xs:complexType> - <xs:attribute name="name" type="xs:string" use="required"/> - <xs:attribute name="in_port" type="xs:string" use="required"/> - <xs:attribute name="out_port" type="xs:string" use="required"/> - </xs:complexType> - </xs:element> </xs:choice> </xs:complexType> @@ -451,23 +476,25 @@ <xs:attribute name="out_val" type="xs:double" use="required"/> </xs:complexType> + <xs:complexType name="mode"> + <xs:choice maxOccurs="unbounded" minOccurs="0"> + <xs:element name="pb_type" type="pb_type"/> + <xs:element name="interconnect" type="interconnect"/> + <xs:element name="pinlocations" type="pinlocations"/> + <xs:element name="switchblock_locations" type="switchblock_locations"/> + <xs:element name="metadata" type="metadata"/> + </xs:choice> + <xs:attribute name="name" type="xs:string" use="required"/> + </xs:complexType> + <xs:complexType name="pb_type"> <xs:choice maxOccurs="unbounded" minOccurs="0"> <xs:element name="pb_type" type="pb_type"/> <xs:element name="input" type="pb_type_input"/> <xs:element name="output" type="pb_type_output"/> <xs:element name="clock" type="pb_type_output"/> - <xs:element name="mode"> - <xs:complexType> - <xs:choice maxOccurs="unbounded" minOccurs="0"> - <xs:element name="pb_type" type="pb_type"/> - <xs:element name="interconnect" type="interconnect"/> - <xs:element name="pinlocations" type="pinlocations"/> - <xs:element name="switchblock_locations" type="switchblock_locations"/> - </xs:choice> - <xs:attribute name="name" type="xs:string" use="required"/> - </xs:complexType> - </xs:element> + <xs:element name="metadata" type="metadata"/> + <xs:element name="mode" type="mode"/> <xs:element name="interconnect" type="interconnect"/> <xs:element name="pinlocations" type="pinlocations"/> <xs:element name="switchblock_locations" type="switchblock_locations"/> @@ -559,7 +586,7 @@ <xs:attribute name="x_offset" type="xs:int" use="required"/> <xs:attribute name="y_offset" type="xs:int" use="required"/> <xs:attribute name="z_offset" type="xs:int" use="required"/> - <xs:attribute name="switch_name" type="xs:string" use="required"/> + <xs:attribute name="switch_name" type="xs:string"/> </xs:complexType> <xs:complexType name="directlist">
diff --git a/routing_resource.xsd b/routing_resource.xsd index 82314a2..c8c689a 100644 --- a/routing_resource.xsd +++ b/routing_resource.xsd
@@ -175,66 +175,61 @@ <xs:attribute name="switch_id" type="xs:int" use="required"/> </xs:complexType> + <xs:complexType name="channels"> + <xs:choice maxOccurs="unbounded"> + <xs:element name="channel" type="channel"/> + <xs:element name="x_list" type="x_list"/> + <xs:element name="y_list" type="y_list"/> + </xs:choice> + </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:choice maxOccurs="unbounded"> - <xs:element name="channels"> - <xs:complexType> - <xs:choice maxOccurs="unbounded"> - <xs:element name="channel" type="channel"/> - <xs:element name="x_list" type="x_list"/> - <xs:element name="y_list" type="y_list"/> - </xs:choice> - </xs:complexType> - </xs:element> + <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="switches"> - <xs:complexType> - <xs:sequence> - <xs:element name="switch" type="switch" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="segments"> - <xs:complexType> - <xs:sequence> - <xs:element name="segment" type="segment" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="block_types"> - <xs:complexType> - <xs:sequence> - <xs:element name="block_type" type="block_type" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="grid"> - <xs:complexType> - <xs:sequence> - <xs:element name="grid_loc" type="grid_loc" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="rr_nodes"> - <xs:complexType> - <xs:choice maxOccurs="unbounded"> - <xs:element name="node" type="node"/> - </xs:choice> - </xs:complexType> - </xs:element> - - <xs:element name="rr_edges"> - <xs:complexType> - <xs:choice maxOccurs="unbounded"> - <xs:element name="edge" type="edge"/> - </xs:choice> - </xs:complexType> - </xs:element> + <xs:element name="rr_edges" type="rr_edges"/> </xs:choice> <xs:attribute name="tool_name" type="xs:string"/>