From 101361912d79f2e6f11b7453e590e9e7c71accd1 Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 12 Sep 2023 10:38:13 -0600 Subject: [PATCH 1/4] S641118: Added siwave, dcir, and raptorx sim settings --- protos/ansys/api/edb/v1/edb_defs.proto | 5 +- .../edb/v1/raptor_x_simulation_settings.proto | 121 ++++ .../ansys/api/edb/v1/simulation_setup.proto | 6 + .../v1/siwave_dcir_simulation_settings.proto | 53 ++ .../edb/v1/siwave_simulation_settings.proto | 207 +++++++ src/ansys/edb/layout/cell.py | 4 +- src/ansys/edb/session.py | 22 + src/ansys/edb/simulation_setup/__init__.py | 18 + .../raptor_x_simulation_settings.py | 398 ++++++++++++ .../raptor_x_simulation_setup.py | 31 + .../edb/simulation_setup/simulation_setup.py | 37 +- .../siwave_dcir_simulation_settings.py | 137 ++++ .../siwave_dcir_simulation_setup.py | 31 + .../siwave_simulation_settings.py | 586 ++++++++++++++++++ .../siwave_simulation_setup.py | 31 + 15 files changed, 1684 insertions(+), 3 deletions(-) create mode 100644 protos/ansys/api/edb/v1/raptor_x_simulation_settings.proto create mode 100644 protos/ansys/api/edb/v1/siwave_dcir_simulation_settings.proto create mode 100644 protos/ansys/api/edb/v1/siwave_simulation_settings.proto create mode 100644 src/ansys/edb/simulation_setup/raptor_x_simulation_settings.py create mode 100644 src/ansys/edb/simulation_setup/raptor_x_simulation_setup.py create mode 100644 src/ansys/edb/simulation_setup/siwave_dcir_simulation_settings.py create mode 100644 src/ansys/edb/simulation_setup/siwave_dcir_simulation_setup.py create mode 100644 src/ansys/edb/simulation_setup/siwave_simulation_settings.py create mode 100644 src/ansys/edb/simulation_setup/siwave_simulation_setup.py diff --git a/protos/ansys/api/edb/v1/edb_defs.proto b/protos/ansys/api/edb/v1/edb_defs.proto index 49be916bad..af13106379 100644 --- a/protos/ansys/api/edb/v1/edb_defs.proto +++ b/protos/ansys/api/edb/v1/edb_defs.proto @@ -29,7 +29,10 @@ enum GeometryExtentType { // Enum for SimulationSetup types enum SimulationSetupType { - HFSS = 0; + HFSS_SIM = 0; + SI_WAVE_SIM = 2; + SI_WAVE_DCIR_SIM = 9; + RAPTOR_X_SIM = 12; } //------------------------------------------------------------------------------ diff --git a/protos/ansys/api/edb/v1/raptor_x_simulation_settings.proto b/protos/ansys/api/edb/v1/raptor_x_simulation_settings.proto new file mode 100644 index 0000000000..f1f084a3d0 --- /dev/null +++ b/protos/ansys/api/edb/v1/raptor_x_simulation_settings.proto @@ -0,0 +1,121 @@ +// Proto file representing raptorx simulation setup settings + +syntax = "proto3"; + +package ansys.api.edb.v1; + +import "edb_messages.proto"; + +service RaptorXGeneralSettingsService { + rpc GetUseGoldEMSolver(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseGoldEMSolver(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMaxFrequency(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetMaxFrequency(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetGlobalTemperature(EDBObjMessage) returns (google.protobuf.DoubleValue) {} + rpc SetGlobalTemperature(DoublePropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetSaveNetlist(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetSaveNetlist(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetNetlistExportSpectre(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetNetlistExportSpectre(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetSaveRFM(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetSaveRFM(BoolPropertyMessage) returns (google.protobuf.Empty) {} +} + +service RaptorXAdvancedSettingsService { + rpc GetUseMeshFrequency(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseMeshFrequency(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMeshFrequency(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetMeshFrequency(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseEdgeMesh(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseEdgeMesh(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetEdgeMesh(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetEdgeMesh(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseCellsPerWavelength(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseCellsPerWavelength(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetCellsPerWavelength(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetCellsPerWavelength(UInt64PropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUsePlaneProjectionFactor(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUsePlaneProjectionFactor(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetPlaneProjectionFactor(EDBObjMessage) returns (google.protobuf.DoubleValue) {} + rpc SetPlaneProjectionFactor(DoublePropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseRelaxedZAxis(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseRelaxedZAxis(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseEliminateSlitPerHoles(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseEliminateSlitPerHoles(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetEliminateSlitPerHoles(EDBObjMessage) returns (google.protobuf.DoubleValue) {} + rpc SetEliminateSlitPerHoles(DoublePropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseArcResolution(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseArcResolution(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetArcResolution(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetArcResolution(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseAutoRemovalSliverPoly(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseAutoRemovalSliverPoly(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetAutoRemovalSliverPoly(EDBObjMessage) returns (google.protobuf.DoubleValue) {} + rpc SetAutoRemovalSliverPoly(DoublePropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseAccelerateViaExtraction(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseAccelerateViaExtraction(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseEnableSubstrateNetworkExtraction(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseEnableSubstrateNetworkExtraction(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseLDE(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseLDE(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseExtractFloatingMetalsDummy(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseExtractFloatingMetalsDummy(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseExtractFloatingMetalsFloating(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseExtractFloatingMetalsFloating(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseEnableEtchTransform(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseEnableEtchTransform(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseEnableHybridExtraction(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseEnableHybridExtraction(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseEnableAdvancedCapEffects(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseEnableAdvancedCapEffects(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseOverrideShrinkFac(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseOverrideShrinkFac(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetOverrideShrinkFac(EDBObjMessage) returns (google.protobuf.DoubleValue) {} + rpc SetOverrideShrinkFac(DoublePropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetAdvancedOptions(EDBObjMessage) returns (RaptorXSimSettingsOptionsMessage) {} + rpc SetAdvancedOptions(RaptorXSimSettingsOptionsPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetNetSettingsOptions(EDBObjMessage) returns (RaptorXSimSettingsOptionsMessage) {} + rpc SetNetSettingsOptions(RaptorXSimSettingsOptionsPropertyMessage) returns (google.protobuf.Empty) {} +} + +message RaptorXSimSettingsOptionsMessage +{ + map options = 1; +} + +message RaptorXSimSettingsOptionsPropertyMessage +{ + RaptorXSimSettingsOptionsMessage value = 1; + EDBObjMessage target = 2; +} \ No newline at end of file diff --git a/protos/ansys/api/edb/v1/simulation_setup.proto b/protos/ansys/api/edb/v1/simulation_setup.proto index 44e111c0b1..6e8fa33941 100644 --- a/protos/ansys/api/edb/v1/simulation_setup.proto +++ b/protos/ansys/api/edb/v1/simulation_setup.proto @@ -18,6 +18,8 @@ service SimulationSetupService { rpc GetSweepData (EDBObjMessage) returns (SweepDataListMessage) {} rpc SetSweepData (SweepDataListPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetType (EDBObjMessage) returns (SimulationSetupTypeMessage) {} } message SimulationSetupCreationMessage { @@ -39,4 +41,8 @@ message SweepDataListMessage { message SweepDataListPropertyMessage { EDBObjMessage target = 1; SweepDataListMessage sweeps = 2; +} + +message SimulationSetupTypeMessage { + SimulationSetupType type = 1; } \ No newline at end of file diff --git a/protos/ansys/api/edb/v1/siwave_dcir_simulation_settings.proto b/protos/ansys/api/edb/v1/siwave_dcir_simulation_settings.proto new file mode 100644 index 0000000000..75960fe6f6 --- /dev/null +++ b/protos/ansys/api/edb/v1/siwave_dcir_simulation_settings.proto @@ -0,0 +1,53 @@ +// Proto file representing siwave dcir simulation setup settings + +syntax = "proto3"; + +package ansys.api.edb.v1; + +import "edb_messages.proto"; + +service SIWaveDCIRSimulationSettingsService { + rpc GetIcepakTempFile(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetIcepakTempFile(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetSourceTermsToGround(EDBObjMessage) returns (SourceTermsToGroundMessage) {} + rpc SetSourceTermsToGround(SourceTermsToGroundPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetExportDCThermalData(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetExportDCThermalData(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetImportThermalData(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetImportThermalData(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetFullDCReportPath(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetFullDCReportPath(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetViaReportPath(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetViaReportPath(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetPerPinResPath(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetPerPinResPath(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetDCReportConfigFile(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetDCReportConfigFile(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetDCReportShowActiveDevices(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetDCReportShowActiveDevices(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetPerPinUsePinFormat(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetPerPinUsePinFormat(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseLoopResForPerPin(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseLoopResForPerPin(BoolPropertyMessage) returns (google.protobuf.Empty) {} +} + +message SourceTermsToGroundMessage +{ + map source_terms_to_ground = 1; +} + +message SourceTermsToGroundPropertyMessage +{ + SourceTermsToGroundMessage value = 1; + EDBObjMessage target = 2; +} \ No newline at end of file diff --git a/protos/ansys/api/edb/v1/siwave_simulation_settings.proto b/protos/ansys/api/edb/v1/siwave_simulation_settings.proto new file mode 100644 index 0000000000..99e57c47cd --- /dev/null +++ b/protos/ansys/api/edb/v1/siwave_simulation_settings.proto @@ -0,0 +1,207 @@ +// Proto file representing siwave simulation setup settings + +syntax = "proto3"; + +package ansys.api.edb.v1; + +import "edb_messages.proto"; + +service SIWaveGeneralSettingsService { + rpc GetUseSISettings(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseSISettings(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetUseCustomSettings(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseCustomSettings(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetSISliderPos(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetSISliderPos(UInt64PropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetPISliderPos(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetPISliderPos(UInt64PropertyMessage) returns (google.protobuf.Empty) {} +} + +service SIWaveAdvancedSettingsService { + rpc GetIncludeCoPlaneCoupling(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetIncludeCoPlaneCoupling(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetIncludeInterPlaneCoupling(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetIncludeInterPlaneCoupling(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetIncludeSplitPlaneCoupling(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetIncludeSplitPlaneCoupling(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetIncludeFringePlaneCoupling(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetIncludeFringePlaneCoupling(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetIncludeTracePlaneCoupling(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetIncludeTracePlaneCoupling(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetCrossTalkThreshold(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetCrossTalkThreshold(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMaxCoupledLines(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetMaxCoupledLines(UInt64PropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMinVoidArea(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetMinVoidArea(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMinPadAreaToMesh(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetMinPadAreaToMesh(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMinPlaneAreaToMesh(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetMinPlaneAreaToMesh(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetSnapLengthThreshold(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetSnapLengthThreshold(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMeshAutomatic(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetMeshAutomatic(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMeshFrequency(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetMeshFrequency(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc Get3DReturnCurrentDistribution(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc Set3DReturnCurrentDistribution(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetIncludeVISources(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetIncludeVISources(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetIncludeInfGnd(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetIncludeInfGnd(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetInfGndLocation(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetInfGndLocation(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetPerformERC(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetPerformERC(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetIgnoreNonFunctionalPads(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetIgnoreNonFunctionalPads(BoolPropertyMessage) returns (google.protobuf.Empty) {} +} + +service SIWaveDCSettingsService { + rpc GetUseDCCustomSettings(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseDCCustomSettings(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetComputeInductance(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetComputeInductance(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetPlotJV(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetPlotJV(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetContactRadius(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetContactRadius(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetDCSliderPos(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetDCSliderPos(UInt64PropertyMessage) returns (google.protobuf.Empty) {} +} + +service SIWaveDCAdvancedSettingsService { + rpc GetDCMinPlaneAreaToMesh(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetDCMinPlaneAreaToMesh(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetDCMinVoidAreaToMesh(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetDCMinVoidAreaToMesh(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMaxInitMeshEdgeLength(EDBObjMessage) returns (google.protobuf.StringValue) {} + rpc SetMaxInitMeshEdgeLength(StringPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetPerformAdaptiveRefinement(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetPerformAdaptiveRefinement(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMaxNumPasses(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetMaxNumPasses(UInt64PropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMinNumPasses(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetMinNumPasses(UInt64PropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetPercentLocalRefinement(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetPercentLocalRefinement(UInt64PropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetEnergyError(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetEnergyError(UInt64PropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMeshBws(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetMeshBws(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetRefineBws(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetRefineBws(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetMeshVias(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetMeshVias(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetRefineVias(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetRefineVias(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetNumBwSides(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetNumBwSides(UInt64PropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetNumViaSides(EDBObjMessage) returns (google.protobuf.UInt64Value) {} + rpc SetNumViaSides(UInt64PropertyMessage) returns (google.protobuf.Empty) {} +} + +enum SParamInterpolation +{ + POINT_IN = 0; + LINEAR_IN = 1; + STEP_IN = 2; +} + +enum SParamExtrapolation +{ + ZERO_EX = 0; + SAME_EX = 1; + LINEAR_EX = 2; + CONSTANT_EX = 3; +} + +enum SParamDCBehavior +{ + ZERO_DC = 0; + SAME_DC = 1; + LINEAR_DC = 2; + CONSTANT_DC = 3; + ONE_PORT_CAPACITOR_DC = 4; + OPEN_DC = 5; +} + +service SIWaveSParameterSettingsService { + rpc GetUseStateSpace(EDBObjMessage) returns (google.protobuf.BoolValue) {} + rpc SetUseStateSpace(BoolPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetInterpolation(EDBObjMessage) returns (SParamInterpolationMessage) {} + rpc SetInterpolation(SParamInterpolationPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetExtrapolation(EDBObjMessage) returns (SParamExtrapolationMessage) {} + rpc SetExtrapolation(SParamExtrapolationPropertyMessage) returns (google.protobuf.Empty) {} + + rpc GetDCBehavior(EDBObjMessage) returns (SParamDCBehaviorMessage) {} + rpc SetDCBehavior(SParamDCBehaviorPropertyMessage) returns (google.protobuf.Empty) {} +} + +message SParamInterpolationMessage { + SParamInterpolation interpolation = 1; +} + +message SParamInterpolationPropertyMessage { + EDBObjMessage target = 1; + SParamInterpolation interpolation = 2; +} + +message SParamExtrapolationMessage { + SParamExtrapolation extrapolation = 1; +} + +message SParamExtrapolationPropertyMessage { + EDBObjMessage target = 1; + SParamExtrapolation extrapolation = 2; +} + +message SParamDCBehaviorMessage { + SParamDCBehavior dc_behavior = 1; +} + +message SParamDCBehaviorPropertyMessage { + EDBObjMessage target = 1; + SParamDCBehavior dc_behavior = 2; +} \ No newline at end of file diff --git a/src/ansys/edb/layout/cell.py b/src/ansys/edb/layout/cell.py index d90820a643..a4ea0db013 100644 --- a/src/ansys/edb/layout/cell.py +++ b/src/ansys/edb/layout/cell.py @@ -429,7 +429,9 @@ def simulation_setups(self): ------- list[:class:`SimulationSetup `] """ - return [SimulationSetup(msg) for msg in self.__stub.GetSimulationSetups(self.msg)] + return [ + SimulationSetup(msg).cast() for msg in self.__stub.GetSimulationSetups(self.msg).items + ] def generate_auto_hfss_regions(self): """Generate auto HFSS regions. diff --git a/src/ansys/edb/session.py b/src/ansys/edb/session.py index cea817ea46..ef8cd40ac6 100644 --- a/src/ansys/edb/session.py +++ b/src/ansys/edb/session.py @@ -94,6 +94,10 @@ from ansys.api.edb.v1.port_property_pb2_grpc import PortPropertyServiceStub from ansys.api.edb.v1.primitive_pb2_grpc import PrimitiveServiceStub from ansys.api.edb.v1.r_tree_pb2_grpc import RTreeServiceStub +from ansys.api.edb.v1.raptor_x_simulation_settings_pb2_grpc import ( + RaptorXAdvancedSettingsServiceStub, + RaptorXGeneralSettingsServiceStub, +) from ansys.api.edb.v1.rectangle_pb2_grpc import RectangleServiceStub from ansys.api.edb.v1.rlc_component_property_pb2_grpc import RLCComponentPropertyServiceStub from ansys.api.edb.v1.simulation_settings_pb2_grpc import ( @@ -104,6 +108,16 @@ SolverSettingsServiceStub, ) from ansys.api.edb.v1.simulation_setup_pb2_grpc import SimulationSetupServiceStub +from ansys.api.edb.v1.siwave_dcir_simulation_settings_pb2_grpc import ( + SIWaveDCIRSimulationSettingsServiceStub, +) +from ansys.api.edb.v1.siwave_simulation_settings_pb2_grpc import ( + SIWaveAdvancedSettingsServiceStub, + SIWaveDCAdvancedSettingsServiceStub, + SIWaveDCSettingsServiceStub, + SIWaveGeneralSettingsServiceStub, + SIWaveSParameterSettingsServiceStub, +) from ansys.api.edb.v1.solder_ball_property_pb2_grpc import SolderBallPropertyServiceStub from ansys.api.edb.v1.sparameter_model_pb2_grpc import SParameterModelServiceStub from ansys.api.edb.v1.spice_model_pb2_grpc import SpiceModelServiceStub @@ -394,6 +408,14 @@ class StubType(Enum): advanced_sim_settings = AdvancedSettingsServiceStub advanced_mesh_sim_settings = AdvancedMeshingSettingsServiceStub solver_sim_settings = SolverSettingsServiceStub + siwave_general_sim_settings = SIWaveGeneralSettingsServiceStub + siwave_advanced_sim_settings = SIWaveAdvancedSettingsServiceStub + siwave_dc_sim_settings = SIWaveDCSettingsServiceStub + siwave_dc_advanced_sim_settings = SIWaveDCAdvancedSettingsServiceStub + siwave_s_param_sim_settings = SIWaveSParameterSettingsServiceStub + siwave_dcir_sim_settings = SIWaveDCIRSimulationSettingsServiceStub + raptor_x_general_sim_settings = RaptorXGeneralSettingsServiceStub + raptor_x_adv_sim_settings = RaptorXAdvancedSettingsServiceStub def launch_session(ansys_em_root, port_num, ip_address=None): diff --git a/src/ansys/edb/simulation_setup/__init__.py b/src/ansys/edb/simulation_setup/__init__.py index 07f5fbe7e1..05a0baa534 100644 --- a/src/ansys/edb/simulation_setup/__init__.py +++ b/src/ansys/edb/simulation_setup/__init__.py @@ -26,6 +26,11 @@ MeshOperation, SkinDepthMeshOperation, ) +from ansys.edb.simulation_setup.raptor_x_simulation_settings import ( + RaptorXAdvancedSettings, + RaptorXGeneralSettings, +) +from ansys.edb.simulation_setup.raptor_x_simulation_setup import RaptorXSimulationSetup from ansys.edb.simulation_setup.simulation_settings import ( AdvancedMeshingSettings, AdvancedSettings, @@ -39,3 +44,16 @@ SimulationSetupType, SweepData, ) +from ansys.edb.simulation_setup.siwave_dcir_simulation_settings import SIWaveDCIRSimulationSettings +from ansys.edb.simulation_setup.siwave_dcir_simulation_setup import SIWaveDCIRSimulationSetup +from ansys.edb.simulation_setup.siwave_simulation_settings import ( + SIWaveAdvancedSettings, + SIWaveDCAdvancedSettings, + SIWaveDCSettings, + SIWaveGeneralSettings, + SIWaveSParameterSettings, + SParamDCBehavior, + SParamExtrapolation, + SParamInterpolation, +) +from ansys.edb.simulation_setup.siwave_simulation_setup import SIWaveSimulationSetup diff --git a/src/ansys/edb/simulation_setup/raptor_x_simulation_settings.py b/src/ansys/edb/simulation_setup/raptor_x_simulation_settings.py new file mode 100644 index 0000000000..72fb897c63 --- /dev/null +++ b/src/ansys/edb/simulation_setup/raptor_x_simulation_settings.py @@ -0,0 +1,398 @@ +"""RaptorX Simulation Settings.""" + +import ansys.api.edb.v1.raptor_x_simulation_settings_pb2 as pb + +from ansys.edb.core import messages +from ansys.edb.session import ( + RaptorXAdvancedSettingsServiceStub, + RaptorXGeneralSettingsServiceStub, + StubAccessor, + StubType, +) +from ansys.edb.simulation_setup.simulation_settings import ( + SimulationSettings, + SimulationSettingsBase, +) + + +def _translate_options_dictionary(dictionary): + return { + key: messages.strings_message([val for val in vals]) for (key, vals) in dictionary.items() + } + + +def _to_options_dict(msg): + return {key: [val for val in vals.strings] for (key, vals) in msg.options.items()} + + +def _to_raptor_x_sim_settings_options_property_msg(obj, options): + return pb.RaptorXSimSettingsOptionsPropertyMessage( + target=obj.msg, + value=pb.RaptorXSimSettingsOptionsMessage( + options={ + key: messages.strings_message([val for val in vals]) + for (key, vals) in options.items() + } + ), + ) + + +class RaptorXSimulationSettings(SimulationSettings): + """Class representing SIWave simulation settings.""" + + @property + def general(self): + """:class:`RaptorXGeneralSettings`: General settings for RaptorX simulations.""" + return RaptorXGeneralSettings(self._sim_setup) + + @property + def advanced(self): + """:class:`RaptorXAdvancedSettings`: Advanced settings for RaptorX simulations.""" + return RaptorXAdvancedSettings(self._sim_setup) + + +class RaptorXGeneralSettings(SimulationSettingsBase): + """Class representing general settings for RaptorX simulations.""" + + __stub: RaptorXGeneralSettingsServiceStub = StubAccessor(StubType.raptor_x_general_sim_settings) + + @property + def use_gold_em_solver(self): + """:obj:`bool`: Flag indicating whether to use the gold em or fast em solver.""" + return self.__stub.GetUseGoldEMSolver(self.msg).value + + @use_gold_em_solver.setter + def use_gold_em_solver(self, use_gold_em_solver): + self.__stub.SetUseGoldEMSolver(messages.bool_property_message(self, use_gold_em_solver)) + + @property + def max_frequency(self): + """:obj:`str`: Max frequency value. Controls how tight the model mesh will be.""" + return self.__stub.GetMaxFrequency(self.msg).value + + @max_frequency.setter + def max_frequency(self, max_frequency): + self.__stub.SetMaxFrequency(messages.string_property_message(self, max_frequency)) + + @property + def global_temperature(self): + """:obj:`float`: Simulation temperature in degrees celsius.""" + return self.__stub.GetGlobalTemperature(self.msg).value + + @global_temperature.setter + def global_temperature(self, global_temperature): + self.__stub.SetGlobalTemperature(messages.double_property_message(self, global_temperature)) + + @property + def save_netlist(self): + """:obj:`bool`: Flag indicating whether to generate netlist output.""" + return self.__stub.GetSaveNetlist(self.msg).value + + @save_netlist.setter + def save_netlist(self, save_netlist): + self.__stub.SetSaveNetlist(messages.bool_property_message(self, save_netlist)) + + @property + def netlist_export_spectre(self): + """:obj:`bool`: Flag indicating whether to export the netlist in spectre format.""" + return self.__stub.GetNetlistExportSpectre(self.msg).value + + @netlist_export_spectre.setter + def netlist_export_spectre(self, netlist_export_spectre): + self.__stub.SetNetlistExportSpectre( + messages.bool_property_message(self, netlist_export_spectre) + ) + + @property + def save_rfm(self): + """:obj:`bool`: Flag indicating whether to export the RFM file.""" + return self.__stub.GetSaveRFM(self.msg).value + + @save_rfm.setter + def save_rfm(self, save_rfm): + self.__stub.SetSaveRFM(messages.bool_property_message(self, save_rfm)) + + +class RaptorXAdvancedSettings(SimulationSettingsBase): + """Class representing advanced settings for RaptorX simulations.""" + + __stub: RaptorXAdvancedSettingsServiceStub = StubAccessor(StubType.raptor_x_adv_sim_settings) + + @property + def use_mesh_frequency(self): + """:obj:`bool`: Flag indicating whether to override the default meshing frequency.""" + return self.__stub.GetUseMeshFrequency(self.msg).value + + @use_mesh_frequency.setter + def use_mesh_frequency(self, use_mesh_frequency): + self.__stub.SetUseMeshFrequency(messages.bool_property_message(self, use_mesh_frequency)) + + @property + def mesh_frequency(self): + """:obj:`str`: Mesh frequency override.""" + return self.__stub.GetMeshFrequency(self.msg).value + + @mesh_frequency.setter + def mesh_frequency(self, mesh_frequency): + self.__stub.SetMeshFrequency(messages.string_property_message(self, mesh_frequency)) + + @property + def use_edge_mesh(self): + """:obj:`bool`: Flag indicating whether to use edge mesh.""" + return self.__stub.GetUseEdgeMesh(self.msg).value + + @use_edge_mesh.setter + def use_edge_mesh(self, use_edge_mesh): + self.__stub.SetUseEdgeMesh(messages.bool_property_message(self, use_edge_mesh)) + + @property + def edge_mesh(self): + """:obj:`str`: The thickness and the width of the exterior conductor filament.""" + return self.__stub.GetEdgeMesh(self.msg).value + + @edge_mesh.setter + def edge_mesh(self, edge_mesh): + self.__stub.SetEdgeMesh(messages.string_property_message(self, edge_mesh)) + + @property + def use_cells_per_wavelength(self): + """:obj:`bool`: Flag indicating whether to use cells per wavelength.""" + return self.__stub.GetUseCellsPerWavelength(self.msg).value + + @use_cells_per_wavelength.setter + def use_cells_per_wavelength(self, use_cells_per_wavelength): + self.__stub.SetUseCellsPerWavelength( + messages.bool_property_message(self, use_cells_per_wavelength) + ) + + @property + def cells_per_wavelength(self): + """:obj:`int`: Number of cells that fit under each wavelength.""" + return self.__stub.GetCellsPerWavelength(self.msg).value + + @cells_per_wavelength.setter + def cells_per_wavelength(self, cells_per_wavelength): + self.__stub.SetCellsPerWavelength(messages.int_property_message(self, cells_per_wavelength)) + + @property + def use_plane_projection_factor(self): + """:obj:`bool`: Flag indicating whether to use plane projection factor.""" + return self.__stub.GetUsePlaneProjectionFactor(self.msg).value + + @use_plane_projection_factor.setter + def use_plane_projection_factor(self, use_plane_projection_factor): + self.__stub.SetUsePlaneProjectionFactor( + messages.bool_property_message(self, use_plane_projection_factor) + ) + + @property + def plane_projection_factor(self): + """:obj:`float`: Plane projection factor used to reduce mesh complexity of large metal planes.""" + return self.__stub.GetPlaneProjectionFactor(self.msg).value + + @plane_projection_factor.setter + def plane_projection_factor(self, plane_projection_factor): + self.__stub.SetPlaneProjectionFactor( + messages.double_property_message(self, plane_projection_factor) + ) + + @property + def use_relaxed_z_axis(self): + """:obj:`bool`: Flag indicating whether to use simplified meshing along the z-axis.""" + return self.__stub.GetUseRelaxedZAxis(self.msg).value + + @use_relaxed_z_axis.setter + def use_relaxed_z_axis(self, use_relaxed_z_axis): + self.__stub.SetUseRelaxedZAxis(messages.bool_property_message(self, use_relaxed_z_axis)) + + @property + def use_eliminate_slit_per_holes(self): + """:obj:`bool`: Flag indicating whether to remove strain relief or thermal relief slits and holes.""" + return self.__stub.GetUseEliminateSlitPerHoles(self.msg).value + + @use_eliminate_slit_per_holes.setter + def use_eliminate_slit_per_holes(self, use_eliminate_slit_per_holes): + self.__stub.SetUseEliminateSlitPerHoles( + messages.bool_property_message(self, use_eliminate_slit_per_holes) + ) + + @property + def eliminate_slit_per_holes(self): + """:obj:`float`: Threshold for strain or thermal relief slits and holes polygon areas.""" + return self.__stub.GetEliminateSlitPerHoles(self.msg).value + + @eliminate_slit_per_holes.setter + def eliminate_slit_per_holes(self, eliminate_slit_per_holes): + self.__stub.SetEliminateSlitPerHoles( + messages.double_property_message(self, eliminate_slit_per_holes) + ) + + @property + def use_arc_resolution(self): + """:obj:`bool`: Flag indicating whether to approximate arcs with polygons.""" + return self.__stub.GetUseArcResolution(self.msg).value + + @use_arc_resolution.setter + def use_arc_resolution(self, use_arc_resolution): + self.__stub.SetUseArcResolution(messages.bool_property_message(self, use_arc_resolution)) + + @property + def arc_resolution(self): + """:obj:`str`: Number of vertices to approximate arcs with.""" + return self.__stub.GetArcResolution(self.msg).value + + @arc_resolution.setter + def arc_resolution(self, arc_resolution): + self.__stub.SetArcResolution(messages.string_property_message(self, arc_resolution)) + + @property + def use_auto_removal_sliver_poly(self): + """:obj:`bool`: Flag indicating whether to automatically align slight misaligned overlapping polygons.""" + return self.__stub.GetUseAutoRemovalSliverPoly(self.msg).value + + @use_auto_removal_sliver_poly.setter + def use_auto_removal_sliver_poly(self, use_auto_removal_sliver_poly): + self.__stub.SetUseAutoRemovalSliverPoly( + messages.bool_property_message(self, use_auto_removal_sliver_poly) + ) + + @property + def auto_removal_sliver_poly(self): + """:obj:`float`: Automatic sliver polygon removal tolerance.""" + return self.__stub.GetAutoRemovalSliverPoly(self.msg).value + + @auto_removal_sliver_poly.setter + def auto_removal_sliver_poly(self, auto_removal_sliver_poly): + self.__stub.SetAutoRemovalSliverPoly( + messages.double_property_message(self, auto_removal_sliver_poly) + ) + + @property + def use_accelerate_via_extraction(self): + """:obj:`bool`: Flag indicating whether to simplify/merge neighboring vias.""" + return self.__stub.GetUseAccelerateViaExtraction(self.msg).value + + @use_accelerate_via_extraction.setter + def use_accelerate_via_extraction(self, use_accelerate_via_extraction): + self.__stub.SetUseAccelerateViaExtraction( + messages.bool_property_message(self, use_accelerate_via_extraction) + ) + + @property + def use_enable_substrate_network_extraction(self): + """:obj:`bool`: Enables modeling of substrate coupling effects using equivalent distributed RC networks.""" + return self.__stub.GetUseEnableSubstrateNetworkExtraction(self.msg).value + + @use_enable_substrate_network_extraction.setter + def use_enable_substrate_network_extraction(self, use_enable_substrate_network_extraction): + self.__stub.SetUseEnableSubstrateNetworkExtraction( + messages.bool_property_message(self, use_enable_substrate_network_extraction) + ) + + @property + def use_lde(self): + """:obj:`bool`: Flag indicating whether to take variations in resistivity into account.""" + return self.__stub.GetUseLDE(self.msg).value + + @use_lde.setter + def use_lde(self, use_lde): + self.__stub.SetUseLDE(messages.bool_property_message(self, use_lde)) + + @property + def use_extract_floating_metals_dummy(self): + """:obj:`bool`: Flag indicating whether to model floating metals as dummy fills.""" + return self.__stub.GetUseExtractFloatingMetalsDummy(self.msg).value + + @use_extract_floating_metals_dummy.setter + def use_extract_floating_metals_dummy(self, use_extract_floating_metals_dummy): + self.__stub.SetUseExtractFloatingMetalsDummy( + messages.bool_property_message(self, use_extract_floating_metals_dummy) + ) + + @property + def use_extract_floating_metals_floating(self): + """:obj:`bool`: Flag indicating whether to model floating metals as floating nets.""" + return self.__stub.GetUseExtractFloatingMetalsFloating(self.msg).value + + @use_extract_floating_metals_floating.setter + def use_extract_floating_metals_floating(self, use_extract_floating_metals_floating): + self.__stub.SetUseExtractFloatingMetalsFloating( + messages.bool_property_message(self, use_extract_floating_metals_floating) + ) + + @property + def use_enable_etch_transform(self): + """:obj:`bool`: Flag indicating whether to "pre-distort" the layout based on foundry rules.""" + return self.__stub.GetUseEnableEtchTransform(self.msg).value + + @use_enable_etch_transform.setter + def use_enable_etch_transform(self, use_enable_etch_transform): + self.__stub.SetUseEnableEtchTransform( + messages.bool_property_message(self, use_enable_etch_transform) + ) + + @property + def use_enable_hybrid_extraction(self): + """:obj:`bool`: Allows modeler to split the layout into two parts in an attempt to decrease the complexity.""" + return self.__stub.GetUseEnableHybridExtraction(self.msg).value + + @use_enable_hybrid_extraction.setter + def use_enable_hybrid_extraction(self, use_enable_hybrid_extraction): + self.__stub.SetUseEnableHybridExtraction( + messages.bool_property_message(self, use_enable_hybrid_extraction) + ) + + @property + def use_enable_advanced_cap_effects(self): + """:obj:`bool`: Flag indicating whether to apply capacitance related effects such as conformal dielectrics.""" + return self.__stub.GetUseEnableAdvancedCapEffects(self.msg).value + + @use_enable_advanced_cap_effects.setter + def use_enable_advanced_cap_effects(self, use_enable_advanced_cap_effects): + self.__stub.SetUseEnableAdvancedCapEffects( + messages.bool_property_message(self, use_enable_advanced_cap_effects) + ) + + @property + def use_override_shrink_factor(self): + """:obj:`bool`: Flag indicating whether to override shrink factor.""" + return self.__stub.GetUseOverrideShrinkFac(self.msg).value + + @use_override_shrink_factor.setter + def use_override_shrink_factor(self, use_override_shrink_factor): + self.__stub.SetUseOverrideShrinkFac( + messages.bool_property_message(self, use_override_shrink_factor) + ) + + @property + def override_shrink_factor(self): + """:obj:`float`: Shrink factor override value.""" + return self.__stub.GetOverrideShrinkFac(self.msg).value + + @override_shrink_factor.setter + def override_shrink_factor(self, override_shrink_factor): + self.__stub.SetOverrideShrinkFac( + messages.double_property_message(self, override_shrink_factor) + ) + + @property + def advanced_options(self): + """:obj:`dict` { :obj:`str` : :obj:`list`[:obj:`str`] }: Advanced options.""" + return _to_options_dict(self.__stub.GetAdvancedOptions(self.msg)) + + @advanced_options.setter + def advanced_options(self, advanced_options): + self.__stub.SetAdvancedOptions( + _to_raptor_x_sim_settings_options_property_msg(self, advanced_options) + ) + + @property + def net_settings_options(self): + """:obj:`dict` { :obj:`str` : :obj:`list`[:obj:`str`] }: Net settings options.""" + return _to_options_dict(self.__stub.GetNetSettingsOptions(self.msg)) + + @net_settings_options.setter + def net_settings_options(self, net_settings_options): + self.__stub.SetNetSettingsOptions( + _to_raptor_x_sim_settings_options_property_msg(self, net_settings_options) + ) diff --git a/src/ansys/edb/simulation_setup/raptor_x_simulation_setup.py b/src/ansys/edb/simulation_setup/raptor_x_simulation_setup.py new file mode 100644 index 0000000000..438e89cd52 --- /dev/null +++ b/src/ansys/edb/simulation_setup/raptor_x_simulation_setup.py @@ -0,0 +1,31 @@ +"""RaptorX Simulation Setup.""" + +from ansys.edb.simulation_setup.raptor_x_simulation_settings import RaptorXSimulationSettings +from ansys.edb.simulation_setup.simulation_setup import SimulationSetup, SimulationSetupType + + +class RaptorXSimulationSetup(SimulationSetup): + """Class representing RaptorX simulation setup data.""" + + @classmethod + def create(cls, cell, name): + """Create a RaptorXSimulationSetup. + + Parameters + ---------- + cell : :class:`Cell ` + Cell containing new simulation setup. + name : str + Name of new simulation setup + + Returns + ------- + RaptorXSimulationSetup + Newly created simulation setup. + """ + return super()._create(cell, name, SimulationSetupType.RAPTOR_X) + + @property + def settings(self): + """:class:`RaptorXSimulationSettings`: Simulation settings of the RaptorX simulation setup.""" + return RaptorXSimulationSettings(self) diff --git a/src/ansys/edb/simulation_setup/simulation_setup.py b/src/ansys/edb/simulation_setup/simulation_setup.py index 078a54f306..3732cc0f9a 100644 --- a/src/ansys/edb/simulation_setup/simulation_setup.py +++ b/src/ansys/edb/simulation_setup/simulation_setup.py @@ -21,7 +21,10 @@ class SimulationSetupType(Enum): - HFSS """ - HFSS = edb_defs_pb2.HFSS + HFSS = edb_defs_pb2.HFSS_SIM + SI_WAVE = edb_defs_pb2.SI_WAVE_SIM + SI_WAVE_DCIR = edb_defs_pb2.SI_WAVE_DCIR_SIM + RAPTOR_X = edb_defs_pb2.RAPTOR_X_SIM class SweepData: @@ -160,3 +163,35 @@ def sweep_data(self, sweep_data): target=self.msg, sweeps=SweepDataListMessage(sweep_data=sweep_data_msgs) ) ) + + @property + def type(self): + """:class:`SimulationSetupType`: Type of the simulation setup.""" + return SimulationSetupType(self.__stub.GetType(self.msg).type) + + def cast(self): + """Cast the base SimulationSetup object to correct subclass, if possible. + + Returns + ------- + SimulationSetup + """ + from ansys.edb.simulation_setup import ( + HfssSimulationSetup, + RaptorXSimulationSetup, + SIWaveDCIRSimulationSetup, + SIWaveSimulationSetup, + ) + + if self.is_null: + return + + sim_type = self.type + if sim_type == SimulationSetupType.HFSS: + return HfssSimulationSetup(self.msg) + elif sim_type == SimulationSetupType.SI_WAVE: + return SIWaveSimulationSetup(self.msg) + elif sim_type == SimulationSetupType.SI_WAVE_DCIR: + return SIWaveDCIRSimulationSetup(self.msg) + elif sim_type == SimulationSetupType.RAPTOR_X: + return RaptorXSimulationSetup(self.msg) diff --git a/src/ansys/edb/simulation_setup/siwave_dcir_simulation_settings.py b/src/ansys/edb/simulation_setup/siwave_dcir_simulation_settings.py new file mode 100644 index 0000000000..c5341281ce --- /dev/null +++ b/src/ansys/edb/simulation_setup/siwave_dcir_simulation_settings.py @@ -0,0 +1,137 @@ +"""SIWave DCIR Simulation Settings.""" + +import ansys.api.edb.v1.siwave_dcir_simulation_settings_pb2 as pb + +from ansys.edb.core import messages +from ansys.edb.session import SIWaveDCIRSimulationSettingsServiceStub, StubAccessor, StubType +from ansys.edb.simulation_setup.siwave_simulation_settings import SIWaveSimulationSettings + + +class SIWaveDCIRSimulationSettings(SIWaveSimulationSettings): + """Class representing SIWave DCIR simulation settings.""" + + __stub: SIWaveDCIRSimulationSettingsServiceStub = StubAccessor( + StubType.siwave_dcir_sim_settings + ) + + @property + def icepak_temp_file(self): + """:obj:`bool`: File path to file containing Icepak temperature map to be imported.""" + return self.__stub.GetIcepakTempFile(self.msg).value + + @icepak_temp_file.setter + def icepak_temp_file(self, icepak_temp_file): + self.__stub.SetIcepakTempFile(messages.string_property_message(self, icepak_temp_file)) + + @property + def source_terms_to_ground(self): + """:obj:`dict` { :obj:`str` : :obj:`int` }: A dictionary of SourceName, NodeToGround pairs. + + NodeToGround is one of 0 (unspecified), 1 (negative), 2 (positive) + """ + return { + source: t_to_g + for (source, t_to_g) in self.__stub.GetSourceTermsToGround( + self.msg + ).source_terms_to_ground.items() + } + + @source_terms_to_ground.setter + def source_terms_to_ground(self, source_terms_to_ground): + self.__stub.SetSourceTermsToGround( + pb.SourceTermsToGroundPropertyMessage( + target=self.msg, + value=pb.SourceTermsToGroundMessage(source_terms_to_ground=source_terms_to_ground), + ) + ) + + @property + def export_dc_thermal_data(self): + """:obj:`bool`: Flag indicating whether to export dc thermal data.""" + return self.__stub.GetExportDCThermalData(self.msg).value + + @export_dc_thermal_data.setter + def export_dc_thermal_data(self, export_dc_thermal_data): + self.__stub.SetExportDCThermalData( + messages.bool_property_message(self, export_dc_thermal_data) + ) + + @property + def import_thermal_data(self): + """:obj:`bool`: Flag indicating whether to import thermal data.""" + return self.__stub.GetImportThermalData(self.msg).value + + @import_thermal_data.setter + def import_thermal_data(self, import_thermal_data): + self.__stub.SetImportThermalData(messages.bool_property_message(self, import_thermal_data)) + + @property + def full_dc_report_path(self): + """:obj:`str`: DC report path.""" + return self.__stub.GetFullDCReportPath(self.msg).value + + @full_dc_report_path.setter + def full_dc_report_path(self, full_dc_report_path): + self.__stub.SetFullDCReportPath(messages.string_property_message(self, full_dc_report_path)) + + @property + def via_report_path(self): + """:obj:`str`: Via report path.""" + return self.__stub.GetViaReportPath(self.msg).value + + @via_report_path.setter + def via_report_path(self, via_report_path): + self.__stub.SetViaReportPath(messages.string_property_message(self, via_report_path)) + + @property + def per_pin_res_path(self): + """:obj:`str`: Per pin res path.""" + return self.__stub.GetPerPinResPath(self.msg).value + + @per_pin_res_path.setter + def per_pin_res_path(self, per_pin_res_path): + self.__stub.SetPerPinResPath(messages.string_property_message(self, per_pin_res_path)) + + @property + def dc_report_config_file(self): + """:obj:`str`: DC report config file.""" + return self.__stub.GetDCReportConfigFile(self.msg).value + + @dc_report_config_file.setter + def dc_report_config_file(self, dc_report_config_file): + self.__stub.SetDCReportConfigFile( + messages.string_property_message(self, dc_report_config_file) + ) + + @property + def dc_report_show_active_devices(self): + """:obj:`bool`: Flag indicating whether to show active devices in the DC report.""" + return self.__stub.GetDCReportShowActiveDevices(self.msg).value + + @dc_report_show_active_devices.setter + def dc_report_show_active_devices(self, dc_report_show_active_devices): + self.__stub.SetDCReportShowActiveDevices( + messages.bool_property_message(self, dc_report_show_active_devices) + ) + + @property + def per_pin_use_pin_format(self): + """:obj:`bool`: Flag indicating per pin use pin format.""" + return self.__stub.GetPerPinUsePinFormat(self.msg).value + + @per_pin_use_pin_format.setter + def per_pin_use_pin_format(self, per_pin_use_pin_format): + self.__stub.SetPerPinUsePinFormat( + messages.bool_property_message(self, per_pin_use_pin_format) + ) + + @property + def use_loop_res_for_per_pin(self): + """:obj:`bool`: Flag indicating whether to use loop res for per pin.""" + return self.__stub.GetUseLoopResForPerPin(self.msg).value + + @use_loop_res_for_per_pin.setter + def use_loop_res_for_per_pin(self, use_loop_res_for_per_pin): + self.__stub.SetUseLoopResForPerPin( + messages.bool_property_message(self, use_loop_res_for_per_pin) + ) diff --git a/src/ansys/edb/simulation_setup/siwave_dcir_simulation_setup.py b/src/ansys/edb/simulation_setup/siwave_dcir_simulation_setup.py new file mode 100644 index 0000000000..54a624b22e --- /dev/null +++ b/src/ansys/edb/simulation_setup/siwave_dcir_simulation_setup.py @@ -0,0 +1,31 @@ +"""SIWave Simulation Setup.""" + +from ansys.edb.simulation_setup.simulation_setup import SimulationSetup, SimulationSetupType +from ansys.edb.simulation_setup.siwave_dcir_simulation_settings import SIWaveDCIRSimulationSettings + + +class SIWaveDCIRSimulationSetup(SimulationSetup): + """Class representing SIWave DCIR simulation setup data.""" + + @classmethod + def create(cls, cell, name): + """Create a SIWaveDCIRSimulationSetup. + + Parameters + ---------- + cell : :class:`Cell ` + Cell containing new simulation setup. + name : str + Name of new simulation setup + + Returns + ------- + SIWaveDCIRSimulationSetup + Newly created simulation setup. + """ + return super()._create(cell, name, SimulationSetupType.SI_WAVE_DCIR) + + @property + def settings(self): + """:class:`SIWaveSimulationSettings`: Simulation settings of the siwave simulation setup.""" + return SIWaveDCIRSimulationSettings(self) diff --git a/src/ansys/edb/simulation_setup/siwave_simulation_settings.py b/src/ansys/edb/simulation_setup/siwave_simulation_settings.py new file mode 100644 index 0000000000..254a9909ea --- /dev/null +++ b/src/ansys/edb/simulation_setup/siwave_simulation_settings.py @@ -0,0 +1,586 @@ +"""SIWave Simulation Settings.""" + +from enum import Enum + +import ansys.api.edb.v1.siwave_simulation_settings_pb2 as pb + +from ansys.edb.core import messages +from ansys.edb.session import ( + SIWaveAdvancedSettingsServiceStub, + SIWaveDCAdvancedSettingsServiceStub, + SIWaveDCSettingsServiceStub, + SIWaveGeneralSettingsServiceStub, + SIWaveSParameterSettingsServiceStub, + StubAccessor, + StubType, +) +from ansys.edb.simulation_setup.simulation_settings import ( + SimulationSettings, + SimulationSettingsBase, +) + + +class SParamInterpolation(Enum): + """Enum representing s parameter interpolation types. + + - POINT_IN + - LINEAR_IN + - STEP_IN + """ + + POINT_IN = pb.POINT_IN + LINEAR_IN = pb.LINEAR_IN + STEP_IN = pb.STEP_IN + + +class SParamExtrapolation(Enum): + """Enum representing s parameter extrapolation types. + + - ZERO_EX + - SAME_EX + - LINEAR_EX + - CONSTANT_EX + """ + + ZERO_EX = pb.ZERO_EX + SAME_EX = pb.SAME_EX + LINEAR_EX = pb.LINEAR_EX + CONSTANT_EX = pb.CONSTANT_EX + + +class SParamDCBehavior(Enum): + """Enum representing s parameter dc behavior types. + + - ZERO_DC + - SAME_DC + - LINEAR_DC + - CONSTANT_DC + - ONE_PORT_CAPACITOR_DC + - OPEN_DC + """ + + ZERO_DC = pb.ZERO_DC + SAME_DC = pb.SAME_DC + LINEAR_DC = pb.LINEAR_DC + CONSTANT_DC = pb.CONSTANT_DC + ONE_PORT_CAPACITOR_DC = pb.ONE_PORT_CAPACITOR_DC + OPEN_DC = pb.OPEN_DC + + +class SIWaveSimulationSettings(SimulationSettings): + """Class representing SIWave simulation settings.""" + + @property + def general(self): + """:class:`SIWaveGeneralSettings`: General settings for SIWave simulations.""" + return SIWaveGeneralSettings(self._sim_setup) + + @property + def advanced(self): + """:class:`SIWaveAdvancedSettings`: Advanced settings for SIWave simulations.""" + return SIWaveAdvancedSettings(self._sim_setup) + + @property + def dc(self): + """:class:`SIWaveDCSettings`: DC settings for SIWave simulations.""" + return SIWaveDCSettings(self._sim_setup) + + @property + def dc_advanced(self): + """:class:`SIWaveDCAdvancedSettings`: Advanced dc settings for SIWave simulations.""" + return SIWaveDCAdvancedSettings(self._sim_setup) + + @property + def s_parameter(self): + """:class:`SIWaveSParameterSettings`: S parameter settings for SIWave simulations.""" + return SIWaveSParameterSettings(self._sim_setup) + + +class SIWaveGeneralSettings(SimulationSettingsBase): + """Class representing general settings for SIWave simulations.""" + + __stub: SIWaveGeneralSettingsServiceStub = StubAccessor(StubType.siwave_general_sim_settings) + + @property + def use_si_settings(self): + """:obj:`bool`: Flag indicating whether to use SI or PI settings.""" + return self.__stub.GetUseSISettings(self.msg).value + + @use_si_settings.setter + def use_si_settings(self, use_si_settings): + self.__stub.SetUseSISettings(messages.bool_property_message(self, use_si_settings)) + + @property + def use_custom_settings(self): + """:obj:`bool`: Flag indicating whether to use custom settings rather than PI/SI settings.""" + return self.__stub.GetUseCustomSettings(self.msg).value + + @use_custom_settings.setter + def use_custom_settings(self, use_si_settings): + self.__stub.SetUseCustomSettings(messages.bool_property_message(self, use_si_settings)) + + @property + def si_slider_pos(self): + """:obj:`int`: SI slider position value.""" + return self.__stub.GetSISliderPos(self.msg).value + + @si_slider_pos.setter + def si_slider_pos(self, si_slider_pos): + self.__stub.SetSISliderPos(messages.int_property_message(self, si_slider_pos)) + + @property + def pi_slider_pos(self): + """:obj:`int`: PI slider position value.""" + return self.__stub.GetPISliderPos(self.msg).value + + @pi_slider_pos.setter + def pi_slider_pos(self, pi_slider_pos): + self.__stub.SetPISliderPos(messages.int_property_message(self, pi_slider_pos)) + + +class SIWaveAdvancedSettings(SimulationSettingsBase): + """Class representing advanced settings for SIWave simulations.""" + + __stub: SIWaveAdvancedSettingsServiceStub = StubAccessor(StubType.siwave_advanced_sim_settings) + + @property + def include_co_plane_coupling(self): + """:obj:`bool`: Flag indicating whether to include co-plane coupling.""" + return self.__stub.GetIncludeCoPlaneCoupling(self.msg).value + + @include_co_plane_coupling.setter + def include_co_plane_coupling(self, include_co_plane_coupling): + self.__stub.SetIncludeCoPlaneCoupling( + messages.bool_property_message(self, include_co_plane_coupling) + ) + + @property + def include_inter_plane_coupling(self): + """:obj:`bool`: Flag indicating whether to include inter-plane coupling.""" + return self.__stub.GetIncludeInterPlaneCoupling(self.msg).value + + @include_inter_plane_coupling.setter + def include_inter_plane_coupling(self, include_inter_plane_coupling): + self.__stub.SetIncludeInterPlaneCoupling( + messages.bool_property_message(self, include_inter_plane_coupling) + ) + + @property + def include_split_plane_coupling(self): + """:obj:`bool`: Flag indicating whether to include split-plane coupling.""" + return self.__stub.GetIncludeSplitPlaneCoupling(self.msg).value + + @include_split_plane_coupling.setter + def include_split_plane_coupling(self, include_split_plane_coupling): + self.__stub.SetIncludeSplitPlaneCoupling( + messages.bool_property_message(self, include_split_plane_coupling) + ) + + @property + def include_fringe_plane_coupling(self): + """:obj:`bool`: Flag indicating whether to include fringe-plane coupling.""" + return self.__stub.GetIncludeFringePlaneCoupling(self.msg).value + + @include_fringe_plane_coupling.setter + def include_fringe_plane_coupling(self, include_fringe_plane_coupling): + self.__stub.SetIncludeFringePlaneCoupling( + messages.bool_property_message(self, include_fringe_plane_coupling) + ) + + @property + def include_trace_plane_coupling(self): + """:obj:`bool`: Flag indicating whether to include trace-plane coupling.""" + return self.__stub.GetIncludeTracePlaneCoupling(self.msg).value + + @include_trace_plane_coupling.setter + def include_trace_plane_coupling(self, include_trace_plane_coupling): + self.__stub.SetIncludeTracePlaneCoupling( + messages.bool_property_message(self, include_trace_plane_coupling) + ) + + @property + def cross_talk_threshold(self): + """:obj:`str`: Cross-talk threshold.""" + return self.__stub.GetCrossTalkThreshold(self.msg).value + + @cross_talk_threshold.setter + def cross_talk_threshold(self, cross_talk_threshold): + self.__stub.SetCrossTalkThreshold( + messages.string_property_message(self, cross_talk_threshold) + ) + + @property + def max_coupled_lines(self): + """:obj:`int`: Maximum number of coupled lines.""" + return self.__stub.GetMaxCoupledLines(self.msg).value + + @max_coupled_lines.setter + def max_coupled_lines(self, max_coupled_lines): + self.__stub.SetMaxCoupledLines(messages.int_property_message(self, max_coupled_lines)) + + @property + def min_void_area(self): + """:obj:`str`: Minimum void area.""" + return self.__stub.GetMinVoidArea(self.msg).value + + @min_void_area.setter + def min_void_area(self, min_void_area): + self.__stub.SetMinVoidArea(messages.string_property_message(self, min_void_area)) + + @property + def min_pad_area_to_mesh(self): + """:obj:`str`: Minimum pad area to mesh.""" + return self.__stub.GetMinPadAreaToMesh(self.msg).value + + @min_pad_area_to_mesh.setter + def min_pad_area_to_mesh(self, min_pad_area_to_mesh): + self.__stub.SetMinPadAreaToMesh( + messages.string_property_message(self, min_pad_area_to_mesh) + ) + + @property + def min_plane_area_to_mesh(self): + """:obj:`str`: Minimum plane area to mesh.""" + return self.__stub.GetMinPlaneAreaToMesh(self.msg).value + + @min_plane_area_to_mesh.setter + def min_plane_area_to_mesh(self, min_plane_area_to_mesh): + self.__stub.SetMinPlaneAreaToMesh( + messages.string_property_message(self, min_plane_area_to_mesh) + ) + + @property + def snap_length_threshold(self): + """:obj:`str`: Snapping length threshold.""" + return self.__stub.GetSnapLengthThreshold(self.msg).value + + @snap_length_threshold.setter + def snap_length_threshold(self, snap_length_threshold): + self.__stub.SetSnapLengthThreshold( + messages.string_property_message(self, snap_length_threshold) + ) + + @property + def mesh_automatic(self): + """:obj:`bool`: Flag indicating whether to automatically determine mesh refinement frequency.""" + return self.__stub.GetMeshAutomatic(self.msg).value + + @mesh_automatic.setter + def mesh_automatic(self, mesh_automatic): + self.__stub.SetMeshAutomatic(messages.bool_property_message(self, mesh_automatic)) + + @property + def mesh_frequency(self): + """:obj:`str`: Mesh refinement frequency.""" + return self.__stub.GetMeshFrequency(self.msg).value + + @mesh_frequency.setter + def mesh_frequency(self, mesh_frequency): + self.__stub.SetMeshFrequency(messages.string_property_message(self, mesh_frequency)) + + @property + def return_current_distribution(self): + """:obj:`bool`: Flag indicating whether to trace return current distribution.""" + return self.__stub.Get3DReturnCurrentDistribution(self.msg).value + + @return_current_distribution.setter + def return_current_distribution(self, return_current_distribution): + self.__stub.Set3DReturnCurrentDistribution( + messages.bool_property_message(self, return_current_distribution) + ) + + @property + def include_vi_sources(self): + """:obj:`bool`: Flag indicating whether to include voltage/current source connections/parasitics.""" + return self.__stub.GetIncludeVISources(self.msg).value + + @include_vi_sources.setter + def include_vi_sources(self, include_vi_sources): + self.__stub.SetIncludeVISources(messages.bool_property_message(self, include_vi_sources)) + + @property + def include_inf_gnd(self): + """:obj:`bool`: Flag indicating whether to include an infinite ground plane.""" + return self.__stub.GetIncludeInfGnd(self.msg).value + + @include_inf_gnd.setter + def include_inf_gnd(self, include_inf_gnd): + self.__stub.SetIncludeInfGnd(messages.bool_property_message(self, include_inf_gnd)) + + @property + def inf_gnd_location(self): + """:obj:`bool`: Infinite ground plane location.""" + return self.__stub.GetInfGndLocation(self.msg).value + + @inf_gnd_location.setter + def inf_gnd_location(self, inf_gnd_location): + self.__stub.SetInfGndLocation(messages.string_property_message(self, inf_gnd_location)) + + @property + def perform_erc(self): + """:obj:`bool`: Flag indicating whether to perform ERC during simulation setup.""" + return self.__stub.GetPerformERC(self.msg).value + + @perform_erc.setter + def perform_erc(self, perform_erc): + self.__stub.SetPerformERC(messages.bool_property_message(self, perform_erc)) + + @property + def ignore_non_functional_pads(self): + """:obj:`bool`: Flag indicating whether to ignore non-functional pads.""" + return self.__stub.GetIgnoreNonFunctionalPads(self.msg).value + + @ignore_non_functional_pads.setter + def ignore_non_functional_pads(self, ignore_non_functional_pads): + self.__stub.SetIgnoreNonFunctionalPads( + messages.bool_property_message(self, ignore_non_functional_pads) + ) + + +class SIWaveDCSettings(SimulationSettingsBase): + """Class representing dc settings for SIWave simulations.""" + + __stub: SIWaveDCSettingsServiceStub = StubAccessor(StubType.siwave_dc_sim_settings) + + @property + def use_dc_custom_settings(self): + """:obj:`bool`: Flag indicating whether to use custom dc settings.""" + return self.__stub.GetUseDCCustomSettings(self.msg).value + + @use_dc_custom_settings.setter + def use_dc_custom_settings(self, use_dc_custom_settings): + self.__stub.SetUseDCCustomSettings( + messages.bool_property_message(self, use_dc_custom_settings) + ) + + @property + def compute_inductance(self): + """:obj:`bool`: Flag indicating whether to calculate inductance.""" + return self.__stub.GetComputeInductance(self.msg).value + + @compute_inductance.setter + def compute_inductance(self, compute_inductance): + self.__stub.SetComputeInductance(messages.bool_property_message(self, compute_inductance)) + + @property + def plot_jv(self): + """:obj:`bool`: Flag indicating whether to plot current density and voltage distribution.""" + return self.__stub.GetPlotJV(self.msg).value + + @plot_jv.setter + def plot_jv(self, plot_jv): + self.__stub.SetPlotJV(messages.bool_property_message(self, plot_jv)) + + @property + def contact_radius(self): + """:obj:`str`: Circuit element contact radius.""" + return self.__stub.GetContactRadius(self.msg).value + + @contact_radius.setter + def contact_radius(self, contact_radius): + self.__stub.SetContactRadius(messages.string_property_message(self, contact_radius)) + + @property + def dc_slider_pos(self): + """:obj:`str`: DC slider position.""" + return self.__stub.GetDCSliderPos(self.msg).value + + @dc_slider_pos.setter + def dc_slider_pos(self, dc_slider_pos): + self.__stub.SetDCSliderPos(messages.int_property_message(self, dc_slider_pos)) + + +class SIWaveDCAdvancedSettings(SimulationSettingsBase): + """Class representing advanced dc settings for SIWave simulations.""" + + __stub: SIWaveDCAdvancedSettingsServiceStub = StubAccessor( + StubType.siwave_dc_advanced_sim_settings + ) + + @property + def dc_min_plane_area_to_mesh(self): + """:obj:`str`: Geometry with an area smaller than this will be ignored.""" + return self.__stub.GetDCMinPlaneAreaToMesh(self.msg).value + + @dc_min_plane_area_to_mesh.setter + def dc_min_plane_area_to_mesh(self, dc_min_plane_area_to_mesh): + self.__stub.SetDCMinPlaneAreaToMesh( + messages.string_property_message(self, dc_min_plane_area_to_mesh) + ) + + @property + def dc_min_void_area_to_mesh(self): + """:obj:`str`: Voids with an area smaller than this will be ignored.""" + return self.__stub.GetDCMinVoidAreaToMesh(self.msg).value + + @dc_min_void_area_to_mesh.setter + def dc_min_void_area_to_mesh(self, dc_min_void_area_to_mesh): + self.__stub.SetDCMinVoidAreaToMesh( + messages.string_property_message(self, dc_min_void_area_to_mesh) + ) + + @property + def max_init_mesh_edge_length(self): + """:obj:`str`: Initial max edge length.""" + return self.__stub.GetMaxInitMeshEdgeLength(self.msg).value + + @max_init_mesh_edge_length.setter + def max_init_mesh_edge_length(self, max_init_mesh_edge_length): + self.__stub.SetMaxInitMeshEdgeLength( + messages.string_property_message(self, max_init_mesh_edge_length) + ) + + @property + def perform_adaptive_refinement(self): + """:obj:`bool`: Flag indicating whether to perform adaptive refinement.""" + return self.__stub.GetPerformAdaptiveRefinement(self.msg).value + + @perform_adaptive_refinement.setter + def perform_adaptive_refinement(self, perform_adaptive_refinement): + self.__stub.SetPerformAdaptiveRefinement( + messages.bool_property_message(self, perform_adaptive_refinement) + ) + + @property + def max_num_passes(self): + """:obj:`int`: Maximum number of adaptive mesh refinement passes.""" + return self.__stub.GetMaxNumPasses(self.msg).value + + @max_num_passes.setter + def max_num_passes(self, max_num_passes): + self.__stub.SetMaxNumPasses(messages.int_property_message(self, max_num_passes)) + + @property + def min_num_passes(self): + """:obj:`int`: Minimum number of adaptive mesh refinement passes.""" + return self.__stub.GetMinNumPasses(self.msg).value + + @min_num_passes.setter + def min_num_passes(self, min_num_passes): + self.__stub.SetMinNumPasses(messages.int_property_message(self, min_num_passes)) + + @property + def percent_local_refinement(self): + """:obj:`int`: Percent local refinement used for adaptive mesh refinement.""" + return self.__stub.GetPercentLocalRefinement(self.msg).value + + @percent_local_refinement.setter + def percent_local_refinement(self, percent_local_refinement): + self.__stub.SetPercentLocalRefinement( + messages.int_property_message(self, percent_local_refinement) + ) + + @property + def energy_error(self): + """:obj:`int`: Percent energy error used for adaptive mesh refinement.""" + return self.__stub.GetEnergyError(self.msg).value + + @energy_error.setter + def energy_error(self, energy_error): + self.__stub.SetEnergyError(messages.int_property_message(self, energy_error)) + + @property + def mesh_bws(self): + """:obj:`bool`: Flag indicating whether to mesh bondwires.""" + return self.__stub.GetMeshBws(self.msg).value + + @mesh_bws.setter + def mesh_bws(self, mesh_bws): + self.__stub.SetMeshBws(messages.bool_property_message(self, mesh_bws)) + + @property + def refine_bws(self): + """:obj:`bool`: Flag indicating whether to refine mesh along bondwires.""" + return self.__stub.GetRefineBws(self.msg).value + + @refine_bws.setter + def refine_bws(self, refine_bws): + self.__stub.SetRefineBws(messages.bool_property_message(self, refine_bws)) + + @property + def mesh_vias(self): + """:obj:`bool`: Flag indicating whether to mesh vias.""" + return self.__stub.GetMeshVias(self.msg).value + + @mesh_vias.setter + def mesh_vias(self, mesh_vias): + self.__stub.SetMeshVias(messages.bool_property_message(self, mesh_vias)) + + @property + def refine_vias(self): + """:obj:`bool`: Flag indicating whether to refine mesh along vias.""" + return self.__stub.GetRefineVias(self.msg).value + + @refine_vias.setter + def refine_vias(self, refine_vias): + self.__stub.SetRefineVias(messages.bool_property_message(self, refine_vias)) + + @property + def num_bw_sides(self): + """:obj:`int`: Number of sides used to approximate cylindrical bondwires.""" + return self.__stub.GetNumBwSides(self.msg).value + + @num_bw_sides.setter + def num_bw_sides(self, num_bw_sides): + self.__stub.SetNumBwSides(messages.int_property_message(self, num_bw_sides)) + + @property + def num_via_sides(self): + """:obj:`int`: Number of sides used to approximate cylindrical vias.""" + return self.__stub.GetNumViaSides(self.msg).value + + @num_via_sides.setter + def num_via_sides(self, num_via_sides): + self.__stub.SetNumViaSides(messages.int_property_message(self, num_via_sides)) + + +class SIWaveSParameterSettings(SimulationSettingsBase): + """Class representing s parameter settings for SIWave simulations.""" + + __stub: SIWaveSParameterSettingsServiceStub = StubAccessor(StubType.siwave_s_param_sim_settings) + + @property + def use_state_space(self): + """:obj:`bool`: Flag indicating whether to use state space or custom model.""" + return self.__stub.GetUseStateSpace(self.msg).value + + @use_state_space.setter + def use_state_space(self, use_state_space): + self.__stub.SetUseStateSpace(messages.bool_property_message(self, use_state_space)) + + @property + def interpolation(self): + """:obj:`SParamInterpolation`: Interpolation type.""" + return SParamInterpolation(self.__stub.GetInterpolation(self.msg).interpolation) + + @interpolation.setter + def interpolation(self, interpolation): + self.__stub.SetInterpolation( + pb.SParamInterpolationPropertyMessage( + target=self.msg, interpolation=interpolation.value + ) + ) + + @property + def extrapolation(self): + """:obj:`SParamExtrapolation`: Extrapolation type.""" + return SParamExtrapolation(self.__stub.GetExtrapolation(self.msg).extrapolation) + + @extrapolation.setter + def extrapolation(self, extrapolation): + self.__stub.SetExtrapolation( + pb.SParamExtrapolationPropertyMessage( + target=self.msg, extrapolation=extrapolation.value + ) + ) + + @property + def dc_behavior(self): + """:obj:`SParamDCBehavior`: DC behavior type.""" + return SParamDCBehavior(self.__stub.GetDCBehavior(self.msg).dc_behavior) + + @dc_behavior.setter + def dc_behavior(self, dc_behavior): + self.__stub.SetDCBehavior( + pb.SParamDCBehaviorPropertyMessage(target=self.msg, dc_behavior=dc_behavior.value) + ) diff --git a/src/ansys/edb/simulation_setup/siwave_simulation_setup.py b/src/ansys/edb/simulation_setup/siwave_simulation_setup.py new file mode 100644 index 0000000000..b86e54099c --- /dev/null +++ b/src/ansys/edb/simulation_setup/siwave_simulation_setup.py @@ -0,0 +1,31 @@ +"""SIWave Simulation Setup.""" + +from ansys.edb.simulation_setup.simulation_setup import SimulationSetup, SimulationSetupType +from ansys.edb.simulation_setup.siwave_simulation_settings import SIWaveSimulationSettings + + +class SIWaveSimulationSetup(SimulationSetup): + """Class representing SIWave simulation setup data.""" + + @classmethod + def create(cls, cell, name): + """Create a SIWaveSimulationSetup. + + Parameters + ---------- + cell : :class:`Cell ` + Cell containing new simulation setup. + name : str + Name of new simulation setup + + Returns + ------- + SIWaveSimulationSetup + Newly created simulation setup. + """ + return super()._create(cell, name, SimulationSetupType.SI_WAVE) + + @property + def settings(self): + """:class:`SIWaveSimulationSettings`: Simulation settings of the SIWave simulation setup.""" + return SIWaveSimulationSettings(self) From 0d9d388e8e9f0b0438cb5acc8fca8d79316fd674 Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 12 Sep 2023 11:46:18 -0600 Subject: [PATCH 2/4] S641118: Fixed doc/energy error val type --- protos/ansys/api/edb/v1/siwave_simulation_settings.proto | 4 ++-- .../edb/simulation_setup/siwave_simulation_settings.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/protos/ansys/api/edb/v1/siwave_simulation_settings.proto b/protos/ansys/api/edb/v1/siwave_simulation_settings.proto index 99e57c47cd..00bf5b79e4 100644 --- a/protos/ansys/api/edb/v1/siwave_simulation_settings.proto +++ b/protos/ansys/api/edb/v1/siwave_simulation_settings.proto @@ -118,8 +118,8 @@ service SIWaveDCAdvancedSettingsService { rpc GetPercentLocalRefinement(EDBObjMessage) returns (google.protobuf.UInt64Value) {} rpc SetPercentLocalRefinement(UInt64PropertyMessage) returns (google.protobuf.Empty) {} - rpc GetEnergyError(EDBObjMessage) returns (google.protobuf.UInt64Value) {} - rpc SetEnergyError(UInt64PropertyMessage) returns (google.protobuf.Empty) {} + rpc GetEnergyError(EDBObjMessage) returns (google.protobuf.DoubleValue) {} + rpc SetEnergyError(DoublePropertyMessage) returns (google.protobuf.Empty) {} rpc GetMeshBws(EDBObjMessage) returns (google.protobuf.BoolValue) {} rpc SetMeshBws(BoolPropertyMessage) returns (google.protobuf.Empty) {} diff --git a/src/ansys/edb/simulation_setup/siwave_simulation_settings.py b/src/ansys/edb/simulation_setup/siwave_simulation_settings.py index 254a9909ea..5fe9314958 100644 --- a/src/ansys/edb/simulation_setup/siwave_simulation_settings.py +++ b/src/ansys/edb/simulation_setup/siwave_simulation_settings.py @@ -309,7 +309,7 @@ def include_inf_gnd(self, include_inf_gnd): @property def inf_gnd_location(self): - """:obj:`bool`: Infinite ground plane location.""" + """:obj:`str`: Infinite ground plane location.""" return self.__stub.GetInfGndLocation(self.msg).value @inf_gnd_location.setter @@ -382,7 +382,7 @@ def contact_radius(self, contact_radius): @property def dc_slider_pos(self): - """:obj:`str`: DC slider position.""" + """:obj:`int`: DC slider position.""" return self.__stub.GetDCSliderPos(self.msg).value @dc_slider_pos.setter @@ -472,7 +472,7 @@ def percent_local_refinement(self, percent_local_refinement): @property def energy_error(self): - """:obj:`int`: Percent energy error used for adaptive mesh refinement.""" + """:obj:`float`: Percent energy error used for adaptive mesh refinement.""" return self.__stub.GetEnergyError(self.msg).value @energy_error.setter From 46c478b3478dd03baa0e51833f40c21fec6fa5ce Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 14 Sep 2023 10:57:59 -0600 Subject: [PATCH 3/4] S641118: Fixed documentation --- doc/source/api/simulation_setup.rst | 16 ++++++++++++++++ src/ansys/edb/simulation_setup/__init__.py | 2 ++ 2 files changed, 18 insertions(+) diff --git a/doc/source/api/simulation_setup.rst b/doc/source/api/simulation_setup.rst index 4ff40126ce..a2697412ca 100644 --- a/doc/source/api/simulation_setup.rst +++ b/doc/source/api/simulation_setup.rst @@ -32,6 +32,19 @@ Classes SolverSettings SimulationSetup SweepData + RaptorXSimulationSettings + RaptorXGeneralSettings + RaptorXAdvancedSettings + RaptorXSimulationSetup + SIWaveDCIRSimulationSettings + SIWaveDCIRSimulationSetup + SIWaveSimulationSettings + SIWaveGeneralSettings + SIWaveAdvancedSettings + SIWaveDCSettings + SIWaveDCAdvancedSettings + SIWaveSParameterSettings + SIWaveSimulationSetup Enums ----- @@ -44,3 +57,6 @@ Enums BasisFunctionOrder SolverType ViaStyle + SParamInterpolation + SParamExtrapolation + SParamDCBehavior diff --git a/src/ansys/edb/simulation_setup/__init__.py b/src/ansys/edb/simulation_setup/__init__.py index 05a0baa534..8342922e34 100644 --- a/src/ansys/edb/simulation_setup/__init__.py +++ b/src/ansys/edb/simulation_setup/__init__.py @@ -29,6 +29,7 @@ from ansys.edb.simulation_setup.raptor_x_simulation_settings import ( RaptorXAdvancedSettings, RaptorXGeneralSettings, + RaptorXSimulationSettings, ) from ansys.edb.simulation_setup.raptor_x_simulation_setup import RaptorXSimulationSetup from ansys.edb.simulation_setup.simulation_settings import ( @@ -51,6 +52,7 @@ SIWaveDCAdvancedSettings, SIWaveDCSettings, SIWaveGeneralSettings, + SIWaveSimulationSettings, SIWaveSParameterSettings, SParamDCBehavior, SParamExtrapolation, From 5c70f6238f44a42ae32284e326b7dd780d32aedf Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 14 Sep 2023 14:53:05 -0600 Subject: [PATCH 4/4] S641118: Fixed energy_error msg type --- src/ansys/edb/simulation_setup/siwave_simulation_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansys/edb/simulation_setup/siwave_simulation_settings.py b/src/ansys/edb/simulation_setup/siwave_simulation_settings.py index 5fe9314958..6270ab3985 100644 --- a/src/ansys/edb/simulation_setup/siwave_simulation_settings.py +++ b/src/ansys/edb/simulation_setup/siwave_simulation_settings.py @@ -477,7 +477,7 @@ def energy_error(self): @energy_error.setter def energy_error(self, energy_error): - self.__stub.SetEnergyError(messages.int_property_message(self, energy_error)) + self.__stub.SetEnergyError(messages.double_property_message(self, energy_error)) @property def mesh_bws(self):