Skip to content

Commit

Permalink
Begin adding virtuoso support
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Nov 28, 2024
1 parent d2ca72c commit 0bd0260
Show file tree
Hide file tree
Showing 12 changed files with 234 additions and 11 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

# # Analogue Circuit Layout & Simulation

# ## Virtuoso Data Extraction

# You might already have a design in Cadence Virtuoso but might want to export some simulation data to use it in a larger co-design flow. `piel` provides limited import functionality currently.


# # Open-Source Flow
#
# ## Going through the Basics

# We will start off by importing the layout elements of the SKY130nm `gdsfactory` PDK process and understanding how we interact and map them to a schematic.
Expand Down
20 changes: 14 additions & 6 deletions docs/examples/06_component_codesign_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@


import gdsfactory as gf
import gplugins.tidy3d as gt

# import gplugins.tidy3d as gt
import tidy3d as td

# ## Getting Started with Mode Analysis
Expand All @@ -46,10 +47,10 @@
# We will use the `gdsfactory` layer default PDK layer stack. You might want to examine it because it has the thicknesses and positions of our layer. You can read more about it [in the `gdsfactory` documentation](https://gdsfactory.github.io/gdsfactory/notebooks/03_layer_stack.html).

gf.config.rich_output()
PDK = gf.generic_tech.get_generic_pdk()
PDK.activate()
LAYER_STACK = PDK.layer_stack
LAYER_STACK
# PDK = gf.generic_tech.get_generic_pdk()
# PDK.activate()
# LAYER_STACK = PDK.layer_stack
# LAYER_STACK

# We will also set the resolution of our mesh for the components we care about for the `femwell` PDE solver:

Expand All @@ -65,10 +66,17 @@
# We want to model our heated MZI2x2 phase shifter.

our_heated_mzi2x2 = gf.components.mzi2x2_2x2_phase_shifter()
our_heated_mzi2x2.plot_widget()
our_heated_mzi2x2.plot()

# ![mzi2x2_2x2_phase_shifter](../_static/img/examples/03a_sax_active_cosimulation/mzi2x2_phase_shifter.PNG)

from gdsfactory.export import to_svg

to_svg(
our_heated_mzi2x2,
filename="../_static/img/examples/03a_sax_active_cosimulation/mzi2x2_phase_shifter.svg",
)

# However, we know from the instances list that the heater element in our MZI2x2 is a `straight_heater_simple`

our_heated_mzi2x2.settings.full
Expand Down
7 changes: 7 additions & 0 deletions docs/examples/component.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions piel/models/logic/electro_optic/signal_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def linear_bit_phase_map(
final_phase_rad: float,
initial_phase_rad: float = 0,
quantization_error: float = 0.000001,
**kwargs,
) -> BitPhaseMap:
"""
Returns a linear direct mapping of bits to phase.
Expand Down
4 changes: 1 addition & 3 deletions piel/models/physical/photonic/component_lattice_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ def find_largest_component(component_list: list) -> Component:


@cell
def component_lattice_generic(
network: list[list] | None = None,
) -> Component:
def component_lattice_generic(network: list[list] | None = None, **kwargs) -> Component:
"""
The shape of the `network` matrix determines the physical interconnection.
Note that there should be at least S+1=N modes
Expand Down
5 changes: 3 additions & 2 deletions piel/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from . import amaranth
from . import cocotb
from . import gdsfactory
from . import openlane
from . import hdl21
from . import openlane
from . import sax
from . import qutip
from . import skrf
from . import virtuoso
from . import qutip
1 change: 1 addition & 0 deletions piel/tools/virtuoso/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import simulation
3 changes: 3 additions & 0 deletions piel/tools/virtuoso/simulation/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import dc
from . import transient
from . import expressions
1 change: 1 addition & 0 deletions piel/tools/virtuoso/simulation/data/dc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Empty file.
Empty file.

0 comments on commit 0bd0260

Please sign in to comment.