Skip to content

Commit

Permalink
Add CentOS 7 Support
Browse files Browse the repository at this point in the history
- Remove patches for OpenROAD: Moved all to a fork.
- Now building cugr and drcu
- Removed Opendbpy: Get it on your own
  • Loading branch information
donn committed Jul 7, 2021
1 parent 2be61f5 commit 611be79
Show file tree
Hide file tree
Showing 13 changed files with 147 additions and 751 deletions.
25 changes: 25 additions & 0 deletions LOCAL_INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**NOTE: This use-case is in alpha. It is far more complex to set up OpenLane without a Docker container. Unless you absolutely have to avoid Docker and are willing to suffer the consequences, go back to the [Readme](./README.md).**

# Using OpenLane without Docker
At its core, OpenLane is a set of scripts working with a set of tools. If you'd like to avoid using a Docker container, you can, but you will have to set up all of your tools manually.

# The OpenLane Scripts
OpenLane can work as a skeleton with just these fiels:

* configuration/
* scripts/
* flow.tcl
* report_generation_wrapper.py

You can copy them into any folder, then invoke `tclsh /path/to/flow.tcl` and go to town. The scripts are pretty light on requirements too: You only need Python 3.6+, Perl 5 and Tclsh. Unfortunately, OpenLane cannot accomplish much without its library of open source EDA tooling.

# Tool Library
You can run `python3 ./ol_install.py --list-tools` for a list. There are at least a dozen tools to install here. Luckily, you don't have to install them all one-by-one: There is an installation script that installs most of them.

You can invoke `python3 ./ol_install.py`. This tool copies the skeleton and installs all the tools to a directory of your choice, which is by default, `/opt/openlane`. Furthermore, if you are on CentOS 7 or Ubuntu 20.04, the installer will offer to install all the required apt or yum packages for you. This tool is only really supported on Ubuntu 20.04 or CentOS 7: you can try your best with Arch or macOS but we have not tested it and we cannot guarantee it will work.

The tools will all be installed with `/opt/openlane` as a prefix. You'll find all the repos in `/opt/openlane/build/repos` and a list of versions in `/opt/openlane/build/versions`.

**DO NOTE:** We expect you to bring your own OpenROAD and Opendbpy. You will have to build OpenROAD from source and make Opendbpy available to Python somehow. The repository https://github.com/donn/OpenROAD has a `build_opendbpy.sh` script for your convenience.

After the installer is done, you can invoke `sh /opt/openlane/openlane <args>` to use OpenLane, where args are the same arguments you'd pass on to `flow.tcl`.
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
\___/ |__| |_____||__|__||_____||__|__||__|__||_____|

# OpenLANE
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fefabless%2Fopenlane.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fefabless%2Fopenlane?ref=badge_shield) [![Documentation Status](https://readthedocs.org/projects/openlane/badge/?version=master)](https://openlane.readthedocs.io/en/master/?badge=master) ![CI](https://github.com/efabless/openlane/workflows/CI/badge.svg?branch=main)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fefabless%2Fopenlane.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fefabless%2Fopenlane?ref=badge_shield) [![Documentation Status](https://readthedocs.org/projects/openlane/badge/?version=master)](https://openlane.readthedocs.io/en/master/?badge=master) ![CI](https://github.com/The-OpenROAD-Project/OpenLane/workflows/CI/badge.svg?branch=master) [![Slack Invite](https://img.shields.io/badge/Community-Skywater%20PDK%20Slack-ff69b4?logo=slack)](https://invite.skywater.tools)

This documentation is also available at ReadTheDocs [here](https://openlane.readthedocs.io/).
OpenLANE is an automated RTL to GDSII flow based on several components including OpenROAD, Yosys, Magic, Netgen, Fault, OpenPhySyn, CVC, SPEF-Extractor, CU-GR, Klayout and custom methodology scripts for design exploration and optimization. The flow performs full ASIC implementation steps from RTL all the way down to GDSII - this capability will be released in the coming weeks with completed SoC design examples that have been sent to SkyWater for fabrication.

You can find the latest release of OpenLANE [here](https://github.com/efabless/openlane/releases).

This documentation is also available at [ReadTheDocs](https://openlane.readthedocs.io/).

# Table of contents
- [Overview](#overview)
- [Prerequisites](#prerequisites)
- [Quick Start](#quick-start)
- [Installation Notes](#installation-notes)
Expand All @@ -35,17 +38,12 @@ This documentation is also available at ReadTheDocs [here](https://openlane.read
- [Papers](#papers)
- [Videos And Tutorials](#videos-and-tutorials)

# Overview

OpenLANE is an automated RTL to GDSII flow based on several components including OpenROAD, Yosys, Magic, Netgen, Fault, OpenPhySyn, CVC, SPEF-Extractor, CU-GR, Klayout and custom methodology scripts for design exploration and optimization. The flow performs full ASIC implementation steps from RTL all the way down to GDSII - this capability will be released in the coming weeks with completed SoC design examples that have been sent to SkyWater for fabrication.

Join the community on [slack](https://invite.skywater.tools)!

To use the latest stable release of OpenLane, please go [here](https://github.com/efabless/openlane/releases/).

# Prerequisites

- Docker (ensure docker daemon is running) -- tested with version 19.03.12, but any recent version should suffice
- Docker 19.03.12+

## Dockerless Install
Please see [LOCAL_INSTALL.md](./LOCAL_INSTALL.md).

# Quick Start:
You can start setting up the skywater-pdk and openlane by running:
Expand Down
5 changes: 5 additions & 0 deletions dependencies/centos7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ devtoolset-8-libatomic-devel

Xvfb
autoconf
automake
bison
boost169-devel
boost169-static
bzip2
cairo
cairo-devel
Expand Down Expand Up @@ -50,6 +53,8 @@ python36u-tkinter
readline-devel
rh-python35
strace
spdlog-devel
swig3
tcl
tcl-devel
tcllib
Expand Down
22 changes: 21 additions & 1 deletion dependencies/get_all_yum.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
#!/usr/bin/env ruby

# Copyright 2021 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is a simple script that looks for all the yum packages installed by the
# Docker images. It's finicky and will likely require human cleanup for the results.

# The ubuntu list was manually translated from the results for centos7.

require 'set'

dockerfiles = `find docker_build | grep Dockerfile`.split("\n")
dockerfiles = `find ../docker_build | grep Dockerfile`.split("\n")

yum_packages_set = Set.new

Expand Down
59 changes: 33 additions & 26 deletions dependencies/tool_metadata.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
from typing import OrderedDict
# Copyright 2021 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Dict

class Tool(object):
map: OrderedDict[str, 'Tool'] = {}
map: Dict[str, 'Tool'] = {}

def __init__(self, name, repo=None, commit=None, install_command="make && make install", skip=False, clone_depth=None):
self.name = name
self.repo = repo
self.commit = commit
self.install_command = install_command
self.skip = skip
self.clone_depth = str(clone_depth)
self.clone_depth = str(clone_depth) if clone_depth is not None else None
Tool.map[self.name] = self

@property
Expand Down Expand Up @@ -41,10 +55,15 @@ def __repr__(self) -> str:
Tool(
"cugr",
install_command="\
python2.7 scripts/build.py -o release &&\
cp run/iccad19gr $PREFIX/bin/cugr\
",
skip=True
xxd -i src/flute/POST9.dat > src/flute/POST9.c &&\
xxd -i src/flute/POWV9.dat > src/flute/POWV9.c &&\
rm -rf build/ &&\
mkdir -p build/ &&\
cd build &&\
cmake ../src &&\
make -j$(nproc) &&\
cp iccad19gr $PREFIX/bin/cugr\
"
)

Tool(
Expand All @@ -60,10 +79,13 @@ def __repr__(self) -> str:
Tool(
"drcu",
install_command="\
python2.7 scripts/build.py -o release &&\
cp run/ispd19dr $PREFIX/bin/drcu\
",
skip=True
rm -rf build/ &&\
mkdir -p build/ &&\
cd build &&\
cmake ../src &&\
make -j$(nproc) &&\
cp ispd19dr $PREFIX/bin/drcu\
"
)

Tool(
Expand Down Expand Up @@ -95,21 +117,6 @@ def __repr__(self) -> str:
"
)

Tool(
# This is temporary until Openlane works with newer versions of OR.
"opendbpy",
install_command="\
mkdir -p ./src/OpenDB/build &&\
cd ./src/OpenDB/build &&\
cmake -DCMAKE_CXX_FLAGS=-I/usr/include/tcl .. &&\
make -j$(nproc) &&\
cd ./src/swig/python &&\
cp _opendbpy.so $PREFIX &&\
cp opendbpy.py $PREFIX\
",
clone_depth=1
)

Tool(
"openphysyn",
install_command="\
Expand Down
14 changes: 1 addition & 13 deletions docker_build/docker/openroad_app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,12 @@ RUN git clone -b v1.8.1 https://github.com/gabime/spdlog \
&& make install -j

ARG OPENROAD_APP_REPO=https://github.com/donn/OpenROAD
ARG OPENROAD_APP_COMMIT=4f1e0a85fab52d99ee3bfe41f14324f51fef3d12
ARG OPENROAD_APP_COMMIT=0c586ccc11128f067a9e0c843be7384e21b01f55
RUN git clone --recursive ${OPENROAD_APP_REPO} OpenROAD_10012020
WORKDIR /OpenROAD_10012020/
RUN git checkout ${OPENROAD_APP_COMMIT}
RUN git submodule update --init --recursive

COPY setup_local.patch /OpenROAD_10012020/src/OpenDB/src/swig/python
RUN cd /OpenROAD_10012020/src/OpenDB/src/swig/python && git apply setup_local.patch

COPY opendp-diamond-search.patch /OpenROAD_10012020/
RUN git apply opendp-diamond-search.patch

# Build OpenROAD
RUN mkdir build && mkdir -p /build/version && mkdir install
RUN cd build && cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/install .. && make -j$(nproc)
Expand All @@ -143,9 +137,3 @@ WORKDIR /OpenROAD_10012020/
RUN date +"Build Timestamp: %Y-%m-%d_%H-%M-%S" > /build/version/openroad.version
RUN git rev-parse HEAD >> /build/version/openroad.version
RUN tar -czf /build.tar.gz /build


# ---
# Temp for Installer
ARG OPENDBPY_REPO=https://github.com/Cloud-V/Opendbpy
ARG OPENDBPY_COMMIT=8e5d974c68613c6d84f090e779a1acb42544228d
16 changes: 0 additions & 16 deletions docker_build/docker/openroad_app/ignore_obs_outside.patch

This file was deleted.

81 changes: 0 additions & 81 deletions docker_build/docker/openroad_app/opendp-diamond-search.patch

This file was deleted.

38 changes: 0 additions & 38 deletions docker_build/docker/openroad_app/pdn_gen_core_ring_fix.patch

This file was deleted.

Loading

0 comments on commit 611be79

Please sign in to comment.