{
  "$defs": {
    "bitstream_info": {
      "description": "Bitstream build output",
      "properties": {
        "build_target": {
          "description": "Build target that generated the output",
          "type": "string"
        },
        "file": {
          "description": "Path to bitstream file relative to root",
          "type": "string"
        }
      },
      "required": [
        "file"
      ],
      "type": "object"
    },
    "design": {
      "description": "Files and metadata related to a design",
      "properties": {
        "bitstream": {
          "$ref": "#/$defs/bitstream_info"
        },
        "build_id": {
          "description": "Build ID associated with this design's output (typically a git hash)",
          "type": "string"
        },
        "memory_map_info": {
          "additionalProperties": {
            "$ref": "#/$defs/memory_map_info"
          },
          "description": "Map of name or key identifying the associated memory to file describing contents",
          "type": "object"
        }
      },
      "required": [
        "bitstream"
      ],
      "type": "object"
    },
    "memory_map_info": {
      "description": "Build output that maps memories to cells in a hardware implementation",
      "properties": {
        "build_target": {
          "description": "Build target that generated the output",
          "type": "string"
        },
        "file": {
          "description": "Path to file with memory contents, relative to root",
          "type": "string"
        }
      },
      "required": [
        "file"
      ],
      "type": "object"
    }
  },
  "$id": "https://raw.githubusercontent.com/lowRISC/opentitan/master/rules/scripts/bitstreams_manifest.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "A manifest of bitstreams in a cache entry, informing what is there and how to reproduce",
  "properties": {
    "designs": {
      "additionalProperties": {
        "$ref": "#/$defs/design"
      },
      "description": "Map of designs to their files and metadata objects",
      "type": "object"
    },
    "schema_version": {
      "description": "Version number of this manifest's schema",
      "maximum": 2,
      "minimum": 2,
      "type": "number"
    }
  },
  "required": [
    "schema_version",
    "designs"
  ],
  "title": "Bitstreams Cache Manifest v2",
  "type": "object"
}