From b996458ca8cf49730188681362f7cb7d12c11db7 Mon Sep 17 00:00:00 2001 From: Paul Scheffler Date: Fri, 29 Oct 2021 20:45:33 +0200 Subject: [PATCH] occamy: Expose `tc_sram` configuration inputs per memory type ([pulp-platform/snitch#303](#303s)) * tc_sram: Add implementation key and IO * vendor: Add `tech_cells_generic` patch * cluster: Add, propagate configurable memory cut configuration ports * doc: Regenerate schema-doc * occamy: Extend wth SRAM config ports at top * occamy: Connect CVA6 SRAM config * occamy: Reorder, count memory config structs * occamy+cluster: Further fixes * cva6: Add SRAM config ports * vendor: Add CVA6 patch * tc_sram: Add implementation stubs to fpga module * vendor: Add `tc_sram` FPGA patch --- ...occamy-properties-snitch-cluster-schema.md | 88 +++++++++++++++---- ...itch_cluster-properties-sram_cfg_expose.md | 15 ++++ ...es-sram_cfg_fields-additionalproperties.md | 19 ++++ ...ster-properties-sram_cfg_fields-default.md | 15 ++++ ...roperties-sram_cfg_fields-propertynames.md | 25 ++++++ ...itch_cluster-properties-sram_cfg_fields.md | 57 ++++++++++++ docs/schema-doc/snitch_cluster.md | 88 +++++++++++++++---- docs/schema-doc/snitch_cluster.schema.json | 2 +- docs/schema/snitch_cluster.schema.json | 13 +++ hw/snitch_cluster/src/snitch_cluster.sv | 16 +++- .../src/snitch_cluster_wrapper.sv.tpl | 24 ++++- hw/snitch_cluster/src/snitch_hive.sv | 10 +++ hw/snitch_icache/src/snitch_icache.sv | 19 +++- hw/snitch_icache/src/snitch_icache_lookup.sv | 20 ++++- 14 files changed, 365 insertions(+), 46 deletions(-) create mode 100644 docs/schema-doc/snitch_cluster-properties-sram_cfg_expose.md create mode 100644 docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-additionalproperties.md create mode 100644 docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-default.md create mode 100644 docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-propertynames.md create mode 100644 docs/schema-doc/snitch_cluster-properties-sram_cfg_fields.md diff --git a/docs/schema-doc/occamy-properties-snitch-cluster-schema.md b/docs/schema-doc/occamy-properties-snitch-cluster-schema.md index 90da93bda8..b0f45f9e03 100644 --- a/docs/schema-doc/occamy-properties-snitch-cluster-schema.md +++ b/docs/schema-doc/occamy-properties-snitch-cluster-schema.md @@ -16,24 +16,26 @@ Base description of a Snitch cluster and its internal structure and configuratio # Snitch Cluster Schema Properties -| Property | Type | Required | Nullable | Defined by | -| :------------------------------------------------ | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [name](#name) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-name.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/name") | -| [boot_addr](#boot_addr) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-boot_addr.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/boot_addr") | -| [cluster_base_addr](#cluster_base_addr) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-cluster_base_addr.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cluster_base_addr") | -| [tcdm](#tcdm) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-tcdm.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/tcdm") | -| [addr_width](#addr_width) | `number` | Required | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-addr_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/addr_width") | -| [data_width](#data_width) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-data_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/data_width") | -| [dma_data_width](#dma_data_width) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_data_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_data_width") | -| [id_width_in](#id_width_in) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-id_width_in.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/id_width_in") | -| [dma_id_width_in](#dma_id_width_in) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_id_width_in.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_id_width_in") | -| [hart_base_id](#hart_base_id) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-hart_base_id.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/hart_base_id") | -| [mode](#mode) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-mode.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/mode") | -| [vm](#vm) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-vm.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/vm") | -| [dma_axi_req_fifo_depth](#dma_axi_req_fifo_depth) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_axi_req_fifo_depth.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_axi_req_fifo_depth") | -| [dma_req_fifo_depth](#dma_req_fifo_depth) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_req_fifo_depth.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_req_fifo_depth") | -| [timing](#timing) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-timing-and-latency-tuning-parameter.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/timing") | -| [hives](#hives) | `array` | Required | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-hives.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/hives") | +| Property | Type | Required | Nullable | Defined by | +| :------------------------------------------------ | :-------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [name](#name) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-name.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/name") | +| [boot_addr](#boot_addr) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-boot_addr.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/boot_addr") | +| [cluster_base_addr](#cluster_base_addr) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-cluster_base_addr.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cluster_base_addr") | +| [tcdm](#tcdm) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-tcdm.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/tcdm") | +| [addr_width](#addr_width) | `number` | Required | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-addr_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/addr_width") | +| [data_width](#data_width) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-data_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/data_width") | +| [dma_data_width](#dma_data_width) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_data_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_data_width") | +| [id_width_in](#id_width_in) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-id_width_in.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/id_width_in") | +| [dma_id_width_in](#dma_id_width_in) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_id_width_in.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_id_width_in") | +| [hart_base_id](#hart_base_id) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-hart_base_id.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/hart_base_id") | +| [mode](#mode) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-mode.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/mode") | +| [vm](#vm) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-vm.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/vm") | +| [dma_axi_req_fifo_depth](#dma_axi_req_fifo_depth) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_axi_req_fifo_depth.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_axi_req_fifo_depth") | +| [dma_req_fifo_depth](#dma_req_fifo_depth) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_req_fifo_depth.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_req_fifo_depth") | +| [sram_cfg_expose](#sram_cfg_expose) | `boolean` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_expose.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_expose") | +| [sram_cfg_fields](#sram_cfg_fields) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_fields.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields") | +| [timing](#timing) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-timing-and-latency-tuning-parameter.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/timing") | +| [hives](#hives) | `array` | Required | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-hives.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/hives") | ## name @@ -391,6 +393,56 @@ The default value is: 3 ``` +## sram_cfg_expose + +Whether to expose memory cut configuration inputs for implementation + +`sram_cfg_expose` + +* is optional + +* Type: `boolean` + +* cannot be null + +* defined in: [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_expose.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_expose") + +### sram_cfg_expose Type + +`boolean` + +## sram_cfg_fields + +The names and widths of memory cut configuration inputs needed for implementation + +`sram_cfg_fields` + +* is optional + +* Type: `object` ([Details](snitch_cluster-properties-sram_cfg_fields.md)) + +* cannot be null + +* defined in: [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_fields.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields") + +### sram_cfg_fields Type + +`object` ([Details](snitch_cluster-properties-sram_cfg_fields.md)) + +### sram_cfg_fields Constraints + +**minimum number of properties**: the minimum number of properties for this object is: `1` + +### sram_cfg_fields Default Value + +The default value is: + +```json +{ + "reserved": 1 +} +``` + ## timing diff --git a/docs/schema-doc/snitch_cluster-properties-sram_cfg_expose.md b/docs/schema-doc/snitch_cluster-properties-sram_cfg_expose.md new file mode 100644 index 0000000000..6232379758 --- /dev/null +++ b/docs/schema-doc/snitch_cluster-properties-sram_cfg_expose.md @@ -0,0 +1,15 @@ +# Untitled boolean in Snitch Cluster Schema Schema + +```txt +http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_expose +``` + +Whether to expose memory cut configuration inputs for implementation + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :------------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [snitch_cluster.schema.json*](snitch_cluster.schema.json "open original schema") | + +## sram_cfg_expose Type + +`boolean` diff --git a/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-additionalproperties.md b/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-additionalproperties.md new file mode 100644 index 0000000000..d78bb03580 --- /dev/null +++ b/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-additionalproperties.md @@ -0,0 +1,19 @@ +# Untitled number in Snitch Cluster Schema Schema + +```txt +http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields/additionalProperties +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :------------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [snitch_cluster.schema.json*](snitch_cluster.schema.json "open original schema") | + +## additionalProperties Type + +`number` + +## additionalProperties Constraints + +**minimum**: the value of this number must greater than or equal to: `1` diff --git a/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-default.md b/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-default.md new file mode 100644 index 0000000000..d4f8b3df7c --- /dev/null +++ b/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-default.md @@ -0,0 +1,15 @@ +# Untitled undefined type in Snitch Cluster Schema Schema + +```txt +http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields/default +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :------------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [snitch_cluster.schema.json*](snitch_cluster.schema.json "open original schema") | + +## default Type + +unknown diff --git a/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-propertynames.md b/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-propertynames.md new file mode 100644 index 0000000000..2d1cd428be --- /dev/null +++ b/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields-propertynames.md @@ -0,0 +1,25 @@ +# Untitled undefined type in Snitch Cluster Schema Schema + +```txt +http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields/propertyNames +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :------------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [snitch_cluster.schema.json*](snitch_cluster.schema.json "open original schema") | + +## propertyNames Type + +unknown + +## propertyNames Constraints + +**pattern**: the string must match the following regular expression: + +```regexp +^[A-Za-z_][A-Za-z0-9_]*$ +``` + +[try pattern](https://regexr.com/?expression=%5E%5BA-Za-z\_%5D%5BA-Za-z0-9\_%5D\*%24 "try regular expression with regexr.com") diff --git a/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields.md b/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields.md new file mode 100644 index 0000000000..b6b1a53793 --- /dev/null +++ b/docs/schema-doc/snitch_cluster-properties-sram_cfg_fields.md @@ -0,0 +1,57 @@ +# Untitled object in Snitch Cluster Schema Schema + +```txt +http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields +``` + +The names and widths of memory cut configuration inputs needed for implementation + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :------------------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [snitch_cluster.schema.json*](snitch_cluster.schema.json "open original schema") | + +## sram_cfg_fields Type + +`object` ([Details](snitch_cluster-properties-sram_cfg_fields.md)) + +## sram_cfg_fields Constraints + +**minimum number of properties**: the minimum number of properties for this object is: `1` + +## sram_cfg_fields Default Value + +The default value is: + +```json +{ + "reserved": 1 +} +``` + +# undefined Properties + +| Property | Type | Required | Nullable | Defined by | +| :-------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Additional Properties | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_fields-additionalproperties.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields/additionalProperties") | + +## Additional Properties + +Additional properties are allowed, as long as they follow this schema: + + + +* is optional + +* Type: `number` + +* cannot be null + +* defined in: [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_fields-additionalproperties.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields/additionalProperties") + +### additionalProperties Type + +`number` + +### additionalProperties Constraints + +**minimum**: the value of this number must greater than or equal to: `1` diff --git a/docs/schema-doc/snitch_cluster.md b/docs/schema-doc/snitch_cluster.md index 1c2dfe4cf7..5e452bf87f 100644 --- a/docs/schema-doc/snitch_cluster.md +++ b/docs/schema-doc/snitch_cluster.md @@ -16,24 +16,26 @@ Base description of a Snitch cluster and its internal structure and configuratio # Snitch Cluster Schema Properties -| Property | Type | Required | Nullable | Defined by | -| :------------------------------------------------ | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [name](#name) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-name.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/name") | -| [boot_addr](#boot_addr) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-boot_addr.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/boot_addr") | -| [cluster_base_addr](#cluster_base_addr) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-cluster_base_addr.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cluster_base_addr") | -| [tcdm](#tcdm) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-tcdm.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/tcdm") | -| [addr_width](#addr_width) | `number` | Required | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-addr_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/addr_width") | -| [data_width](#data_width) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-data_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/data_width") | -| [dma_data_width](#dma_data_width) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_data_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_data_width") | -| [id_width_in](#id_width_in) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-id_width_in.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/id_width_in") | -| [dma_id_width_in](#dma_id_width_in) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_id_width_in.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_id_width_in") | -| [hart_base_id](#hart_base_id) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-hart_base_id.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/hart_base_id") | -| [mode](#mode) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-mode.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/mode") | -| [vm](#vm) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-vm.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/vm") | -| [dma_axi_req_fifo_depth](#dma_axi_req_fifo_depth) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_axi_req_fifo_depth.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_axi_req_fifo_depth") | -| [dma_req_fifo_depth](#dma_req_fifo_depth) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_req_fifo_depth.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_req_fifo_depth") | -| [timing](#timing) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-timing-and-latency-tuning-parameter.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/timing") | -| [hives](#hives) | `array` | Required | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-hives.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/hives") | +| Property | Type | Required | Nullable | Defined by | +| :------------------------------------------------ | :-------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [name](#name) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-name.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/name") | +| [boot_addr](#boot_addr) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-boot_addr.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/boot_addr") | +| [cluster_base_addr](#cluster_base_addr) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-cluster_base_addr.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cluster_base_addr") | +| [tcdm](#tcdm) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-tcdm.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/tcdm") | +| [addr_width](#addr_width) | `number` | Required | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-addr_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/addr_width") | +| [data_width](#data_width) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-data_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/data_width") | +| [dma_data_width](#dma_data_width) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_data_width.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_data_width") | +| [id_width_in](#id_width_in) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-id_width_in.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/id_width_in") | +| [dma_id_width_in](#dma_id_width_in) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_id_width_in.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_id_width_in") | +| [hart_base_id](#hart_base_id) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-hart_base_id.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/hart_base_id") | +| [mode](#mode) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-mode.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/mode") | +| [vm](#vm) | `string` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-vm.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/vm") | +| [dma_axi_req_fifo_depth](#dma_axi_req_fifo_depth) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_axi_req_fifo_depth.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_axi_req_fifo_depth") | +| [dma_req_fifo_depth](#dma_req_fifo_depth) | `number` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-dma_req_fifo_depth.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/dma_req_fifo_depth") | +| [sram_cfg_expose](#sram_cfg_expose) | `boolean` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_expose.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_expose") | +| [sram_cfg_fields](#sram_cfg_fields) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_fields.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields") | +| [timing](#timing) | `object` | Optional | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-timing-and-latency-tuning-parameter.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/timing") | +| [hives](#hives) | `array` | Required | cannot be null | [Snitch Cluster Schema](snitch_cluster-properties-hives.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/hives") | ## name @@ -391,6 +393,56 @@ The default value is: 3 ``` +## sram_cfg_expose + +Whether to expose memory cut configuration inputs for implementation + +`sram_cfg_expose` + +* is optional + +* Type: `boolean` + +* cannot be null + +* defined in: [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_expose.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_expose") + +### sram_cfg_expose Type + +`boolean` + +## sram_cfg_fields + +The names and widths of memory cut configuration inputs needed for implementation + +`sram_cfg_fields` + +* is optional + +* Type: `object` ([Details](snitch_cluster-properties-sram_cfg_fields.md)) + +* cannot be null + +* defined in: [Snitch Cluster Schema](snitch_cluster-properties-sram_cfg_fields.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/sram_cfg_fields") + +### sram_cfg_fields Type + +`object` ([Details](snitch_cluster-properties-sram_cfg_fields.md)) + +### sram_cfg_fields Constraints + +**minimum number of properties**: the minimum number of properties for this object is: `1` + +### sram_cfg_fields Default Value + +The default value is: + +```json +{ + "reserved": 1 +} +``` + ## timing diff --git a/docs/schema-doc/snitch_cluster.schema.json b/docs/schema-doc/snitch_cluster.schema.json index 064f95970b..0dbd4aa8bd 100644 --- a/docs/schema-doc/snitch_cluster.schema.json +++ b/docs/schema-doc/snitch_cluster.schema.json @@ -1 +1 @@ -{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://pulp-platform.org/snitch/snitch_cluster.schema.json","title":"Snitch Cluster Schema","description":"Base description of a Snitch cluster and its internal structure and configuration.","type":"object","required":["addr_width","hives"],"properties":{"name":{"type":"string","description":"Optional name for the generated wrapper.","default":"snitch_cluster"},"boot_addr":{"type":"number","description":"Address from which all harts of the cluster start to boot. The default setting is `0x8000_0000`.","default":2147483648},"cluster_base_addr":{"type":"number","description":"Base address of this cluster.","default":0},"tcdm":{"type":"object","description":"Configuration of the Tightly Coupled Data Memory of this cluster.","default":{"size":128,"banks":32},"properties":{"size":{"type":"number","description":"Size of TCDM in KiByte. Divided in `n` banks. The total size must be divisible by the number of banks.","examples":[128,64]},"banks":{"type":"number","description":"Number of banks.","examples":[16,32]}}},"addr_width":{"type":"number","description":"Length of the address, should be greater than 30. If the address is larger than 34 the data bus needs to be 64 bits in size.","default":48},"data_width":{"type":"number","description":"Data bus size of the integer core (everything except the DMA), must be 32 or 64. A double precision FPU requires 64 bit data length.","default":64},"dma_data_width":{"type":"number","description":"Data bus size of DMA. Usually this is larger than the integer core as the DMA is used to efficiently transfer bulk of data.","default":512},"id_width_in":{"type":"number","description":"Id width of the narrower AXI plug into the cluster.","default":2},"dma_id_width_in":{"type":"number","description":"Id width of the wide AXI plug into the cluster.","default":2},"hart_base_id":{"type":"number","description":"Base hart id of the cluster. All cores get the respective cluster id plus their cluster position as the final `hart_id`.","default":0},"mode":{"type":"string","description":"Supported mode by the processor, can be msu.","$comment":"Currently ignored."},"vm":{"type":"string","description":"Supported virtual memory mode, can be XSv32.","enum":["Sv32","XSv48"],"default":"XSv48","$comment":"Currently ignored."},"dma_axi_req_fifo_depth":{"type":"number","description":"Number of AXI FIFO entries of the DMA engine.","default":3},"dma_req_fifo_depth":{"type":"number","description":"Number of request entries the DMA can keep","default":3},"timing":{"type":"object","title":"Timing and Latency Tuning Parameter","properties":{"iso_crossings":{"type":"boolean","description":"Enable isochronous crossings, this clocks the integer core at half the speed of the rest of the system.","default":false},"narrow_xbar_latency":{"type":"string","description":"Latency mode of the cluster crossbar.","enum":["NO_LATENCY","CUT_SLV_AX","CUT_MST_AX","CUT_ALL_AX","CUT_SLV_PORTS","CUT_MST_PORTS","CUT_ALL_PORTS"],"default":"CUT_ALL_PORTS"},"wide_xbar_latency":{"type":"string","description":"Latency mode of the DMA crossbar.","enum":["NO_LATENCY","CUT_SLV_AX","CUT_MST_AX","CUT_ALL_AX","CUT_SLV_PORTS","CUT_MST_PORTS","CUT_ALL_PORTS"],"default":"CUT_ALL_PORTS"},"register_offload_req":{"type":"boolean","description":"Insert Pipeline registers into off-loading path (request).","default":false},"register_offload_rsp":{"type":"boolean","description":"Insert Pipeline registers into off-loading path (response).","default":false},"register_core_req":{"type":"boolean","description":"Insert Pipeline registers into data memory request path.","default":false},"register_core_rsp":{"type":"boolean","description":"Insert Pipeline registers into data memory response path.","default":false},"register_fpu_req":{"type":"boolean","description":"Insert Pipeline register into the FPU request data path","default":false},"register_tcdm_cuts":{"type":"boolean","description":"Insert Pipeline registers after each memory cut.","default":false},"register_ext_wide":{"type":"boolean","description":"Decouple wide external AXI plug.","default":false},"register_ext_narrow":{"type":"boolean","description":"Decouple narrow external AXI plug.","default":false},"register_sequencer":{"type":"boolean","description":"Insert Pipeline registers after sequencer.","default":false},"lat_comp_fp32":{"type":"number","description":"Latency setting (number of pipeline stages) for FP32.","default":3},"lat_comp_fp64":{"type":"number","description":"Latency setting (number of pipeline stages) for FP64.","default":3},"lat_comp_fp16":{"type":"number","description":"Latency setting (number of pipeline stages) for FP16.","default":1},"lat_comp_fp16_alt":{"type":"number","description":"Latency setting (number of pipeline stages) for FP16alt (brainfloat).","default":2},"lat_comp_fp8":{"type":"number","description":"Latency setting (number of pipeline stages) for FP8.","default":1},"lat_comp_fp8alt":{"type":"number","description":"Latency setting (number of pipeline stages) for FP8alt.","default":1},"lat_noncomp":{"type":"number","description":"Latency setting (number of pipeline stages) for floating-point non-computational instructions (except conversions), i.e., `classify`, etc.","default":1},"lat_conv":{"type":"number","description":"Latency setting (number of pipeline stages) for floating-point conversion instructions.","default":1},"lat_sdotp":{"type":"number","description":"Latency setting (number of pipeline stages) for floating-point expanding dot product with accumulation.","default":2},"fpu_pipe_config":{"type":"string","description":"Pipeline configuration (i.e., position of the registers) of the FPU.","enum":["BEFORE","AFTER","INSIDE","DISTRIBUTED"],"default":"BEFORE"}}},"hives":{"type":"array","title":"Hives","description":"Cores in a hive share an instruction cache and other shared infrastructure such as the PTW or the multiply/divide unit.","minItems":1,"items":{"type":"object","title":"Hive Description","description":"Configuration of a Hive","properties":{"icache":{"type":"object","title":"Hive's instruction cache configuration.","description":"Detailed configuration of the current Hive's instruction cache.","default":{"size":8,"sets":2,"cacheline":128},"properties":{"size":{"type":"number","description":"Total instruction cache size in KiByte."},"sets":{"type":"number","description":"Number of ways."},"cacheline":{"type":"number","description":"Cacheline/Word size in bits."}}},"cores":{"type":"array","title":"Cores","description":"List of all cores in the respective hive.","minItems":1,"items":{"type":"object","title":"Core Description","description":"Description of a single core.","properties":{"isa":{"type":"string","title":"ISA String containing RISC-V standard extensions.","description":"ISA string as defined by the RISC-V standard. Only contain the standardized ISA extensions.","examples":["rv32imafd"],"default":"rv32imafd"},"Xdiv_sqrt":{"type":"boolean","description":"Enable hardware support for floating-point division and square-root. The iterative floating-point unit is known to produce some rounding inaccuracies so it is disabled by default.","default":false},"xssr":{"type":"boolean","title":"Enable Xssr Extension","description":"Stream Semantic Registers (Xssr) custom extension.","default":true},"xfrep":{"type":"boolean","title":"Enable Xfrep Extension","description":"Floating-point repetition buffer (Xfrep) custom extension.","default":true},"xdma":{"type":"boolean","title":"Xdma Extension","description":"Direct memory access (Xdma) custom extension.","default":false},"xf8":{"type":"boolean","title":"Xf8 8-bit Float Extension","description":"Enable Smallfloat Xf8 extension (IEEE 8-bit float).","default":false},"xf8alt":{"type":"boolean","title":"Xf8 8-bit Float Extension","description":"Enable Smallfloat Xf8alt extension.","default":false},"xf16":{"type":"boolean","title":"Xf16 16-bit Float Extension","description":"Enable Smallfloat Xf16 extension (IEEE 16-bit float).","default":false},"xf16alt":{"type":"boolean","title":"Xf16alt 16-bit Brain-Float Extension","description":"Enable Smallfloat Xf16alt extension, also known as brain-float.","default":false},"xfdotp":{"type":"boolean","title":"Xfdotp Extension","description":"Enable DOTP extensions.","default":false},"xfvec":{"type":"boolean","title":"Xfvec Extension","description":"Enable Smallfloat vector extension (SIMD).","default":false},"num_int_outstanding_loads":{"type":"number","description":"Number of outstanding integer loads. Determines the buffer size in the core's load/store unit.","default":1},"num_int_outstanding_mem":{"type":"number","description":"Number of outstanding memory operations. Determines the buffer size in the core's load/store unit.","default":1},"num_fp_outstanding_loads":{"type":"number","description":"Number of outstanding floating-point loads. Determines the buffer size in the FPU's load/store unit.","default":4},"num_fp_outstanding_mem":{"type":"number","description":"Number of outstanding memory operations. Determines the buffer size in the core's load/store unit.","default":1},"num_sequencer_instructions":{"type":"number","description":"Amount of floating-point instruction the floating-point sequence buffer can hold.","default":16},"num_itlb_entries":{"type":"number","description":"Number of ITLB entries. Determines the core's size.","default":1},"num_dtlb_entries":{"type":"number","description":"Number of DTLB entries. Determines the core's size.","default":2},"ssr_intersection":{"type":"boolean","title":"SSR Intersection Feature","description":"Enable intersection between 3 SSRs for sparse-sparse processing.","default":false},"ssr_intersection_triple":{"type":"array","title":"SSR Intersection Triple","description":"Indices of the SSRs forming an SSR intersection triple.","maxItems":3,"minItems":3,"default":[0,1,2],"items":{"type":"number"}},"ssr_mux_resp_depth":{"type":"number","description":"Depth of response buffer in the TCDM multiplexer arbitrating between core and SSR 0.","default":4},"ssrs":{"type":"array","title":"SSRs","description":"List of all SSRs in the respective core.","minItems":0,"default":[{},{},{}],"items":{"type":"object","title":"SSR Description","description":"Description of a single Stream Semantic Register.","properties":{"reg_idx":{"type":["number","null"],"description":"The floating-point register index this SSR is assigned to. If not assigned, the next available index counting from 0 is chosen.","minimum":0,"maximum":31,"default":null},"indirection":{"type":"boolean","description":"Enable indirection extension.","default":false},"indir_out_spill":{"type":"boolean","description":"Whether to cut timing paths with a spill register at the address generator output; added only if indirection extension enabled.","default":true},"isect_slave_spill":{"type":"boolean","description":"Whether to cut timing paths with a spill register at the intersector index output; added only if this SSR is an intersection slave.","default":true},"isect_slave_credits":{"type":"number","description":"Number of elements by which intersected indices may outrun corresponding data; added only if this SSR is an intersection slave.","minimum":2,"default":8},"num_loops":{"type":"number","description":"Number of nested hardware loops in address generator.","minimum":1,"maximum":4,"default":4},"index_credits":{"type":"number","description":"Number of credits and buffer depth of the index word FIFO.","minimum":1,"default":3},"data_credits":{"type":"number","description":"Number of credits and buffer depth of the data word FIFO.","minimum":1,"default":4},"mux_resp_depth":{"type":"number","description":"Depth of response buffer in the TCDM multiplexer arbitrating between data and indices.","minimum":1,"default":3},"index_width":{"type":"number","description":"Internal bitwidth of indices in address generator.","minimum":1,"maximum":32,"default":16},"pointer_width":{"type":"number","description":"Internal bitwidth of pointers in address generator; must be larger than the TCDM word address mask.","maximum":32,"default":18},"shift_width":{"type":"number","description":"Internal bitwidth of additional left shift amount for indirect indices.","minimum":1,"maximum":32,"default":3},"rpt_width":{"type":"number","description":"Internal bitwidth of repetition counter for read streams.","minimum":1,"maximum":32,"default":4}}}}}}}}}}}} +{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://pulp-platform.org/snitch/snitch_cluster.schema.json","title":"Snitch Cluster Schema","description":"Base description of a Snitch cluster and its internal structure and configuration.","type":"object","required":["addr_width","hives"],"properties":{"name":{"type":"string","description":"Optional name for the generated wrapper.","default":"snitch_cluster"},"boot_addr":{"type":"number","description":"Address from which all harts of the cluster start to boot. The default setting is `0x8000_0000`.","default":2147483648},"cluster_base_addr":{"type":"number","description":"Base address of this cluster.","default":0},"tcdm":{"type":"object","description":"Configuration of the Tightly Coupled Data Memory of this cluster.","default":{"size":128,"banks":32},"properties":{"size":{"type":"number","description":"Size of TCDM in KiByte. Divided in `n` banks. The total size must be divisible by the number of banks.","examples":[128,64]},"banks":{"type":"number","description":"Number of banks.","examples":[16,32]}}},"addr_width":{"type":"number","description":"Length of the address, should be greater than 30. If the address is larger than 34 the data bus needs to be 64 bits in size.","default":48},"data_width":{"type":"number","description":"Data bus size of the integer core (everything except the DMA), must be 32 or 64. A double precision FPU requires 64 bit data length.","default":64},"dma_data_width":{"type":"number","description":"Data bus size of DMA. Usually this is larger than the integer core as the DMA is used to efficiently transfer bulk of data.","default":512},"id_width_in":{"type":"number","description":"Id width of the narrower AXI plug into the cluster.","default":2},"dma_id_width_in":{"type":"number","description":"Id width of the wide AXI plug into the cluster.","default":2},"hart_base_id":{"type":"number","description":"Base hart id of the cluster. All cores get the respective cluster id plus their cluster position as the final `hart_id`.","default":0},"mode":{"type":"string","description":"Supported mode by the processor, can be msu.","$comment":"Currently ignored."},"vm":{"type":"string","description":"Supported virtual memory mode, can be XSv32.","enum":["Sv32","XSv48"],"default":"XSv48","$comment":"Currently ignored."},"dma_axi_req_fifo_depth":{"type":"number","description":"Number of AXI FIFO entries of the DMA engine.","default":3},"dma_req_fifo_depth":{"type":"number","description":"Number of request entries the DMA can keep","default":3},"sram_cfg_expose":{"type":"boolean","description":"Whether to expose memory cut configuration inputs for implementation","default":false},"sram_cfg_fields":{"type":"object","description":"The names and widths of memory cut configuration inputs needed for implementation","default":{"reserved":1},"minProperties":1,"propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{"type":"number","minimum":1}},"timing":{"type":"object","title":"Timing and Latency Tuning Parameter","properties":{"iso_crossings":{"type":"boolean","description":"Enable isochronous crossings, this clocks the integer core at half the speed of the rest of the system.","default":false},"narrow_xbar_latency":{"type":"string","description":"Latency mode of the cluster crossbar.","enum":["NO_LATENCY","CUT_SLV_AX","CUT_MST_AX","CUT_ALL_AX","CUT_SLV_PORTS","CUT_MST_PORTS","CUT_ALL_PORTS"],"default":"CUT_ALL_PORTS"},"wide_xbar_latency":{"type":"string","description":"Latency mode of the DMA crossbar.","enum":["NO_LATENCY","CUT_SLV_AX","CUT_MST_AX","CUT_ALL_AX","CUT_SLV_PORTS","CUT_MST_PORTS","CUT_ALL_PORTS"],"default":"CUT_ALL_PORTS"},"register_offload_req":{"type":"boolean","description":"Insert Pipeline registers into off-loading path (request).","default":false},"register_offload_rsp":{"type":"boolean","description":"Insert Pipeline registers into off-loading path (response).","default":false},"register_core_req":{"type":"boolean","description":"Insert Pipeline registers into data memory request path.","default":false},"register_core_rsp":{"type":"boolean","description":"Insert Pipeline registers into data memory response path.","default":false},"register_fpu_req":{"type":"boolean","description":"Insert Pipeline register into the FPU request data path","default":false},"register_tcdm_cuts":{"type":"boolean","description":"Insert Pipeline registers after each memory cut.","default":false},"register_ext_wide":{"type":"boolean","description":"Decouple wide external AXI plug.","default":false},"register_ext_narrow":{"type":"boolean","description":"Decouple narrow external AXI plug.","default":false},"register_sequencer":{"type":"boolean","description":"Insert Pipeline registers after sequencer.","default":false},"lat_comp_fp32":{"type":"number","description":"Latency setting (number of pipeline stages) for FP32.","default":3},"lat_comp_fp64":{"type":"number","description":"Latency setting (number of pipeline stages) for FP64.","default":3},"lat_comp_fp16":{"type":"number","description":"Latency setting (number of pipeline stages) for FP16.","default":1},"lat_comp_fp16_alt":{"type":"number","description":"Latency setting (number of pipeline stages) for FP16alt (brainfloat).","default":2},"lat_comp_fp8":{"type":"number","description":"Latency setting (number of pipeline stages) for FP8.","default":1},"lat_comp_fp8alt":{"type":"number","description":"Latency setting (number of pipeline stages) for FP8alt.","default":1},"lat_noncomp":{"type":"number","description":"Latency setting (number of pipeline stages) for floating-point non-computational instructions (except conversions), i.e., `classify`, etc.","default":1},"lat_conv":{"type":"number","description":"Latency setting (number of pipeline stages) for floating-point conversion instructions.","default":1},"lat_sdotp":{"type":"number","description":"Latency setting (number of pipeline stages) for floating-point expanding dot product with accumulation.","default":2},"fpu_pipe_config":{"type":"string","description":"Pipeline configuration (i.e., position of the registers) of the FPU.","enum":["BEFORE","AFTER","INSIDE","DISTRIBUTED"],"default":"BEFORE"}}},"hives":{"type":"array","title":"Hives","description":"Cores in a hive share an instruction cache and other shared infrastructure such as the PTW or the multiply/divide unit.","minItems":1,"items":{"type":"object","title":"Hive Description","description":"Configuration of a Hive","properties":{"icache":{"type":"object","title":"Hive's instruction cache configuration.","description":"Detailed configuration of the current Hive's instruction cache.","default":{"size":8,"sets":2,"cacheline":128},"properties":{"size":{"type":"number","description":"Total instruction cache size in KiByte."},"sets":{"type":"number","description":"Number of ways."},"cacheline":{"type":"number","description":"Cacheline/Word size in bits."}}},"cores":{"type":"array","title":"Cores","description":"List of all cores in the respective hive.","minItems":1,"items":{"type":"object","title":"Core Description","description":"Description of a single core.","properties":{"isa":{"type":"string","title":"ISA String containing RISC-V standard extensions.","description":"ISA string as defined by the RISC-V standard. Only contain the standardized ISA extensions.","examples":["rv32imafd"],"default":"rv32imafd"},"Xdiv_sqrt":{"type":"boolean","description":"Enable hardware support for floating-point division and square-root. The iterative floating-point unit is known to produce some rounding inaccuracies so it is disabled by default.","default":false},"xssr":{"type":"boolean","title":"Enable Xssr Extension","description":"Stream Semantic Registers (Xssr) custom extension.","default":true},"xfrep":{"type":"boolean","title":"Enable Xfrep Extension","description":"Floating-point repetition buffer (Xfrep) custom extension.","default":true},"xdma":{"type":"boolean","title":"Xdma Extension","description":"Direct memory access (Xdma) custom extension.","default":false},"xf8":{"type":"boolean","title":"Xf8 8-bit Float Extension","description":"Enable Smallfloat Xf8 extension (IEEE 8-bit float).","default":false},"xf8alt":{"type":"boolean","title":"Xf8 8-bit Float Extension","description":"Enable Smallfloat Xf8alt extension.","default":false},"xf16":{"type":"boolean","title":"Xf16 16-bit Float Extension","description":"Enable Smallfloat Xf16 extension (IEEE 16-bit float).","default":false},"xf16alt":{"type":"boolean","title":"Xf16alt 16-bit Brain-Float Extension","description":"Enable Smallfloat Xf16alt extension, also known as brain-float.","default":false},"xfdotp":{"type":"boolean","title":"Xfdotp Extension","description":"Enable DOTP extensions.","default":false},"xfvec":{"type":"boolean","title":"Xfvec Extension","description":"Enable Smallfloat vector extension (SIMD).","default":false},"num_int_outstanding_loads":{"type":"number","description":"Number of outstanding integer loads. Determines the buffer size in the core's load/store unit.","default":1},"num_int_outstanding_mem":{"type":"number","description":"Number of outstanding memory operations. Determines the buffer size in the core's load/store unit.","default":1},"num_fp_outstanding_loads":{"type":"number","description":"Number of outstanding floating-point loads. Determines the buffer size in the FPU's load/store unit.","default":4},"num_fp_outstanding_mem":{"type":"number","description":"Number of outstanding memory operations. Determines the buffer size in the core's load/store unit.","default":1},"num_sequencer_instructions":{"type":"number","description":"Amount of floating-point instruction the floating-point sequence buffer can hold.","default":16},"num_itlb_entries":{"type":"number","description":"Number of ITLB entries. Determines the core's size.","default":1},"num_dtlb_entries":{"type":"number","description":"Number of DTLB entries. Determines the core's size.","default":2},"ssr_intersection":{"type":"boolean","title":"SSR Intersection Feature","description":"Enable intersection between 3 SSRs for sparse-sparse processing.","default":false},"ssr_intersection_triple":{"type":"array","title":"SSR Intersection Triple","description":"Indices of the SSRs forming an SSR intersection triple.","maxItems":3,"minItems":3,"default":[0,1,2],"items":{"type":"number"}},"ssr_mux_resp_depth":{"type":"number","description":"Depth of response buffer in the TCDM multiplexer arbitrating between core and SSR 0.","default":4},"ssrs":{"type":"array","title":"SSRs","description":"List of all SSRs in the respective core.","minItems":0,"default":[{},{},{}],"items":{"type":"object","title":"SSR Description","description":"Description of a single Stream Semantic Register.","properties":{"reg_idx":{"type":["number","null"],"description":"The floating-point register index this SSR is assigned to. If not assigned, the next available index counting from 0 is chosen.","minimum":0,"maximum":31,"default":null},"indirection":{"type":"boolean","description":"Enable indirection extension.","default":false},"indir_out_spill":{"type":"boolean","description":"Whether to cut timing paths with a spill register at the address generator output; added only if indirection extension enabled.","default":true},"isect_slave_spill":{"type":"boolean","description":"Whether to cut timing paths with a spill register at the intersector index output; added only if this SSR is an intersection slave.","default":true},"isect_slave_credits":{"type":"number","description":"Number of elements by which intersected indices may outrun corresponding data; added only if this SSR is an intersection slave.","minimum":2,"default":8},"num_loops":{"type":"number","description":"Number of nested hardware loops in address generator.","minimum":1,"maximum":4,"default":4},"index_credits":{"type":"number","description":"Number of credits and buffer depth of the index word FIFO.","minimum":1,"default":3},"data_credits":{"type":"number","description":"Number of credits and buffer depth of the data word FIFO.","minimum":1,"default":4},"mux_resp_depth":{"type":"number","description":"Depth of response buffer in the TCDM multiplexer arbitrating between data and indices.","minimum":1,"default":3},"index_width":{"type":"number","description":"Internal bitwidth of indices in address generator.","minimum":1,"maximum":32,"default":16},"pointer_width":{"type":"number","description":"Internal bitwidth of pointers in address generator; must be larger than the TCDM word address mask.","maximum":32,"default":18},"shift_width":{"type":"number","description":"Internal bitwidth of additional left shift amount for indirect indices.","minimum":1,"maximum":32,"default":3},"rpt_width":{"type":"number","description":"Internal bitwidth of repetition counter for read streams.","minimum":1,"maximum":32,"default":4}}}}}}}}}}}} diff --git a/docs/schema/snitch_cluster.schema.json b/docs/schema/snitch_cluster.schema.json index a678e49c38..3828bc93f4 100644 --- a/docs/schema/snitch_cluster.schema.json +++ b/docs/schema/snitch_cluster.schema.json @@ -105,6 +105,19 @@ "description": "Number of request entries the DMA can keep", "default": 3 }, + "sram_cfg_expose": { + "type": "boolean", + "description": "Whether to expose memory cut configuration inputs for implementation", + "default": false + }, + "sram_cfg_fields": { + "type": "object", + "description": "The names and widths of memory cut configuration inputs needed for implementation", + "default": {"reserved" : 1}, + "minProperties": 1, + "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" }, + "additionalProperties": { "type": "number", "minimum": 1 } + }, "timing": { "type": "object", "title": "Timing and Latency Tuning Parameter", diff --git a/hw/snitch_cluster/src/snitch_cluster.sv b/hw/snitch_cluster/src/snitch_cluster.sv index d716b719de..c4f49bec80 100644 --- a/hw/snitch_cluster/src/snitch_cluster.sv +++ b/hw/snitch_cluster/src/snitch_cluster.sv @@ -155,6 +155,9 @@ module snitch_cluster parameter type wide_out_resp_t = logic, parameter type wide_in_req_t = logic, parameter type wide_in_resp_t = logic, + // Memory configuration input types; these vary depending on implementation. + parameter type sram_cfg_t = logic, + parameter type sram_cfgs_t = logic, // Memory latency parameter. Most of the memories have a read latency of 1. In // case you have memory macros which are pipelined you want to adjust this // value here. This only applies to the TCDM. The instruction cache macros will break! @@ -188,6 +191,9 @@ module snitch_cluster /// Base address of cluster. TCDM and cluster peripheral location are derived from /// it. This signal is pseudo-static. input logic [PhysicalAddrWidth-1:0] cluster_base_addr_i, + /// Configuration inputs for the memory cuts used in implementation. + /// These signals are pseudo-static. + input sram_cfgs_t sram_cfgs_i, /// Bypass half-frequency clock. (`d2` = divide-by-two). This signal is /// pseudo-static. input logic clk_d2_bypass_i, @@ -634,10 +640,13 @@ module snitch_cluster .DataWidth (NarrowDataWidth), .ByteWidth (8), .NumPorts (1), - .Latency (1) + .Latency (1), + .impl_in_t (sram_cfg_t) ) i_data_mem ( .clk_i, .rst_ni, + .impl_i (sram_cfgs_i.tcdm), + .impl_o ( ), .req_i (mem_cs), .we_i (mem_wen), .addr_i (mem_add), @@ -866,6 +875,8 @@ module snitch_cluster .ICacheLineCount (ICacheLineCount[i]), .ICacheSets (ICacheSets[i]), .IsoCrossing (IsoCrossing), + .sram_cfg_t (sram_cfg_t), + .sram_cfgs_t (sram_cfgs_t), .axi_req_t (axi_mst_dma_req_t), .axi_rsp_t (axi_mst_dma_resp_t) ) i_snitch_hive ( @@ -879,7 +890,8 @@ module snitch_cluster .axi_req_o (wide_axi_mst_req[ICache+i]), .axi_rsp_i (wide_axi_mst_rsp[ICache+i]), .icache_prefetch_enable_i (icache_prefetch_enable), - .icache_events_o(icache_events_reshape) + .icache_events_o(icache_events_reshape), + .sram_cfgs_i ); end diff --git a/hw/snitch_cluster/src/snitch_cluster_wrapper.sv.tpl b/hw/snitch_cluster/src/snitch_cluster_wrapper.sv.tpl index aa5bd34cd4..5017e04a1b 100644 --- a/hw/snitch_cluster/src/snitch_cluster_wrapper.sv.tpl +++ b/hw/snitch_cluster/src/snitch_cluster_wrapper.sv.tpl @@ -69,6 +69,18 @@ package ${cfg['pkg_name']}; localparam int unsigned Hive [NrCores] = '{${core_cfg('hive')}}; + typedef struct packed { +% for field, width in cfg['sram_cfg_fields'].items(): + logic [${width-1}:0] ${field}; +% endfor + } sram_cfg_t; + + typedef struct packed { + sram_cfg_t icache_tag; + sram_cfg_t icache_data; + sram_cfg_t tcdm; + } sram_cfgs_t; + typedef logic [AddrWidth-1:0] addr_t; typedef logic [NarrowDataWidth-1:0] data_t; typedef logic [NarrowDataWidth/8-1:0] strb_t; @@ -156,6 +168,9 @@ module ${cfg['name']}_wrapper ( input logic [${cfg['addr_width']-1}:0] cluster_base_addr_i, input logic clk_d2_bypass_i, % endif +% if cfg['sram_cfg_expose']: + input ${cfg['pkg_name']}::sram_cfgs_t sram_cfgs_i, +%endif input ${cfg['pkg_name']}::narrow_in_req_t narrow_in_req_i, output ${cfg['pkg_name']}::narrow_in_resp_t narrow_in_resp_o, output ${cfg['pkg_name']}::narrow_out_req_t narrow_out_req_o, @@ -243,7 +258,9 @@ module ${cfg['name']}_wrapper ( .RegisterSequencer (${int(cfg['timing']['register_sequencer'])}), .IsoCrossing (${int(cfg['timing']['iso_crossings'])}), .NarrowXbarLatency (axi_pkg::${cfg['timing']['narrow_xbar_latency']}), - .WideXbarLatency (axi_pkg::${cfg['timing']['wide_xbar_latency']}) + .WideXbarLatency (axi_pkg::${cfg['timing']['wide_xbar_latency']}), + .sram_cfg_t (${cfg['pkg_name']}::sram_cfg_t), + .sram_cfgs_t (${cfg['pkg_name']}::sram_cfgs_t) ) i_cluster ( .clk_i, .rst_ni, @@ -260,6 +277,11 @@ module ${cfg['name']}_wrapper ( .cluster_base_addr_i, .clk_d2_bypass_i, % endif +% if cfg['sram_cfg_expose']: + .sram_cfgs_i (sram_cfgs_i), +% else: + .sram_cfgs_i (${cfg['pkg_name']}::sram_cfgs_t'('0)), +%endif .narrow_in_req_i, .narrow_in_resp_o, .narrow_out_req_o, diff --git a/hw/snitch_cluster/src/snitch_hive.sv b/hw/snitch_cluster/src/snitch_hive.sv index df677ad0ef..5e8fecc98f 100644 --- a/hw/snitch_cluster/src/snitch_hive.sv +++ b/hw/snitch_cluster/src/snitch_hive.sv @@ -28,6 +28,9 @@ module snitch_hive #( parameter type axi_rsp_t = logic, parameter type hive_req_t = logic, parameter type hive_rsp_t = logic, + /// Configuration input types for memory cuts used in implementation. + parameter type sram_cfg_t = logic, + parameter type sram_cfgs_t = logic, /// Derived parameter *Do not override* parameter type addr_t = logic [AddrWidth-1:0], parameter type data_t = logic [NarrowDataWidth-1:0] @@ -46,6 +49,8 @@ module snitch_hive #( input logic icache_prefetch_enable_i, + input sram_cfgs_t sram_cfgs_i, + output snitch_icache_pkg::icache_events_t [CoreCount-1:0] icache_events_o ); // Extend the ID to route back results to the appropriate core. @@ -88,6 +93,8 @@ module snitch_hive #( .EARLY_LATCH ( 0 ), .L0_EARLY_TAG_WIDTH ( snitch_pkg::PAGE_SHIFT - $clog2(ICacheLineWidth/8) ), .ISO_CROSSING ( IsoCrossing ), + .sram_cfg_tag_t ( sram_cfg_t ), + .sram_cfg_data_t ( sram_cfg_t ), .axi_req_t ( axi_req_t ), .axi_rsp_t ( axi_rsp_t ) ) i_snitch_icache ( @@ -106,6 +113,9 @@ module snitch_hive #( .inst_ready_o ( inst_ready ), .inst_error_o ( inst_error ), + .sram_cfg_tag_i ( sram_cfgs_i.icache_tag ), + .sram_cfg_data_i ( sram_cfgs_i.icache_data ), + .axi_req_o (axi_req_o), .axi_rsp_i (axi_rsp_i) ); diff --git a/hw/snitch_icache/src/snitch_icache.sv b/hw/snitch_icache/src/snitch_icache.sv index 83a1f68003..36b9eedf23 100644 --- a/hw/snitch_icache/src/snitch_icache.sv +++ b/hw/snitch_icache/src/snitch_icache.sv @@ -40,6 +40,10 @@ module snitch_icache #( parameter int L0_EARLY_TAG_WIDTH = -1, /// Operate L0 cache in slower clock-domain parameter bit ISO_CROSSING = 1, + /// Configuration input types for memory cuts used in implementation. + parameter type sram_cfg_data_t = logic, + parameter type sram_cfg_tag_t = logic, + parameter type axi_req_t = logic, parameter type axi_rsp_t = logic ) ( @@ -59,6 +63,10 @@ module snitch_icache #( input logic [NR_FETCH_PORTS-1:0] inst_valid_i, output logic [NR_FETCH_PORTS-1:0] inst_ready_o, output logic [NR_FETCH_PORTS-1:0] inst_error_o, + + input sram_cfg_data_t sram_cfg_data_i, + input sram_cfg_tag_t sram_cfg_tag_i, + output axi_req_t axi_req_o, input axi_rsp_t axi_rsp_i ); @@ -400,7 +408,11 @@ module snitch_icache #( assign flush_ready = flush_ready_lookup; end - snitch_icache_lookup #(CFG) i_lookup ( + snitch_icache_lookup #( + .CFG (CFG), + .sram_cfg_tag_t (sram_cfg_tag_t), + .sram_cfg_data_t (sram_cfg_data_t) + ) i_lookup ( .clk_i, .rst_ni, @@ -427,7 +439,10 @@ module snitch_icache #( .write_tag_i ( write_tag ), .write_error_i ( write_error ), .write_valid_i ( write_valid ), - .write_ready_o ( write_ready ) + .write_ready_o ( write_ready ), + + .sram_cfg_tag_i, + .sram_cfg_data_i ); // The miss handler module deals with the result of the lookup. It also diff --git a/hw/snitch_icache/src/snitch_icache_lookup.sv b/hw/snitch_icache/src/snitch_icache_lookup.sv index e0b410e307..abd3858255 100644 --- a/hw/snitch_icache/src/snitch_icache_lookup.sv +++ b/hw/snitch_icache/src/snitch_icache_lookup.sv @@ -6,7 +6,10 @@ /// An actual cache lookup. module snitch_icache_lookup #( - parameter snitch_icache_pkg::config_t CFG = '0 + parameter snitch_icache_pkg::config_t CFG = '0, + /// Configuration input types for SRAMs used in implementation. + parameter type sram_cfg_data_t = logic, + parameter type sram_cfg_tag_t = logic )( input logic clk_i, input logic rst_ni, @@ -34,7 +37,10 @@ module snitch_icache_lookup #( input logic [CFG.TAG_WIDTH-1:0] write_tag_i, input logic write_error_i, input logic write_valid_i, - output logic write_ready_o + output logic write_ready_o, + + input sram_cfg_data_t sram_cfg_data_i, + input sram_cfg_tag_t sram_cfg_tag_i ); `ifndef SYNTHESIS @@ -144,10 +150,13 @@ module snitch_icache_lookup #( .DataWidth (CFG.TAG_WIDTH+2), .ByteWidth (8), .NumPorts (1), - .Latency (1) + .Latency (1), + .impl_in_t (sram_cfg_tag_t) ) i_tag ( .clk_i (clk_i), .rst_ni (rst_ni), + .impl_i (sram_cfg_tag_i), + .impl_o ( ), .req_i (ram_enable[i]), .we_i (ram_write), .addr_i (ram_addr), @@ -161,10 +170,13 @@ module snitch_icache_lookup #( .DataWidth (CFG.LINE_WIDTH), .ByteWidth (8), .NumPorts (1), - .Latency (1) + .Latency (1), + .impl_in_t (sram_cfg_data_t) ) i_data ( .clk_i (clk_i), .rst_ni (rst_ni), + .impl_i (sram_cfg_data_i), + .impl_o ( ), .req_i (ram_enable[i]), .we_i (ram_write), .addr_i (ram_addr),