Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.rst and add docker exit code inside workflows [CI] #240

Merged
merged 9 commits into from
Oct 2, 2023
4 changes: 3 additions & 1 deletion .github/workflows/cryo_gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'openfasoc/common/**'
- 'openfasoc/generators/common/**'
- 'openfasoc/generators/common/cryo-gen/**'
- 'openfasoc/generators/cryo-gen/**'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -38,5 +39,6 @@ jobs:
cd ./openfasoc/generators/cryo-gen &&\
make ${{ matrix.platform }}_cryo &&\
python3 parse_rpt.py ${{ matrix.platform }}
"| tee -a file.log
" && exit_code=$? | tee -a file.log
if [ $? -ne 0 ]; then exit 1; fi
if grep "^Error" file.log; then exit 1; else exit 0; fi
4 changes: 3 additions & 1 deletion .github/workflows/ldo_sky130hvl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'openfasoc/common/**'
- 'openfasoc/generators/common/**'
- 'openfasoc/generators/common/ldo-gen/**'
- 'openfasoc/generators/ldo-gen/**'
workflow_dispatch:

jobs:
Expand All @@ -34,5 +35,6 @@ jobs:
cd ./openfasoc/generators/ldo-gen &&\
make sky130hvl_ldo &&\
python3 parse_rpt.py sky130hvl_ldo
"| tee -a file.log
" && exit_code=$? | tee -a file.log
if [ $? -ne 0 ]; then exit 1; fi
if grep "\[ERROR\]" file.log; then exit 1; else exit 0; fi
4 changes: 3 additions & 1 deletion .github/workflows/tempSense_sky130hd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'openfasoc/common/**'
- 'openfasoc/generators/common/**'
- 'openfasoc/generators/common/temp-sense-gen/**'
- 'openfasoc/generators/temp-sense-gen/**'
workflow_dispatch:

jobs:
Expand All @@ -34,5 +35,6 @@ jobs:
cd ./openfasoc/generators/temp-sense-gen &&\
make sky130hd_temp &&\
python3 parse_rpt.py
"| tee -a file.log
" && exit_code=$? | tee -a file.log
if [ $? -ne 0 ]; then exit 1; fi
if grep "\[ERROR\]" file.log; then exit 1; else exit 0; fi
122 changes: 20 additions & 102 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OpenFASoC


OpenFASOC is focused on open-source automated analog generation from user specification to GDSII with fully open-sourced tools.
This project is led by a team of researchers at the University of Michigan and is inspired by FASoC, which sits on proprietary tools. (See more about FaSoC at `website <https://fasoc.engin.umich.edu/>`_)
This project is led by a team of researchers at the University of Michigan and is inspired by FASoC, that sits on proprietary tools. (See more about FaSoC at `website <https://fasoc.engin.umich.edu/>`_)


* **Temperature sensor -**
Expand All @@ -28,7 +28,7 @@ This project is led by a team of researchers at the University of Michigan and i
.. image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/idea-fasoc/OpenFASOC/blob/main/docs/source/notebooks/ldo-gen/LDO_notebook.ipynb

Prerequisites
Getting Started
****************

Install all the prerequisites using the `dependencies.sh` script provided in the home location of this project (where this README.rst file is found). Supports CentOS7, Ubuntu 20.04 LTS and Ubuntu 22.04 LTS.
Expand All @@ -37,7 +37,9 @@ Install all the prerequisites using the `dependencies.sh` script provided in the

$ sudo ./dependencies.sh

(Or) Please install the following tools by building the tools manually from their code base with the recommended commit ids for stable functioning of the flow:
For more info on getting-started, please refer to ["Getting Started" section ](https://openfasoc.readthedocs.io/en/latest/getting-started.html)

Below are the tool requirements along with their currently support versions that are updated regularly upon testing againsts the generators.

1. `Magic <https://github.com/RTimothyEdwards/magic>`_ (version:8.3.416)

Expand Down Expand Up @@ -67,109 +69,25 @@ Install all the prerequisites using the `dependencies.sh` script provided in the
- Python 3.7 is used in this generator.
- All the required tools need to be loaded into the environment before running this generator.

Upgrading
****************
To upgrade packages used by the generators, the dependencies.sh script must be run (which can be found in the home folder of the cloned repository).

.. code-block:: bash

$ sudo ./dependencies.sh # Enter 'u' on being prompted to commence upgrade

Testing Installation
****************
To test your installation, run the following commands from the home folder of the cloned repository -

.. code-block:: bash

$ cd openfasoc/generators/temp-sense-gen
$ make sky130hd_temp

This will run the Makefile for the temperature sensor generator (the functionality of which is explained in the Generators section).
The installation has finished succesfully if the make process exits without errors.

Design Generation
********************

Generators
^^^^^^^^^^^^^^
**Temperature Sensor (temp-sense-gen)** - `link <https://github.com/idea-fasoc/OpenFASOC/tree/main/openfasoc/generators/temp-sense-gen/>`_

A fully automated SoC generator that uses an all-digital temperature sensor architecture, that relies on a new subthreshold oscillator (achieved using the auxiliary cell “Header Cell“) for realizing synthesizable thermal sensors.

Block Architecture:
- Temperature-sensitive ring oscillator and stacked zero-VT devices.

.. image:: https://github.com/idea-fasoc/OpenFASOC/blob/main/openfasoc/generators/temp-sense-gen/readme_imgs/tempSensor-BA.png
:target: https://github.com/idea-fasoc/OpenFASOC/blob/main/openfasoc/generators/temp-sense-gen/readme_imgs/tempSensor-BA.png

**LDO Generator (ldo-gen)** - `link <https://github.com/idea-fasoc/OpenFASOC/tree/main/openfasoc/generators/ldo-gen>`_

The main idea behind a Digital LDO is the use of an array of small power transistors that operate as switches. The use of power transistors as switches facilitates low VDD power management and process scalability which makes Digital LDOs a good potential candidate for power management as we go to lower nodes. With the “Unit Power Switch” as the auxiliary cell, an automatic LDO design tool “LDO_GEN” is developed as part of this project.

Block Architecture:
- Synchronous Digital LDO with optional stochastic flash ADC.

.. image:: https://github.com/idea-fasoc/OpenFASOC/blob/main/openfasoc/generators/ldo-gen/readme_images/LDO-BA.png
:target: https://github.com/idea-fasoc/OpenFASOC/blob/main/openfasoc/generators/ldo-gen/readme_images/LDO-BA.png

**DC-DC Generator (dcdc-gen)** - `link <https://github.com/idea-fasoc/OpenFASOC/tree/main/openfasoc/generators/dcdc-gen>`_

For synthesizable on-chip power management circuits, we use the “2:1 SC Cell” auxiliary cell for implementing a switched-capacitor (SC) based DC-DC converter. By varying the number of auxiliary cells, we can achieve a wide range of conversion ratios with fine-grain resolution. It operates similarly to a successive approximation analog to digital converter (SAR ADC). Furthermore, since the total structure is simply composed of auxiliary cells, it is ideal for the proposed flow of automating the analog block design.


**Cryo Generator (cryo-gen)** - `link <https://github.com/idea-fasoc/OpenFASOC/tree/main/openfasoc/generators/cryo-gen>`_ TBA

**GDS Factory (gdsfactory)** - `link <https://github.com/idea-fasoc/OpenFASOC/tree/main/openfasoc/generators/gdsfactory>`_ TBA

**LC-DCO Generator (lc-dco)** - `link <https://github.com/idea-fasoc/OpenFASOC/tree/main/openfasoc/generators/lc-dco>`_ TBA

**SCPA Generator (cpa-gen)** - `link <https://github.com/idea-fasoc/OpenFASOC/tree/main/openfasoc/generators/scpa-gen>`_ TBA

Our fully open-source flow only supports the temperature sensor generation so far. We are working on adding additional generators in the near future.

The generators are located inside `openfasoc/generators/`, the target for temperature sensor generation is `sky130hd_temp` and located inside `openfasoc/generators/temp-sense-gen`, the following parameters are supported:

- --specfile: input specifications where the min/max temperature for the temp sensor are specified
- --outputDir: output folder where the gds/def results will be exported
- --platform: only sky130hd platform is supported for now
- --clean: clean flow folder and start a fresh design flow
- --mode: support verilog/macro/full modes, macro mode runs through APR/DRC/LVS steps to generate macros, full mode completes macro generation + simulations
- --nhead: specify a fixed number of headers (optional)
- --ninv: specify a fixed number of inverters (optional)

Look more into "getting-started" section on how to run the OpenFASOC flow


Spice Simulation Flow
**************************

To run the simulation, please edit your local model file in `common/platform_config.json`:

- simTool: simulation tool, only ngspice is supported for now -- We plan to support Xyce in the future

- simMode: `partial` (recommended to reduce runtime) or `full`, partial simulation only includes headers and cells in low voltage domain to calculate the frequency errors, full simulation includes the internal counter (full simulation is slow using ngspice and is still being tested)

- nominal_voltage: the nominal voltage of the specified technology, it is used to set a supply voltage in the simulation testbench

- model_file: the path to the top model lib file

- model_corner: the corner used in the simulation

- an example of the `common/platform_config.json` looks like:

.. code-block:: json
********************

{
"simTool": "ngspice",
"simMode": "partial",
"platforms": {
"sky130hd": {
"nominal_voltage": 1.8,
"model_file": "~/open_pdks/pdks/sky130A/libs.tech/ngspice/sky130.lib.spice",
"model_corner": "tt"
}
}
}
+------------------------------------------+--------------------+----------------------------+----------------------------------------------------------------+
| Generator | Technology nodes | Supported | Documentation |
| | | | |
+==========================================+====================+============================+================================================================+
| Temperature Sensor | sky130hd | Yes | https://openfasoc.readthedocs.io/en/latest/flow-tempsense.html |
+------------------------------------------+--------------------+----------------------------+----------------------------------------------------------------+
| Low dropout Voltage Regulator (LDO) | sky130hvl | Yes | https://openfasoc.readthedocs.io/en/latest/flow-ldo.html |
+------------------------------------------+--------------------+----------------------------+----------------------------------------------------------------+
| Cryogenic | sky130hs, | No (In-progress) | https://openfasoc.readthedocs.io/en/latest/flow-cryo.html |
| | sky130hd, | | |
| | sky130hvl | | |
+------------------------------------------+--------------------+----------------------------+----------------------------------------------------------------+
| GDSFactory | sky130hd | No (In-progress) | https://openfasoc.readthedocs.io/en/latest/flow-ldo.html |
+------------------------------------------+--------------------+----------------------------+----------------------------------------------------------------+


Tapeouts and testing setup
Expand Down