Skip to content

Commit

Permalink
fixing schema bug with PROPERTYDEFINITION
Browse files Browse the repository at this point in the history
  • Loading branch information
nanobowers committed Jul 16, 2024
1 parent 30ace88 commit 068fca4
Show file tree
Hide file tree
Showing 4 changed files with 299 additions and 69 deletions.
316 changes: 266 additions & 50 deletions lef21/resources/lef21.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"title": "Lef Library",
"description": "LEF's primary design-content container, including a set of macro/cell definitions and associated metadata.",
"type": "object",
"required": [
"fixed_mask"
],
"properties": {
"bus_bit_chars": {
"description": "Bus-Bit Separator Characters",
Expand All @@ -27,10 +30,9 @@
},
"clearance_measure": {
"description": "Clearance Measure",
"writeOnly": true,
"anyOf": [
{
"$ref": "#/definitions/Unsupported"
"$ref": "#/definitions/LefClearanceStyle"
},
{
"type": "null"
Expand All @@ -47,16 +49,15 @@
"minLength": 1
},
"extensions": {
"description": "Syntax Extensions (Unsupported)",
"description": "Syntax Extensions",
"type": "array",
"items": {
"$ref": "#/definitions/LefExtension"
}
},
"fixed_mask": {
"writeOnly": true,
"anyOf": [
{
"$ref": "#/definitions/Unsupported"
},
{
"type": "null"
}
]
"type": "boolean"
},
"layers": {
"description": "Layer Definitions",
Expand All @@ -79,15 +80,11 @@
},
"manufacturing_grid": {
"description": "Manufacturing Grid",
"writeOnly": true,
"anyOf": [
{
"$ref": "#/definitions/Unsupported"
},
{
"type": "null"
}
]
"type": [
"string",
"null"
],
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"max_via_stack": {
"description": "Max Via Stack",
Expand Down Expand Up @@ -137,15 +134,10 @@
},
"property_definitions": {
"description": "Property Definitions",
"writeOnly": true,
"anyOf": [
{
"$ref": "#/definitions/Unsupported"
},
{
"type": "null"
}
]
"type": "array",
"items": {
"$ref": "#/definitions/LefPropertyDefinition"
}
},
"sites": {
"description": "Site Definitions",
Expand All @@ -167,7 +159,6 @@
},
"use_min_spacing": {
"description": "\"Use Min Spacing\" Option",
"writeOnly": true,
"anyOf": [
{
"$ref": "#/definitions/LefOnOff"
Expand Down Expand Up @@ -275,6 +266,25 @@
}
]
},
"LefClearanceStyle": {
"description": "Clearance Measure Spacing Styles",
"oneOf": [
{
"description": "MAXXY",
"type": "string",
"enum": [
"MaxXY"
]
},
{
"description": "EUCLIDEAN",
"type": "string",
"enum": [
"Euclidean"
]
}
]
},
"LefCoreClassType": {
"description": "Sub-Types for Macros of Class [LefMacroClass::Core]",
"oneOf": [
Expand Down Expand Up @@ -410,6 +420,23 @@
}
]
},
"LefExtension": {
"type": "object",
"required": [
"data",
"name"
],
"properties": {
"data": {
"description": "Stringified data contained in the extension",
"type": "string"
},
"name": {
"description": "Name of the extension",
"type": "string"
}
}
},
"LefForeign": {
"title": "Lef Foreign Cell Declaration",
"description": "Declares the linkage to another cell, commonly in DEF or GDSII format. Foreign-cell references are stored exacty as in the LEF format: as a string cell-name.",
Expand Down Expand Up @@ -663,16 +690,11 @@
}
},
"properties": {
"description": "Properties (Unsupported)",
"writeOnly": true,
"anyOf": [
{
"$ref": "#/definitions/Unsupported"
},
{
"type": "null"
}
]
"description": "Properties",
"type": "array",
"items": {
"$ref": "#/definitions/LefProperty"
}
},
"site": {
"description": "Site Name Note the optional `SITEPATTERN` is not supported",
Expand Down Expand Up @@ -1058,16 +1080,11 @@
}
},
"properties": {
"description": "Properties (Unsupported)",
"writeOnly": true,
"anyOf": [
{
"$ref": "#/definitions/Unsupported"
},
{
"type": "null"
}
]
"description": "Properties",
"type": "array",
"items": {
"$ref": "#/definitions/LefProperty"
}
},
"shape": {
"description": "Shape",
Expand Down Expand Up @@ -1301,6 +1318,205 @@
}
]
},
"LefProperty": {
"title": "User Defined Property Instantiation",
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"LefPropertyDefinition": {
"title": "User Defined Property Definition",
"oneOf": [
{
"type": "object",
"required": [
"LefString"
],
"properties": {
"LefString": {
"type": "array",
"items": [
{
"$ref": "#/definitions/LefPropertyDefinitionObjectType"
},
{
"type": "string"
},
{
"type": [
"string",
"null"
]
}
],
"maxItems": 3,
"minItems": 3
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"LefReal"
],
"properties": {
"LefReal": {
"type": "array",
"items": [
{
"$ref": "#/definitions/LefPropertyDefinitionObjectType"
},
{
"type": "string"
},
{
"type": [
"string",
"null"
],
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
{
"anyOf": [
{
"$ref": "#/definitions/LefPropertyRange"
},
{
"type": "null"
}
]
}
],
"maxItems": 4,
"minItems": 4
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"LefInteger"
],
"properties": {
"LefInteger": {
"type": "array",
"items": [
{
"$ref": "#/definitions/LefPropertyDefinitionObjectType"
},
{
"type": "string"
},
{
"type": [
"string",
"null"
],
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
{
"anyOf": [
{
"$ref": "#/definitions/LefPropertyRange"
},
{
"type": "null"
}
]
}
],
"maxItems": 4,
"minItems": 4
}
},
"additionalProperties": false
}
]
},
"LefPropertyDefinitionObjectType": {
"description": "Valid object types for [LefPropertyDefinition]",
"oneOf": [
{
"description": "LAYER",
"type": "string",
"enum": [
"Layer"
]
},
{
"description": "LIBRARY",
"type": "string",
"enum": [
"Library"
]
},
{
"description": "MACRO",
"type": "string",
"enum": [
"Macro"
]
},
{
"description": "NONDEFAULTRULE",
"type": "string",
"enum": [
"NonDefaultRule"
]
},
{
"description": "PIN",
"type": "string",
"enum": [
"Pin"
]
},
{
"description": "VIA",
"type": "string",
"enum": [
"Via"
]
},
{
"description": "VIARULE",
"type": "string",
"enum": [
"ViaRule"
]
}
]
},
"LefPropertyRange": {
"title": "Numeric Range for [LefPropertyDefinition]",
"type": "object",
"required": [
"begin",
"end"
],
"properties": {
"begin": {
"type": "string",
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"end": {
"type": "string",
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"LefShape": {
"title": "Lef Shape Enumeration",
"description": "Includes each of LEF's individual geometric primitives: rectangles, polygons, and paths.",
Expand Down
Loading

0 comments on commit 068fca4

Please sign in to comment.