Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
occamy: Add SPM fixes #135 (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
zarubaf committed May 21, 2021
1 parent e5e6fd3 commit cc64926
Show file tree
Hide file tree
Showing 14 changed files with 378 additions and 22 deletions.
15 changes: 15 additions & 0 deletions docs/schema-doc/occamy-properties-spm-default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Untitled undefined type in Occamy System Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/spm/default
```



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

## default Type

unknown
25 changes: 25 additions & 0 deletions docs/schema-doc/occamy-properties-spm-properties-banks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Untitled number in Occamy System Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/spm/properties/banks
```

Number of banks.

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

## banks Type

`number`

## banks Examples

```json
16
```

```json
32
```
25 changes: 25 additions & 0 deletions docs/schema-doc/occamy-properties-spm-properties-size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Untitled number in Occamy System Schema Schema

```txt
http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/spm/properties/size
```

Size of SPM in KiByte. Divided in `n` banks. The total size must be divisible by the number of banks.

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

## size Type

`number`

## size Examples

```json
128
```

```json
64
```
89 changes: 89 additions & 0 deletions docs/schema-doc/occamy-properties-spm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Untitled undefined type in Occamy System Schema Schema

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



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

## spm Type

unknown

## spm Default Value

The default value is:

```json
{
"size": 128,
"banks": 8
}
```

# undefined Properties

| Property | Type | Required | Nullable | Defined by |
| :-------------- | :------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [size](#size) | `number` | Optional | cannot be null | [Occamy System Schema](occamy-properties-spm-properties-size.md "http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/spm/properties/size") |
| [banks](#banks) | `number` | Optional | cannot be null | [Occamy System Schema](occamy-properties-spm-properties-banks.md "http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/spm/properties/banks") |

## size

Size of SPM in KiByte. Divided in `n` banks. The total size must be divisible by the number of banks.

`size`

* is optional

* Type: `number`

* cannot be null

* defined in: [Occamy System Schema](occamy-properties-spm-properties-size.md "http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/spm/properties/size")

### size Type

`number`

### size Examples

```json
128
```

```json
64
```

## banks

Number of banks.

`banks`

* is optional

* Type: `number`

* cannot be null

* defined in: [Occamy System Schema](occamy-properties-spm-properties-banks.md "http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/spm/properties/banks")

### banks Type

`number`

### banks Examples

```json
16
```

```json
32
```
30 changes: 30 additions & 0 deletions docs/schema-doc/occamy.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Description for a very simple single-cluster testbench. That is the most minimal
| :-------------------------------- | :------------ | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [cluster](#cluster) | `object` | Required | cannot be null | [Occamy System Schema](occamy-properties-snitch-cluster-schema.md "http://pulp-platform.org/snitch/snitch_cluster.schema.json#/properties/cluster") |
| [rom](#rom) | `object` | Optional | cannot be null | [Occamy System Schema](occamy-properties-rom.md "http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/rom") |
| [spm](#spm) | Not specified | Optional | cannot be null | [Occamy System Schema](occamy-properties-spm.md "http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/spm") |
| [nr_s1_quadrant](#nr_s1_quadrant) | `integer` | Optional | cannot be null | [Occamy System Schema](occamy-properties-number-of-s1-quadrants.md "http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/nr_s1_quadrant") |
| [s1_quadrant](#s1_quadrant) | Not specified | Optional | cannot be null | [Occamy System Schema](occamy-properties-object.md "http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/s1_quadrant") |

Expand Down Expand Up @@ -70,6 +71,35 @@ The default value is:
}
```

## spm



`spm`

* is optional

* Type: unknown

* cannot be null

* defined in: [Occamy System Schema](occamy-properties-spm.md "http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json#/properties/spm")

### spm Type

unknown

### spm Default Value

The default value is:

```json
{
"size": 128,
"banks": 8
}
```

## nr_s1\_quadrant


Expand Down
2 changes: 1 addition & 1 deletion docs/schema-doc/occamy.schema.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json","title":"Occamy System Schema","description":"Description for a very simple single-cluster testbench. That is the most minimal system available. Most of the hardware is emulated by the testbench.","type":"object","required":["cluster"],"properties":{"cluster":{"$ref":"http://pulp-platform.org/snitch/snitch_cluster.schema.json"},"rom":{"type":"object","description":"Read-only memory from which _all_ harts of the system start to boot.","default":{"address":16777216,"length":131072},"address":{"type":"number","description":"Start address of ROM.","minimum":0},"length":{"type":"number","description":"Total size of ROM in bytes.","minimum":0}},"nr_s1_quadrant":{"title":"Number of S1 Quadrants","type":"integer","default":8},"s1_quadrant":{"title":"object","properties":{"nr_clusters":{"type":"integer","default":4,"description":"Number of clusters in an S1 quadrant."},"const_cache":{"type":"object","description":"Constant cache configuration.","properties":{"width":{"type":"integer","description":"Cache Line Width"},"count":{"type":"integer","description":"The number of cache lines per set. Power of two; >= 2."},"sets":{"type":"integer","description":"The set associativity of the cache. Power of two; >= 1."}}}}}}}
{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://pulp-platform.org/snitch/snitch_cluster_tb.schema.json","title":"Occamy System Schema","description":"Description for a very simple single-cluster testbench. That is the most minimal system available. Most of the hardware is emulated by the testbench.","type":"object","required":["cluster"],"properties":{"cluster":{"$ref":"http://pulp-platform.org/snitch/snitch_cluster.schema.json"},"rom":{"type":"object","description":"Read-only memory from which _all_ harts of the system start to boot.","default":{"address":16777216,"length":131072},"address":{"type":"number","description":"Start address of ROM.","minimum":0},"length":{"type":"number","description":"Total size of ROM in bytes.","minimum":0}},"spm":{"default":{"size":128,"banks":8},"properties":{"size":{"type":"number","description":"Size of SPM 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]}}},"nr_s1_quadrant":{"title":"Number of S1 Quadrants","type":"integer","default":8},"s1_quadrant":{"title":"object","properties":{"nr_clusters":{"type":"integer","default":4,"description":"Number of clusters in an S1 quadrant."},"const_cache":{"type":"object","description":"Constant cache configuration.","properties":{"width":{"type":"integer","description":"Cache Line Width"},"count":{"type":"integer","description":"The number of cache lines per set. Power of two; >= 2."},"sets":{"type":"integer","description":"The set associativity of the cache. Power of two; >= 1."}}}}}}}
24 changes: 24 additions & 0 deletions docs/schema/occamy.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,30 @@
"minimum": 0
}
},
"spm": {
"default": {
"size": 128,
"banks": 8
},
"properties": {
"size": {
"type": "number",
"description": "Size of SPM 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
]
}
}
},
"nr_s1_quadrant": {
"title": "Number of S1 Quadrants",
"type": "integer",
Expand Down
13 changes: 13 additions & 0 deletions hw/system/occamy/src/memories.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,18 @@
"speed_optimized": true,
"width": 44,
"words": 256
},
{
"byte_enable": true,
"byte_width": 8,
"density_optimized": true,
"description": [
"SPM"
],
"latency": 1,
"ports": 1,
"speed_optimized": true,
"width": 64,
"words": 16384
}
]
4 changes: 4 additions & 0 deletions hw/system/occamy/src/occamy_cfg.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
address: 16777216,
length: 131072
},
spm: {
size: 128,
latency: 1
},
nr_s1_quadrant: 8,
s1_quadrant: {
nr_clusters: 4,
Expand Down
3 changes: 2 additions & 1 deletion hw/system/occamy/src/occamy_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ package occamy_pkg;
SOC_NARROW_XBAR_OUT_S1_QUADRANT_6,
SOC_NARROW_XBAR_OUT_S1_QUADRANT_7,
SOC_NARROW_XBAR_OUT_PERIPH,
SOC_NARROW_XBAR_OUT_SPM,
SOC_NARROW_XBAR_OUT_SOC_WIDE,
SOC_NARROW_XBAR_OUT_REGBUS_PERIPH,
SOC_NARROW_XBAR_NUM_OUTPUTS
Expand All @@ -299,7 +300,7 @@ package occamy_pkg;
AxiIdUsedSlvPorts: 4,
AxiAddrWidth: 48,
AxiDataWidth: 64,
NoAddrRules: 11
NoAddrRules: 13
};

// AXI bus with 48 bit address, 64 bit data, 4 bit IDs, and 0 bit user data.
Expand Down
Loading

0 comments on commit cc64926

Please sign in to comment.