[reggen] Correct calculation of interrupt width

Issue was found during the code review #516.

Error Symptom:

    If a IP has interrupts having more than one bit width, the validate
    has a chance to not raises ERROR for the interrupt exceeding full
    register width (currently 32).

auto interrupt register generation was added to create INTERRUPT
enable/status/test registers by the tool. It does have a limitation that
only supports up to 32bit interrupts in a IP. For instance, if IP has 33
interrupts, it raises an ERROR and stop generating.

However, GPIO has only one interrupt signal but the width of the
interrupt is 32bit width. If it is set to 33 bit width, tool doesn't
create an error. as the checker only checks:

```python
if len(m['interrupt_list']) > fullwidth:
```

It should check the `width` field and account it to compare with
`fullwidth`.

Results:

    Changed to sum the width of the interrupt_list

```python
sum([int(x['width']) if 'width' in x else 1 for x in
m['interrupt_list'])
```
1 file changed
tree: 632cde2b492a8f00ce31ebf1eb189306d98c0cdb
  1. .github/
  2. ci/
  3. doc/
  4. hw/
  5. sw/
  6. test/
  7. util/
  8. .clang-format
  9. .gitignore
  10. .style.yapf
  11. azure-pipelines.yml
  12. CONTRIBUTING.md
  13. index.md
  14. LICENSE
  15. meson.build
  16. meson_init.sh
  17. meson_options.txt
  18. python-requirements.txt
  19. README.md
  20. sitemap.md
  21. toolchain.txt
README.md

OpenTitan

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.

Documentation

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.

  1. Ensure that you have the required Python modules installed (to be executed in the repository root):
$ sudo apt install python3 python3-pip
$ pip3 install --user -r python-requirements.txt
  1. Execute the build script:
$ ./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.

How to contribute

Have a look at CONTRIBUTING.md for guidelines how to contribute code to this repository.

Licensing

Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).