Skip to content

Padrick - A Smart Pad-Multiplexer IP Generator for SoCs

License

Notifications You must be signed in to change notification settings

AlSaqr-platform/padrick

 
 

Repository files navigation

Padrick - A flexible Padframe Generator for SoCs

State of Development

WARNING Padrick is still in it’s very early stage of development and not yet ready for production. Do not yet use it for actual tapeouts without asking the author about the current state of development.

Purpose of this Tool

Modern SoCs contain a large number of peripherals and functional blocks that need to communicate with the outside world. Most of the time, the number of IO pins required to map every IO facing port of the whole SoC to dedicated IO pads is infeasible due to limited available area dedicated for IO pads. Instead, most modern SoCs use multiplexing logic to use a single IO pad for several different functionalities according to some user-programmable configuration register. While some SoCs (e.g. Nordic nRF52 series of BLE chips) allow mapping of every module port (e.g. SPI MOSI signal) to every available IO pad in a full crossbar fashion, traditionally the PULP chips taped out so far only used the approach to assign 2-3 Module ports to one dedicated IO pad. I.e. the user can chose to use e.g. IO Pad 43 as either GPIO4 or I2C_SCK but the SPI_MOSI signal for example cannot be routed to IO Pad 43. While the full-crossbar like approach can have its demerits (e.g. routing can become trickier if very fast IO signals are involfed), the full-crossbar routing approach makes the resulting SoC way more flexible for dynamic adaptation to the workload and simplifies a lot the PCB design process and repurposing of existing PCBs by means of rerouting the IO signals.

Since the padframe is always a custom tailored component for one particular SoCs, a lot of time has been spent in the past writing this padframe multiplexing and routing logic. This design process is very labouruos and extremely error prone which is where Padrick enters the stage;

Padrick aims to solve the problem of painstakingly writing the multiplexing logic and interconnection logic for padframes by hand. Not only does it (optionally) allow full-crossbar like routing of every periphery port to every IO pad it also generates C-drivers and Documentation to interact with the auto-generated peripherals.

How does it work? The user provides a YAML description of the desired Padrame configuration. The configuration file’s syntax is tailored in a way such that large portions of it can be copy pasted or even entirely reused from one SoC to the other while only minor modifications of e.g. the involved IO pads need to be performed. After parsing and internaly validating the configuration file with a couple of sanity checks, Padrick generates several SystemVerilog modules that instantiate the desired IO Pads, implements the IO Multiplexing logic and exposes the SoC facing IO signal and either an AXI-lite or APB interface to be attached to the SoC configuration bus for at-runtime control over the IO Pads.

Getting Started

Installation

Installation of padrick is straight forward:

git clone [email protected]:AlSaqr-platform/padrick.git
pip install -e ./padrick

This framework will automatically install all the required dependencies. This will install the new command line tool padrick. It is recommmended to use a virtual environment.

Write the Padframe Configuration File

Now that you installed padrick, you can start writing your padframe configuration file. Have a look at some of the examples in the examples folder to become familiar with the syntax and read the documentation.

Generating the Padframe

With your padframe configuration file ready you can now invoke the padrick command to generate the padframe project:

padrick generate rtl -output my_padframe my_padframe_config.yml

This command will first parse your configuration file and pass it through a number of sanity checks to ensure it has the proper format. If there is a mistake in the config file, you will see an error message with hints to where the error occured.

After successfully parsing the config file, padrick will generate a complete RTL project in the subdirectory my_padframe. If the folder doesn’t exist, it will be created for you. Amongst the various SystemVerilog RTL files, the folder will also be populated with appropriate Bender and IPApprox IP configuration file to simplify the integration of the auto-generated padframe.

Instantiating the Padframe within your Design

Now that your padframe IP is generated you can instantiate it within your design. The toplevel module for user instantiation is called <padframe.name>_top.sv. The structs that make up the interface of this SystemVerilog module are defined in pkg_<padframe.name>.sv.

Documentation

For more in-depth documentatin of Padrick, visit the project Documentation site at https://iis-people.ee.ethz.ch/~meggiman/tools/padrick.

About

Padrick - A Smart Pad-Multiplexer IP Generator for SoCs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 68.1%
  • Smarty 21.9%
  • Mako 5.8%
  • Starlark 1.8%
  • C 1.3%
  • SystemVerilog 0.9%
  • Other 0.2%