Skip to content

Commit

Permalink
Fix hjson files that *should* not use commas (esl-epfl#552)
Browse files Browse the repository at this point in the history
The Hjson format specification (https://hjson.github.io/syntax.html)
also discourages the use of trailing commas at the end of a line,
which are harmless (valid) but superfluous and confusing:

> You should omit optional commas to make your data more readable.

It has been decided that adopting this style will be less confusing
and avoid possible repetitions of issue esl-epfl#552 in the future.

This commit removes all the trailing commas from hjson files,
after a meticulous process to verify that none of these trailing commas
had a specific meaning; such as in this hypothetical scenario:
```
    description: '''This is the description's first line,
                    which has a trailing comma.'''
```
  • Loading branch information
cousteaulecommandant authored and Javier Mora committed Jul 20, 2024
2 parents 68da510 + 577e756 commit c30dc4d
Show file tree
Hide file tree
Showing 18 changed files with 602 additions and 602 deletions.
4 changes: 2 additions & 2 deletions configs/ci.hjson
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
bus_type: "onetoM",
bus_type: "onetoM"
ram_banks: {
code_and_data: {
num: 6
Expand All @@ -14,7 +14,7 @@
start: 0
#minimum size for freeRTOS and clang
size: 0x00000D800
},
}
{
name: data
start: 0x00000D800
Expand Down
4 changes: 2 additions & 2 deletions configs/example_interleaved.hjson
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
bus_type: "NtoM",
bus_type: "NtoM"
ram_banks: {
code_and_data: {
sizes: 64
Expand Down Expand Up @@ -31,7 +31,7 @@
start: 0
// minimum size for freeRTOS and clang
size: 0x00000C800
},
}
{
name: data
start: 0x00000C800
Expand Down
4 changes: 2 additions & 2 deletions configs/general.hjson
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
ram_address: 0
bus_type: "onetoM",
bus_type: "onetoM"
ram_banks: {
code_and_data: {
num: 2
Expand All @@ -15,7 +15,7 @@
start: 0
#minimum size for freeRTOS and clang
size: 0x00000C800
},
}
{
name: data
start: 0x00000C800
Expand Down
4 changes: 2 additions & 2 deletions configs/testall.hjson
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
bus_type: "onetoM",
bus_type: "onetoM"
ram_banks: {
code_and_data: {
num: 3
Expand All @@ -14,7 +14,7 @@
start: 0
#minimum size for freeRTOS and clang
size: 0x00000D800
},
}
{
name: data
start: 0x00000D800
Expand Down
2 changes: 1 addition & 1 deletion docs/source/Configuration/Configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The other name can be used in code with a `.xheep_` prefix, like in `example_mat
{
ram_address: 0
bus_type: "onetoM",
bus_type: "onetoM"
ram_banks: {
code_and_data: {
num: 2
Expand Down
20 changes: 10 additions & 10 deletions docs/source/How_to/IntegratePeripheral.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ b. The module `xilinx_core_v_mini_mcu_wrapper` should be modified as follows:
+ inout logic [X-1:0] gpio_io,
```

c. The pads configuration (pad_cfg.json) must be adapted as well:
c. The pads configuration (pad_cfg.hjson) must be adapted as well:

```diff
gpio: {
- num: <N>,
+ num: <N-D>,
num_offset: 0, #first gpio is gpio0
- num: <N>
+ num: <N-D>
num_offset: 0 # first gpio is gpio0
type: inout
},
+ pdm2pcm_pdm: {
+ num: 1,
+ num: 1
+ type: inout
+ mux: {
+ <peripheral_io>: {
Expand Down Expand Up @@ -237,9 +237,9 @@ reg2hw.register.q // Data to be read from a register

```
{ window: {
name: "RX_WINDOW_NAME",
items: "1",
validbits: "32",
name: "RX_WINDOW_NAME"
items: "1"
validbits: "32"
desc: '''Window purpose description'''
swaccess: "ro"
}
Expand Down Expand Up @@ -314,10 +314,10 @@ If the GPIOs usage has changed, the testbench must be adapted as follows:
```

## Add an interrupt
You must register the interrupt in the MCU configuration `mcu_cfg.json`.
You must register the interrupt in the MCU configuration `mcu_cfg.hjson`.
```diff
interrupts: {
number: 64, // Do not change this number!
number: 64 // Do not change this number!
list: {
...
+ <interrupt identifier>: <interrupt num>
Expand Down
10 changes: 5 additions & 5 deletions docs/source/How_to/eXtendingHEEP.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ In order to vendorize `X-HEEP` create inside your repository's base directory (`
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
{
name: "esl_epfl_x_heep",
target_dir: "esl_epfl_x_heep",
name: "esl_epfl_x_heep"
target_dir: "esl_epfl_x_heep"
upstream: {
url: "https://github.com/esl-epfl/x-heep.git",
rev: "main",
url: "https://github.com/esl-epfl/x-heep.git"
rev: "main"
},
patch_dir: "patches/esl_epfl_x_heep",
patch_dir: "patches/esl_epfl_x_heep"
exclude_from_upstream: [
".github",
Expand Down
Loading

0 comments on commit c30dc4d

Please sign in to comment.