Skip to content

Commit

Permalink
Snitch cluster testbench bring-up (#14)
Browse files Browse the repository at this point in the history
* mem_interface: Add typedef and documentation

* tcdm_interface: Add doc and include

* snitch_cfg: Re-factor tunable parameters

All tunable parameters are now in a single package which should make it
easier to generate a parameterized derivative of a Snitch cluster.

Update pulp_platform_register_interface to 500f0b1

Update code from upstream repository https://github.com/pulp-
platform/register_interface.git to revision
500f0b10c7f9910606b7259d290219a35f435d2e

* Add `reggen` tool (#5) (bluew)
* src/axi_to_reg.sv: Fix parameter exposure (#8) (Flavien Solt)
* axi_to_reg: Expose max transactions parameters (#7) (Flavien Solt)

Signed-off-by: Florian Zaruba <[email protected]>

editorconfig: Set Python indentation to four

This is the recommended `pep8` indentation.

doc: Add schema and documentation

clustergen: Add generated config file

A first step towards more advanced parameterization is a script which
digests JSON (adhering to a schema) and outputs a parameterized `cfg`
package.

regtool: Symlink regtool from `register_interface`

docs: Symlink ip documentation

snitch_cluster: Remove hard-coded TCDM base addr

Originally each cluster would alias its local TCDM through a dedicated
address region. This has led to strange address maps with hidden memory
region (the alias as seen by another cluster). This commit resolves this
by adding a `cluster_base_addr_i` port which positions the cluster
address map in the global memory region. No more "hidden" memory regions
:tada:.

doc: Update documentation w/ cluster addr map

Update pulp_platform_register_interface to 03a24c6

Update code from upstream repository https://github.com/pulp-
platform/register_interface.git to revision
03a24c618888ecaad1c0b2409fdf99c38edbfe41

* Release v0.2.0 (Florian Zaruba)
* Add missing LICENSE file (Florian Zaruba)
* ci: Add basic workflow (Florian Zaruba)
* Fix minor style lint issues (Florian Zaruba)
* CHANGELOG: Mention `reggen` tool (Florian Zaruba)
* reg_intf_pkg: Remove in favor of typedef.svh (Florian Zaruba)
* reggen: Add common cells assertion patch (Florian Zaruba)
* Add `__pycache__` to gitignore (Florian Zaruba)
* reggen: Change to common_cells assertions (Florian Zaruba)
* Bender: Add vendored `prim_reg` sources (Florian Zaruba)

Signed-off-by: Florian Zaruba <[email protected]>

Replace explicit signals with structs

cluster: Replace rigid adapter chain

Wolfgang has developed a very nice `axi_to_mem` adapter which finally
replaces the adapter chain we had previously in place. For the benefit
of humankind. 🧑‍🚀

Bundle interrupt signals into interrupt struct

snitch_cluster: Use `axi_to_mem` for DMA to TCDM

Another clean-up of an unnecessary adapter chain.

future: Move to separate `ip`

tcdm_xbar: Add common_cells based implementation

We have a very nice implemenation of a generic `xbar` and `omega
network` in the `common_cells` repository. The additional logic needed
for the response path is trivial and can be build from `common_cells`
components as well.

snitch-gen: Generate linker script for the tb

modelsim: Simulation bring-up

cluster_peripherals: Generated using register tool

Update .gitignore

tracer: Add tracer script

vendor: VCS patches

vcs: Cluster simulation bring-up

snitch_cluster: Further clean-up

lint: Correct stylistic issues

wrapper: Generate cluster wrapper from template

snitch_cluster: Improve Makefile

reqrsp: Update implementation

Update cluster with new IPs

Make cluster parameterizeable

Instantiate new cluster in TB

Small bring-up fixes

ssr: Add custom instructions to configure SSRs

Quality of life improvements

common_cells: Add napot address decoder

axi: Add `typedef_all`

tc_generic: Include `sram` for Verilator

vendor: Update with local changes

Lint fixes

Gen config
  • Loading branch information
zarubaf authored Jan 19, 2021
1 parent 3bfc1e6 commit 7ecd463
Show file tree
Hide file tree
Showing 241 changed files with 18,419 additions and 1,991 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,27 @@ jobs:
| xargs -n1 util/vendor.py --verbose \
&& util/git-diff.py --error-msg "::error ::Found differences, please re-vendor."
########################
# Check Doc up-to-date #
########################
check-doc:
name: Documentation Up-to-Date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
- run: npm install -g @adobe/jsonschema2md
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install -r python-requirements.txt
- name: Re-generate documentation and diff
run: |
cd docs/ && jsonschema2md -d schema/ --out schema-doc -x schema-doc -n
../util/git-diff.py --error-msg "::error ::Found stale documentation, please re-generate schema doc."
#################
# Check License #
#################
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.bender/
.vscode/
__pycache__

// Modelsim Fiels
*.wlf
modelsim.ini
*stacktrace*
*stacktrace*
transcript
1 change: 1 addition & 0 deletions Bender.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

overrides:
common_verification: { git: https://github.com/pulp-platform/common_verification.git, rev: master}
tech_cells_generic: { path: hw/vendor/pulp_platform_tech_cells_generic }
common_cells: { path: hw/vendor/pulp_platform_common_cells }
axi: { path: hw/vendor/pulp_platform_axi }
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This monolithic repository hosts software and hardware for the Snitch generator and generated systems.

## Tool Requirements

* `verilator = v4.100`
* `bender >= v0.21.0`

## License

Snitch is being made available under permissive open source licenses.
Expand Down
1 change: 1 addition & 0 deletions docs/rm/reqrsp_interface
1 change: 1 addition & 0 deletions docs/rm/snitch
1 change: 1 addition & 0 deletions docs/rm/snitch_cluster
741 changes: 741 additions & 0 deletions docs/schema-doc/manticore-properties-clusters-snitch-cluster-schema.md

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions docs/schema-doc/manticore-properties-clusters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Clusters Schema

```txt
http://pulp-platform.org/snitch/manticore.schema.json#/properties/clusters
```

An array of snitch clusters.


| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------- |
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [manticore.schema.json\*](manticore.schema.json "open original schema") |

## clusters Type

`object[]` ([Snitch Cluster Schema](manticore-properties-clusters-snitch-cluster-schema.md))
16 changes: 16 additions & 0 deletions docs/schema-doc/manticore-properties.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Untitled undefined type in Manticore Schema Schema

```txt
http://pulp-platform.org/snitch/manticore.schema.json#/properties
```




| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
| :------------------ | ---------- | -------------- | ----------------------- | :---------------- | --------------------- | ------------------- | ----------------------------------------------------------------------- |
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [manticore.schema.json\*](manticore.schema.json "open original schema") |

## properties Type

unknown
38 changes: 38 additions & 0 deletions docs/schema-doc/manticore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Manticore Schema Schema

```txt
http://pulp-platform.org/snitch/manticore.schema.json
```

Manticore system description


| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
| :------------------ | ---------- | -------------- | ------------ | :---------------- | --------------------- | ------------------- | --------------------------------------------------------------------- |
| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [manticore.schema.json](manticore.schema.json "open original schema") |

## Manticore Schema Type

`object` ([Manticore Schema](manticore.md))

# Manticore Schema Properties

| Property | Type | Required | Nullable | Defined by |
| :-------------------- | ------- | -------- | -------------- | :------------------------------------------------------------------------------------------------------------------------------------- |
| [clusters](#clusters) | `array` | Required | cannot be null | [Manticore Schema](manticore-properties-clusters.md "http&#x3A;//pulp-platform.org/snitch/manticore.schema.json#/properties/clusters") |

## clusters

An array of snitch clusters.


`clusters`

- is required
- Type: `object[]` ([Snitch Cluster Schema](manticore-properties-clusters-snitch-cluster-schema.md))
- cannot be null
- defined in: [Manticore Schema](manticore-properties-clusters.md "http&#x3A;//pulp-platform.org/snitch/manticore.schema.json#/properties/clusters")

### clusters Type

`object[]` ([Snitch Cluster Schema](manticore-properties-clusters-snitch-cluster-schema.md))
1 change: 1 addition & 0 deletions docs/schema-doc/manticore.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://pulp-platform.org/snitch/manticore.schema.json","title":"Manticore Schema","description":"Manticore system description","type":"object","required":["clusters"],"properties":{"clusters":{"type":"array","title":"Clusters","description":"An array of snitch clusters.","items":{"$ref":"http://pulp-platform.org/snitch/snitch_cluster.schema.json"}}}}
24 changes: 24 additions & 0 deletions docs/schema-doc/snitch_cluster-properties-addr_len.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Untitled number in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/addr_len
```

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.


| 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") |

## addr_len Type

`number`

## addr_len Default Value

The default value is:

```json
48
```
24 changes: 24 additions & 0 deletions docs/schema-doc/snitch_cluster-properties-addr_width.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Untitled number in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/addr_width
```

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.


| 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") |

## addr_width Type

`number`

## addr_width Default Value

The default value is:

```json
48
```
16 changes: 16 additions & 0 deletions docs/schema-doc/snitch_cluster-properties-base_hart_id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Untitled number in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/base_hart_id
```

Base hart id of the cluster. All cores get the respective cluster id plus their cluster position as the final `hart_id`.


| 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") |

## base_hart_id Type

`number`
24 changes: 24 additions & 0 deletions docs/schema-doc/snitch_cluster-properties-boot_addr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Untitled number in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/boot_addr
```

Address from which all harts of the cluster start to boot. The default setting is `0x8000_0000`.


| 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") |

## boot_addr Type

`number`

## boot_addr Default Value

The default value is:

```json
2147483648
```
24 changes: 24 additions & 0 deletions docs/schema-doc/snitch_cluster-properties-boot_address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Untitled number in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/boot_address
```

Address from which all harts of the cluster start to boot. The default setting is `0x8000_0000`.


| 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") |

## boot_address Type

`number`

## boot_address Default Value

The default value is:

```json
2147483648
```
16 changes: 16 additions & 0 deletions docs/schema-doc/snitch_cluster-properties-cluster_base_addr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Untitled number in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cluster_base_addr
```

Base address of this cluster.


| 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") |

## cluster_base_addr Type

`number`
16 changes: 16 additions & 0 deletions docs/schema-doc/snitch_cluster-properties-cluster_base_address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Untitled number in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cluster_base_address
```

Base address of this cluster.


| 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") |

## cluster_base_address Type

`number`
38 changes: 38 additions & 0 deletions docs/schema-doc/snitch_cluster-properties-cluster_xbar_latency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Untitled string in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cluster_xbar_latency
```

Latency mode of the cluster crossbar.


| 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") |

## cluster_xbar_latency Type

`string`

## cluster_xbar_latency Constraints

**enum**: the value of this property must be equal to one of the following values:

| Value | Explanation |
| :---------------- | ----------- |
| `"NO_LATENCY"` | |
| `"CUT_SLV_AX"` | |
| `"CUT_MST_AX"` | |
| `"CUT_ALL_AX"` | |
| `"CUT_SLV_PORTS"` | |
| `"CUT_MST_PORTS"` | |
| `"CUT_ALL_PORTS"` | |

## cluster_xbar_latency Default Value

The default value is:

```json
"CUT_ALL_PORTS"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ISA String Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cores/items/properties/isa
```

ISA string as defined by the RISC-V standard. Only contain the standardized ISA extensions.


| 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") |

## isa Type

`string` ([ISA String](snitch_cluster-properties-cores-core-description-properties-isa-string.md))

## isa Examples

```json
"rv32imafd"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Untitled string in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cores/items/properties/xdma/properties/version
```

Version number of DMA ISA extension.


| 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") |

## version Type

`string`
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Untitled undefined type in Snitch Cluster Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cores/items/properties/xdma/properties
```




| 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") |

## properties Type

unknown
Loading

0 comments on commit 7ecd463

Please sign in to comment.