[top/earlgrey] Adding PINMUX to the top

PINMUX is to arbitrate the inputs/outputs from internal IPs into
multiplexed IO pads. This commit is to generate PINMUX register module
based on the given input/outputs from IP hjsons and the number of MIO
pads defined in the top hjson.

With this PR, top_earlgrey port list is changed to:

1. All Multiplexer I/Os have `mio_` prefix and no distinct names tied
   to the IPs anymore.
2. Dedicated I/Os have distinct names still, but have `dio_` prefix.
   Previously, they have `cio_` prefix in the top port list.

Add padding function to line-up the signals in generated codes.

Removed `parameterize` function inside template but moving to the
topgen.lib function. It is now used as filter function, which looks the
template code more clean, I hope.

A few more helper functions are added to topgen.lib also. Those aren't
filter functions as they need second argument. For instance,
topgen.lib.bitarray function needs second argument `width` to pad with
spaces at the end of the bit slice (e.g. '[1:0]  ')

This is related to #81
12 files changed
tree: 687972cce7560001008afa8a950f260337bbdad0
  1. .github/
  2. ci/
  3. doc/
  4. hw/
  5. site/
  6. sw/
  7. test/
  8. util/
  9. .clang-format
  10. .gitignore
  11. .style.yapf
  12. _index.md
  13. azure-pipelines.yml
  14. CONTRIBUTING.md
  15. LICENSE
  16. meson.build
  17. meson_init.sh
  18. meson_options.txt
  19. python-requirements.txt
  20. README.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. Download and install hugo-extended.

  2. 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 ./build/docs and starts a local server, which allows you to access the documentation at http://127.0.0.1:1313.

How to contribute

Have a look at CONTRIBUTING 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).