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; see the file COPYING. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 */
21
22
23#include "c_stripline.h"
24#include "transline.h"
25#include "units.h"
26
27
29{
30 // Must not alias C_MICROSTRIP's "Coupled_MicroStrip" key; see migration shim in
31 // TRANSLINE_IDENT::ReadConfig().
32 m_Name = "Coupled_Stripline";
33 Init();
34}
35
36
38{
39 m_calc.Analyse();
40}
41
42
47
48
50{
51 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
52 m_calc.GetAnalysisResults();
53
57
59 setResult( 1, results[TRANSLINE_PARAMETERS::EPSILON_EFF_ODD].first, "" );
60 setResult( 2, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_EVEN].first, "ps/cm" );
61 setResult( 3, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_ODD].first, "ps/cm" );
62 setResult( 4, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
63 setResult( 5, results[TRANSLINE_PARAMETERS::Z_DIFF].first, "Ω" );
64 setResult( 6, results[TRANSLINE_PARAMETERS::Z_COMM].first, "Ω" );
65 setResult( 7, results[TRANSLINE_PARAMETERS::COUPLING_K].first, "" );
66
73}
74
75
77{
78 std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>& results =
79 m_calc.GetAnalysisResults();
80
84
86 setResult( 1, results[TRANSLINE_PARAMETERS::EPSILON_EFF_ODD].first, "" );
87 setResult( 2, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_EVEN].first, "ps/cm" );
88 setResult( 3, results[TRANSLINE_PARAMETERS::UNIT_PROP_DELAY_ODD].first, "ps/cm" );
89 setResult( 4, results[TRANSLINE_PARAMETERS::SKIN_DEPTH].first / UNIT_MICRON, "µm" );
90 setResult( 5, results[TRANSLINE_PARAMETERS::Z_DIFF].first, "Ω" );
91 setResult( 6, results[TRANSLINE_PARAMETERS::Z_COMM].first, "Ω" );
92 setResult( 7, results[TRANSLINE_PARAMETERS::COUPLING_K].first, "" );
93
100}
101
102
104{
106
107 // TODO expose Z_DIFF and Z_COMM as alternative synthesis inputs once the panel framework
108 // gains a toggle between (Z0_E, Z0_O) and (Z_DIFF, Z_COMM) target modes. The math layer
109 // honours that mode when Synthesize() is called with SYNTHESIZE_OPTS::FROM_ZDIFF_ZCOMM.
129}
130
void show_results() override
Shows results.
COUPLED_STRIPLINE m_calc
Definition c_stripline.h:41
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:76
void setResult(int, double, const char *)
double m_parameters[EXTRA_PRMS_COUNT]
Definition transline.h:142
virtual void getProperties()
@function getProperties
const char * m_Name
Definition transline.h:93
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:71
@ DIELECTRIC_MODEL_PRM
Definition transline.h:77
@ EPSILONR_SPEC_FREQ_PRM
Definition transline.h:78
@ SKIN_DEPTH_PRM
Definition transline.h:72
@ Z0_O_PRM
Definition transline.h:56
@ FREQUENCY_PRM
Definition transline.h:53
@ T_PRM
Definition transline.h:48
@ Z0_E_PRM
Definition transline.h:55
@ MURC_PRM
Definition transline.h:52
@ MUR_PRM
Definition transline.h:50
@ STRIPLINE_A_PRM
Definition transline.h:47
@ TAND_PRM
Definition transline.h:42
@ PHYS_LEN_PRM
Definition transline.h:62
@ ANG_L_PRM
Definition transline.h:57
@ ROUGH_PRM
Definition transline.h:49
@ EPSILONR_PRM
Definition transline.h:41
@ PHYS_S_PRM
Definition transline.h:60
@ H_PRM
Definition transline.h:44
@ PHYS_WIDTH_PRM
Definition transline.h:58