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

Replace apb soc ctrl #89

Draft
wants to merge 31 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3ee8dbc
Don't use latest register_interface with new AXI version deps
Apr 11, 2022
ee71cdb
Whitespace cleanup of soc_interconnect
May 28, 2021
a42d8b5
Refactor soc_peripherals module
Jun 2, 2021
26eed76
WIP switch to pulp-io
Apr 19, 2022
4984339
instantiate pulp_io and propagate peripheral structure to the top
adimauro-iis Jul 16, 2021
3e9e7fa
Integrate new gpio peripheral
Aug 18, 2021
cd972a1
Remove unused mode_select port
Sep 7, 2021
9c57f34
Fix lint error for slice reversal of vector port connection
Sep 7, 2021
9189ab7
Fix lint warnign about slice into integer type
Sep 8, 2021
5b1311e
Fix wrong apb slaves count in soc_peripherals
Sep 18, 2021
11309d3
enable pipeline registers on the axi_lite_to_apb bridge
adimauro-iis Sep 28, 2021
108a27f
Externalize clock generator modules using regbus
Jun 7, 2021
5af1926
Fix duplicate declaration of GPIO signals
Dec 2, 2022
8e5f88a
Bump version
Dec 4, 2022
63cfec5
Bump APB version
Dec 4, 2022
373058a
Remove obsolete parameter
Dec 7, 2022
a4dd6da
Remove internal reset synchronizers
Dec 7, 2022
04f0dae
Cleanup and reorder connection between pulp_soc and soc_peripherals
Dec 7, 2022
5565c56
Remove less than constraint on reg_interface dependency
Dec 7, 2022
72597bb
Move jtag_tap_top to pulp_soc repo where it is actually used
Dec 7, 2022
99fdc24
Fix bugs in soc_peripherals
Dec 7, 2022
176d9fb
Fix wrong jtag_tap connections in pulp_soc
Dec 7, 2022
e479f42
Print timestamp in virtual stdout
Dec 8, 2022
f856e50
Add hint where boot rom model looks for the binary dump file
Dec 8, 2022
e5754bf
Add missing apb chip control signals
Dec 8, 2022
6042e9a
Add connections for pin level gpio interrupts
Dec 9, 2022
8cddda7
Point to stable version of dependencies
Dec 9, 2022
00c1346
Remove obsolete boot_l2 signal
Dec 12, 2022
c9e1dcb
Add documentation to each toplevel port
Dec 12, 2022
a3ed205
Vendor in reggen tool from register_interface repo using Bender
Dec 12, 2022
2b11ea4
Replace old apb_soc control with an autogenerated register file
Dec 13, 2022
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
171 changes: 171 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Created by https://www.toptal.com/developers/gitignore/api/python
# Edit at https://www.toptal.com/developers/gitignore?templates=python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml


# End of https://www.toptal.com/developers/gitignore/api/python
42 changes: 17 additions & 25 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,29 @@ package:

dependencies:
L2_tcdm_hybrid_interco: { git: "https://github.com/pulp-platform/L2_tcdm_hybrid_interco.git", version: 1.0.0 }
apb: { git: "https://github.com/pulp-platform/apb.git", version: 0.1.0 }
apb: { git: "https://github.com/pulp-platform/apb.git", version: 0.2.2 }
adv_dbg_if: { git: "https://github.com/pulp-platform/adv_dbg_if.git", version: 0.0.2 }
apb2per: { git: "https://github.com/pulp-platform/apb2per.git", version: 0.1.0 }
apb_adv_timer: { git: "https://github.com/pulp-platform/apb_adv_timer.git", version: 1.0.4 }
apb_fll_if: { git: "https://github.com/pulp-platform/apb_fll_if.git", version: 0.1.3 }
apb_gpio: { git: "https://github.com/pulp-platform/apb_gpio.git", rev: "0e9f142f2f11278445c953ad011fce1c7ed85b66" }
apb_node: { git: "https://github.com/pulp-platform/apb_node.git", version: 0.1.1 }
apb_interrupt_cntrl: { git: "https://github.com/pulp-platform/apb_interrupt_cntrl.git", version: 0.1.1 }
axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.29.1 }
apb_fll_if: { git: "https://github.com/pulp-platform/apb_fll_if.git", version: 0.2.0 }
apb_interrupt_cntrl: { git: "https://github.com/pulp-platform/apb_interrupt_cntrl.git", version: 0.2.0 }
axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.38.0 }
# axi_node: { git: "https://github.com/pulp-platform/axi_node.git", version: 1.1.4 } # deprecated, replaced by axi_xbar (in axi repo)
axi_slice: { git: "https://github.com/pulp-platform/axi_slice.git", version: 1.1.4 } # deprecated, replaced by axi_cut (in axi repo)
timer_unit: { git: "https://github.com/pulp-platform/timer_unit.git", version: 1.0.2 }
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.21.0 }
cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", version: 1.1.1 }
fpnew: { git: "https://github.com/pulp-platform/fpnew.git", version: 0.6.6 }
jtag_pulp: { git: "https://github.com/pulp-platform/jtag_pulp.git", rev: v0.2.0 }
jtag_pulp: { git: "https://github.com/pulp-platform/jtag_pulp.git", version: 0.2.0 }
cv32e40p: { git: "https://github.com/pulp-platform/cv32e40p.git", rev: "pulpissimo-v4.1.0"}
ibex: { git: "https://github.com/pulp-platform/ibex.git", rev: "pulpissimo-v6.1.2" }
scm: { git: "https://github.com/pulp-platform/scm.git", version: 1.0.1}
generic_FLL: { git: "https://github.com/pulp-platform/generic_FLL.git", rev: "1c92dc73a940392182fd4cb7b86f35649b349595" }
generic_FLL: { git: "https://github.com/pulp-platform/generic_FLL.git", version: 0.2.0 }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.3 }
udma_core: { git: "https://github.com/pulp-platform/udma_core.git", version: 1.1.2 }
udma_uart: { git: "https://github.com/pulp-platform/udma_uart.git", version: 1.0.2 }
udma_i2c: { git: "https://github.com/pulp-platform/udma_i2c.git", version: 2.0.0 }
udma_i2s: { git: "https://github.com/pulp-platform/udma_i2s.git", version: 1.1.2 }
udma_qspi: { git: "https://github.com/pulp-platform/udma_qspi.git", version: 1.0.4 }
udma_sdio: { git: "https://github.com/pulp-platform/udma_sdio.git", version: 1.1.2 }
udma_camera: { git: "https://github.com/pulp-platform/udma_camera.git", version: 1.1.2 }
udma_filter: { git: "https://github.com/pulp-platform/udma_filter.git", version: 1.0.3 }
udma_external_per: { git: "https://github.com/pulp-platform/udma_external_per.git", version: 1.0.4 }
udma_hyper: { git: "https://github.com/pulp-platform/udma_hyper.git", rev: "83ab704f9d1c5f9e5353268c901fe95c36bcea36" }
pulp_io: { git: "https://github.com/pulp-platform/pulp-io.git", rev: v0.1.0-draft }
hwpe-mac-engine: { git: "https://github.com/pulp-platform/hwpe-mac-engine.git", version: 1.3.3 }
riscv-dbg: { git: "https://github.com/pulp-platform/riscv-dbg.git", version: 0.5.0 }
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: 0.3.1 }
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: 0.3.8 }

sources:
# pulp_soc
Expand All @@ -63,19 +52,17 @@ sources:
- rtl/pulp_soc/boot_rom.sv
- rtl/pulp_soc/l2_ram_multi_bank.sv
- rtl/pulp_soc/lint_jtag_wrap.sv
- rtl/pulp_soc/periph_bus_wrap.sv
- rtl/pulp_soc/soc_clk_rst_gen.sv
- rtl/pulp_soc/soc_event_arbiter.sv
- rtl/pulp_soc/soc_event_generator.sv
- rtl/pulp_soc/soc_event_queue.sv
- rtl/pulp_soc/tcdm_error_slave.sv
- rtl/pulp_soc/soc_interconnect.sv
- rtl/pulp_soc/soc_interconnect_wrap.sv
- rtl/pulp_soc/soc_ctrl_reg/src/soc_ctrl_reg_pkg.sv
- rtl/pulp_soc/soc_ctrl_reg/src/soc_ctrl_reg_top.sv
- rtl/pulp_soc/soc_peripherals.sv
- rtl/pulp_soc/jtag_tap_top.sv
- rtl/pulp_soc/pulp_soc.sv
# udma_subsystem
- files:
- rtl/udma_subsystem/udma_subsystem.sv
# fc
- target: rtl
defines:
Expand All @@ -94,7 +81,6 @@ sources:
# components
- files:
- rtl/components/apb_clkdiv.sv
- rtl/components/apb_soc_ctrl.sv
- rtl/components/memory_models.sv
- rtl/components/pulp_interfaces.sv
- rtl/components/glitch_free_clk_mux.sv
Expand All @@ -112,3 +98,9 @@ sources:
- rtl/components/freq_meter.sv
- rtl/components/tb_fs_handler.sv
target: all(rtl, not(synthesis))
external_import:
- name: reggen
target_dir: "util"
upstream: { git: "https://github.com/pulp-platform/register_interface.git", rev: "e3a4955071fcf554febd4b29a7c7a52c7f1e7fc6"}
mapping:
- { from: 'vendor/lowrisc_opentitan/util', to: 'reggen'}
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.DEFAULT_GOAL := help

VENVDIR?=$(WORKDIR)/.venv
REQUIREMENTS_TXT?=$(wildcard requirements.txt)
include Makefile.venv

## Regenerate the register file and HAL C-header the soc_ctrl register.
regenerate_soc_ctrl: | venv
@echo Regenerating SoC control register...
$(VENV)/python util/reggen/regtool.py rtl/pulp_soc/soc_ctrl_reg/soc_ctrl_reg.hjson -r -t rtl/pulp_soc/soc_ctrl_reg/src
$(VENV)/python util/reggen/regtool.py rtl/pulp_soc/soc_ctrl_reg/soc_ctrl_reg.hjson --cdefines -o rtl/pulp_soc/soc_ctrl_reg/hal/soc_ctrl_reg_hal.h
@echo "Done"

.PHONY: help
help: Makefile
@printf "Pulp SoC Reconfiguration\n"
@printf "Available targets\n\n"
@awk '/^[a-zA-Z\-_0-9]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf "%-15s %s\n", helpCommand, helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
Loading