Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structs multireg fix #466

Merged
merged 41 commits into from
Mar 5, 2024
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4441604
python file to generate registers' structs
Jan 24, 2023
12bb346
added generation of reserved bits field
Jan 24, 2023
16f1385
refactor by adding specific functions
Jan 24, 2023
950a7e9
refactor of the reading input and writing output parts
Jan 24, 2023
5888e8a
changed argparse to call the function from different module
Jan 24, 2023
c7d2814
python script to generate the _structs.h for specified peripherals
Jan 24, 2023
d84b730
added template file for the _structs.h files
Jan 24, 2023
af3fca6
call to structs generation in Makefile
Jan 24, 2023
d4bcb71
add call to the python structs generation script in Makefile
Jan 31, 2023
78a8674
add structs generation for non-vendor peripherals
Feb 2, 2023
5813593
path adjustment for calling the structs generation
Feb 2, 2023
f668cb9
change gitignore
StefanoAlbini96 Feb 2, 2023
addc808
Update gitignore
StefanoAlbini96 Feb 2, 2023
18d3af3
Merge remote-tracking branch 'upstream/main'
StefanoAlbini96 Feb 2, 2023
4022649
Update Makefile
StefanoAlbini96 Feb 2, 2023
b38e1c2
Update makefile again
StefanoAlbini96 Feb 2, 2023
78b6602
added time and header name generation
StefanoAlbini96 Feb 3, 2023
135a009
added comments in enums generation
StefanoAlbini96 Feb 3, 2023
b76d4eb
changed path of GPIO for generation
StefanoAlbini96 Feb 3, 2023
d81a4e1
minor fix in gitignore and makefile
StefanoAlbini96 Feb 3, 2023
29209f2
Update Makefile
StefanoAlbini96 Feb 3, 2023
aaa405f
Add path to mcu_cfg.hjson and changed mcu_gen.py to discard path and …
StefanoAlbini96 Feb 7, 2023
5665087
Use mcu_cfg to generate the structs and changed name to the script, u…
StefanoAlbini96 Feb 7, 2023
ec480bc
Changed the names of spi and plic to avoid hardcoding them in the str…
StefanoAlbini96 Feb 7, 2023
3818293
fix hardware
davideschiavone Feb 7, 2023
b0a7417
Merge pull request #1 from davideschiavone/fix_hw_struct
StefanoAlbini96 Feb 7, 2023
814af94
Merge remote-tracking branch 'upstream/main'
StefanoAlbini96 Feb 8, 2023
734e066
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Feb 27, 2023
81c2aae
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Feb 28, 2023
76b6452
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Mar 3, 2023
238cce5
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Mar 13, 2023
ba10135
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Mar 23, 2023
f23f034
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Apr 5, 2023
00869ef
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Apr 26, 2023
6cfea4d
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Jun 27, 2023
d65a647
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Aug 25, 2023
76ed1aa
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Sep 20, 2023
b74dec3
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Nov 8, 2023
92e6749
Merge branch 'esl-epfl:main' into main
StefanoAlbini96 Feb 29, 2024
a081a8b
Merge branch 'esl-epfl:main' into structs_multireg_fix
StefanoAlbini96 Mar 4, 2024
b72a314
fixed a wrong generation of multiregs for spi_host
StefanoAlbini96 Mar 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion util/structs_gen.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import hjson
from math import ceil
import string
import argparse
import sys
Expand Down Expand Up @@ -297,7 +298,7 @@ def add_registers(peripheral_json):
n_bits += count_bits(f["bits"])

# computes the number of registers needed to pack all the bit fields needed
n_multireg = int((count * n_bits) / int(peripheral_json["regwidth"]))
n_multireg = ceil((count * n_bits) / int(peripheral_json["regwidth"]))

# generate the multiregisters
for r in range(n_multireg):
Expand Down
Loading