commit | 7b52baa843ddc44b57d8037735fac623457247d7 | [log] [tgz] |
---|---|---|
author | Eunchan Kim <eunchan@google.com> | Mon Oct 28 13:52:41 2019 -0700 |
committer | Eunchan Kim <eunchan@google.com> | Mon Oct 28 14:51:31 2019 -0700 |
tree | 79e90c2a82ddc34f4fc6babbf83fcbd6a3b2caff | |
parent | 270a48e84ec480a8422f1fbc671309d215131a85 [diff] |
[rv_plic] Add skipto handling for large interrupts Problem: Current `reggen` raises an error if `skipto` field is less than calculated `offset` field. RV_PLIC sets first target offset to `0x100` and if # of interrupt sources is greater than or equal to 60, it exceeds 0x100 offset for the first target. For 60 interrupts , it needs 60 PRIORITY registers (240 addr offset) and two Interrupt Pending registers and two Level-Edge registers. So it hits the `skipto <= offset` condition in `reggen/validate.py#L1357`. Error Msg: Traceback (most recent call last): File "../../../util/regtool.py", line 213, in <module> main() File "../../../util/regtool.py", line 165, in main elif (validate.validate(obj, params=params) == 0): File "/util/reggen/validate.py", line 1357, in validate " evaluates as " + hex(skipto) + TypeError: can only concatenate str (not "int") to str Resolution: Changed `hw/ip/rv_plic/data/rv_plic.hjson.tpl` to consider a large number of interrupts case. It calculates the target offset and increases skip to value at 0x100 granularity. So if #Src is greater than 60, it changes the `skipto` value to 0x200. Also, validate.py now converts `['skipto']` to string so that rather than above Exception error, it correctly creates error on the log file (our stdout). this is related to #653
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.
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 python3 python3-pip $ pip3 install --user -r python-requirements.txt
$ ./util/build_docs.py --preview
This compiles the documentation into ./opentitan-docs
and starts a local server, which allows you to access the documentation at http://127.0.0.1:5500.
Have a look at CONTRIBUTING.md for guidelines 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).