SiFive · Schema

Sifive Duh

CompanySemiconductorsRISC-VProcessor IPChip DesignEmbeddedHardwareDeveloper ToolsElectronic Design AutomationOAuth
View JSON Schema on GitHub

JSON Schema

sifive-duh-schema.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$defs": {
    "catalog": {
      "type": "object",
      "title": "Catalog document",
      "properties": {
        "catalog": {
          "type": "object",
          "properties": {
            "components": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/component"
              }
            },
            "designs": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/design"
              }
            },
            "busDefinitions": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/abstractionDefinition"
              }
            }
          }
        }
      },
      "required": [
        "catalog"
      ]
    },
    "component": {
      "type": "object",
      "title": "Component document",
      "description": "\nComponent document collects information about a single hardware block without\nexpressing internal structure or hierarchy. Component document expressing following aspects:\n* name, version\n* top level ports\n* parameter schema\n* bus interfaces\n* memory regions\n* registers\n* clocks, resets\n* block generation flow\n* references to implementation, documentation, tests\n",
      "required": [
        "component"
      ],
      "properties": {
        "component": {
          "type": "object",
          "oneOf": [
            {
              "properties": {
                "vlnv": {
                  "type": "string",
                  "minLength": 9,
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z0-9_.-]+$"
                }
              },
              "required": [
                "vlnv"
              ]
            },
            {
              "properties": {
                "vendor": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                },
                "library": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "vendor",
                "library",
                "name",
                "version"
              ]
            }
          ],
          "properties": {
            "busInterfaces": {
              "type": "array",
              "uniqueItemProperties": [
                "name"
              ],
              "items": {
                "$ref": "#/$defs/busInterface"
              }
            },
            "model": {
              "type": "object",
              "required": [
                "ports"
              ],
              "properties": {
                "ports": {
                  "title": "Ports",
                  "oneOf": [
                    {
                      "type": "object",
                      "patternProperties": {
                        ".+": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "required": [
                                "direction",
                                "width"
                              ],
                              "properties": {
                                "direction": {
                                  "enum": [
                                    "in",
                                    "out",
                                    "inout"
                                  ]
                                },
                                "width": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    {
                                      "type": "string"
                                    }
                                  ]
                                },
                                "analog": {
                                  "enum": [
                                    "in",
                                    "out",
                                    "inout"
                                  ]
                                },
                                "displayName": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        }
                      }
                    },
                    {
                      "type": "array",
                      "uniqueItemProperties": [
                        "name"
                      ],
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "wire"
                        ],
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                          },
                          "wire": {
                            "oneOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "string"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "direction",
                                  "width"
                                ],
                                "properties": {
                                  "direction": {
                                    "enum": [
                                      "in",
                                      "out",
                                      "inout"
                                    ]
                                  },
                                  "width": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 1
                                      },
                                      {
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  "analog": {
                                    "enum": [
                                      "in",
                                      "out",
                                      "inout"
                                    ]
                                  },
                                  "displayName": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                }
              }
            },
            "addressSpaces": {
              "type": "array",
              "uniqueItemProperties": [
                "name"
              ],
              "items": {
                "type": "object",
                "title": "Address space",
                "required": [
                  "name",
                  "range",
                  "width"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                  },
                  "range": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "width": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            },
            "memoryMaps": {
              "type": "array",
              "uniqueItemProperties": [
                "name"
              ],
              "items": {
                "$ref": "#/$defs/memoryMap"
              }
            },
            "componentGenerators": {
              "type": "array"
            },
            "fileSets": {
              "type": "object"
            },
            "parameters": {
              "type": "array"
            },
            "props": {
              "type": "object",
              "patternProperties": {
                ".+": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "array",
                        "boolean",
                        "integer",
                        "null",
                        "number",
                        "object",
                        "string"
                      ]
                    },
                    "description": {
                      "type": "string"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "allOf": {
                      "type": "array",
                      "minItems": 1
                    },
                    "anyOf": {
                      "type": "array",
                      "minItems": 1
                    },
                    "oneOf": {
                      "type": "array",
                      "minItems": 1
                    }
                  }
                }
              }
            },
            "assertions": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "design": {
      "type": "object",
      "title": "Design document",
      "properties": {
        "design": {
          "type": "object",
          "oneOf": [
            {
              "properties": {
                "vlnv": {
                  "type": "string",
                  "minLength": 9,
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z0-9_.-]+$"
                }
              },
              "required": [
                "vlnv"
              ]
            },
            {
              "properties": {
                "vendor": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                },
                "library": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "vendor",
                "library",
                "name",
                "version"
              ]
            }
          ],
          "properties": {
            "instances": {
              "type": "array",
              "uniqueItemProperties": [
                "name"
              ],
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                  },
                  "ref": {
                    "type": "object",
                    "oneOf": [
                      {
                        "properties": {
                          "vlnv": {
                            "type": "string",
                            "minLength": 9,
                            "maxLength": 256,
                            "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z0-9_.-]+$"
                          }
                        },
                        "required": [
                          "vlnv"
                        ]
                      },
                      {
                        "properties": {
                          "vendor": {
                            "type": "string",
                            "minLength": 3,
                            "maxLength": 256,
                            "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                          },
                          "library": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                          },
                          "version": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "vendor",
                          "library",
                          "name",
                          "version"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "ref"
                ]
              }
            },
            "links": {
              "type": "array",
              "description": "set of links",
              "items": {
                "type": "object",
                "description": "links is an edge between source and target bus interfaces",
                "properties": {
                  "source": {
                    "description": "bus interface where links starts",
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "\nA symbolic link name that expected to be resolved to the target busInnterface\nof some instance withing design\n"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                        },
                        "minItems": 2,
                        "maxItems": 2,
                        "description": "\nA pair of names: component instance name, busInterface name\n"
                      }
                    ]
                  },
                  "target": {
                    "description": "bus interface where link terminates",
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "\nA symbolic link name that expected to be resolved to the initiator busInterface\nof some instance withing design\n"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                        },
                        "minItems": 2,
                        "maxItems": 2,
                        "description": "\nA pair of names: component instance name, busInterface name\n"
                      }
                    ]
                  }
                },
                "required": [
                  "source",
                  "target"
                ]
              }
            },
            "connections": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "description": "exposes a named connection point on the boundary of containing component",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                      },
                      "import": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                      },
                      "target": {
                        "type": "array",
                        "description": "pair of (instance name, bus interface name)",
                        "minItems": 2,
                        "maxItems": 2,
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                        }
                      }
                    },
                    "required": [
                      "import",
                      "target"
                    ]
                  },
                  {
                    "type": "object",
                    "description": "connection between initiator interface and target interface",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                      },
                      "source": {
                        "type": "array",
                        "description": "pair of (instance name, bus interface name)",
                        "minItems": 2,
                        "maxItems": 2,
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                        }
                      },
                      "target": {
                        "type": "array",
                        "description": "pair of (instance name, bus interface name)",
                        "minItems": 2,
                        "maxItems": 2,
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                        }
                      }
                    },
                    "required": [
                      "source",
                      "target"
                    ]
                  },
                  {
                    "type": "object",
                    "description": "exposes a named connection point on the boundary of containing component",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                      },
                      "source": {
                        "type": "array",
                        "description": "pair of (instance name, bus interface name)",
                        "minItems": 2,
                        "maxItems": 2,
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                        }
                      },
                      "export": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                      }
                    },
                    "required": [
                      "source",
                      "export"
                    ]
                  }
                ]
              }
            },
            "adHocConnections": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                  },
                  "portReferences": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "oneOf": [
                        {
                          "properties": {
                            "kind": {
                              "enum": [
                                "internal"
                              ]
                            },
                            "componentRef": {
                              "type": "object"
                            },
                            "portRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
                            }
                          },
                          "required": [
                            "portRef",
                            "componentRef"
                          ]
                        },
                        {
                          "properties": {
                            "kind": {
                              "enum": [
                                "extrenal"
                              ]
                            },
                            "portRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
                            }
                          },
                          "required": [
                            "portRef"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            },
            "props": {
              "type": "object",
              "patternProperties": {
                ".+": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "array",
                        "boolean",
                        "integer",
                        "null",
                        "number",
                        "object",
                        "string"
                      ]
                    },
                    "description": {
                      "type": "string"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "allOf": {
                      "type": "array",
                      "minItems": 1
                    },
                    "anyOf": {
                      "type": "array",
                      "minItems": 1
                    },
                    "oneOf": {
                      "type": "array",
                      "minItems": 1
                    }
                  }
                }
              }
            },
            "assertions": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object"
                  }
                ]
              }
            }
          }
        }
      },
      "required": [
        "design"
      ]
    },
    "abstractionDefinition": {
      "type": "object",
      "title": "Abstraction definition document",
      "required": [
        "abstractionDefinition"
      ],
      "properties": {
        "abstractionDefinition": {
          "type": "object",
          "oneOf": [
            {
              "properties": {
                "vlnv": {
                  "type": "string",
                  "minLength": 9,
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z0-9_.-]+$"
                }
              },
              "required": [
                "vlnv"
              ]
            },
            {
              "properties": {
                "vendor": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                },
                "library": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "vendor",
                "library",
                "name",
                "version"
              ]
            }
          ],
          "required": [
            "busType",
            "ports"
          ],
          "properties": {
            "busType": {
              "type": "object",
              "oneOf": [
                {
                  "properties": {
                    "vlnv": {
                      "type": "string",
                      "minLength": 9,
                      "maxLength": 256,
                      "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z][:a-zA-Z0-9_-]*/[a-zA-Z0-9_.-]+$"
                    }
                  },
                  "required": [
                    "vlnv"
                  ]
                },
                {
                  "properties": {
                    "vendor": {
                      "type": "string",
                      "minLength": 3,
                      "maxLength": 256,
                      "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$"
                    },
                    "library": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^[a-zA-Z][:a-zA-Z0-9_-]*$"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256,
                      "pattern": "^[_:A-Za-z][-._:A-Za-z0-9]*$"
                    },
                    "version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "vendor",
                    "library",
                    "name",
                    "version"
                  ]
                }
              ]
            },
            "ports": {
              "type": "object",
              "patternProperties": {
                ".+": {
                  "type": "object",
                  "required": [
                    "description",
                    "wire"
                  ],
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "wire": {
                      "type": "object",
                      "properties": {
                        "onMaster": {
                          "type": "object",
                          "properties": {
                            "direction": {
                              "enum": [
                                "in",
                                "out"
                              ]
                            },
                            "width": {
                              "oneOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "oneOf": [
                            {
                              "required": [
                                "direction"
                              ],
                              "properties": {
                                "presence": {
                                  "enum": [
                                    "optional",
                                    "required"
                                  ]
                                }
                              }
                            },
                            {
                              "required": [
                                "presence"
                              ],
                              "properties": {
                                "presence": {
                                  "enum": [
                                    "illegal"
                                  ]
                                }
                              }
                            }
                          ]
                        },
                        "onSlave": {
                          "type": "object",
                          "properties": {
                            "direction": {
                              "enum": [
                                "in",
                                "out"
                              ]
                            },
                            "width": {
                              "oneOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "oneOf": [
                            {
                              "required": [
                          

# --- truncated at 32 KB (56 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sifive/refs/heads/main/json-schema/sifive-duh-schema.json