-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9855920
commit 36e6e48
Showing
23 changed files
with
191 additions
and
161 deletions.
There are no files selected for viewing
Binary file modified
BIN
+19.9 KB
(180%)
...atic/img/examples/03a_sax_active_cosimulation/simple_ideal_o3_mzi_2x2_plots.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+13.9 KB
(150%)
...atic/img/examples/03a_sax_active_cosimulation/simple_ideal_o4_mzi_2x2_plots.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.01 KB
(110%)
docs/_static/img/examples/04_spice_cosimulation/linear_phase_power_mapping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+16.6 KB
(140%)
docs/_static/img/examples/04_spice_cosimulation/simple_ideal_o3_mzi_2x2_plots.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+20.7 KB
(150%)
docs/_static/img/examples/04_spice_cosimulation/simple_ideal_o4_mzi_2x2_plots.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.87 KB
(120%)
docs/_static/img/examples/04_spice_cosimulation/simple_transient_plot.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+37.7 KB
(200%)
docs/_static/img/examples/04_spice_cosimulation/simple_transient_plot_full.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.04 KB
(110%)
...c/img/examples/04_spice_cosimulation/simple_transient_plot_power_resistance.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
""" | ||
This file contains the design flow from going from a photonic component into an analogue. | ||
""" | ||
import sys | ||
import hdl21 as h | ||
from piel.types import CircuitComponent, PathTypes | ||
from piel.integration import ( | ||
gdsfactory_netlist_with_hdl21_generators, | ||
construct_hdl21_module, | ||
) | ||
|
||
|
||
def extract_component_spice_from_netlist( | ||
component: CircuitComponent, output_path: PathTypes = sys.stdout, fmt: str = "spice" | ||
): | ||
""" | ||
This function extracts the SPICE netlist from a component definition and writes it to a file. The function uses | ||
the HDL21 library to generate the SPICE netlist from the component's netlist. The netlist is then written to a | ||
file in the specified format. | ||
Args: | ||
component (CircuitComponent): The component for which to extract the SPICE netlist. | ||
output_path (str): The path to the output file where the SPICE netlist will be written. | ||
fmt (str, optional): The format in which the netlist will be written. Defaults to "spice". | ||
Returns: | ||
None | ||
""" | ||
# Get the netlist of the component | ||
component_netlist = component.get_netlist( | ||
allow_multiple=True, exclude_port_types="optical" | ||
) | ||
|
||
# | ||
spice_component_netlist = gdsfactory_netlist_with_hdl21_generators( | ||
component_netlist | ||
) | ||
|
||
hdl21_module = construct_hdl21_module(spice_netlist=spice_component_netlist) | ||
|
||
h.netlist( | ||
hdl21_module, | ||
output_path, | ||
fmt="spice", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .electronic import ElectronicCircuitComponent | ||
from .photonic import PhotonicCircuitComponent | ||
|
||
CircuitComponent = ElectronicCircuitComponent | PhotonicCircuitComponent |
Oops, something went wrong.