Welcome to BPG’s documentation!

Getting Started

This chapter contains a step-by-step guide to installing BPG and producing your first gds and lsf file. You will also learn the basic structure of a BPG generator, and run a few examples that we have provided. This will utilize the built in example PDK.

Installing BPG

Prerequisites

We highly recommend you use an Anaconda environment with a Python version greater than 3.6. BPG generally will not function with Python versions less than 3.6, and requires packages with C/C++ dependencies that are most easily installed using Anaconda.

Once Anaconda is set up, please run the following commands to install packages with C/C++ dependencies:

conda install numpy
conda install rtree
conda install shapely

BPG generally generates output layouts in the GDSII format. To view these layouts, we recommend you install and use the free open-source software package, Klayout.

Installation

WARNING: Installation instructions are currently in flux.

We highly recommend you use an Anaconda environment with a Python version greater than 3.6. BPG generally will not function with Python versions less than 3.6, and requires packages with C/C++ dependencies that are most easily installed using Anaconda.

Once Anaconda is set up, please run the following commands to install packages with C/C++ dependencies:

conda install numpy
conda install rtree
conda install shapely

Then clone and install BAG with in any folder with:

git clone git@github.com:ucb-art/BAG_Framework.git
cd BAG_Framework
pip install .

Finally clone and install BPG in any folder with:

git clone git@github.com:BerkeleyPhotonicsGenerator/BPG.git
cd BPG
pip install .

BPG generally generates output layouts in the GDSII format. To view these layouts, we recommend you install and use the free open-source software package, Klayout.

Quick Workspace Setup

BPG requires specific environmental variables and a PDK for your technology in order to run. We provide an example workspace and PDK for you to quickly get started. To set up your workspace run the following:

  1. bpg setup_workspace. This copies over the example technology and environment variable setup file

  2. source sourceme.sh. This will setup all of the necessary environment variables

  3. Now you can execute any BPG based python script by running python <INSERT PATH TO PYTHON FILE HERE>

To get some example generators and learn more about how BPG works, please check out the tutorial section in getting started.

Testing BPG

WARNING: This under certain conditions, this may copy the wrong tests.

You may wish to run BPG’s test suite to make sure that it functions properly on your system. To do so, first make sure that you have the example tech setup by running the instructions in the Quick Workspace Setup section, and that you. have pytest installed. Then run

bpg setup_test
pytest bpg_test_suite

If you do not have pytest installed, do so by running pip install pytest, then re-run pytest bpg_test_suite. After running the test suite, you should see something similar to this, with a few warnings and messages below:

_images/test_pass.png

Configuration Files

This chapter contains a information on special options to configure the operation of BPG and BAG.

BPG Configuration

Placeholder text

Anchor1

Anchor2

Dataprep

This chapter contains an in-depth explanation of how dataprep works, and how to customize the dataprep routine to support photonic layout compilation for your specific PDK

Dataprep

Placeholder text

BPG

BPG package

Subpackages

BPG.compiler package
Submodules
BPG.compiler.dataprep_gdspy module
BPG.compiler.dataprep_shapely module
BPG.compiler.dataprep_skill module
BPG.compiler.manh_shapely module
BPG.compiler.point_operations module
BPG.compiler.poly_simplify module
Module contents
BPG.gds package
Submodules
BPG.gds.core module
BPG.gds.io module
Module contents
BPG.lumerical package
Submodules
BPG.lumerical.code_generator module
BPG.lumerical.core module
BPG.lumerical.design_manager module
BPG.lumerical.objects module
BPG.lumerical.simulation module
BPG.lumerical.testbench module
Module contents
BPG.oa package
Submodules
BPG.oa.core module
Module contents
BPG.skill package
Submodules
BPG.skill.photonic_skill module
Module contents
BPG.workspace_setup package
Submodules
BPG.workspace_setup.setup module
BPG.workspace_setup.setup_submodules module
Module contents

Submodules

BPG.abstract_plugin module

BPG.bpg_custom_types module

BPG.content_list module

BPG.db module

BPG.flow module

BPG.geometry module

BPG.layout_manager module

BPG.logger module

class BPG.logger.DontRepeatFilter[source]

Bases: object

add_key(key)[source]
clear_history()[source]
filter(record)[source]
BPG.logger.setup_logger(log_path: str, log_filename: str = 'bpg.log') → None[source]

Configures the root logger so that all other loggers in BPG inherit from its properties.

Parameters
  • log_path (str) – The path to save the log files.

  • log_filename (str) – The name of the primary output log file.

BPG.objects module

BPG.photonic_core module

BPG.port module

BPG.template module

Module contents