commit | 7e36bd7071ccb81fe9c86f803738dbac4e7d3cbe | [log] [tgz] |
---|---|---|
author | Sam Elliott <selliott@lowrisc.org> | Wed Apr 22 14:05:49 2020 +0100 |
committer | Philipp Wagner <mail@philipp-wagner.com> | Wed Apr 22 18:31:38 2020 +0100 |
tree | fdca82e93c8f257d872de208ac141e7fb2d48a98 | |
parent | 0938b335648cd7125f4620da76dff85816e94702 [diff] |
[topgen] Generate PLIC Enums and Peripheral Mapping Until now, the PLIC DIF has used a handwritten set of enums to produce human readable names for interrupt ids, and handwritten arrays to map these back to peripherals. This commit now auto-generates this information, based on the interrupt information in `top_earlgrey.hjson`, and adds it to `top_earlgrey.h`. The following enums are generated: - `top_earlgrey_plic_irq_id_t`: interrupt ID enum, from `top['interrupt']`; - `top_earlgrey_plic_peripheral_t`: interrupt peripheral (source) enum, `from top['interrupt_module']`, - `top_earlgrey_plic_target_t`: interrupt target enum, from `top['num_cores']` This also generates a mapping from an interrupt ID to the peripheral that it came from, called `top_earlgrey_plic_interrupt_for_peripheral` and implemented using a const array. This maps from `top_earlgrey_plic_irq_id_t` to `top_earlgrey_plic_peripheral_t`. This is generated into a .c file (as its definition cannot be put into a header), and a library is created called `top_earlgrey_ot` to contain it. Signed-off-by: Sam Elliott <selliott@lowrisc.org>
OpenTitan is an open source silicon Root of Trust (RoT) project. OpenTitan will make the silicon RoT design and implementation more transparent, trustworthy, and secure for enterprises, platform providers, and chip manufacturers. OpenTitan is administered by lowRISC CIC as a collaborative project to produce high quality, open IP for instantiation as a full-featured product. See the OpenTitan site and OpenTitan docs for more information about the project.
This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository. It exists to enable collaboration across partners participating in the OpenTitan project.
The project contains comprehensive documentation of all IPs and tools. You can either access it online or build it locally by following the steps below.
$ sudo apt install curl python3 python3-pip $ pip3 install --user -r python-requirements.txt
$ ./util/build_docs.py --preview
This compiles the documentation into ./build/docs
and starts a local server, which allows you to access the documentation at http://127.0.0.1:1313.
Have a look at CONTRIBUTING for guidelines on how to contribute code to this repository.
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).