KiCad PCB EDA Suite
Loading...
Searching...
No Matches
c_stripline.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002 Claudio Girardi <[email protected]>
3 * Copyright (C) 2005, 2006 Stefan Jahn <[email protected]>
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this package. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20
21#include "c_stripline.h"
22#include "transline.h"
23#include "units.h"
24
25
27{
28 // Must not alias C_MICROSTRIP's "Coupled_MicroStrip" key; see migration shim in
29 // TRANSLINE_IDENT::ReadConfig().
30 m_Name = "Coupled_Stripline";
31 Init();
32}
33
34
36{
37 m_calc.Analyse();
38}
39
40
45
46
48{
49 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
50 m_calc.GetAnalysisResults();
51
55
57 setResult( 1, results[TRANSLINE_PARAMETERS::EPSILON_EFF_ODD].first, "" );
58 setResult( 2, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_EVEN].first, "ps/cm" );
59 setResult( 3, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_ODD].first, "ps/cm" );
60 setResult( 4, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
61 setResult( 5, results[TRANSLINE_PARAMETERS::Z_DIFF].first, "Ω" );
62 setResult( 6, results[TRANSLINE_PARAMETERS::Z_COMM].first, "Ω" );
63 setResult( 7, results[TRANSLINE_PARAMETERS::COUPLING_K].first, "" );
64
71}
72
73
75{
76 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
77 m_calc.GetAnalysisResults();
78
82
84 setResult( 1, results[TRANSLINE_PARAMETERS::EPSILON_EFF_ODD].first, "" );
85 setResult( 2, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_EVEN].first, "ps/cm" );
86 setResult( 3, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_ODD].first, "ps/cm" );
87 setResult( 4, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
88 setResult( 5, results[TRANSLINE_PARAMETERS::Z_DIFF].first, "Ω" );
89 setResult( 6, results[TRANSLINE_PARAMETERS::Z_COMM].first, "Ω" );
90 setResult( 7, results[TRANSLINE_PARAMETERS::COUPLING_K].first, "" );
91
98}
99
100
102{
104
105 // TODO expose Z_DIFF and Z_COMM as alternative synthesis inputs once the panel framework
106 // gains a toggle between (Z0_E, Z0_O) and (Z_DIFF, Z_COMM) target modes. The math layer
107 // honours that mode when Synthesize() is called with SYNTHESIZE_OPTS::FROM_ZDIFF_ZCOMM.
127}
128
void show_results() override
Shows results.
COUPLED_STRIPLINE m_calc
Definition c_stripline.h:39
void calcAnalyze() override
Computation for analysis.
void calcSynthesize() override
Computation for synthesis.
void showAnalyze() override
Shows synthesis results and checks for errors / warnings.
void getProperties() override
@function getProperties
void showSynthesize() override
Shows analysis results and checks for errors / warnings.
void Init()
Definition transline.cpp:74
void setResult(int, double, const char *)
double m_parameters[EXTRA_PRMS_COUNT]
Definition transline.h:140
virtual void getProperties()
@function getProperties
const char * m_Name
Definition transline.h:91
static char convertParameterStatusCode(TRANSLINE_STATUS aStatus)
Converts a TRANSLINE_PARAMETER status to a PCB Calculation status.
void setProperty(enum PRMS_ID aPrmId, double aValue)
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
#define UNIT_MICRON
@ SIGMA_PRM
Definition transline.h:69
@ DIELECTRIC_MODEL_PRM
Definition transline.h:75
@ EPSILONR_SPEC_FREQ_PRM
Definition transline.h:76
@ SKIN_DEPTH_PRM
Definition transline.h:70
@ Z0_O_PRM
Definition transline.h:54
@ FREQUENCY_PRM
Definition transline.h:51
@ T_PRM
Definition transline.h:46
@ Z0_E_PRM
Definition transline.h:53
@ MURC_PRM
Definition transline.h:50
@ MUR_PRM
Definition transline.h:48
@ STRIPLINE_A_PRM
Definition transline.h:45
@ TAND_PRM
Definition transline.h:40
@ PHYS_LEN_PRM
Definition transline.h:60
@ ANG_L_PRM
Definition transline.h:55
@ ROUGH_PRM
Definition transline.h:47
@ EPSILONR_PRM
Definition transline.h:39
@ PHYS_S_PRM
Definition transline.h:58
@ H_PRM
Definition transline.h:42
@ PHYS_WIDTH_PRM
Definition transline.h:56