Compare commits

...

333 Commits

Author SHA1 Message Date
wawuwo
565efd3b81
Merge pull request #1278 from wawuwo/fix-1273-crash-in-one-two-wires
Fix crash when coordinates of wire ends are in wrong order

Fix #1273
2025-03-25 21:07:56 +01:00
Andrey Kalmykov
dfcab0a850 Fix crash when coordinates of wire ends are in wrong order
A wire loaded from a file so that its x1 coordinate is larger than
x2 coordinate causes crash. Somehow it's crucial that x1 is less
than x2. How is exactly it's crucial is not so easy to grasp so it's
easier just to go with it.

This commit fixes crashes by adding "normalization" of coordinates
just before installing the loaded wire into schematic.

Fix ra3xdh#1273
2025-03-25 20:36:32 +01:00
Vadim Kuznetsov
6c9f859a8b
Merge pull request #1275 from ra3xdh/1274_fix
Fix Xyce IC for Tline
2025-03-21 14:39:31 +01:00
Vadim Kuznetsov
b058169b94 Fix Xyce IC for Tline 2025-03-21 16:16:03 +03:00
Vadim Kuznetsov
20812e9e67
Merge pull request #1271 from wawuwo/fix-945-unable-to-paste-ports
Allow copy and paste ports in symbol editing mode
2025-03-16 17:02:57 +01:00
Andrey Kalmykov
5fb8e45e98 Allow copy and paste ports in symbol editing mode 2025-03-16 16:31:48 +01:00
Vadim Kuznetsov
36c29e226e Update QucsatorRF 2025-03-14 16:08:52 +03:00
Vadim Kuznetsov
6f253a768e
Merge pull request #1267 from ra3xdh/upd_news_25_1_1
Update NEWS, VERSION, and About dialog
2025-03-14 06:40:38 +01:00
Vadim Kuznetsov
a9af3730be Update About dialog 2025-03-13 09:08:46 +03:00
Vadim Kuznetsov
50630daab7 Update NEWS, VERSION, and MetaInfo 2025-03-13 08:50:53 +03:00
Vadim Kuznetsov
d82a737a98
Merge pull request #1261 from ra3xdh/1258_fix
Add InitialDC option for FFT
2025-02-27 14:06:10 +01:00
Vadim Kuznetsov
f945d54f80 Add InitialDC option for FFT 2025-02-27 15:14:41 +03:00
Vadim Kuznetsov
f5d7ca1219
Merge pull request #1255 from wawuwo/fix-1254-wrong-label-is-removed
Fix removing of a not selected label instead of selected
2025-02-24 13:17:27 +01:00
Andrey Kalmykov
a138bcbda4 Fix removing of a not selected label instead of selected
Fixes ra3xdh#1254
2025-02-23 19:46:23 +01:00
Vadim Kuznetsov
9c59da8c99
Merge pull request #1253 from wawuwo/thicker-ephemeral-wire
Make future wire more thicker when laying a new wire
2025-02-23 17:34:27 +01:00
Andrey Kalmykov
20caefadf8 Make future wire more thicker when laying a new wire 2025-02-23 11:30:24 +01:00
Vadim Kuznetsov
69bb9c3a1e
Merge pull request #1252 from vaxxabait/feature/gentoo_overlay
Update Gentoo ebuild
2025-02-23 11:29:02 +01:00
Michael Tulupov
577aa2f331 Remove wrong link 2025-02-23 02:38:15 +01:00
Michael Tulupov
82c95156a5 Fix build path; add doc list 2025-02-23 01:50:20 +01:00
Michael Tulupov
12feece0ba Small cleanup 2025-02-23 01:28:48 +01:00
Michael Tulupov
2c68ab5dd1 Add hashes 2025-02-23 01:21:46 +01:00
Michael Tulupov
00439f0d95 Fix package URL 2025-02-23 01:20:55 +01:00
Michael Tulupov
b9604a066e Add 25.1.0; remove deprecated flag 2025-02-23 01:06:15 +01:00
Michael Tulupov
fceb207734 Add last 24* release 2025-02-23 01:04:47 +01:00
Michael Tulupov
ccd39804d5 Improve ebuild structure 2025-02-23 01:01:41 +01:00
Michael Tulupov
3a91c4e19b Add link to manual 2025-02-23 00:59:20 +01:00
Michael Tulupov
5967818993 Add README 2025-02-23 00:56:49 +01:00
Michael Tulupov
3a71ba1afc Year bump 2025-02-22 14:09:38 +01:00
Michael Tulupov
ca39ef07a5 Reorganize into Gentoo overlay - update dolder structure, add necessary metadata 2025-02-22 14:09:00 +01:00
Vadim Kuznetsov
ad8714d56b
Merge pull request #1250 from wawuwo/fix-1245-crash-when-deleting-elements
Fix crash when deleting two shorted devices
2025-02-22 07:10:04 +01:00
Vadim Kuznetsov
8db56a38b9
Merge pull request #1249 from ra3xdh/upd_meta_info
Update MetaInfo
2025-02-22 07:04:23 +01:00
Andrey Kalmykov
ba57f6f3f0 Fix crash when deleting two shorted devices
Fixes ra3xdh#1245
2025-02-21 21:32:27 +03:00
Vadim Kuznetsov
2a59b089e8 Update MetaInfo 2025-02-21 19:00:05 +03:00
Vadim Kuznetsov
d44b2921c5
Merge pull request #1246 from antohami/russian-translation
Update Russian translation
2025-02-21 15:08:43 +01:00
Anton Midyukov
c377135f7f translations/qucs_ru.ts: shorten the inscription so it fits 2025-02-21 12:13:38 +03:00
Anton Midyukov
702e5dac0d Update Russian translation
Signed-off-by: Anton Midyukov <antohami@altlinux.org>
2025-02-21 12:13:38 +03:00
Anton Midyukov
0cabe22a1c translations: Update source strings in TS files
Signed-off-by: Anton Midyukov <antohami@altlinux.org>
2025-02-21 12:13:38 +03:00
Anton Midyukov
e317aa50dc Improvement of internationalization
Signed-off-by: Anton Midyukov <antohami@altlinux.org>
2025-02-21 12:13:38 +03:00
Anton Midyukov
3a4056880a Update Russian translation
Signed-off-by: Anton Midyukov <antohami@altlinux.org>
2025-02-21 12:13:38 +03:00
Anton Midyukov
cd14ebabe9 translations: Update source strings in TS files
Signed-off-by: Anton Midyukov <antohami@altlinux.org>
2025-02-21 12:13:38 +03:00
Vadim Kuznetsov
2c0d49649b Update QucsatorRF to v1.0.4 2025-02-20 10:58:27 +03:00
Vadim Kuznetsov
db0cff79f9
Merge pull request #1240 from ra3xdh/upd_ana_lib
Library update
2025-02-18 11:14:59 +03:00
Vadim Kuznetsov
26ffe6b4b2 Update NEWS and About dialog 2025-02-18 10:27:23 +03:00
Vadim Kuznetsov
df9ce13d9a Add RC.lib 2025-02-18 10:08:20 +03:00
Vadim Kuznetsov
c0804cc07f Add AD8221 IC 2025-02-18 09:44:26 +03:00
Vadim Kuznetsov
eff2da648a
Merge pull request #1237 from wawuwo/refactor-out-some-q3ptrlist-usages
Replace some Q3PtrList usages with QList
2025-02-15 19:08:14 +03:00
Vadim Kuznetsov
f114398101
Merge pull request #1239 from dsm/current
update qt and ngspice
2025-02-11 13:36:32 +03:00
Vadim Kuznetsov
57816d6596
Merge pull request #1236 from wawuwo/refactor-schematic-set-component-number
Refactor Schematic::setComponentNumber()
2025-02-10 10:51:41 +03:00
Vadim Kuznetsov
b392e25627
Merge pull request #1235 from wawuwo/refactor-schematik-size-of-selection
Refactor Schematic::sizeOfSelection() and its usages
2025-02-10 10:49:30 +03:00
Muhammet Şükrü Demir
253c985864
update qt and ngspice
update Qt v6.8.2 and ngspice v44.2
2025-02-10 10:23:08 +03:00
Vadim Kuznetsov
c1a05d4c03
Merge pull request #1232 from wawuwo/more-wire-forms
Add two new wire forms
2025-02-10 09:55:40 +03:00
Andrey Kalmykov
3ac7d9e435 Replace some Q3PtrList usages with QList 2025-02-09 22:13:09 +01:00
Andrey Kalmykov
8c99e2f1b1 Refactor Schematic::setComponentNumber() 2025-02-09 12:40:32 +01:00
Andrey Kalmykov
5733d1827d Use Schematic::currentSelection() wherever possible 2025-02-09 10:38:44 +01:00
Andrey Kalmykov
1ac773f4f2 Rename Schematic::sizeOfSelection() 2025-02-09 10:35:19 +01:00
Andrey Kalmykov
cbfb060786 Refactor Schematic::sizeOfSelection 2025-02-09 10:35:19 +01:00
Andrey Kalmykov
8f0fc38487 Fix crash when new wire ends at the other wire's end 2025-02-07 15:53:34 +03:00
Andrey Kalmykov
6fb5f15c57 Add new wire routes when laying a new wire 2025-02-07 08:40:22 +03:00
Andrey Kalmykov
43aa0f518b Add Schematic::connectWithWire() and Schematic::showEphemeralWire 2025-02-07 08:40:22 +03:00
Andrey Kalmykov
d4d487298c Add wire planner 2025-02-07 08:37:57 +03:00
Vadim Kuznetsov
a1a157b7c8
Merge pull request #1231 from ra3xdh/lib_dgmos_analog
Add NE592 model
2025-02-06 21:25:53 +03:00
Vadim Kuznetsov
df2353b911 Add NE592 2025-02-06 20:16:45 +03:00
Vadim Kuznetsov
191971d4aa
Merge pull request #1229 from ra3xdh/lib_dgmos_analog
Library update
2025-02-05 19:55:44 +03:00
Vadim Kuznetsov
3440d36941 Fixed Qucs equation export 2025-02-05 19:36:47 +03:00
Vadim Kuznetsov
d047c7e9e1 Update NEWS.md 2025-02-05 19:10:35 +03:00
Vadim Kuznetsov
cc490858f8 Add two new libraries 2025-02-05 16:22:49 +03:00
Vadim Kuznetsov
75040f363d
Merge pull request #1201 from ThomasZecha/current
Introduce optional netlisting to console
2025-02-04 13:08:12 +03:00
Vadim Kuznetsov
4637aa9260
Merge pull request #1226 from ra3xdh/upd_news
Update NEWS and VERSION before release
2025-02-02 16:22:36 +03:00
Vadim Kuznetsov
50f3f08ec8 Update VERSION 2025-02-02 15:57:57 +03:00
Vadim Kuznetsov
e74100f94c Update NEWS.md 2025-02-02 15:57:57 +03:00
Vadim Kuznetsov
2147756fb3
Merge pull request #1218 from ra3xdh/1217_fix
Add offset and Td parameters for AC current source
2025-01-23 12:52:56 +03:00
Vadim Kuznetsov
e2f63ad2e1 Add offset and Td parameters for AC current source 2025-01-23 09:21:41 +03:00
Vadim Kuznetsov
c98551d9a2
Merge pull request #1216 from ra3xdh/867_lib_update
Library update
2025-01-22 20:08:37 +03:00
Vadim Kuznetsov
65bb557775 Library update 2025-01-22 19:30:39 +03:00
Vadim Kuznetsov
1600e3f53a
Merge pull request #1211 from ra3xdh/fix_1120
Fixed nested subcircuits processing in Spice Library Device
2025-01-19 20:37:38 +03:00
Vadim Kuznetsov
5dfd16975b Don't put OPTIONAL in the pins list 2025-01-19 19:25:19 +03:00
Vadim Kuznetsov
ec9624a268 Fix processing of nested subcircuits with SpiceLibComp 2025-01-19 19:19:38 +03:00
ThomasZecha
e27883ff95 Introduce optional netlisting to console
-Replaced Component::getProbeVariable(bool isXyce) with
 Component::getProbeVariable(spicecompat::SpiceDialect dialect)

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2025-01-19 15:38:13 +01:00
ThomasZecha
63d6d07000 Introduce optional netlisting to console
-Replaced Component::getExpression(bool isXyce, bool isCdl) with
 Component::getExpression(spicecompat::SpiceDialect dialect)

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2025-01-19 15:18:42 +01:00
ThomasZecha
b79d94ef2a Introduce optional netlisting to console
-Introduced cli parameter --cdl for netlisting CDL
-Implemented netlisting to console for ngspice and xyce
-Increased readability and introduced smart-pointer semantics for some
 qucs-s main.cpp functions
-Increased readability and introduced c++ cast's for casting to
 Schematic* for affected QucsApp::slotSimulateWithSpice and QucsApp::slotSaveNetlist

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2025-01-19 14:19:21 +01:00
ThomasZecha
e6f35a35ff Introduce optional netlisting to console
-Implemented conditional netlisting to console for CDL
-forced using trailing a_ for class attributes instead ms-style m_ for
 class QucsApp
-removed unused attribute m_projModel from class QucsApp

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2025-01-19 14:19:21 +01:00
ThomasZecha
b4d985d268 Introduce optional netlisting to console
-Replaced qucs_s manual commandline parsing with QCommandLineParser
-Introduced new cli-parameter for netlisting to console

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2025-01-19 14:19:21 +01:00
Vadim Kuznetsov
a09b9c68fe
Merge pull request #1210 from ra3xdh/944_splibcomp_library
Create Library from Spice library device
2025-01-19 14:48:17 +03:00
Vadim Kuznetsov
2261b6caf2 Remove remains of XSPICE CM builder 2025-01-19 14:31:44 +03:00
Vadim Kuznetsov
fcdcaeaebe Add swtich to supress digital model generation when creating library 2025-01-19 14:31:44 +03:00
Vadim Kuznetsov
6adc782cff Implement attaching of SPICE libraries to Qucs XML libraries
SPICE libraries referenced by SpiceLibComp are copied to the the
subdirectory when creating a library from project.
2025-01-19 14:31:32 +03:00
Vadim Kuznetsov
d609a25547
Merge pull request #1208 from ra3xdh/1134_fix
Fix rectangle resize
2025-01-17 18:49:36 +03:00
Vadim Kuznetsov
cc7dd5f95f Fix rectangle resize 2025-01-17 18:32:23 +03:00
Vadim Kuznetsov
03a0c6b2ca
Merge pull request #1206 from ra3xdh/1134_fix
Fixed schematic editor issues
2025-01-16 20:58:08 +03:00
Vadim Kuznetsov
050665e022 Fix rectangle select after rotate 2025-01-16 20:33:07 +03:00
Vadim Kuznetsov
63e087eb6f Fix text shift after mirror 2025-01-16 18:54:51 +03:00
Vadim Kuznetsov
b549138221
Merge pull request #1203 from ra3xdh/1202_fix
Fix SPICE multilitne header parsing
2025-01-10 15:33:25 +01:00
Vadim Kuznetsov
b6c789b5d3 Fix SPICE multilitne header parsing 2025-01-10 17:08:21 +03:00
Vadim Kuznetsov
f0fb726b2b
Merge pull request #1200 from ra3xdh/digi_lib_xspice
Upload digital XSPICE library
2025-01-09 16:44:19 +01:00
Vadim Kuznetsov
31e87288d3 Upload digital XSPICE library 2025-01-09 18:24:21 +03:00
Vadim Kuznetsov
c87ef57bd2
Merge pull request #1198 from ra3xdh/fix_1195
Fix log calculation in componentdialog.cpp
2025-01-08 09:30:53 +01:00
Vadim Kuznetsov
058d69cc30
Merge pull request #1197 from ra3xdh/spice_param
Allow passing parameters for SPICE subcircuits
2025-01-08 09:08:55 +01:00
Vadim Kuznetsov
7a662b7d4a Fix log calculation in componentdialog.cpp 2025-01-08 11:06:22 +03:00
Vadim Kuznetsov
9ce9e0304a Upload generic triac model 2025-01-08 10:48:57 +03:00
Vadim Kuznetsov
f842cf2d7d Allow passing parameters for SPICE file 2025-01-07 21:28:32 +03:00
Vadim Kuznetsov
25df9f1a4b
Merge pull request #1196 from ThomasZecha/current
Fix compiler warnings
2025-01-07 13:06:58 +01:00
ThomasZecha
0d97f032bb Fix compiler warnings
Qt6 QTranslator::load() uses [[nodiscard]] which currently leads to
compiler warnings. This is fixed using static_cast<void>.

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2025-01-07 12:11:57 +01:00
Vadim Kuznetsov
ac24a25bfb
Merge pull request #1165 from ThomasZecha/dev/tze/featureExportCdlNetlist
New feature CDL netlist export
2025-01-07 10:45:50 +01:00
Thomas Zecha
efb112d74d
Update qucs.cpp
Fixed typo
2025-01-07 10:22:31 +01:00
Vadim Kuznetsov
b955037fc1
Merge pull request #1194 from ra3xdh/fix_1138
Fix plotting XSPICE digital nodes
2025-01-07 07:37:38 +01:00
Vadim Kuznetsov
f876e6f9fd Fix plotting XSPICE digital nodes 2025-01-06 21:51:08 +03:00
Vadim Kuznetsov
11d0c1adaa
Merge pull request #1192 from ra3xdh/fix_1152
Set CLI parameters for each simulator individually
2025-01-06 16:14:06 +01:00
Vadim Kuznetsov
55748eb73e Remove XSPICE-related SubPort properties; has no effect on simulation 2025-01-06 17:57:45 +03:00
Vadim Kuznetsov
3c5e71ab0a Clean commneted code 2025-01-06 17:33:35 +03:00
Vadim Kuznetsov
008895cb65 Replace setting name; remove QSettings.SimParameters 2025-01-06 17:29:20 +03:00
Vadim Kuznetsov
171bb805fe Add GUI controls to hold simulator CLI parameters 2025-01-06 17:20:13 +03:00
Vadim Kuznetsov
6b206d3362
Merge pull request #1190 from ra3xdh/1117_fix
Temporary fix for #1117 and upload CD4069 model
2025-01-06 08:36:43 +01:00
Vadim Kuznetsov
7a6813c4c1 Add CD4069 device model 2025-01-06 10:15:33 +03:00
Vadim Kuznetsov
f6d86ddd0a Show Symbol property for some devices 2025-01-06 10:13:15 +03:00
Vadim Kuznetsov
b848b70da2
Merge pull request #1189 from milssky/update-python-3.13
Update python code
2025-01-05 19:54:53 +01:00
Alexey Potapov
387d720892 fix: add python 3.13 support 2025-01-05 21:05:39 +03:00
Alexey Potapov
ebc4a9506d fix: change example to new numpy, add reqs 2025-01-05 20:37:56 +03:00
Vadim Kuznetsov
601fe85f14
Merge pull request #1187 from ra3xdh/cd4066
Add CD4066 model
2025-01-05 17:25:51 +01:00
Vadim Kuznetsov
f8cf328ec4
Merge pull request #1186 from ivandi69/diag_limits_button_fix
Fix 'Set Diagram Limits' not updating the diagram
2025-01-05 17:13:34 +01:00
Vadim Kuznetsov
a80cebe228 Add CD4066 model 2025-01-05 19:05:16 +03:00
ivandi
a40ad6d755 Fix 'Set Diagram Limits' not updating the diagram 2025-01-05 10:36:23 -05:00
Vadim Kuznetsov
3dd56e6b1f
Merge pull request #1185 from ra3xdh/upd_digilib
Upload Laser diode library and update digital libraries verison
2025-01-05 11:16:39 +01:00
Vadim Kuznetsov
df644c1c2a Upload Laser diode library 2025-01-05 12:44:13 +03:00
Vadim Kuznetsov
03a8bec7ee Upload library version 2025-01-05 12:39:15 +03:00
Vadim Kuznetsov
cb3c78f29f
Merge pull request #1184 from ra3xdh/upd_digilib
Update digital libraries and README
2025-01-05 10:37:07 +01:00
Vadim Kuznetsov
0f5068fca3 Upload CD library 2025-01-05 12:08:48 +03:00
Vadim Kuznetsov
d89665b89a Update readme 2025-01-05 11:35:41 +03:00
Vadim Kuznetsov
fbcb9da573 Update digital libraries 2025-01-05 11:19:59 +03:00
Vadim Kuznetsov
38434ff353
Merge pull request #1181 from ra3xdh/deprecate_qt5
Deprecate Qt5
2025-01-05 08:29:54 +01:00
Vadim Kuznetsov
8c779b1162
Merge pull request #1182 from ra3xdh/digit_lib
Digital libraries
2025-01-04 19:38:50 +01:00
Vadim Kuznetsov
c909b21d7f Add libraries to blacklist 2025-01-04 19:47:00 +03:00
Vadim Kuznetsov
e469274fc0 Upload first edition of digital libraries 2025-01-04 19:37:45 +03:00
Vadim Kuznetsov
96c3cf6584 Remove Qt5 CI target 2025-01-04 18:59:00 +03:00
Vadim Kuznetsov
d7ecac818d
Merge pull request #1180 from ivandi69/pwr_amp_thd
Power amplifier THD vs. output voltage RMS ngspice template
2025-01-04 15:08:58 +01:00
ivandi
434930e9be Power amplifier THD vs. output voltage RMS ngspice template 2025-01-04 08:14:52 -05:00
Vadim Kuznetsov
7fde61997c Remove conditional Qt5 code 2025-01-04 12:15:41 +03:00
Vadim Kuznetsov
6b39fda03c Remove WITH_QT6; switch to Qt6 by default 2025-01-03 22:06:56 +03:00
Vadim Kuznetsov
07970d566a Remove qucs::SkipEmptyParts 2025-01-03 21:06:41 +03:00
Vadim Kuznetsov
c56bb4f966
Merge pull request #1178 from ra3xdh/fix_1145
Fix M units processing with tuner
2025-01-03 18:57:01 +01:00
Vadim Kuznetsov
7e61aa13aa Fix M units processing with tuner 2025-01-03 20:25:36 +03:00
Vadim Kuznetsov
88a4b113f1
Merge pull request #1173 from ra3xdh/fix_splibcomp
Different fixes
2025-01-01 18:36:16 +01:00
Vadim Kuznetsov
4c901ed4b2
Merge pull request #1170 from dsm/current
update bundled ngspice to v44 for windows.
2025-01-01 18:19:50 +01:00
Vadim Kuznetsov
3742c83e20 Select extension when saving text file 2025-01-01 20:18:26 +03:00
Vadim Kuznetsov
dde7480f53 Fix parsing SPICE continuation with PARAMS: 2025-01-01 17:15:26 +03:00
Muhammet Şükrü Demir
0a738d1f6f
update bundled ngspice to v44 for windows. 2024-12-31 22:54:39 +03:00
Vadim Kuznetsov
7c9c40e360
Merge pull request #1167 from ra3xdh/fix_1166
Fix digital simulation with subcircuits
2024-12-30 19:36:16 +01:00
Vadim Kuznetsov
7ffbcc5824 Fix GHDL simulation for subcircuits 2024-12-30 21:13:41 +03:00
Vadim Kuznetsov
55428164d0 Fix writing digital netlists with subcircuits 2024-12-30 21:00:39 +03:00
Vadim Kuznetsov
6e985de6ce Fix crash when try to simulate digital schematic with subcircuit 2024-12-30 20:51:15 +03:00
Thomas Zecha
187f2a71b8
Merge branch 'current' into dev/tze/featureExportCdlNetlist 2024-12-30 17:30:24 +01:00
ThomasZecha
909f02340d New feature CDL netlist export
-introduced new type spicecompat::SpiceDialect to distinguish SPICE,
 Xyce and CDL
-adapt dependent components accordingly

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-12-30 16:52:35 +01:00
Vadim Kuznetsov
2c086e62b0
Merge pull request #1162 from ra3xdh/fix_1142
Fixed SpiceLibComp dilaog and ID dialog
2024-12-29 17:33:43 +01:00
Vadim Kuznetsov
3dec901955 Don't clear imput fields when press Apply in ID_Dialog 2024-12-29 19:09:15 +03:00
Vadim Kuznetsov
2813ae7f78 Fix SPICE one-port device 2024-12-29 18:57:24 +03:00
Vadim Kuznetsov
68fbbbf6ff
Merge pull request #1161 from ra3xdh/small_fixes
Small fixes
2024-12-29 09:18:10 +01:00
Vadim Kuznetsov
b8492fd287 Add more symbols 2024-12-29 10:19:58 +03:00
Vadim Kuznetsov
91c21c193d Set shorted value to Ngspice minR 2024-12-29 10:06:57 +03:00
Vadim Kuznetsov
930c532427 Fix GNL direction 2024-12-29 09:55:59 +03:00
ThomasZecha
ad319b3f0c Fixed wrong usage of Q_ASSERT
-Fixed wrong usage of Q_ASSERT testing connect() result

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-12-23 11:12:21 +01:00
ThomasZecha
8fb5295531 Fix compiler warnings
-Fixed compiler warnings regarding missing virtual destructor

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-12-23 11:12:21 +01:00
ThomasZecha
f2fd2fe204 New feature CDL netlist export
-integrated CdlNetlistWriter in application GUI

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-12-23 11:12:21 +01:00
ThomasZecha
d11f8c0af0 New feature CDL netlist export
-Changed Schematic::giveNodeNames() to public to be usable from new
 class CdlNetlistWriter
-Changed AbstractSpiceKernel::collectSpiceLibs() to public static since it
 don't use any instance member and to be usable from new class CdlNetlistWriter
-Added new class CdlNetlistWriter implementing CDL netlist export

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-12-23 11:12:21 +01:00
ThomasZecha
718d9c37ca New feature CDL netlist export
-Introduced new parameter for cdl-type netlist export to Component::getExpression() and
 derivatives. It is used for CDL type specific netlist parameter export.

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-12-23 11:12:21 +01:00
ThomasZecha
62fe9727a6 New feature CDL netlist export
-Added cdl_netlist() as default to class Component and as implementation
 to CDL supporting derived components. Besides some port-number checking
 this implementation is a wrapper for spice_netlist.
-Implemented necessary spice_netlist() adjustments to meet CDL requirements.
-Improved spice_netlist() derived default parameter 'isXyce' to be
 explicitly set.
-Fixed using of tabs/trailing spaces.

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-12-23 11:12:21 +01:00
ThomasZecha
47af743871 New feature CDL netlist export
-introduced new parameter for cdl-type netlist export to Component::spice_netlist
 derivatives under spicecomponents/

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-12-23 11:12:21 +01:00
ThomasZecha
80d4a57532 New feature CDL netlist export
-introduced new parameter for cdl-type netlist export to Component::spice_netlist
 and all derivatives under components/

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-12-23 11:12:21 +01:00
Vadim Kuznetsov
8dcde7e4fa
Merge pull request #1147 from dsm/fix_tool_path
fix launchTool method.
2024-12-18 07:12:56 +01:00
Muhammet Şükrü Demir
fe6c33a980 fix launchTool method. 2024-12-18 00:27:08 +03:00
Vadim Kuznetsov
c04edc69cc
Merge pull request #1144 from ivandi69/1143-fix
Fix #1143
2024-12-17 06:47:15 +01:00
ivandi
c74ae467e8 Fix #1143
Fixes a double free regression caused by #1139
2024-12-16 21:02:12 -05:00
Vadim Kuznetsov
f152ee25ce
Merge pull request #1139 from ivandi69/diagram-memory-leak
Plug diagram memory leak
2024-12-16 15:50:16 +01:00
Vadim Kuznetsov
b0523fa392
Merge pull request #1133 from andresmmera/SPAR_Viewer_Improvements
S-parameter Viewer: Some improvements
2024-12-16 15:49:29 +01:00
Vadim Kuznetsov
48c4248773
Merge pull request #1136 from Radvall/add_csparam
Add .CSPARAM Support
2024-12-16 15:49:06 +01:00
Vadim Kuznetsov
9482caafe9
Merge pull request #1130 from dsm/current
fix #1121
2024-12-16 15:44:57 +01:00
Vadim Kuznetsov
10e1e6f288
Merge pull request #1084 from ThomasZecha/current
Refactor SpiceLibComp dialog
2024-12-16 15:41:43 +01:00
Vadim Kuznetsov
a2fda8002e
Merge pull request #1141 from dsm/fix_bundled_ngspice
add ngspice scripts to share folder.
2024-12-16 15:39:30 +01:00
Muhammet Şükrü Demir
a7c6729d2c
add ngspice scripts to share folder. 2024-12-16 15:26:53 +03:00
ivandi
03b791fa73 Plug diagram memory leak 2024-12-15 22:42:45 -05:00
Radvall
86073b5be1 add csparam component 2024-12-14 13:26:36 +03:00
Vadim Kuznetsov
526eeedaf5
Merge pull request #1129 from iwbnwif/new_comp_dialog
Allow free text editing for .IC components.
2024-12-11 17:25:22 +01:00
dsm
8a9c64004f fix #1121 2024-12-11 18:53:56 +03:00
Iwbnwif Yiw
aa3354b9ff Allow free text editing for .IC components. 2024-12-10 20:20:27 +00:00
Vadim Kuznetsov
0fe4bc40c9
Merge pull request #1124 from dsm/fix_path
fix path.
2024-12-10 09:31:35 +01:00
Muhammet Şükrü Demir
5913133324 search ngspice using homebrew path on macos. 2024-12-07 22:36:46 +03:00
Muhammet Şükrü Demir
eb3aad2452 fix ngspice and qucsator_rf path search. 2024-12-07 20:08:08 +03:00
Vadim Kuznetsov
1a3ce1797c
Merge pull request #1125 from dsm/add_style_selection
Add style selection
2024-12-06 17:28:43 +01:00
Vadim Kuznetsov
9e4ac5a13d
Merge pull request #1112 from KrzysztofHerman/ac_source_fix
AC power source amplitude fix
2024-12-06 16:14:02 +01:00
Vadim Kuznetsov
c1cae1605d
Merge pull request #1123 from dsm/inno_setup_uninstaller
inno setup improvements
2024-12-06 15:55:06 +01:00
Vadim Kuznetsov
7053e95a05
Merge pull request #1122 from dsm/optimize_svgs
optimize SVGs.
2024-12-06 15:53:04 +01:00
Muhammet Şükrü Demir
fac5e64104 enable x64compatible installer mode.
x64compatible
2024-12-05 22:33:24 +03:00
Muhammet Şükrü Demir
1d3441eedf fixed simulatorsCombobox size. 2024-12-05 20:06:59 +03:00
Muhammet Şükrü Demir
efabb31d59 fix background color. 2024-12-05 20:06:52 +03:00
Muhammet Şükrü Demir
d48cbade77 add style to qucs tools 2024-12-05 20:06:46 +03:00
Muhammet Şükrü Demir
185ac83c56 settings improvements. 2024-12-05 20:06:37 +03:00
dsm
046f2f7003 uninstall old version if it installed before. 2024-12-05 20:04:41 +03:00
Muhammet Şükrü Demir
b433a2c0e6 optimize SVGs. 2024-12-05 20:04:09 +03:00
KrzysztofHerman
7a330e287b Amplitude changes reverted using floating point format
Signed-off-by: KrzysztofHerman <herman@ihp-microelectronics.com>
2024-12-04 08:25:29 +01:00
KrzysztofHerman
043cb8214c Amplitude changes reverted
Signed-off-by: KrzysztofHerman <herman@ihp-microelectronics.com>
2024-12-04 08:24:08 +01:00
Vadim Kuznetsov
c94049bf52
Merge pull request #1113 from ra3xdh/1111_fix
Fixed parsing SPICE library
2024-12-03 17:53:46 +01:00
Vadim Kuznetsov
96fb011ee6 Fixed parsing SPICE library 2024-12-03 19:36:06 +03:00
KrzysztofHerman
b847af10c7 AC power source source_ac.cpp amplitude fix
Signed-off-by: KrzysztofHerman <herman@ihp-microelectronics.com>
2024-12-03 16:47:55 +01:00
Vadim Kuznetsov
07b2171dc8
Merge pull request #1109 from dsm/current
update Qt version to 6.8.1
2024-12-03 13:13:02 +01:00
Muhammet Şükrü Demir
9bf9776b7c
update Qt version to 6.8.1 2024-12-02 19:11:10 +03:00
Vadim Kuznetsov
241d2ff3f8
Merge pull request #1106 from iwbnwif/new_comp_dialog
Do not add export statement for certain models
2024-12-01 08:47:11 +01:00
Iwbnwif Yiw
e5034305f7 Do not add export statement for NutmegEq, SpicePar or SpGlobPar models (see #1105). 2024-11-30 21:52:13 +00:00
ThomasZecha
ee21251275 Prepare for CDL netlist export
Reviewed changes from https://github.com/ra3xdh/qucs_s/pull/1049

SpiceLibCompDialog has been reworked to achieve the code quality
improvements introduced by https://github.com/ra3xdh/qucs_s/pull/1049.

Tested the following dialogs under extsimkernel/:
-ExternSimDialog
-CustomSimDialog
-SimSettingsDialog
-SpiceLibCompDialog

Rebased.
2024-11-30 16:32:45 +01:00
Vadim Kuznetsov
0d74f553d7
Merge pull request #1103 from dsm/current
CI improvements.
2024-11-29 17:35:23 +01:00
Muhammet Şükrü Demir
9268acebe8
don't add network and d3d dlls in msys2. 2024-11-29 15:30:29 +03:00
dsm
5226827389 switch ninja for ubuntu 2024-11-29 11:23:51 +03:00
Muhammet Şükrü Demir
f44b7cf49d switch ninja for msys2 2024-11-29 10:45:09 +03:00
Muhammet Şükrü Demir
4ef7a9b6bb CI improvements
- added MSVC portable and setup artifacts.
- improve some usage.
- removed msvc build hashes in hash file.
2024-11-29 10:45:08 +03:00
Vadim Kuznetsov
b826d12020
Merge pull request #1091 from dsm/current
CI improvements
2024-11-27 18:13:26 +01:00
Muhammet Şükrü Demir
b100745875 fix win64 portable naming. 2024-11-26 21:05:14 +00:00
Muhammet Şükrü Demir
7fa2a01596 add dash to short_hash. 2024-11-26 21:05:14 +00:00
Muhammet Şükrü Demir
6b7d368593 adding short hash to artifact filename except macos. 2024-11-26 21:05:14 +00:00
Muhammet Şükrü Demir
683e4af9eb adding git short hash to CI. 2024-11-26 21:05:14 +00:00
Muhammet Şükrü Demir
c227c973d6 if MSVC or Qt5 build failed, continue and don't affect create-relase job. 2024-11-26 21:05:14 +00:00
Muhammet Şükrü Demir
3d1182142e changed CI version handling. 2024-11-26 21:05:14 +00:00
Muhammet Şükrü Demir
fb686be61f add some compiler opt. flag 2024-11-26 21:05:14 +00:00
Muhammet Şükrü Demir
5a97a35bd0 adding msvc-build to deploy.yml 2024-11-26 21:05:13 +00:00
Muhammet Şükrü Demir
1f91a7e4b4 add linux-qt5 to deploy.yml 2024-11-26 21:05:13 +00:00
Muhammet Şükrü Demir
c4d24f568c Delete .github/workflows/cmake.yml 2024-11-26 21:05:13 +00:00
Muhammet Şükrü Demir
c9dd2ea489
add translate_with_deepl.py. 2024-11-26 10:36:50 +03:00
Vadim Kuznetsov
37da481d77
Merge pull request #1094 from dsm/tr_translate
update turkish translate.
2024-11-26 08:18:19 +01:00
Muhammet Şükrü Demir
b10abc128b
fixing minor issue. 2024-11-25 18:55:42 +03:00
Muhammet Şükrü Demir
486c95826b
Update aboutdialog.cpp 2024-11-25 18:46:48 +03:00
Muhammet Şükrü Demir
7a4744cf4c
fix header. 2024-11-25 18:20:07 +03:00
Muhammet Şükrü Demir
6949a88aac
update turkish translate.
The old translation was quite wrong. I corrected the old translations and replaced the missing ones with machine translations. Since there were too many, I made manual edits. There may be missing and incorrect ones, I will complete them later.
2024-11-25 18:13:10 +03:00
Vadim Kuznetsov
8378690331
Merge pull request #1093 from iwbnwif/new_comp_dialog
Update the 'values' field of simulation sweep in component dialog
2024-11-25 14:26:30 +01:00
Iwbnwif Yiw
38d37c3b03 Update the 'values' field of simulation sweep properties when start and stop values are changed. 2024-11-24 16:11:38 +00:00
Vadim Kuznetsov
5d47d790b3
Merge pull request #1090 from ra3xdh/fix_crash_on_missing_symbol
Fixed crash in SpiceLibComp dialog
2024-11-24 08:02:22 +01:00
Vadim Kuznetsov
9bcb20b393 Fixed crash if symbol list if empty (application not installed) 2024-11-24 09:41:07 +03:00
Vadim Kuznetsov
5e36d2f9d1
Merge pull request #1086 from dsm/drag_fix
fix! MSVC build drag component cause a crash.
2024-11-23 06:44:33 +01:00
Muhammet Şükrü Demir
673e38002d fix! MSVC build drag component cause a crash.
- after this commit QVariant::save warning gone.
2024-11-22 23:02:24 +03:00
Vadim Kuznetsov
e27b4523b6
Merge pull request #1079 from iwbnwif/new_comp_dialog
Fix sweep steps and number of points issues  (see #1077)
2024-11-21 17:48:19 +01:00
Iwbnwif Yiw
ed28844d5e Noise simulations do not have "Simulation" or "Sweep Parameter" settings. Distortion simulations should have a sweep tab. 2024-11-20 22:46:57 +00:00
Iwbnwif Yiw
782f5929ff Intermediate commit to address some problems with 'list' and 'value' sweep types 2024-11-20 22:39:28 +00:00
Iwbnwif Yiw
03261edd80 Attempt to fix problems (see #1077) with sweep steps and number of points in new component (simulation) dialog 2024-11-19 19:39:33 +00:00
Vadim Kuznetsov
ccbac4408a
Merge pull request #1074 from ra3xdh/1055_fix
Fix #1055 and #861
2024-11-18 16:28:25 +01:00
Vadim Kuznetsov
871b51c755 Recognize the + continuation in SUBCKT header 2024-11-18 18:09:37 +03:00
Vadim Kuznetsov
08b72b59a6 Recognize comments in SPICE starting with semicolon 2024-11-18 17:40:43 +03:00
Vadim Kuznetsov
e41e6bc73b
Merge pull request #1073 from ThomasZecha/current
Solving Issue 1072
2024-11-18 13:43:19 +01:00
ThomasZecha
b6258a38bf Solving Issue 1072
-reverted Spice Library Device dialog code due to wrong initialization

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-11-18 12:09:51 +01:00
Vadim Kuznetsov
dc6f657824
Merge pull request #1054 from iwbnwif/new_comp_dialog
New Component Properties dialog
2024-11-18 12:02:18 +01:00
Iwbnwif Yiw
de5fff9999 Fix updating of component from SPICE model 2024-11-18 10:03:50 +00:00
Iwbnwif Yiw
174d206857 Workaround for systems where ::accepted signal does not first register changes made to the propertyTable 2024-11-17 15:39:59 +00:00
Vadim Kuznetsov
ea17222811
Merge pull request #1066 from iwbnwif/graph_line_default
Allow a default graph line thickness to be set
2024-11-17 14:45:30 +01:00
Iwbnwif Yiw
784c7cbc07 Allow a default graph line thickness to be set 2024-11-17 10:20:16 +00:00
Iwbnwif Yiw
e63feb804b Do not add generic simulations to Sweep Parameter simulation list 2024-11-17 09:50:09 +00:00
Iwbnwif Yiw
14f603b52e Make sure propertyTable edits are accepted before closing 2024-11-17 09:10:22 +00:00
Iwbnwif Yiw
8070f2a517 Move to next cell if user presses Enter on a property 2024-11-16 14:05:31 +00:00
Iwbnwif Yiw
c7ab11f4f4 Add debug messages to identify why changes are not being saved on Enter 2024-11-16 12:01:57 +00:00
iwbnwif
3e852a43d1
Merge branch 'ra3xdh:current' into new_comp_dialog 2024-11-16 11:00:26 +00:00
Vadim Kuznetsov
8b21b3ce29
Merge pull request #1063 from iwbnwif/update-settings-dialog
Add grid color setting option
2024-11-16 07:27:17 +01:00
Vadim Kuznetsov
86144ab8ee
Merge pull request #1065 from iwbnwif/show_grid_menu
Allow document grid visibilty to be toggled via menu and shortcut key
2024-11-16 07:21:46 +01:00
Vadim Kuznetsov
a8e7ea989b
Merge pull request #1064 from iwbnwif/move_component_search
Move component search box to top of component browser
2024-11-16 07:18:42 +01:00
Iwbnwif Yiw
b38f3e6f8e Allow document grid visibilty to be toggled via menu and shortcut key 2024-11-15 22:34:02 +00:00
Iwbnwif Yiw
4bab808750 Move component search box to top of component pane ('Main Dock'). 2024-11-15 21:15:37 +00:00
Iwbnwif Yiw
6a1ad91454 Add getter / setter for schematic grid color 2024-11-15 21:05:09 +00:00
Iwbnwif Yiw
bcd45d7c67 Merge branch 'current' into update-settings-dialog 2024-11-15 20:53:58 +00:00
Iwbnwif Yiw
a97f8df9a5 Merge branch 'current' into new_comp_dialog 2024-11-15 20:36:56 +00:00
Vadim Kuznetsov
1bbd4bd700
Merge pull request #1049 from ThomasZecha/current
Prepare for CDL netlist export
2024-11-15 15:40:08 +01:00
ThomasZecha
62cf2d4bdc New Feature: CDL netlist export
Introduced very basic c++ coding style for the class Schematic and it's
parent-class QucsDoc based on https://google.github.io/styleguide/cppguide.html:
-Prefix class attributes with a_ (much more better readability!)
-Class member initialization via constructor member initialization list
-No public class attributes (where possible with small effort)

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-11-15 12:39:39 +01:00
ThomasZecha
9d55075db8 New Feature: CDL netlist export
Introduced very basic c++ coding style for the extsimkernels subsystem
based on https://google.github.io/styleguide/cppguide.html:
-Prefix class attributes with a_ (much more better readability!)
-Class member initialization via constructor member initialization list
-No public class attributes

Signed-off-by: ThomasZecha <zecha@ihp-microelectronics.com>
2024-11-15 12:35:05 +01:00
Iwbnwif Yiw
35304542a1 Further attempt to dynamically set grid color (working). 2024-11-14 22:01:15 +00:00
Iwbnwif Yiw
dda56bfe30 Attempt to get grid to update on current documents. 2024-11-14 21:29:50 +00:00
Iwbnwif Yiw
ae7765b85f Create 'Appearance' tab in settings dialog and allow grid color to be set. 2024-11-14 21:15:18 +00:00
Vadim Kuznetsov
6abdf70821
Merge pull request #1061 from ra3xdh/upd_news
Update NEWS, VERSION, and MetaInfo
2024-11-14 18:42:19 +01:00
Vadim Kuznetsov
03fd8b5947 Update MetaInfo 2024-11-14 20:24:03 +03:00
Vadim Kuznetsov
dae596a063 Update NEWS and VERSION 2024-11-14 20:21:31 +03:00
Iwbnwif Yiw
3fbc44bccc Tidy up memory allocation and remove leaks. 2024-11-13 21:59:41 +00:00
Iwbnwif Yiw
61222d150a Add a checkbox to allow enabling / disabling of equation variables export. 2024-11-13 21:07:49 +00:00
Iwbnwif Yiw
a19e46086c Attempt to fix build error on Qt5 2024-11-12 22:58:54 +00:00
Iwbnwif Yiw
ce95dd4c74 Reinstate abilit to fill properties from SPICE .MODEL file. 2024-11-12 22:22:15 +00:00
Iwbnwif Yiw
dc6367938e Automatically update the number of sweep points or step size for log sweeps based on the content of the other cells. 2024-11-12 22:02:02 +00:00
Iwbnwif Yiw
42e2a797ce Allow translations in widget labels and other noun strings. 2024-11-12 20:56:50 +00:00
Vadim Kuznetsov
d6f90105ab
Merge pull request #1059 from ra3xdh/fix_ipulse
Fix pulsed current source issues
2024-11-12 19:01:12 +01:00
Vadim Kuznetsov
ebb035c45c Fix sources direction 2024-11-12 20:35:12 +03:00
Vadim Kuznetsov
2f8013d6f2 Fix simulation error with irect+Qucsator 2024-11-12 20:24:46 +03:00
Vadim Kuznetsov
6e88b27584
Merge pull request #1058 from NN708/current
Fix build for contrib directory
2024-11-12 18:05:37 +01:00
NN708
c85cb4ea73 Move install of MetaInfo to top level 2024-11-13 00:29:10 +08:00
NN708
7ae6f4bcd9
Merge branch 'ra3xdh:current' into current 2024-11-13 00:11:55 +08:00
NN708
b489d1ae84 Fix build for contrib directory 2024-11-13 00:09:57 +08:00
Vadim Kuznetsov
94c2ca50da
Merge pull request #1057 from ivandi69/1001_fix
Fix #1001
2024-11-12 15:52:27 +01:00
ivandi
3040c2cb19 Fix #1001 2024-11-11 20:57:34 -05:00
Iwbnwif Yiw
fea45c996e Allow file browsing or eqn editing directly within
a table cell.

Implement a compound widget that includes both a QLineEdit and a
QPushButton. If the use presses the button it will typically open
either a file browser (file parameters)
or a simple text editor (eqn parameters).
2024-11-11 22:22:26 +00:00
Vadim Kuznetsov
5d581f4dc5
Merge pull request #1056 from NN708/current
Add MetaInfo
2024-11-11 18:41:35 +01:00
Iwbnwif Yiw
31d5c90ed8 Add ability to have special sweep parameter names depending on sweep type. 2024-11-11 17:25:03 +00:00
NN708
948b4079ca Add MetaInfo 2024-11-12 01:17:09 +08:00
Iwbnwif Yiw
9d3e5d3927 Add SpicePar and SpGlobPar to list of components that use the equation editor. 2024-11-10 18:03:25 +00:00
Iwbnwif Yiw
4c2b7dcbf4 Do not show simulation combo box for Qucsator equations. 2024-11-10 17:57:54 +00:00
Iwbnwif Yiw
f1f186dc03 Revert 8cd942be2eb4640a1743814b0a4be0b05a03b22c 2024-11-10 17:33:14 +00:00
Iwbnwif Yiw
8cd942be2e Implement change in slotBrowseFile from #1049. 2024-11-10 17:17:17 +00:00
Iwbnwif Yiw
48e695c1b6 Merge branch 'new_comp_dialog' of github.com:iwbnwif/qucs_s into new_comp_dialog 2024-11-10 17:05:09 +00:00
Muhammet Şükrü Demir
24590c3b77 Update Qt to v6.8.0 LTS 2024-11-10 17:03:09 +00:00
Iwbnwif Yiw
913ccdeb75 Add transient simulation to list of simulations with a sweep page.
Set the property table values after openPersistentEditor to avoid them being selected by the editor.
2024-11-10 17:03:09 +00:00
Iwbnwif Yiw
e6a97e0ace First minimum viable attempt with working dialog ready for basic testing. 2024-11-10 17:03:09 +00:00
Integral
7c3a180bf0 refactor: replace non-empty QString constructors with QStringLiteral() 2024-11-10 17:03:09 +00:00
Andrey Kalmykov
8b0aa2a77a Improve graph rendering performance
Fixes ra3xdh/qucs_s#984
2024-11-10 17:03:09 +00:00
Vadim Kuznetsov
b5ef1a455e Fix continous build version in deploy.yml 2024-11-10 17:03:09 +00:00
Vadim Kuznetsov
fcb458f7d2 Fix hardcoded version in Cauer LC filter 2024-11-10 17:03:09 +00:00
Anton Midyukov
6c0a474470 Update Russian translation
Signed-off-by: Anton Midyukov <antohami@altlinux.org>
2024-11-10 17:03:08 +00:00
Anton Midyukov
cc7e68c248 translations: Update source strings in TS files
Signed-off-by: Anton Midyukov <antohami@altlinux.org>
2024-11-10 17:03:08 +00:00
Vadim Kuznetsov
e9017a0393 Fix ASCO execution error 2024-11-10 17:03:08 +00:00
Vadim Kuznetsov
e42cc19f9e Allow execute context menu on tabdiagram scrollbars 2024-11-10 17:03:08 +00:00
Iwbnwif Yiw
25ec6c2d8a Introduce bound line edit and use it to provide the component name functionality.
Add a BoundComboBox class and implement the .SW Sim property using it.

Implement basic functionality for sweep and parameter pages. A lot of existing code will be removed after this commit.

First minimum inviable state. File open and edit buttons not implemented. Step and Points fields do not auto update. Open SPICE file not implemented.
qDebug() statements will be largely removed after this commit.
2024-11-10 17:02:33 +00:00
Iwbnwif Yiw
f655886d01 Merge branch 'new_comp_dialog' of github.com:iwbnwif/qucs_s into new_comp_dialog 2024-11-10 17:00:33 +00:00
Iwbnwif Yiw
ea4bc2c79a Add transient simulation to list of simulations with a sweep page.
Set the property table values after openPersistentEditor to avoid them being selected by the editor.
2024-11-10 17:00:25 +00:00
iwbnwif
c23178eac8
Merge branch 'ra3xdh:current' into new_comp_dialog 2024-11-09 17:29:06 +00:00
Iwbnwif Yiw
ed3b5864d8 First minimum viable attempt with working dialog ready for basic testing. 2024-11-09 16:27:22 +00:00
Iwbnwif Yiw
cd30614bb1 Merge branch 'new_comp_dialog' of github.com:iwbnwif/qucs_s into new_comp_dialog 2024-11-08 20:03:46 +00:00
Iwbnwif Yiw
468bc55132 First minimum inviable state. File open and edit buttons not implemented. Step and Points fields do not auto update. Open SPICE file not implemented.
qDebug() statements will be largely removed after this commit.
2024-11-08 19:56:55 +00:00
Vadim Kuznetsov
3e4cafb909
Merge pull request #1048 from dsm/current
Update Qt to v6.8.0 LTS
2024-11-07 19:22:27 +01:00
Muhammet Şükrü Demir
1696ed0e2e
Update Qt to v6.8.0 LTS 2024-11-07 15:01:33 +03:00
iwbnwif
c309600c32
Merge branch 'ra3xdh:current' into new_comp_dialog 2024-11-07 10:18:01 +00:00
Vadim Kuznetsov
989abd4630
Merge pull request #1043 from Integral-Tech/qstring-refactor
refactor: replace non-empty QString constructors with QStringLiteral()
2024-11-07 07:43:05 +01:00
Iwbnwif Yiw
c14c81c8b1 Implement basic functionality for sweep and parameter pages. A lot of existing code will be removed after this commit. 2024-11-06 16:50:18 +00:00
Vadim Kuznetsov
961074b11f
Merge pull request #1042 from wawuwo/984-optimize-graph-rendering
Improve graph rendering performance
2024-11-04 17:21:47 +01:00
Andrey Kalmykov
b0f4e4917d Improve graph rendering performance
Fixes ra3xdh/qucs_s#984
2024-11-04 16:58:29 +01:00
Integral
30f8ddd583
refactor: replace non-empty QString constructors with QStringLiteral() 2024-11-04 15:53:11 +08:00
Iwbnwif Yiw
25bf41ed6e Add a BoundComboBox class and implement the .SW Sim property using it. 2024-11-02 22:49:34 +00:00
Iwbnwif Yiw
b6fbdcefca Introduce bound line edit and use it to provide the component name functionality. 2024-11-02 18:39:31 +00:00
Vadim Kuznetsov
af80d21a22 Fix continous build version in deploy.yml 2024-11-01 17:46:52 +03:00
Vadim Kuznetsov
32c5c12c86
Merge pull request #1039 from ra3xdh/cauer_fix
Fix hardcoded version in Cauer LC filter
2024-11-01 07:21:55 +01:00
Vadim Kuznetsov
beaed2596f Fix hardcoded version in Cauer LC filter 2024-11-01 08:57:17 +03:00
Vadim Kuznetsov
51dc53185d
Merge pull request #1038 from antohami/russian-translation
Update Russian translation
2024-11-01 06:41:20 +01:00
Anton Midyukov
925fab1fdf Update Russian translation
Signed-off-by: Anton Midyukov <antohami@altlinux.org>
2024-11-01 06:34:06 +03:00
Anton Midyukov
7157a8a7ef translations: Update source strings in TS files
Signed-off-by: Anton Midyukov <antohami@altlinux.org>
2024-11-01 06:33:45 +03:00
andresmmera
50dc69b0e9 Fix trace style when loading a session file 2024-10-31 06:57:28 +01:00
andresmmera
fa36ac584f Improvement: Save only S-par data on session files
Before this commit, all traces associated to a S-parameter file were saved in the session file even if the user was not displaying them. This causes a heavy overhead specially in large files.

Now, the session file only contains S-parameter data. If the user wants to display additional traces such as K, mu, |delta|, etc., they are computed on demand
2024-10-31 06:49:58 +01:00
andresmmera
b25d59dc07 Fix: Wrong pen width when loading traces from file
It was found that when a session file is loaded the width of the traces was 1 regardless the trace setting. 

The pen width was omitted... This commit fixes this problem.
2024-10-29 18:37:47 +01:00
andresmmera
ebaf0897d1 Recent files feature
It was found useful to have a "Recent Files" list with the last 10 sessions, this allows the user to quickly load a session file he/she worked recently.
2024-10-29 18:29:20 +01:00
andresmmera
8a7d158067 Note taking feature
A simple code editor example provided by Qt [1] was included in the tool. It is very convenient to have a text pad to include comments on the traces displayed.

The notes are saved into the session file and they are restored when a session file is opened.

[1] https://doc.qt.io/qt-5/qtwidgets-widgets-codeeditor-example.html
2024-10-29 18:29:20 +01:00
595 changed files with 47378 additions and 51960 deletions

View File

@ -1,46 +0,0 @@
name: CMake Linux Qt5
on:
push:
branches: [ "master", "current", "release/*" ]
paths: [ "**.cpp", "**.h", "**/CMakeLists.txt" ]
pull_request:
branches: [ "master", "current", "release/*" ]
paths: [ "**.cpp", "**.h", "**/CMakeLists.txt" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: InstallQt5
run: |
sudo apt-get update
sudo apt-get install -y qtbase5-dev qttools5-dev qtscript5-dev libqt5svg5-dev flex bison libqt5charts5-dev
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build -j`nproc` --config ${{env.BUILD_TYPE}}
#- name: Test
# working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C ${{env.BUILD_TYPE}}

View File

@ -11,20 +11,20 @@ on:
env:
APP_NAME: "Qucs-S"
CI_VERSION: 24.3.99
EXECUTABLE_NAME: "qucs-s"
PUBLISHER_NAME: "The Qucs-S Team"
BUILD_TYPE: Release
QT_VERSION: 6.7.2
QUCS_MACOS_BIN: build/qucs/qucs-s.app/Contents/MacOS/bin
QUCS_MACOS_RESOURCES: build/qucs/qucs-s.app/Contents/MacOS/share/qucs-s
NGSPICE_URL: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/43/ngspice-43_64.7z
QT_VERSION: 6.8.2
QUCS_MACOS_BIN: ${{github.workspace}}/build/qucs/qucs-s.app/Contents/MacOS/bin
QUCS_MACOS_RESOURCES: ${{github.workspace}}/build/qucs/qucs-s.app/Contents/MacOS/share/qucs-s
NGSPICE_URL: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/44.2/ngspice-44.2_64.7z
jobs:
setup:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.read_version.outputs.version }}
short_hash: ${{ steps.read_version.outputs.short_hash }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
@ -32,19 +32,28 @@ jobs:
- name: Read version from file
id: read_version
run: |
if [ "${{github.ref_type}}" == "tag" ]; then
if [ "${{ github.ref_type }}" == "tag" ]; then
VERSION=${{ github.ref_name }}
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT
else
VERSION=${{ env.CI_VERSION }}
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT
SHORT_HASH=""
else
MAJOR_MINOR=$(cut -d. -f1-2 VERSION)
VERSION="${MAJOR_MINOR}.99"
# Get the short hash of the current commit
COMMIT_HASH=$(echo ${{ github.sha }} | cut -c1-7)
SHORT_HASH="-$COMMIT_HASH"
fi
- name: Print version
run: echo "Qucs-S version is ${{ env.VERSION }}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "SHORT_HASH=$SHORT_HASH" >> $GITHUB_ENV
echo "short_hash=$SHORT_HASH" >> $GITHUB_OUTPUT
- name: Print version and hash
run: |
echo "Qucs-S version is ${{ env.VERSION }}"
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}"
build-linux-appimage-qt6:
runs-on: ubuntu-22.04
needs: setup
@ -54,15 +63,19 @@ jobs:
submodules: recursive
- name: Set version environment variable
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV
run: |
echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" >> $GITHUB_ENV
- name: Print version
run: echo "Qucs-S version is ${{ env.VERSION }}"
- name: Print version and hash
run: |
echo "Qucs-S version is ${{ env.VERSION }}"
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}"
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglx-dev libgl1-mesa-dev flex bison gperf dos2unix flex bison gperf dos2unix
sudo apt-get install -y libglx-dev libgl1-mesa-dev flex bison gperf dos2unix flex bison gperf dos2unix cups libcups2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12
- name: 'Install Qt6'
@ -76,11 +89,15 @@ jobs:
install-deps: 'true'
modules: 'qtcharts'
- name: '⚙️ Install CMake'
uses: lukka/get-cmake@latest
- name: 'Configure CMake'
run: |
cmake -B ${{github.workspace}}/build \
cmake -B ${{github.workspace}}/build -G 'Ninja' \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/AppDir/usr \
-DWITH_QT6=ON \
-DCI_VERSION="${{env.VERSION}}"
@ -88,7 +105,7 @@ jobs:
# Build your program with the given configuration
run: |
cmake --build ${{github.workspace}}/build -j`nproc` --config ${{env.BUILD_TYPE}}
make -C ${{github.workspace}}/build install DESTDIR=${{github.workspace}}/AppDir
cmake --build ${{github.workspace}}/build --target install
- name: 'Install linuxdeploy'
@ -109,13 +126,13 @@ jobs:
--plugin=qt --output appimage
rm linuxdeploy-x86_64.AppImage
rm linuxdeploy-plugin-qt-x86_64.AppImage
mv *.AppImage ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64.AppImage
mv *.AppImage ${{ env.APP_NAME }}-${{env.VERSION}}${{env.SHORT_HASH}}-linux-x86_64.AppImage
- name: 'Upload artifact: AppImage'
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64
path: ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64.AppImage
name: ${{ env.APP_NAME }}-${{env.VERSION}}${{env.SHORT_HASH}}-linux-x86_64
path: ${{ env.APP_NAME }}-${{env.VERSION}}${{env.SHORT_HASH}}-linux-x86_64.AppImage
build-mac-intel:
@ -129,10 +146,14 @@ jobs:
xcode-version: latest-stable
- name: Set version environment variable
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV
run: |
echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" >> $GITHUB_ENV
- name: Print version
run: echo "Qucs-S version is ${{ env.VERSION }}"
- name: Print version and hash
run: |
echo "Qucs-S version is ${{ env.VERSION }}"
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}"
- uses: actions/checkout@v4
with:
@ -157,8 +178,7 @@ jobs:
export LDFLAGS="-L$(brew --prefix bison)/lib"
source ~/.bashrc
brew link bison --force
- name: 'Configure CMake'
run: |
cmake -B ${{github.workspace}}/build -G 'Ninja' \
@ -177,19 +197,19 @@ jobs:
mkdir -p ${{env.QUCS_MACOS_RESOURCES}}/examples
mkdir -p ${{env.QUCS_MACOS_RESOURCES}}/library
mkdir -p ${{env.QUCS_MACOS_RESOURCES}}/symbols
cp -pR ./build/qucs-activefilter/qucs-sactivefilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-attenuator/qucs-sattenuator.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-filter/qucs-sfilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-powercombining/qucs-spowercombining.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-s-spar-viewer/qucs-sspar-viewer.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-transcalc/qucs-strans.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucsator_rf/src/qucsator_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucsator_rf/src/converter/qucsconv_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ./examples/* ${{env.QUCS_MACOS_RESOURCES}}/examples
cp -pR ./library/*.lib ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ./library/*.blacklist ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ./library/symbols/* ${{env.QUCS_MACOS_RESOURCES}}/symbols
macdeployqt ./build/qucs/qucs-s.app
cp -pR ${{github.workspace}}/build/qucs-activefilter/qucs-sactivefilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-attenuator/qucs-sattenuator.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-filter/qucs-sfilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-powercombining/qucs-spowercombining.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-s-spar-viewer/qucs-sspar-viewer.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-transcalc/qucs-strans.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucsator_rf/src/qucsator_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucsator_rf/src/converter/qucsconv_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/examples/* ${{env.QUCS_MACOS_RESOURCES}}/examples
cp -pR ${{github.workspace}}/library/*.lib ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ${{github.workspace}}/library/*.blacklist ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ${{github.workspace}}/library/symbols/* ${{env.QUCS_MACOS_RESOURCES}}/symbols
macdeployqt ${{github.workspace}}/build/qucs/qucs-s.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sactivefilter.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sattenuator.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sfilter.app
@ -198,10 +218,10 @@ jobs:
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-strans.app
strip ${{env.QUCS_MACOS_BIN}}/qucsator_rf
strip ${{env.QUCS_MACOS_BIN}}/qucsconv_rf
codesign --force --deep --sign - ./build/qucs/qucs-s.app
codesign --force --deep --sign - ${{github.workspace}}/build/qucs/qucs-s.app
npm install --global create-dmg
create-dmg ./build/qucs/qucs-s.app ./build/qucs/ || true
cp -pR ./build/qucs/qucs-*.dmg ./${{ env.APP_NAME }}-${{env.VERSION}}-macOSX-x86_64.dmg
create-dmg ${{github.workspace}}/build/qucs/qucs-s.app ${{github.workspace}}/build/qucs/ || true
cp -pR ${{github.workspace}}/build/qucs/qucs-*.dmg ${{github.workspace}}/${{ env.APP_NAME }}-${{env.VERSION}}-macOSX-x86_64.dmg
- name: 'Upload build artifacts'
uses: actions/upload-artifact@v4
@ -221,10 +241,14 @@ jobs:
xcode-version: latest-stable
- name: Set version environment variable
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV
run: |
echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" >> $GITHUB_ENV
- name: Print version
run: echo "Qucs-S version is ${{ env.VERSION }}"
- name: Print version and hash
run: |
echo "Qucs-S version is ${{ env.VERSION }}"
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}"
- uses: actions/checkout@v4
with:
@ -244,24 +268,24 @@ jobs:
- name: 'Install Dependencies'
shell: bash
run: |
brew install gperf dos2unix bison flex ninja graphicsmagick imagemagick
echo 'export PATH="$(brew --prefix bison)/bin:$PATH"' >> /Users/runner/.bashrc
export LDFLAGS="-L$(brew --prefix bison)/lib"
source ~/.bashrc
brew link bison --force
brew install gperf dos2unix bison flex ninja graphicsmagick imagemagick
echo 'export PATH="$(brew --prefix bison)/bin:$PATH"' >> /Users/runner/.bashrc
export LDFLAGS="-L$(brew --prefix bison)/lib"
source ~/.bashrc
brew link bison --force
- name: 'Configure CMake'
run: |
cmake -B ${{github.workspace}}/build -G 'Ninja' \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_QT6=1 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCI_VERSION="${{env.VERSION}}"
cmake -B ${{github.workspace}}/build -G 'Ninja' \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_QT6=1 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCI_VERSION="${{env.VERSION}}"
- name: 'Build Qucs-s'
run: |
cmake --build ${{github.workspace}}/build --parallel --config=${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/build --parallel --config=${{env.BUILD_TYPE}}
- name: 'Package App Bundle'
run: |
@ -269,40 +293,152 @@ jobs:
mkdir -p ${{env.QUCS_MACOS_RESOURCES}}/examples
mkdir -p ${{env.QUCS_MACOS_RESOURCES}}/library
mkdir -p ${{env.QUCS_MACOS_RESOURCES}}/symbols
cp -pR ./build/qucs-activefilter/qucs-sactivefilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-attenuator/qucs-sattenuator.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-filter/qucs-sfilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-powercombining/qucs-spowercombining.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-s-spar-viewer/qucs-sspar-viewer.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-transcalc/qucs-strans.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucsator_rf/src/qucsator_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucsator_rf/src/converter/qucsconv_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ./examples/* ${{env.QUCS_MACOS_RESOURCES}}/examples
cp -pR ./library/*.lib ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ./library/*.blacklist ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ./library/symbols/* ${{env.QUCS_MACOS_RESOURCES}}/symbols
macdeployqt ./build/qucs/qucs-s.app
cp -pR ${{github.workspace}}/build/qucs-activefilter/qucs-sactivefilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-attenuator/qucs-sattenuator.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-filter/qucs-sfilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-powercombining/qucs-spowercombining.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-s-spar-viewer/qucs-sspar-viewer.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucs-transcalc/qucs-strans.app ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucsator_rf/src/qucsator_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/build/qucsator_rf/src/converter/qucsconv_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ${{github.workspace}}/examples/* ${{env.QUCS_MACOS_RESOURCES}}/examples
cp -pR ${{github.workspace}}/library/*.lib ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ${{github.workspace}}/library/*.blacklist ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ${{github.workspace}}/library/symbols/* ${{env.QUCS_MACOS_RESOURCES}}/symbols
macdeployqt ${{github.workspace}}/build/qucs/qucs-s.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sactivefilter.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sattenuator.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sfilter.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-spowercombining.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-strans.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sspar-viewer.app
macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-strans.app
strip ${{env.QUCS_MACOS_BIN}}/qucsator_rf
strip ${{env.QUCS_MACOS_BIN}}/qucsconv_rf
codesign --force --deep --sign - ./build/qucs/qucs-s.app
strip ${{env.QUCS_MACOS_BIN}}/qucsconv_rf
codesign --force --deep --sign - ${{github.workspace}}/build/qucs/qucs-s.app
npm install --global create-dmg
create-dmg ./build/qucs/qucs-s.app ./build/qucs/ || true
cp -pR ./build/qucs/qucs-*.dmg ./${{ env.APP_NAME }}-${{env.VERSION}}-macOS.dmg
create-dmg ${{github.workspace}}/build/qucs/qucs-s.app ${{github.workspace}}/build/qucs/ || true
cp -pR ${{github.workspace}}/build/qucs/qucs-*.dmg ${{github.workspace}}/${{ env.APP_NAME }}-${{env.VERSION}}-macOS.dmg
- name: 'Upload build artifacts'
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-${{env.VERSION}}-macOS
path: ${{ env.APP_NAME }}-${{env.VERSION}}-macOS.dmg
build-windows-msvc:
runs-on: windows-latest
needs: setup
strategy:
fail-fast: false
defaults:
run:
shell: pwsh
steps:
- name: Disable autocrlf in Git
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Set version environment variable
run: |
echo "VERSION=${{ needs.setup.outputs.version }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Print version and hash
run: |
echo "Qucs-S version is ${{ env.VERSION }}"
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}"
- name: Checkout repository
uses: actions/checkout@v4
- name: 'Install Qt6'
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
host: 'windows'
target: 'desktop'
cache: true
arch: 'win64_msvc2022_64'
install-deps: 'true'
modules: 'qtcharts'
- name: '⚙️ Install CMake'
uses: lukka/get-cmake@latest
- name: '🛠 Setup MSVC Development Environment'
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: 'Configure CMake'
run: |
cmake -B ${{github.workspace}}\build -G 'Ninja' -DWITH_QT6=1 `
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}\build\qucs-suite `
-DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl `
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
-DCI_VERSION="${{env.VERSION}}"
- name: 'Build Qucs-s'
run: |
cmake --build ${{github.workspace}}\build --parallel --config=${{env.BUILD_TYPE}}
- name: 'Cmake install'
run: |
cmake --build ${{github.workspace}}\build --target install
- name: 'Deploy Qt6 dependencies'
run: |
$qucs_bin_dir = "${{github.workspace}}\build\qucs-suite\bin"
$executables = @(
"qucs-s.exe", "qucs-sactivefilter.exe", "qucs-sattenuator.exe",
"qucs-sfilter.exe", "qucs-spowercombining.exe", "qucs-strans.exe",
"qucs-sspar-viewer.exe"
)
$executables | ForEach-Object { windeployqt "$qucs_bin_dir\$_" --no-translations --no-opengl-sw --no-system-d3d-compiler --no-network --no-compiler-runtime }
- name: 'Add ngspice to release'
run: |
$qucs_dir = "${{github.workspace}}\build\qucs-suite"
curl -sL --retry 3 --retry-delay 5 -o ngspice.7z ${{ env.NGSPICE_URL }}
7z.exe x ngspice.7z -ongspice
New-Item -ItemType Directory -Path "$qucs_dir\lib\ngspice" -Force
Copy-Item -Recurse -Force ngspice\Spice64\bin\ $qucs_dir
Copy-Item -Recurse -Force ngspice\Spice64\lib\ $qucs_dir
Copy-Item -Recurse -Force ngspice\Spice64\share\ $qucs_dir
- name: 'Create zip archive for release'
run: |
$qucs_dir = "${{github.workspace}}\build\qucs-suite"
New-Item -ItemType Directory -Path "$qucs_dir\misc" -Force
Copy-Item -Recurse -Force "contrib\InnoSetup\misc" "$qucs_dir"
cd $qucs_dir
$zipName = "${env:APP_NAME}-${env:VERSION}${env:SHORT_HASH}-MSVC-x64.zip"
Compress-Archive -Path ./bin, ./share, ./lib, ./misc -DestinationPath "${{github.workspace}}\$zipName"
cd ${{github.workspace}}
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.5
with:
path: contrib/InnoSetup/qucs.iss
options: /Qp /O"${{github.workspace}}" /DAPPNAME=${{ env.APP_NAME }} /DRELEASE="${{ env.VERSION }}${{ env.SHORT_HASH }}-MSVC"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-${{ env.VERSION }}${{ env.SHORT_HASH }}-MSVC-x64
path: ${{ env.APP_NAME }}-${{ env.VERSION }}${{ env.SHORT_HASH }}-MSVC-x64.zip
- name: Upload exe artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-${{ env.VERSION }}${{ env.SHORT_HASH }}-MSVC-setup
path: ${{ env.APP_NAME }}-${{ env.VERSION }}${{ env.SHORT_HASH }}-MSVC-setup.exe
build-windows:
runs-on: windows-2022
continue-on-error: true
needs: setup
strategy:
fail-fast: false
@ -320,10 +456,13 @@ jobs:
shell: pwsh
run: |
echo "VERSION=${{ needs.setup.outputs.version }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Print version
- name: Print version and hash
shell: pwsh
run: echo "Qucs-S version is ${{ env.VERSION }}"
run: |
echo "Qucs-S version is ${{ env.VERSION }}"
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}"
- name: Checkout repository
uses: actions/checkout@v4
@ -336,51 +475,40 @@ jobs:
msystem: ucrt64
cache: true
update: true
install: >-
bison
flex
dos2unix
curl
zip
p7zip
pacboy: >-
cmake:p
gcc:p
qt6-base:p
qt6-tools:p
qt6-svg:p
make:p
ninja:p
python:p
gperf:p
github-cli:p
qt6-charts:p
install: bison flex dos2unix curl zip p7zip
pacboy: cmake:p gcc:p qt6-base:p qt6-tools:p qt6-svg:p make:p ninja:p python:p gperf:p github-cli:p qt6-charts:p
- name: Build project with CMake
run: |
cmake.exe -B build/ -G "MinGW Makefiles" \
cmake.exe -B build/ -G 'Ninja' \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_INSTALL_PREFIX=build/qucs-suite \
-DWITH_QT6=ON \
-DCI_VERSION="${{env.VERSION}}"
cmake.exe --build build/ -j$(nproc) --config ${{env.BUILD_TYPE}}
cmake.exe --build build/ --parallel --config ${{env.BUILD_TYPE}}
- name: Make install
run: |
cd build/ && mingw32-make.exe install DESTDIR=./ -j$(nproc)
cp -rf 'Program Files (x86)/qucs-suite' ./
cd ..
cmake --build build/ --target install
strip build/qucs-suite/bin/*.exe
- name: Deploy Qt6 dependencies
run: |
windeployqt-qt6.exe build/qucs-suite/bin/qucs-s.exe --svg --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-sactivefilter.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-sattenuator.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-sfilter.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-spowercombining.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-strans.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-sspar-viewer.exe --no-translations
deploy_tool="windeployqt-qt6.exe"
bin_dir="build/qucs-suite/bin"
options="--svg --no-translations --no-system-d3d-compiler --no-network"
executables=(
"qucs-s.exe" "qucs-sactivefilter.exe" "qucs-sattenuator.exe"
"qucs-sfilter.exe" "qucs-spowercombining.exe" "qucs-strans.exe"
"qucs-sspar-viewer.exe"
)
for exe in "${executables[@]}"; do
$deploy_tool "$bin_dir/$exe" $options
done
- name: Copy non-Qt DLLs to bin directory
run: |
shopt -s extglob
@ -398,32 +526,33 @@ jobs:
mkdir -p build/qucs-suite/lib/ngspice
cp -rf ngspice/Spice64/bin/ build/qucs-suite
cp -rf ngspice/Spice64/lib/ build/qucs-suite
cp -rf ngspice/Spice64/share/ build/qucs-suite
- name: Create zip archive for release
run: |
mkdir -p build/qucs-suite/misc
cp -rf contrib/InnoSetup/misc build/qucs-suite/
cd build/qucs-suite
zip -r ../../${{ env.APP_NAME }}-${{ env.VERSION }}-win64.zip ./bin ./share ./lib ./misc
zip -r ../../${{ env.APP_NAME }}-${{ env.VERSION }}${{ env.SHORT_HASH }}-win64.zip ./bin ./share ./lib ./misc
cd ../..
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.4
uses: Minionguyjpro/Inno-Setup-Action@v1.2.5
with:
path: contrib/InnoSetup/qucs.iss
options: /Qp /O"${{github.workspace}}" /DAPPNAME=${{ env.APP_NAME }} /DRELEASE="${{ env.VERSION }}"
options: /Qp /O"${{github.workspace}}" /DAPPNAME=${{ env.APP_NAME }} /DRELEASE="${{ env.VERSION }}${{ env.SHORT_HASH }}"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-${{ env.VERSION }}-win64
path: ${{ env.APP_NAME }}-${{ env.VERSION }}-win64.zip
name: ${{ env.APP_NAME }}-${{ env.VERSION }}${{ env.SHORT_HASH }}-win64
path: ${{ env.APP_NAME }}-${{ env.VERSION }}${{ env.SHORT_HASH }}-win64.zip
- name: Upload exe artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-${{ env.VERSION }}-setup
path: ${{ env.APP_NAME }}-${{ env.VERSION }}-setup.exe
name: ${{ env.APP_NAME }}-${{ env.VERSION }}${{ env.SHORT_HASH }}-setup
path: ${{ env.APP_NAME }}-${{ env.VERSION }}${{ env.SHORT_HASH }}-setup.exe
create-release:
runs-on: ubuntu-latest
@ -434,10 +563,14 @@ jobs:
uses: actions/checkout@v4
- name: Set version environment variable
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV
run: |
echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV
echo "SHORT_HASH=${{ needs.setup.outputs.short_hash }}" >> $GITHUB_ENV
- name: Print version
run: echo "Qucs-S version is ${{ env.VERSION }}"
- name: Print version and hash
run: |
echo "Qucs-S version is ${{ env.VERSION }}"
echo "Qucs-S short hash is ${{ env.SHORT_HASH }}"
- name: Download build artifacts
uses: actions/download-artifact@v4
@ -449,7 +582,7 @@ jobs:
run: |
cd ~/artifacts
> hashes.sha256
for file in $(find . -type f \( -name "*.exe" -o -name "*.zip" -o -name "*.dmg" -o -name "*.AppImage" \)); do
for file in $(find . -type f \( -name "*-setup.exe" ! -name "*-MSVC-setup.exe" -o -name "*-win64.zip" -o -name "*.dmg" -o -name "*.AppImage" \)); do
filename=$(basename "$file")
sha256sum "$file" | awk -v fname="$filename" '{print $1 " *" fname}' >> hashes.sha256
done
@ -475,8 +608,8 @@ jobs:
run: |
# Find existing artifact files
hash_files=$(find ~/artifacts -name "*.sha256" -print0 | xargs -0 echo)
exe_files=$(find ~/artifacts -name "*.exe" -print0 | xargs -0 echo)
zip_files=$(find ~/artifacts -name "*.zip" -print0 | xargs -0 echo)
exe_files=$(find ~/artifacts -name "*-setup.exe" ! -name "*-MSVC-setup.exe" -print0 | xargs -0 echo)
zip_files=$(find ~/artifacts -name "*-win64.zip" -print0 | xargs -0 echo)
dmg_files=$(find ~/artifacts -name "*.dmg" -print0 | xargs -0 echo)
appimage_files=$(find ~/artifacts -name "*.AppImage" -print0 | xargs -0 echo)

3
.gitignore vendored
View File

@ -57,5 +57,6 @@ __pycache__
.vscode/settings.json
.vscode/tasks.json
/cmake-build-debug/
.cache/
/qt/
build-qucs-s-spar-viewer-Desktop-Debug/

View File

@ -39,14 +39,8 @@ endif()
message(STATUS "${PROJECT_NAME} ${CMAKE_INSTALL_PREFIX} ${qucs-suite_BINARY_DIR}" )
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets LinguistTools)
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets LinguistTools)
set(QT_VERSION ${Qt6Core_VERSION})
message(STATUS "Qt Version: " ${QT_VERSION})
@ -81,6 +75,8 @@ add_subdirectory( translations )
install(DIRECTORY "examples" DESTINATION "share/${QUCS_NAME}")
install(FILES contrib/io.github.ra3xdh.qucs_s.metainfo.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo)
#
# Custom uninstall target
#

91
NEWS.md
View File

@ -1,3 +1,94 @@
# Qucs-S 25.1.1
## Bugfixes and general improvemnt
* Add UIC option for FFT analysis #1261
* Improve wire editing #1253
* Fix crash when deleting shorted devices #1254
* Fix removing labels #1255
## Localization
* Russian translation update #1246
## Packaging
* Update Gentoo ebuidl #1252
## Known issues
* The .OPTIONS and .FUNC devices not working properly. Use the *INCLUDE SCRIPT* instead. See #1260
# Qucs-S 25.1.0
## New features
* Component properties dialog redesign #1054
* CDL netlist export #1165
* Implemented plotting XSPICE digital nodes #1138
* Add individual CLI oparameters setting for each simulator #1152
* Add .CSPARAM virtual device #1136
* Add Qt aplication style selection #1118
* Add default graph line thickness setting #1066
* Add setting for grid visibility #1065
* Allow parameter passing for SPICE file device #1197
* S-parameter files viewer improvements #1133
* Added background when renderign DC bias labels #1121
* Added possibility to create libraries from SpiceLibraryDevice components #944 #1210
* Added two new wire forms #1232
## Bugfixes and general improvemnt
* CI improvement #1103 #1091 #1086
* Fixed graph renderign performance #984
* Fixed SPICE models processing bugs #861 #1055 #1090 #1142
* Default shorted resistance changed from 0 Ohms to 1/GMIN #1116
* Fixed diagram memory leak #1139
* Added offset parameter for AC current source #1218
* Fixed schematic editing issues #1159 #1134
## Component library
This release contains a massive library extention:
* Added libraries for 74HC, 74LV, CD4000 digital ICs for analog mode #1034 #1160
* Added XSPICE generic logic gates library for analog mode #1199
* Added XSPICE digital auxillary devices #1193
* Added Laser diode library #942
* Added generic triac device in Thyristor.lib #924
* Added vaccum tubes extended library #846 #1216
* Added neon bulb model #846 #1216
* Added MOC3063/MOC3062 optocouple models #846 #1216
* Added Analog ICs and dual gate MOSFET libraries #1229
* Added RC with parasitics library #1240
## Packaging
* Qt5 build deprecated; switch to Qt6 by default #938
* Windows package improvements #1123
## Localization
* Update Turkish translation #1094
# Qucs-S 24.4.1
## Bugfixes
* Improved diagrams rendering speed #1042
* Fixed hardcoded version in LC Cauer filter #1039
* Fixed pulsed current source issues #1059
* Fixed show exit status if Ngspice crashes #1001
## Localization
* Russian translation update #1038
## Packaging
* Prepare for Flatpak package #51
# Qucs-S 24.4.0
## New features

View File

@ -31,23 +31,30 @@ Use CMake to build Qucs-S. Install all necessary dependencies: GCC, Qt, Flex, Bi
### Dependencies
#### Ubuntu
Qucs-S requires Qt6 libraries including QtCharts, CMake, flex, bison, gperf, and dos2unix as compile time
dependencies. Install these packages using the package manager of your distribution before compiling Qucs-S.
Ngspice is not required at compile time, but it is required as runtime dependency to run the simulation.
Here are some examples for the popular Linux distributions.
#### Ubuntu or Debian
~~~
sudo apt-get install ngspice build-essential git cmake qtbase5-dev qttools5-dev libqt5svg5-dev libqt5charts5-dev flex bison gperf dos2unix
sudo apt-get install ngspice build-essential git cmake flex bison gperf dos2unix
sudo apt-get install qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libglx-dev linguist-qt6
sudo apt-get install qt6-l10n-tools libqt6svg6-dev libgl1-mesa-dev qt6-charts-dev libqt6opengl6-dev
~~~
#### OpenSUSE Tumbleweed
#### Fedora
~~~
sudo zypper install ngspice git cmake libqt5-qtbase-devel libqt5-qttools-devel libqt5-qtsvg-devel libqt5-qtcharts-devel flex bison gperf dos2unix
sudo dnf install gcc-c++ cmake git flex bison gperf dos2unix ngspice
sudo dnf install qt6-qtbase-devel cmake qt6-qtsvg-devel qt6-qttools-devel qt6-qtcharts-devel
~~~
### Compiling
#### Qt5
Then clone this git repository and execute in the top directory:
After installing the dependecies, clone this git repository and execute in the top directory:
~~~
git submodule init
@ -59,19 +66,16 @@ make
make install
~~~
Where `/your_install_prefix/` is desired installation directory. Substitute any
desire path (for example `$HOME/qucs-s`) here. You may omit this option and
installation steps. Default installation directory will be `/usr/local` if
Since the v25.1.0 the Qucs-S will be configured with Qt6 by default. Substutute the `/your_install_prefix/`
as desired installation directory. Substitute any desire path (for example `$HOME/qucs-s`) here.
You may omit this option and installation steps. Default installation directory will be `/usr/local` if
`CMAKE_INSTALL_PREFIX` is not defined.
#### Qt6
### Qt5/Qt6 support
Since v1.0.1 Qucs-S supports build with Qt6. Set the `WITH_QT6` flag to tell CMake use the Qt6.
For example use the following command sequence for Ubuntu-22.04
Qt5 support has been dropped since v25.1.0. Only Qt6 libraries are supported. Set the `WITH_QT6=ON`
cmake flag if compiling the Qucs-S versions before v25.1.0
~~~
cmake .. -DWITH_QT6=ON -DCMAKE_INSTALL_PREFIX=/your_install_prefix/
~~~
### Running

View File

@ -1 +1 @@
24.4.0
25.1.1

View File

@ -1,5 +1,5 @@
;
; qucs.iss - inno Setup script file
; Qucs-S Inno Setup script file
; Refactored for improved readability and maintainability
;
; Copyright (C) 2005-2011 Stefan Jahn <stefan@lkcc.org>
; Copyright (C) 2014-2016 Guilherme Brondani Torri <guitorri@gmail.com>
@ -18,7 +18,7 @@
; along with this package; see the file COPYING. If not, write to
; the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
; Boston, MA 02110-1301, USA.
;
#ifndef RELEASE
#define RELEASE "24.3.0"
#endif
@ -31,37 +31,34 @@
#define TREE "..\..\build\qucs-suite\"
[Setup]
AppName={# APPNAME}
AppVersion={# RELEASE}
AppName={#APPNAME}
AppVersion={#RELEASE}
AppPublisher=The Qucs-S Team
AppPublisherURL={# URL}
AppSupportURL={# URL}
AppUpdatesURL={# URL}
AppPublisherURL={#URL}
AppSupportURL={#URL}
AppUpdatesURL={#URL}
DefaultDirName={pf}\Qucs-S
DefaultGroupName=Qucs-S
AllowNoIcons=yes
LicenseFile={# TREE}\misc\gpl.rtf
OutputBaseFilename={# APPNAME}-{# RELEASE}-setup
LicenseFile={#TREE}\misc\gpl.rtf
OutputBaseFilename={#APPNAME}-{#RELEASE}-setup
Compression=lzma2/max
SolidCompression=yes
ChangesEnvironment=yes
UsePreviousAppDir=yes
WizardStyle=modern
SetupIconFile={# TREE}\misc\qucs.ico
; [Registry]
; Root: HKLM; Subkey: SYSTEM\CurrentControlSet\Control\Session Manager\Environment; ValueType: string; ValueName: QUCSDIR; ValueData: "{app}"; Flags: deletevalue createvalueifdoesntexist noerror; MinVersion: 0,4.00.1381
SetupIconFile={#TREE}\misc\qucs.ico
Uninstallable=yes
ArchitecturesInstallIn64BitMode=x64compatible
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "{# TREE}\bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
; Source: "{# TREE}\include\*"; DestDir: "{app}\include"; Flags: ignoreversion recursesubdirs createallsubdirs
; Source: "{# TREE}\lib\*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{# TREE}\misc\*"; DestDir: "{app}\misc"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{# TREE}\lib\*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{# TREE}\share\*"; DestDir: "{app}\share"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#TREE}\bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#TREE}\misc\*"; DestDir: "{app}\misc"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#TREE}\lib\*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#TREE}\share\*"; DestDir: "{app}\share"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
Name: "{group}\Qucs-S Simulator"; Filename: "{app}\bin\qucs-s.exe"; IconFilename: "{app}\misc\qucs.ico"; WorkingDir: "{app}\bin"
@ -70,3 +67,16 @@ Name: "{group}\Technical Online Documentation"; Filename: "{app}\misc\docsite.ur
Name: "{group}\{cm:UninstallProgram,Qucs}"; Filename: "{uninstallexe}"
Name: "{userdesktop}\Qucs-S"; Filename: "{app}\bin\qucs-s.exe"; IconFilename: "{app}\misc\qucs.ico"; WorkingDir: "{app}\bin"; Tasks: desktopicon
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode: Integer;
Uninstall: String;
begin
if (CurStep = ssInstall) then begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#APPNAME}_is1', 'UninstallString', Uninstall) then begin
MsgBox('An existing version of {#APPNAME} was detected. It will now be removed before installing the new version.', mbInformation, MB_OK);
Exec(RemoveQuotes(Uninstall), ' /SILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
end;
end;
end;

25
contrib/gentoo/README.md Normal file
View File

@ -0,0 +1,25 @@
qucs_s
===============
Gentoo overlay with ebuild for Qucs-S package
To use, follow https://wiki.gentoo.org/wiki/Creating_an_ebuild_repository
and copy content of this folder to new repository
===============
TODO list:
to Science project (sci-electronics)
docs examples test USE flags ?
lib as separate package ? with meta like kicad-meta ?
qucsatorrf - separate ebuild ?
qucs - qucsator ebuild
gnucsator - gnucap based - ebuild
openvaf - ebuild ?
xyce ebuild ?
spiceopus ebuild ?

View File

@ -0,0 +1 @@
masters = gentoo

View File

@ -0,0 +1 @@
qucs_s

View File

@ -1,52 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ ${PV} == "9999" ]]; then
EGIT_REPO_URI="https://github.com/ra3xdh/qucs_s.git"
inherit git-r3
else
SRC_URI="https://github.com/ra3xdh/qucs_s/releases/download/${PV}/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
inherit cmake-multilib xdg-utils
DESCRIPTION="Quite universal circuit simulator with SPICE"
HOMEPAGE="https://github.com/ra3xdh/qucs_s"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
RESTRICT="mirror"
DEPEND="
dev-qt/qtsvg:6
sci-electronics/ngspice
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-qt/qttools:6
sys-devel/flex
sys-devel/bison
app-text/dos2unix
dev-util/gperf
"
multilib_src_configure() {
local mycmakeargs=(
-DWITH_QT6=ON
-DCMAKE_INSTALL_PREFIX=/usr
)
cmake_src_configure
}
pkg_postinst() {
xdg_icon_cache_update
}
pkg_postrm() {
xdg_icon_cache_update
}

View File

@ -0,0 +1,6 @@
DIST qucs-s-24.4.1.tar.gz 4659723 BLAKE2B aeb2b3613f8ea2aeaeabfe3aa18fc0aca70bd7acecd862aac81cbc53e5c5ef671db7c76ebcaaf9ec4e15a2d1bf2fbc373f18d96e67fd228e683a412b87102f5d SHA512 ef96395c9932e4f90f718d1515a1f8550650005c5ba263580d911ae827bf22c63c7b8d6bac0f46f35bb4946ee17f587f424c60d0bf0fb53602383b8d375a3e19
DIST qucs-s-25.1.0.tar.gz 4690986 BLAKE2B 285d475bd61e1fb807d8d25edb9b437fb8aa43c590257ce02bec61ac0cd09c3c62b116262372113bf1d319f68837a17bbcb2b5c528a0d561f5ffb5c7b10ab08c SHA512 3ce980491685974dae9cea5d2758d6b227dde0e427152001520f1b46bcd0a4841c27ddd1256a9f3a1bb2742f039271bf0f45d1ab8986864f2168af17f414a815
EBUILD qucs_s-24.4.1.ebuild 1341 BLAKE2B 60c34a9e9448d1c62c42809621ab238398b8cd3a986999d36082ff286a1d1cc6add75e83b85d2d75dc2294c8804d1c734bec474bb5f11fe8c3086f30cd9dd8e3 SHA512 43cf52a729500785db06aa645089e01fc8f8cdde2794139740e9312da8e5b76cdb17551485c7294f0b94e5bb443c61778b15b96878289360eeb9d4ec831b5a9f
EBUILD qucs_s-25.1.0.ebuild 1325 BLAKE2B 9469756e62eeb2a97736d19648223d6ad73dd638f4352bf61564a5afcd34be9e96b311c56c57b687ec7619a6298ac2123307297dc7db36239b7e2b31f3c92c4d SHA512 e0c0bbee39f6085c2f6f7a6451ae821c5bd2b06befb3407085124ff8196fbe05375720ddab882f8c923abde4f696414b98e147c91f87adfbdb23af80c4896907
EBUILD qucs_s-9999.ebuild 1325 BLAKE2B 9469756e62eeb2a97736d19648223d6ad73dd638f4352bf61564a5afcd34be9e96b311c56c57b687ec7619a6298ac2123307297dc7db36239b7e2b31f3c92c4d SHA512 e0c0bbee39f6085c2f6f7a6451ae821c5bd2b06befb3407085124ff8196fbe05375720ddab882f8c923abde4f696414b98e147c91f87adfbdb23af80c4896907
MISC metadata.xml 5020 BLAKE2B e4a4aea13d1b47cfc598fb9849c5e8adeb6f0b420bc006fed43ff8ff8294de0aabadfb2c8490b5cb9c9ee4b3bf8733f27f25e0a8249c09965f3d3b3573ae9205 SHA512 bb4c2d6f2e7b65a65e491883d48239ea0567a0dcd88c23e86af8ce635be6216ceeb9401c51cd8acc2bbcdbf8937821925242b9fe34cd92157282a12733084ae0

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<name>Vadim Kuznetsov</name>
<email>ra3xdh@gmail.com</email>
</maintainer>
<maintainer type="project">
<name>Proxy Maintainers</name>
<email>proxy-maint@gentoo.org</email>
</maintainer>
<longdescription lang="en">
Qucs-S is a circuit simulation program based on Qucs circuit simulator. The "S" letter indicates SPICE.
The purpose of the Qucs-S project is to use free circuit simulation kernels (Ngspice, Qucsator, Xyce)
with the unified GUI based on Qt6 toolkit. It merges the power of SPICE and the simplicity of the Qucs GUI.
Qucs-S is not a simulator by itself, but it requires to use an external simulation backend with it.
Qucs-S allows to use the following open-source simulation kernels:
<pkg>sci-electronics/ngspice</pkg> is recommended to use.
Ngspice is powerful mixed-level/mixed-signal circuit simulator. The most of industrial SPICE models
are compatible with Ngspice. It has an excellent simulation performance and powerful postprocessor.
Google Skywater 130nm PDK supports Ngspice.
XYCE is a new SPICE-compatible circuit simulator written by Sandia from the scratch. It supports
basic SPICE simulation types and has an advanced RF simulation features such as Harmonic balance simulation.
QucsatorRF for RF and microwave circuits design. It provides advanced models for such devices microstrip
lines and waveguides. QucsatorRF is not SPICE compatible. The general purpose circuits simulation is
also possible but not recommended.
SpiceOpus is developed by the Faculty of Electrical Engineering of the Ljubljana University. It based on
the SPICE-3f5 code
</longdescription>
<longdescription lang="ru">
Qucs-S - это кроссплатформенная программа с открытым исходным кодом для аналогового моделирования
электронных схем с графическим интерфейсом, написанная на С++ на базе библиотек Qt6.
Qucs-S основан как форк проекта Qucs, а буква "S" обозначает SPICE - стандарт де-факто в аналоговом
моделировании. Он объединяет мощь разных SPICE-симуляторов с универсальным и простым в использовании
интерфейсом Qucs.
Qucs-S не моделирует схему сам по себе, а использует внешний симулятор:
<pkg>sci-electronics/ngspice</pkg> - рекомендуется как наиболее распространённый симулятор
с открытым исходным кодом. Большая часть доступных SPICE-моделей компонентов совместима с Ngspice.
У него отличная скорость работы, а также мощный и гибкий постпроцессор обработки результатов.
Как один из примеров, Google Skywater 130nm PDK, библиотека компонентов для разработки микросхем
от Google, включает модели для Ngspice.
QucsatorRF - предназначен для радиочастотного моделирования. Несовместим с SPICE-моделями, зато имеет
продвинутые модели для микрополосковых линий и волноводов. Также способен моделировать обычные схемы,
но это не рекомендуется.
Не требует отдельной установки, поскольку входит в комплект Qucs-S.
XYCE - новый SPICE-симулятор, написаный с руля, от Sandia National Laboratories. Поддерживает
как стандартные типы моделей SPICE, так и продвинутые функции для радиочастотного моделирования,
к примеру метод гармонического баланса.
SpiceOpus - бесплатный симулятор с закрытым исходным кодом от инженерного факультета университета Любляны.
Основан на оигинальном коде SPICE-3f5 с различными улучшениями и расширениями.
</longdescription>
<upstream>
<maintainer status="active">
<name>Vadim Kuznetsov</name>
<email>ra3xdh@gmail.com</email>
</maintainer>
<changelog>https://github.com/ra3xdh/qucs_s/releases</changelog>
<doc lang="en">https://ra3xdh.github.io/pdf/qucs_s_tutorial.pdf</doc>
<bugs-to>mailto:ra3xdh@gmail.com</bugs-to>
<remote-id type="github">ra3xdh/qucs_s</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,65 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib optfeature xdg
DESCRIPTION="Quite universal circuit simulator with SPICE"
HOMEPAGE="https://github.com/ra3xdh/qucs_s"
MY_PN="qucs-s"
MY_P=${MY_PN}-${PV}
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/ra3xdh/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/ra3xdh/${PN}/releases/download/${PV}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="GPL-2"
SLOT="0"
DEPEND="
dev-qt/qtbase:6[gui,widgets]
dev-qt/qtsvg:6
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-qt/qttools:6[linguist]
sys-devel/flex
sys-devel/bison
dev-util/gperf
app-text/dos2unix
"
S="${WORKDIR}/${MY_P}"
DOCS="${S}/AUTHORS ${S}/ChangeLog ${S}/debian/changelog ${S}/CONTRIBUTING.md ${S}/NEWS.md ${S}/NEWS_qucs ${S}/README.md ${S}/README_qucs ${S}/THANKS ${S}/TODO"
multilib_src_configure() {
local mycmakeargs=(
-DWITH_QT6=ON
-DCMAKE_INSTALL_PREFIX=/usr
)
cmake_src_configure
}
pkg_preinst() {
xdg_pkg_preinst
}
pkg_postinst() {
optfeature "Result postprocessing in Octave" sci-mathematics/octave
optfeature_header "Install optonal simulator backends:"
optfeature "Ngspice" sci-electronics/ngspice
xdg_pkg_postinst
}
pkg_postrm() {
xdg_pkg_postrm
}

View File

@ -0,0 +1,64 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib optfeature xdg
DESCRIPTION="Quite universal circuit simulator with SPICE"
HOMEPAGE="https://github.com/ra3xdh/qucs_s"
MY_PN="qucs-s"
MY_P=${MY_PN}-${PV}
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/ra3xdh/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/ra3xdh/${PN}/releases/download/${PV}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="GPL-2"
SLOT="0"
DEPEND="
dev-qt/qtbase:6[gui,widgets]
dev-qt/qtsvg:6
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-qt/qttools:6[linguist]
sys-devel/flex
sys-devel/bison
dev-util/gperf
app-text/dos2unix
"
S="${WORKDIR}/${MY_P}"
DOCS="${S}/AUTHORS ${S}/ChangeLog ${S}/debian/changelog ${S}/CONTRIBUTING.md ${S}/NEWS.md ${S}/NEWS_qucs ${S}/README.md ${S}/README_qucs ${S}/THANKS ${S}/TODO"
multilib_src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_PREFIX=/usr
)
cmake_src_configure
}
pkg_preinst() {
xdg_pkg_preinst
}
pkg_postinst() {
optfeature "Result postprocessing in Octave" sci-mathematics/octave
optfeature_header "Install optonal simulator backends:"
optfeature "Ngspice" sci-electronics/ngspice
xdg_pkg_postinst
}
pkg_postrm() {
xdg_pkg_postrm
}

View File

@ -0,0 +1,64 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib optfeature xdg
DESCRIPTION="Quite universal circuit simulator with SPICE"
HOMEPAGE="https://github.com/ra3xdh/qucs_s"
MY_PN="qucs-s"
MY_P=${MY_PN}-${PV}
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/ra3xdh/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/ra3xdh/${PN}/releases/download/${PV}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="GPL-2"
SLOT="0"
DEPEND="
dev-qt/qtbase:6[gui,widgets]
dev-qt/qtsvg:6
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-qt/qttools:6[linguist]
sys-devel/flex
sys-devel/bison
dev-util/gperf
app-text/dos2unix
"
S="${WORKDIR}/${MY_P}"
DOCS="${S}/AUTHORS ${S}/ChangeLog ${S}/debian/changelog ${S}/CONTRIBUTING.md ${S}/NEWS.md ${S}/NEWS_qucs ${S}/README.md ${S}/README_qucs ${S}/THANKS ${S}/TODO"
multilib_src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_PREFIX=/usr
)
cmake_src_configure
}
pkg_preinst() {
xdg_pkg_preinst
}
pkg_postinst() {
optfeature "Result postprocessing in Octave" sci-mathematics/octave
optfeature_header "Install optonal simulator backends:"
optfeature "Ngspice" sci-electronics/ngspice
xdg_pkg_postinst
}
pkg_postrm() {
xdg_pkg_postrm
}

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>io.github.ra3xdh.qucs_s</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0-or-later</project_license>
<name>Qucs-S</name>
<summary>Quite universal circuit simulator with SPICE</summary>
<developer id="io.github.ra3xdh">
<name>Vadim Kuznetsov</name>
</developer>
<description>
<p>
Qucs-S provides a fancy graphical user interface for a number of popular circuit simulation engines. Qucs-S contains instruments for schematic capture, visualization and provides differents passive and active components including device library.
</p>
</description>
<launchable type="desktop-id">qucs-s.desktop</launchable>
<content_rating type="oars-1.1" />
<url type="bugtracker">https://github.com/ra3xdh/qucs_s/issues</url>
<url type="homepage">https://ra3xdh.github.io</url>
<url type="donation">https://boosty.to/qucs_s</url>
<url type="vcs-browser">https://github.com/ra3xdh/qucs_s</url>
<screenshots>
<screenshot type="default">
<image>https://ra3xdh.github.io/ne5532.png</image>
<caption>NE5532 amplifier using SPICE model</caption>
</screenshot>
</screenshots>
<releases>
<release version="25.1.1" date="2025-03-14">
<url type="details">https://github.com/ra3xdh/qucs_s/releases/tag/25.1.1</url>
</release>
<release version="25.1.0" date="2025-02-20">
<url type="details">https://github.com/ra3xdh/qucs_s/releases/tag/25.1.0</url>
</release>
<release version="24.4.1" date="2024-11-14">
<url type="details">https://github.com/ra3xdh/qucs_s/releases/tag/24.4.1</url>
</release>
<release version="24.4.0" date="2024-10-31">
<url type="details">https://github.com/ra3xdh/qucs_s/releases/tag/24.4.0</url>
</release>
</releases>
</component>

View File

@ -0,0 +1,48 @@
import os
import xml.etree.ElementTree as ET
import deepl # Import DeepL API
# Set up DeepL API key
token = 'your_deepL_api_key' # Replace with your DeepL API key
translator = deepl.Translator(token)
# select target lang
def translate_text(text, source_lang="EN", target_lang="XX"):
"""
Translates text using DeepL API.
"""
try:
# Call DeepL API for translation
result = translator.translate_text(text, source_lang=source_lang, target_lang=target_lang)
return result.text
except Exception as e:
print(f"Error translating text: {e}")
return text # Return the original text in case of an error
def process_ts_file(input_file, output_file):
"""
Processes a .ts XML file to translate `unfinished` entries.
"""
tree = ET.parse(input_file)
root = tree.getroot()
for context in root.findall("context"):
for message in context.findall("message"):
source = message.find("source")
translation = message.find("translation")
if translation is not None and translation.get("type") == "unfinished":
if source is not None:
source_text = source.text
# Translate the source text
translated_text = translate_text(source_text)
print(f"Translating: {source_text} -> {translated_text}")
translation.text = translated_text
translation.attrib.pop("type", None) # Remove 'unfinished' attribute
# Save the updated file
tree.write(output_file, encoding="utf-8", xml_declaration=True)
# Example usage
input_ts_file = "qucs_xx.ts" # Replace with your input file path
output_ts_file = "qucs_xx_translated.ts" # Replace with your desired output file path
process_ts_file(input_ts_file, output_ts_file)

View File

@ -0,0 +1,194 @@
<Qucs Schematic 24.4.1>
<Properties>
<View=2,-136,1511,748,1.0431,0,0>
<Grid=10,10,1>
<DataSet=PwrAmpTHD.dat>
<DataDisplay=PwrAmpTHD.dpl>
<OpenDisplay=0>
<Script=PwrAmpTHD.m>
<RunScript=0>
<showFrame=0>
<FrameText0=Title>
<FrameText1=Drawn By:>
<FrameText2=Date:>
<FrameText3=Revision:>
</Properties>
<Symbol>
</Symbol>
<Components>
<_BJT Q2N3905_2 1 550 470 -74 -26 0 2 "pnp" 0 "1.05e-15" 0 "1" 0 "1" 0 "0.1" 0 "0" 0 "240" 0 "0" 0 "1.003e-09" 0 "4" 0 "1.003e-09" 0 "4" 0 "220" 0 "1" 0 "0" 0 "0" 0 "0.2" 0 "0.5" 0 "3" 0 "5.7e-12" 0 "0.75" 0 "0.33" 0 "4.32e-12" 0 "0.75" 0 "0.33" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "3.35e-10" 0 "0" 0 "0" 0 "0" 0 "1.7e-07" 0 "26.85" 0 "4e-15" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "0" 0 "3" 0 "1.11" 0 "26.85" 0 "1" 0 "yes" 0>
<_BJT Q2N3904_1 1 370 170 8 -26 0 0 "npn" 0 "1.4e-14" 0 "1" 0 "1" 0 "0.025" 0 "0" 0 "100" 0 "0" 0 "3e-13" 0 "1.5" 0 "0" 0 "2" 0 "300" 0 "7.5" 0 "0" 0 "0" 0 "2.4" 0 "0" 0 "0" 0 "4.5e-12" 0 "0.75" 0 "0.33" 0 "3.5e-12" 0 "0.75" 0 "0.33" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "4e-10" 0 "0" 0 "0" 0 "0" 0 "2.1e-08" 0 "26.85" 0 "9e-16" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1.5" 0 "3" 0 "1.11" 0 "26.85" 0 "1" 0 "yes" 0>
<_BJT Q2N3904_2 1 550 170 -74 -26 1 2 "npn" 0 "1.4e-14" 0 "1" 0 "1" 0 "0.025" 0 "0" 0 "100" 0 "0" 0 "3e-13" 0 "1.5" 0 "0" 0 "2" 0 "300" 0 "7.5" 0 "0" 0 "0" 0 "2.4" 0 "0" 0 "0" 0 "4.5e-12" 0 "0.75" 0 "0.33" 0 "3.5e-12" 0 "0.75" 0 "0.33" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "4e-10" 0 "0" 0 "0" 0 "0" 0 "2.1e-08" 0 "26.85" 0 "9e-16" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1.5" 0 "3" 0 "1.11" 0 "26.85" 0 "1" 0 "yes" 0>
<R R11 1 580 230 -71 -26 1 1 "1.8Meg" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R12 1 370 230 15 -26 0 1 "22k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R5 1 370 410 15 -26 0 1 "22k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R6 1 580 410 -71 -26 1 1 "1.8Meg" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<_BJT Q2N3905_1 1 370 470 8 -26 1 0 "pnp" 0 "1.05e-15" 0 "1" 0 "1" 0 "0.1" 0 "0" 0 "240" 0 "0" 0 "1.003e-09" 0 "4" 0 "1.003e-09" 0 "4" 0 "220" 0 "1" 0 "0" 0 "0" 0 "0.2" 0 "0.5" 0 "3" 0 "5.7e-12" 0 "0.75" 0 "0.33" 0 "4.32e-12" 0 "0.75" 0 "0.33" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "3.35e-10" 0 "0" 0 "0" 0 "0" 0 "1.7e-07" 0 "26.85" 0 "4e-15" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "0" 0 "3" 0 "1.11" 0 "26.85" 0 "1" 0 "yes" 0>
<R R23 1 620 200 15 -26 0 1 "2.7k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R22 1 620 440 15 -26 0 1 "2.7k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<GND * 1 620 290 0 0 0 0>
<GND * 1 620 350 0 0 0 2>
<C C13 1 620 260 20 -26 1 3 "47u" 1 "" 0 "polar" 0>
<C C14 1 620 380 20 -26 1 3 "47u" 1 "" 0 "polar" 0>
<R R18 1 370 660 15 -26 0 1 "2.2k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R13 1 340 690 -26 -49 1 0 "470" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<C C8 1 250 660 20 -26 1 3 "10u" 1 "" 0 "polar" 0>
<Lib D1 1 190 660 -109 -32 1 3 "Z-Diodes" 0 "1N4742A" 1>
<C C12 1 620 660 17 -26 0 1 "680p" 1 "" 0 "neutral" 0>
<_BJT Q2N3904_3 1 710 10 8 -26 0 0 "npn" 0 "1.4e-14" 0 "1" 0 "1" 0 "0.025" 0 "0" 0 "100" 0 "0" 0 "3e-13" 0 "1.5" 0 "0" 0 "2" 0 "300" 0 "7.5" 0 "0" 0 "0" 0 "2.4" 0 "0" 0 "0" 0 "4.5e-12" 0 "0.75" 0 "0.33" 0 "3.5e-12" 0 "0.75" 0 "0.33" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "4e-10" 0 "0" 0 "0" 0 "0" 0 "2.1e-08" 0 "26.85" 0 "9e-16" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1.5" 0 "3" 0 "1.11" 0 "26.85" 0 "1" 0 "yes" 0>
<R R29 1 820 -20 15 -26 0 1 "100" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R16 1 820 100 15 -26 0 1 "330" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<GND * 1 820 130 0 0 0 0>
<GND * 1 710 130 0 0 0 0>
<R R20 1 710 100 15 -26 0 1 "2.2k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R28 1 970 10 -26 15 0 0 "4.7" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R21 1 370 -20 15 -26 0 1 "2.2k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R14 1 340 -50 -26 15 0 0 "470" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<C C9 1 250 -20 20 -26 1 3 "10u" 1 "" 0 "polar" 0>
<Lib D2 1 190 -20 -109 -32 1 3 "Z-Diodes" 0 "1N4742A" 1>
<C C11 1 620 -20 17 -26 0 1 "680p" 1 "" 0 "neutral" 0>
<R R26 1 970 630 -26 15 0 0 "4.7" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R24 1 1000 470 -26 15 1 2 "47k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<C C15 1 1000 440 -26 -51 1 0 "22p" 1 "" 0 "neutral" 0>
<R R25 1 1000 170 -26 -49 0 2 "47k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<C C16 1 1000 200 -26 17 0 0 "22p" 1 "" 0 "neutral" 0>
<R R31 1 1030 270 15 -26 0 1 "0.47" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R30 1 1030 370 15 -26 0 1 "0.47" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R17 1 940 270 -43 -26 1 1 "22" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<C C17 1 940 370 -55 -26 1 1 "10u" 1 "" 0 "polar" 0>
<R R39 1 1110 350 15 -26 0 1 "3.3" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<C C18 1 1110 410 17 -26 0 1 "47n" 1 "" 0 "neutral" 0>
<GND * 1 1110 440 0 0 0 0>
<GND * 1 1140 630 0 0 0 2>
<Vdc VEE 1 1140 660 18 -26 0 1 "20" 1>
<Vdc VCC 1 1140 -20 18 -26 0 1 "20" 1>
<GND * 1 1140 10 0 0 0 0>
<GND * 1 190 10 0 0 0 0>
<GND * 1 250 10 0 0 0 0>
<GND * 1 190 630 0 0 0 2>
<GND * 1 250 630 0 0 0 2>
<_BJT Q2N2955_1 1 1030 10 8 -26 1 0 "pnp" 0 "4.66e-12" 0 "1" 0 "1" 0 "0.25" 0 "0" 0 "100" 0 "0" 0 "3.339e-11" 0 "1.5" 0 "5e-09" 0 "2" 0 "360" 0 "2" 0 "0.4" 0 "0.001" 0 "0.04" 0 "0" 0 "3" 0 "5.802e-10" 0 "1.2" 0 "0.45" 0 "2.121e-10" 0 "0.75" 0 "0.4" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "8e-08" 0 "1" 0 "0" 0 "3" 0 "2.55e-06" 0 "26.85" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "120" 0 "1" 0 "3" 0 "1.11" 0 "26.85" 0 "1" 0 "yes" 0>
<_BJT Q2N3055_1 1 1030 630 8 -26 0 0 "npn" 0 "4.66e-12" 0 "1" 0 "1" 0 "0.25" 0 "0" 0 "100" 0 "0" 0 "3.339e-11" 0 "1.5" 0 "5e-09" 0 "2" 0 "360" 0 "2" 0 "0.4" 0 "0.001" 0 "0.04" 0 "0" 0 "3" 0 "5.802e-10" 0 "1.2" 0 "0.45" 0 "2.121e-10" 0 "0.75" 0 "0.4" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "8e-08" 0 "1" 0 "0" 0 "3" 0 "2.55e-06" 0 "26.85" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "120" 0 "1" 0 "3" 0 "1.11" 0 "26.85" 0 "1" 0 "yes" 0>
<_BJT BD136_138_140_1 1 820 40 8 -26 1 0 "pnp" 0 "2.9537e-13" 0 "1" 0 "1.021" 0 "1.0993" 0 "0.1" 0 "137" 0 "8.41" 0 "1.8002e-13" 0 "1.5" 0 "7.0433e-12" 0 "1.38" 0 "201.4" 0 "23.765" 0 "0.01" 0 "0.011" 0 "0.01" 0 "0.1109" 0 "1.98" 0 "2.1982e-10" 0 "0.7211" 0 "0.3685" 0 "6.8291e-11" 0 "0.5499" 0 "0.3668" 0 "0.5287" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "0" 0 "0" 0 "0" 0 "0" 0 "0" 0 "26.85" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1.4883" 0 "3" 0 "1.2343" 0 "26.85" 0 "1" 0 "yes" 0>
<R R10 1 310 230 15 -26 0 1 "1k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R7 1 310 410 15 -26 0 1 "1k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<C C7 1 250 290 20 -26 1 3 "1u" 1 "" 0 "polar" 0>
<C C6 1 250 350 20 -26 1 3 "1u" 1 "" 0 "polar" 0>
<GND * 1 250 440 0 0 0 0>
<GND * 1 250 200 0 0 0 2>
<C C5 1 160 350 17 -26 0 1 "330p" 1 "" 0 "neutral" 0>
<R R4 1 130 320 -26 -49 1 0 "3.3k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<GND * 1 160 380 0 0 0 0>
<R R3 1 100 350 -57 -26 1 1 "100k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<GND * 1 100 380 0 0 0 0>
<GND * 1 100 200 0 0 0 2>
<R R8 1 250 410 -50 -26 1 1 "47k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R9 1 250 230 -50 -26 1 1 "47k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<_BJT Q2N3905_3 1 710 630 8 -26 1 0 "pnp" 0 "1.05e-15" 0 "1" 0 "1" 0 "0.1" 0 "0" 0 "240" 0 "0" 0 "1.003e-09" 0 "4" 0 "1.003e-09" 0 "4" 0 "220" 0 "1" 0 "0" 0 "0" 0 "0.2" 0 "0.5" 0 "3" 0 "5.7e-12" 0 "0.75" 0 "0.33" 0 "4.32e-12" 0 "0.75" 0 "0.33" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "3.35e-10" 0 "0" 0 "0" 0 "0" 0 "1.7e-07" 0 "26.85" 0 "4e-15" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "0" 0 "3" 0 "1.11" 0 "26.85" 0 "1" 0 "yes" 0>
<R R27 1 820 660 15 -26 0 1 "100" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R15 1 820 540 15 -26 0 1 "330" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<R R19 1 710 540 15 -26 0 1 "2.2k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<_BJT BD135_137_139_1 1 820 600 8 -26 0 0 "npn" 0 "2.3985e-13" 0 "1" 0 "1.007" 0 "1.1863" 0 "0.1445" 0 "98.5" 0 "7.46" 0 "1.0471e-14" 0 "1.2" 0 "1.9314e-11" 0 "1.45" 0 "244.9" 0 "78.11" 0 "0.001" 0 "0.031" 0 "0.01" 0 "0.0832" 0 "2.14" 0 "2.92702e-10" 0 "0.67412" 0 "0.33" 0 "4.8831e-11" 0 "0.5258" 0 "0.3928" 0 "0.5287" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "0" 0 "0" 0 "0" 0 "0" 0 "0" 0 "26.85" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1.1398" 0 "3" 0 "1.2105" 0 "26.85" 0 "1" 0 "yes" 0>
<GND * 1 710 510 0 0 0 2>
<GND * 1 820 510 0 0 0 2>
<GND * 1 1110 200 0 0 0 2>
<R RL 1 1110 230 15 -26 0 1 "8" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<SpicePar SpicePar1 1 1250 -40 -27 18 0 0 "vin=600m" 1>
<.CUSTOMSIM CUSTOM1 1 1230 30 0 40 0 0 "\ncompose vin start=100m stop=1 step=100m\nlet n=length(vin)\nlet thd=vector(n)\nlet out_rms=vector(n)\n\nset nfreqs=20\n\nlet i=0\nrepeat $&n\n let vin_i=vin[i]\n alterparam vin=$&vin_i\n reset\n\n tran 10u 10m\n fourier 1k v(out)\n meas tran orms_i rms out\n let out_rms[i]=orms_i\n\n let j=2\n let sum_i=0\n let f=i+1\n while j < $nfreqs\n let sum_i=sum_i+fourier{$&f}1[1][j]^2\n let j=j+1\n end\n let thd_i=100*sqrt(sum_i)/fourier{$&f}1[1][1]\n let thd[i]=thd_i\n\n destroy $curplot\n let i=i+1\nend\n\nsetscale out_rms\n\ndestroy all\nreset" 0 "thd;vin" 0 "" 0>
<S4Q_V V1 1 100 230 19 5 1 3 "sin(0 {vin} 1k)" 1 "" 0 "" 0 "" 0 "" 0>
</Components>
<Wires>
<370 440 550 440 "" 0 0 0 "">
<370 200 550 200 "" 0 0 0 "">
<580 170 580 200 "" 0 0 0 "">
<370 260 470 260 "" 0 0 0 "">
<370 380 460 380 "" 0 0 0 "">
<580 440 580 470 "" 0 0 0 "">
<580 470 620 470 "" 0 0 0 "">
<580 170 620 170 "" 0 0 0 "">
<370 500 370 630 "" 0 0 0 "">
<250 690 310 690 "" 0 0 0 "">
<190 690 250 690 "" 0 0 0 "">
<370 690 620 690 "" 0 0 0 "">
<370 630 620 630 "" 0 0 0 "">
<710 -50 710 -20 "" 0 0 0 "">
<710 -50 820 -50 "" 0 0 0 "">
<710 40 790 40 "" 0 0 0 "">
<710 40 710 70 "" 0 0 0 "">
<820 10 940 10 "" 0 0 0 "">
<820 -50 1030 -50 "" 0 0 0 "">
<1030 -50 1030 -20 "" 0 0 0 "">
<370 10 370 140 "" 0 0 0 "">
<250 -50 310 -50 "" 0 0 0 "">
<190 -50 250 -50 "" 0 0 0 "">
<370 -50 620 -50 "" 0 0 0 "">
<370 10 620 10 "" 0 0 0 "">
<620 10 680 10 "" 0 0 0 "">
<620 -50 710 -50 "" 0 0 0 "">
<470 260 580 260 "" 0 0 0 "">
<470 260 470 510 "" 0 0 0 "">
<620 470 940 470 "" 0 0 0 "">
<1030 660 1030 690 "" 0 0 0 "">
<1030 470 1030 600 "" 0 0 0 "">
<1030 440 1030 470 "" 0 0 0 "">
<620 170 940 170 "" 0 0 0 "">
<1030 40 1030 170 "" 0 0 0 "">
<1030 170 1030 200 "" 0 0 0 "">
<1030 300 1030 320 "" 0 0 0 "">
<1030 200 1030 240 "" 0 0 0 "">
<1030 400 1030 440 "" 0 0 0 "">
<940 300 940 340 "" 0 0 0 "">
<940 200 970 200 "" 0 0 0 "">
<940 200 940 240 "" 0 0 0 "">
<940 170 970 170 "" 0 0 0 "">
<940 170 940 200 "" 0 0 0 "">
<940 440 970 440 "" 0 0 0 "">
<940 400 940 440 "" 0 0 0 "">
<940 470 970 470 "" 0 0 0 "">
<940 440 940 470 "" 0 0 0 "">
<460 380 580 380 "" 0 0 0 "">
<1030 320 1030 340 "" 0 0 0 "">
<1030 320 1110 320 "" 0 0 0 "">
<1030 690 1140 690 "" 0 0 0 "">
<1030 -50 1140 -50 "" 0 0 0 "">
<160 320 250 320 "" 0 0 0 "">
<250 260 310 260 "" 0 0 0 "">
<310 170 310 200 "" 0 0 0 "">
<310 170 340 170 "" 0 0 0 "">
<250 380 310 380 "" 0 0 0 "">
<310 440 310 470 "" 0 0 0 "">
<310 470 340 470 "" 0 0 0 "">
<620 690 710 690 "" 0 0 0 "">
<820 630 940 630 "" 0 0 0 "">
<820 690 1030 690 "" 0 0 0 "">
<620 630 680 630 "" 0 0 0 "">
<710 660 710 690 "" 0 0 0 "">
<710 600 790 600 "" 0 0 0 "">
<710 690 820 690 "" 0 0 0 "">
<710 570 710 600 "" 0 0 0 "">
<460 130 460 380 "" 0 0 0 "">
<310 130 460 130 "" 0 0 0 "">
<310 -50 310 130 "" 0 0 0 "">
<550 130 550 140 "" 0 0 0 "">
<460 130 550 130 "" 0 0 0 "">
<310 510 310 690 "" 0 0 0 "">
<310 510 470 510 "" 0 0 0 "">
<550 500 550 510 "" 0 0 0 "">
<470 510 550 510 "" 0 0 0 "">
<1110 260 1110 320 "" 0 0 0 "">
<100 260 100 320 "" 0 0 0 "">
<1110 320 1110 320 "out" 1070 290 0 "">
<100 320 100 320 "in" 70 300 0 "">
</Wires>
<Diagrams>
<Rect 1230 270 240 160 3 #c0c0c0 1 00 1 1.08481 2 10.7141 1 -0.0601316 0.5 0.68536 1 -1 1 1 315 0 225 1 0 0 "" "" "">
<"ngspice/thd" #0000ff 2 3 0 0 0>
</Rect>
<Tab 1230 525 154 205 3 #c0c0c0 1 00 1 0 1 1 1 0 1 1 1 0 1 1 315 0 225 1 0 0 "" "" "">
<"ngspice/thd" #0000ff 0 3 1 0 0>
<"ngspice/vin" #0000ff 0 3 1 0 0>
</Tab>
</Diagrams>
<Paintings>
<Text 540 -90 20 #000000 0 "Musical Fidelity A1">
</Paintings>

2153
library/Analog.lib Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,7 @@
SET(COMPLIBS
555_timer.lib
Analog.lib
AudioIC.lib
Bridges.lib
BJT_Extended.lib
@ -9,12 +10,20 @@ Crystal.lib
Diodes.lib
DiodesSchottky.lib
Diodes_Extended.lib
Digital_AUX.lib
Digital_CD.lib
Digital_HC.lib
Digital_LV.lib
Digital_XSPICE.lib
DualGateMOSFET.lib
GeDiodes.lib
Ideal.lib
JFETs.lib
LEDs.lib
LaserDiodes.lib
Loudspeaker.lib
MixerIC.lib
Neon.lib
MOSFETs.lib
NMOSFETs.lib
OpAmps.lib
@ -23,6 +32,7 @@ PhotovoltaicRelay.lib
PMOSFETs.lib
PWM_Controller.lib
Regulators.lib
RC.lib
Substrates.lib
Transistors.lib
Varistors.lib
@ -32,6 +42,7 @@ SPICE_TLine.lib
Thermistor.lib
Thyristor.lib
Transformers.lib
TubesExtended.lib
Xanalogue.lib
XyceDigital.lib
Xyce_Digital_TTL_Technology.lib
@ -53,6 +64,9 @@ xyce.blacklist
INSTALL( FILES ${COMPLIBS} ${BLACKLIST} DESTINATION share/${QUCS_NAME}/library )
INSTALL( DIRECTORY "symbols" DESTINATION share/${QUCS_NAME}/ )
INSTALL( DIRECTORY "TubesExtended" DESTINATION share/${QUCS_NAME}/library)
INSTALL( DIRECTORY "Optocoupler" DESTINATION share/${QUCS_NAME}/library )
INSTALL( DIRECTORY "DualGateMOSFET" DESTINATION share/${QUCS_NAME}/library )
ADD_SUBDIRECTORY( XyceDigital)

1027
library/Digital_AUX.lib Normal file

File diff suppressed because it is too large Load Diff

1328
library/Digital_CD.lib Normal file

File diff suppressed because it is too large Load Diff

1400
library/Digital_HC.lib Normal file

File diff suppressed because it is too large Load Diff

936
library/Digital_LV.lib Normal file
View File

@ -0,0 +1,936 @@
<Qucs Library 24.4.1 "Digital_LV">
<Component 74LV00>
<Description>
2-Input NAND Gate
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV00 _net0 _net1 _net2
Sub:X1 _net0 _net1 _net2 gnd Type="n74LV00_cir"
.Def:End
</Model>
<ModelIncludes "74LV00.cir.lst">
<Spice>
* The timing parameters for all of these models were taken from the specifications for a
* 3.3V power supply and a 50pF capacitive load.
* ----------------------------------------------------------- 74LV00A ------
* Quad 2-Input Positive-Nand Gates
*
* TI PDF File
* bss 2/18/03
*
.SUBCKT 74LV00A 1A 1B 1Y
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 nand(2) DPWR_3V DGND_3V
+ 1A 1B 1Y
+ DLY_LV00 IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
.model DLY_LV00 ugate (tplhTY=6.9ns tplhMX=11.4ns tphlTY=6.9ns tphlMX=11.4ns)
.ENDS 74LV00A
*
.SUBCKT Digital_LV_74LV00 gnd _net0 _net1 _net2
X1 _net0 _net1 _net2 74LV00A
.ENDS
</Spice>
<Symbol>
<EArc -30 -20 40 40 4320 2880 #000080 2 1>
<Ellipse 10 -4 8 8 #000080 1 1 #000080 1 1>
<Line 10 0 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<.PortSym -30 -10 1 0 P1>
<.PortSym -30 10 2 0 P2>
<.PortSym 30 0 3 180 P3>
<.ID 10 14 Y>
<Line -10 20 0 -40 #000080 2 1>
</Symbol>
</Component>
<Component 74LV02>
<Description>
2-Input NOR Gate
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV02 _net0 _net1 _net2
Sub:X1 _net0 _net1 _net2 gnd Type="n74LV02_cir"
.Def:End
</Model>
<ModelIncludes "74LV02.cir.lst">
<Spice>
* ---------------------------------- 74LV02A ---------------------
* Quad 2-Input Nor Gates
*
* TI PDF File
* bss 2/18/03
*
.SUBCKT 74LV02A 1A 1B 1Y
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 nor(2) DPWR_3V DGND_3V
+ 1A 1B 1Y
+ DLY_LV02 IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
.model DLY_LV02 ugate (tplhTY=7.6ns tplhMX=11.4ns tphlTY=7.6ns tphlMX=11.4ns)
.ENDS 74LV02A
*
.SUBCKT Digital_LV_74LV02 gnd _net0 _net1 _net2
X1 _net0 _net1 _net2 74LV02A
.ENDS
</Spice>
<Symbol>
<.PortSym -30 -10 1 0 P1>
<.PortSym -30 10 2 0 P2>
<.PortSym 30 0 3 180 P3>
<.ID 10 14 Y>
<EArc -30 -20 40 40 4320 2880 #000080 2 1>
<Ellipse 10 -4 8 8 #000080 1 1 #000080 1 1>
<Line 10 0 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<EArc -20 -20 10 40 4320 2880 #000080 2 1>
<Line -10 20 -5 0 #000080 2 1>
<Line -10 -20 -5 0 #000080 2 1>
</Symbol>
</Component>
<Component 74LV04>
<Description>
Inverter
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV04 _net0 _net1
Sub:X1 _net0 _net1 gnd Type="n74LV04_cir"
.Def:End
</Model>
<ModelIncludes "74LV04.cir.lst">
<Spice>
* -------------------------- 74LV04A --------------------------------
* Hex Inverters
*
* TI PDF File
* bss 1/2/03
*
.SUBCKT 74LV04A 1A 1Y
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 inv DPWR_3V DGND_3V
+ 1A 1Y
+ DLY_LV04 IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
.model DLY_LV04 ugate (tplhTY=7.3ns tplhMX=10.6ns tphlTY=7.3ns tphlMX=10.6ns)
.ENDS 74LV04A
*
.SUBCKT Digital_LV_74LV04 gnd _net0 _net1
X1 _net0 _net1 74LV04A
.ENDS
</Spice>
<Symbol>
<EArc -30 -20 40 40 4320 2880 #000080 2 1>
<Line -10 20 0 -40 #000080 2 1>
<Ellipse 10 -4 8 8 #000080 1 1 #000080 1 1>
<Line 10 0 20 0 #000080 2 1>
<.ID 10 14 Y>
<.PortSym 30 0 2 180 P2>
<Line -30 0 20 0 #000080 2 1>
<.PortSym -30 0 1 0 P1>
</Symbol>
</Component>
<Component 74LV08>
<Description>
2-Input AND Gate
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV08 _net0 _net1 _net2
Sub:X1 _net0 _net1 _net2 gnd Type="n74LV08_cir"
.Def:End
</Model>
<ModelIncludes "74LV08.cir.lst">
<Spice>
* ---------------------------- 74LV08A ------------------------------
* Quad 2-Input AND Gate
*
* TI PDF File
* bss 2/21/03
*
.SUBCKT 74LV08A 1A 1B 1Y
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 and(2) DPWR_3V DGND_3V
+ 1A 1B 1Y
+ DLY_LV08 IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
.model DLY_LV08 ugate (tplhTY=7.5ns tplhMX=12.3ns tphlTY=7.5ns tphlMX=12.3ns)
.ENDS 74LV08A
*
.SUBCKT Digital_LV_74LV08 gnd _net0 _net1 _net2
X1 _net0 _net1 _net2 74LV08A
.ENDS
</Spice>
<Symbol>
<.PortSym -30 -10 1 0 P1>
<.PortSym -30 10 2 0 P2>
<.PortSym 30 0 3 180 P3>
<.ID 10 14 Y>
<EArc -30 -20 40 40 4320 2880 #000080 2 1>
<Line -10 20 0 -40 #000080 2 1>
<Line 10 0 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
</Symbol>
</Component>
<Component 74LV20>
<Description>
4-Input NAND Gate
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV20 _net0 _net1 _net2 _net3 _net4
Sub:X1 _net0 _net1 _net2 _net3 _net4 gnd Type="n74LV20_cir"
.Def:End
</Model>
<ModelIncludes "74LV20.cir.lst">
<Spice>
* ----------------------------- 74LV20A -------------------------
* Dual 4-Input Nand Gate
*
* TI PDF File
* bss 2/24/03
*
.SUBCKT 74LV20A 1A 1B 1C 1D 1Y
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 nand(4) DPWR_3V DGND_3V
+ 1A 1B 1C 1D 1Y
+ DLY_LV20 IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
.model DLY_LV20 ugate (tplhTY=6.5ns tplhMX=10.1ns tphlTY=6.5ns tphlMX=10.1ns)
.ENDS 74LV20A
*
.SUBCKT Digital_LV_74LV20 gnd _net0 _net1 _net2 _net3 _net4
X1 _net0 _net1 _net2 _net3 _net4 74LV20A
.ENDS
</Spice>
<Symbol>
<Line -30 -30 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<Line -30 30 20 0 #000080 2 1>
<Line -10 40 0 -80 #000080 2 1>
<Ellipse 20 -4 8 8 #000080 1 1 #000080 1 1>
<EArc -20 -20 40 40 4320 2880 #000080 2 1>
<Line 0 20 -10 0 #000080 2 1>
<.PortSym -30 -30 1 0 P1>
<.PortSym -30 -10 2 0 P2>
<.PortSym -30 10 3 0 P3>
<.PortSym -30 30 4 0 P4>
<.PortSym 40 0 5 180 P5>
<.ID 20 14 Y>
<Line 28 0 12 0 #000080 2 1>
<Line 0 -20 -10 0 #000080 2 1>
</Symbol>
</Component>
<Component 74LV32>
<Description>
2-Input OR Gate
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV32 _net0 _net1 _net2
Sub:X1 _net0 _net1 _net2 gnd Type="n74LV32_cir"
.Def:End
</Model>
<ModelIncludes "74LV32.cir.lst">
<Spice>
* -------------------------- 74LV32A ----------------------------
* Quad 2-Input Or Gate
*
* TI PDF File
* bss 2/24/03
*
.SUBCKT 74LV32A 1A 1B 1Y
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 or(2) DPWR_3V DGND_3V
+ 1A 1B 1Y
+ DLY_LV32 IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
.model DLY_LV32 ugate (tplhTY=6.9ns tplhMX=11.4ns tphlTY=6.9ns tphlMX=11.4ns)
.ENDS 74LV32A
*
.SUBCKT Digital_LV_74LV32 gnd _net0 _net1 _net2
X1 _net0 _net1 _net2 74LV32A
.ENDS
</Spice>
<Symbol>
<.PortSym -30 -10 1 0 P1>
<.PortSym -30 10 2 0 P2>
<.PortSym 30 0 3 180 P3>
<.ID 10 14 Y>
<EArc -30 -20 40 40 4320 2880 #000080 2 1>
<Line 10 0 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<EArc -20 -20 10 40 4320 2880 #000080 2 1>
<Line -10 20 -5 0 #000080 2 1>
<Line -10 -20 -5 0 #000080 2 1>
</Symbol>
</Component>
<Component 74LV74>
<Description>
D-Type Positive Edge Triggered Flip-Flop With Preset And Clear
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV74 _net0 _net1 _net2 _net3 _net4 _net5
Sub:X1 _net0 _net1 _net2 _net3 _net4 _net5 gnd Type="n74LV74_cir"
.Def:End
</Model>
<ModelIncludes "74LV74.cir.lst">
<Spice>
* The timing parameters for all of these models were taken from the specifications for a
* 3.3V power supply and a 50pF capacitive load.
*
* -------------------------------------- 74LV74A ---------------------------
* Dual Positive Edge Triggered D-Type Flip-Flop
*
* TI PDF File
* bss 2/24/03
*
.SUBCKT 74LV74A 1PREBAR 1CLRBAR 1CLK 1D 1Q 1QBAR
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 DFF(1) DPWR_3V DGND_3V
+ 1PREBAR 1CLRBAR 1CLK 1D 1Q 1QBAR
+ DLY_LV74 IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
.model DLY_LV74 ueff(tppcqlhty=9.2ns tppcqlhmx=15.8ns tppcqhlty=9.2ns tppcqhlmx=15.8ns
+ tpclkqlhty=10.2ns tpclkqlhmx=15.4ns tpclkqhlty=10.2ns tpclkqhlmx=15.4ns
+ twpclmn=6ns twclklmn=6ns twclkhmn=6ns tsudclkmn=6n tsupcclkhmn=5ns
+ thdclkmn=.5n)
.ENDS 74LV74A
*
.SUBCKT Digital_LV_74LV74 gnd _net0 _net1 _net2 _net3 _net4 _net5
X1 _net0 _net1 _net2 _net3 _net4 _net5 74LV74A
.ENDS
</Spice>
<Symbol>
<Rectangle -30 -40 60 80 #000080 2 1 #c0c0c0 1 0>
<Line -50 20 20 0 #000080 2 1>
<Line -50 -20 20 0 #000080 2 1>
<Line 30 -20 20 0 #000080 2 1>
<Line 0 -40 0 -20 #000080 2 1>
<Ellipse -4 40 8 8 #000080 1 1 #000080 1 1>
<Line 30 20 20 0 #000080 2 1>
<Ellipse -4 -48 8 8 #000080 1 1 #000080 1 1>
<Line 14 11 12 0 #000080 2 1>
<Text 14 -31 12 #000080 0 "Q">
<Text 14 9 12 #000080 0 "Q">
<Text -28 -30 12 #000080 0 "D">
<Line -15 20 -15 -10 #000080 2 1>
<Line -30 30 15 -10 #000080 2 1>
<Line 0 61 0 -20 #000080 2 1>
<Text -6 -41 12 #000080 0 "C">
<Text -3 19 12 #000080 0 "P">
<.PortSym 0 60 1 0 P1>
<.ID 20 44 Y>
<.PortSym 0 -60 2 0 P2>
<.PortSym -50 -20 4 0 P4>
<.PortSym -50 20 3 0 P3>
<.PortSym 50 -20 5 180 P5>
<.PortSym 50 20 6 180 P6>
</Symbol>
</Component>
<Component 74LV86>
<Description>
2-Input Exclusive-OR Gate
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV86 _net0 _net1 _net2
Sub:X1 _net0 _net1 _net2 gnd Type="n74LV86_cir"
.Def:End
</Model>
<ModelIncludes "74LV86.cir.lst">
<Spice>
* ----------------------------------------------------------- 74LV86A ------
* Quad 2-Input Exclusive-Or Gate
*
* TI PDF File
* bss 2/24/03
*
.SUBCKT 74LV86 1A 1B 1Y
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 xor DPWR_3V DGND_3V
+ 1A 1B 1Y
+ DLY_LV86 IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
.model DLY_LV86 ugate (tplhTY=7.4ns tplhMX=14.5ns tphlTY=7.4ns tphlMX=14.5ns)
.ENDS 74LV86
*
.SUBCKT Digital_LV_74LV86 gnd _net0 _net1 _net2
X1 _net0 _net1 _net2 74LV86
.ENDS
</Spice>
<Symbol>
<.PortSym -30 -10 1 0 P1>
<.PortSym -30 10 2 0 P2>
<.PortSym 30 0 3 180 P3>
<.ID 10 14 Y>
<EArc -30 -20 40 40 4320 2880 #000080 2 1>
<Line 10 0 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<EArc -20 -20 10 40 4320 2880 #000080 2 1>
<EArc -15 -20 10 40 4320 2880 #000080 2 1>
</Symbol>
</Component>
<Component 74LV138>
<Description>
3-Line To 8-Line Decoder/Demultiplexer
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV138 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 _net12 _net13
Sub:X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 _net12 _net13 gnd Type="n74LV138_cir"
.Def:End
</Model>
<ModelIncludes "74LV138.cir.lst">
<Spice>
*-----------------------------------------------------------74LV138A-----
* 3-Line To 8-Line Decoder/Demultiplexer
*
* TI PDF File
* bss 2/25/03
.SUBCKT 74LV138A A B C G1 G2ABAR G2BBAR Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 LOGICEXP(6,8) DPWR_3V DGND_3V
+ A B C G1 G2ABAR G2BBAR
+ Y0O Y1O Y2O Y3O Y4O Y5O Y6O Y7O
+ D0_GATE IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
+ LOGIC:
+ ENAB = {G1 & ~G2ABAR & ~G2BBAR}
+ Y0O = {~(~A & ~B & ~C & ENAB)}
+ Y1O = {~(A & ~B & ~C & ENAB)}
+ Y2O = {~(~A & B & ~C & ENAB)}
+ Y3O = {~(A & B & ~C & ENAB)}
+ Y4O = {~(~A & ~B & C & ENAB)}
+ Y5O = {~(A & ~B & C & ENAB)}
+ Y6O = {~(~A & B & C & ENAB)}
+ Y7O = {~(A & B & C & ENAB)}
U2 PINDLY(8,0,6) DPWR_3V DGND_3V
+ Y0O Y1O Y2O Y3O Y4O Y5O Y6O Y7O
+ A B C G1 G2ABAR G2BBAR
+ Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7
+ IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
+ BOOLEAN:
+ IN = {CHANGED(A,0) | CHANGED(B,0) | CHANGED(C,0)}
+ ENBAR = {CHANGED(G2ABAR,0) | CHANGED(G2BBAR,0)}
+ EN = {CHANGED(G1,0)}
+ PINDLY:
+ Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 = {
+ CASE(
+ EN & TRN_LH, DELAY(-1,10.6ns,16.3ns),
+ EN & TRN_HL, DELAY(-1,10.6ns,16.3ns),
+ ENBAR & TRN_LH, DELAY(-1,10ns,14.9ns),
+ ENBAR & TRN_HL, DELAY(-1,10ns,14.9ns),
+ IN & TRN_LH, DELAY(-1,10.3ns,15.8ns),
+ IN & TRN_HL, DELAY(-1,10.3ns,15.8ns),
+ DELAY(-1,11ns,17ns))}
.ENDS 74LV138A
*
.SUBCKT Digital_LV_74LV138 gnd _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 _net12 _net13
X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 _net12 _net13 74LV138A
.ENDS
</Spice>
<Symbol>
<Line 30 20 20 0 #000080 2 1>
<Rectangle -30 -20 60 180 #000080 2 1 #c0c0c0 1 0>
<Line 30 0 20 0 #000080 2 1>
<Line 30 60 20 0 #000080 2 1>
<Line 30 40 20 0 #000080 2 1>
<Line 30 100 20 0 #000080 2 1>
<Line 30 80 20 0 #000080 2 1>
<Line 30 140 20 0 #000080 2 1>
<Line 30 120 20 0 #000080 2 1>
<Line -50 0 20 0 #000080 2 1>
<.PortSym 50 0 7 180 Y0>
<.PortSym 50 20 8 180 Y1>
<.PortSym 50 40 9 180 Y2>
<.PortSym 50 60 10 180 Y3>
<.PortSym 50 80 11 180 Y4>
<.PortSym 50 100 12 180 Y5>
<.PortSym 50 120 13 180 Y6>
<.PortSym 50 140 14 180 Y7>
<Line -50 20 20 0 #000080 2 1>
<Line -50 40 20 0 #000080 2 1>
<.PortSym -50 20 2 0 B>
<.PortSym -50 0 1 0 A>
<.PortSym -50 40 3 0 C>
<Line -50 80 20 0 #000080 2 1>
<Line -50 100 20 0 #000080 2 1>
<Ellipse -31 96 -8 8 #000080 1 1 #000080 1 1>
<Line -50 120 20 0 #000080 2 1>
<Ellipse -31 116 -8 8 #000080 1 1 #000080 1 1>
<.PortSym -50 80 4 0 G1>
<.PortSym -50 100 5 0 G2AB>
<.PortSym -50 120 6 0 G2BB>
<Text -25 -11 12 #000080 0 "A">
<Text 6 29 12 #000080 0 "Y2">
<Text 6 49 12 #000080 0 "Y3">
<Text 6 129 12 #000080 0 "Y7">
<Text 6 9 12 #000080 0 "Y1">
<Text 6 89 12 #000080 0 "Y5">
<Text 6 -11 12 #000080 0 "Y0">
<Text 6 69 12 #000080 0 "Y4">
<Text 6 109 12 #000080 0 "Y6">
<Text -25 9 12 #000080 0 "B">
<Text -25 69 12 #000080 0 "G1">
<Text -25 89 12 #000080 0 "G2">
<Text -25 109 12 #000080 0 "G3">
<.ID -10 164 Y>
<Text -25 29 12 #000080 0 "C">
</Symbol>
</Component>
<Component 74LV164>
<Description>
8-Bit Parallel-Out Serial Shift Register
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
.PARAM: vcc=5
</Description>
<Model>
.Def:Digital_LV_74LV164 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11
Sub:X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 gnd Type="n74LV164_cir"
.Def:End
</Model>
<ModelIncludes "74LV164.cir.lst">
<Spice>
* ----------------------------------------------------------- 74LV164 ------
* 8-Bit Parallel-Out Serial Shift Register
*
* TI PDF File
* bss 2/26/03
*
.SUBCKT 74LV164 A B CLRBAR CLK QA QB QC QD QE QF QG QH
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U74164 LOGICEXP (3,3) DPWR_3V DGND_3V
+ CLK A B
+ r0 s0 clkbar
+ D0_GATE IO_LV-A IO_LEVEL={IO_LEVEL}
+
+ LOGIC:
+ r0 = { (~(A & B)) }
+ s0 = { (~r0) }
+ clkbar = { (~CLK) }
uf0 JKff(8) DPWR_3V DGND_3V
+ $D_HI CLRBAR clkbar
+ s0 QA_O QB_O QC_O QD_O QE_O QF_O QG_O
+ r0 qabar qbbar qcbar qdbar qebar qfbar qgbar
+ QA_O QB_O QC_O QD_O QE_O QF_O QG_O QH_O
+ qabar qbbar qcbar qdbar qebar qfbar qgbar qhbar
+ D0_EFF IO_LV-A
Udly PINDLY (8,0,2) DPWR_3V DGND_3V
+ QA_O QB_O QC_O QD_O QE_O QF_O QG_O QH_O
+ CLRBAR CLK
+ QA QB QC QD QE QF QG QH
+ IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
+
+ BOOLEAN:
+ CLOCK= { CHANGED(CLK,0) }
+ CLEAR= { CHANGED_HL(CLRBAR,0) }
+
+ PINDLY:
+ QA QB QC QD QE QF QG QH = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,7.9ns,16.3ns),
+ CLOCK, DELAY(-1,8.3ns,16.3ns),
+ DELAY(-1,9ns,17ns)
+ )
+ }
Ucnstr CONSTRAINT(4) DPWR_3V DGND_3V
+ CLRBAR CLK A B
+ IO_LV-A
+
+ FREQ:
+ NODE = CLK
+ MAXFREQ = 120MEG
+ WIDTH:
+ NODE = CLK
+ MIN_HI = 5ns
+ MIN_LO = 5ns
+ WIDTH:
+ NODE = CLRBAR
+ MIN_LO = 5ns
+ SETUP_HOLD:
+ CLOCK LH = CLK
+ DATA(2) = A B
+ SETUPTIME = 5ns
+ WHEN = { CLRBAR != '0 }
+ SETUP_HOLD:
+ DATA(1) = CLRBAR
+ CLOCK LH = CLK
+ SETUPTIME_HI = 2.5ns
.ENDS 74LV164
*
.SUBCKT Digital_LV_74LV164 gnd _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11
X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 74LV164
.ENDS
</Spice>
<Symbol>
<Line 30 20 20 0 #000080 2 1>
<Text 4 9 12 #000080 0 "QB">
<Text 4 -11 12 #000080 0 "QA">
<Text 4 29 12 #000080 0 "QC">
<Text 4 49 12 #000080 0 "QD">
<Text 4 69 12 #000080 0 "QE">
<Line -50 0 20 0 #000080 2 1>
<Text -28 -10 12 #000080 0 "A">
<Rectangle -30 -20 60 180 #000080 2 1 #c0c0c0 1 0>
<Line 30 0 20 0 #000080 2 1>
<Text 4 89 12 #000080 0 "QF">
<Text 4 109 12 #000080 0 "QG">
<Text 4 129 12 #000080 0 "QH">
<Line 30 60 20 0 #000080 2 1>
<Line 30 40 20 0 #000080 2 1>
<Line 30 100 20 0 #000080 2 1>
<Line 30 80 20 0 #000080 2 1>
<Line 30 140 20 0 #000080 2 1>
<Line 30 120 20 0 #000080 2 1>
<Line -50 20 20 0 #000080 2 1>
<Line -50 60 20 0 #000080 2 1>
<Text -28 10 12 #000080 0 "B">
<Text -28 50 12 #000080 0 "CLR">
<Ellipse -31 56 -8 8 #000080 1 1 #000080 1 1>
<Line -50 140 20 0 #000080 2 1>
<Line -15 140 -15 -10 #000080 2 1>
<Line -30 150 15 -10 #000080 2 1>
<.PortSym -50 60 3 0 CLRBAR>
<.ID -10 164 Y>
<.PortSym -50 0 1 0 A>
<.PortSym -50 20 2 0 B>
<.PortSym -50 140 4 0 CLK>
<.PortSym 50 0 5 180 QA>
<.PortSym 50 20 6 180 QB>
<.PortSym 50 40 7 180 QC>
<.PortSym 50 60 8 180 QD>
<.PortSym 50 80 9 180 QE>
<.PortSym 50 100 10 180 QF>
<.PortSym 50 120 11 180 QG>
<.PortSym 50 140 12 180 QH>
</Symbol>
</Component>
<Component 74LV4040>
<Description>
12-Stage Binary Ripple Counter
XSPICE Based Model
Requirements:
.spiceinit: set ngbehavior=psa
</Description>
<Model>
.Def:Digital_LV_74LV4040 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 _net12 _net13
Sub:X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 _net12 _net13 gnd Type="n74LV4040_cir"
.Def:End
</Model>
<ModelIncludes "74LV4040.cir.lst">
<Spice>
*
*---------------------74LV4040A-----------------------
* 12-Bit Asynchronous Binary Counter
*
* TI PDF File
* bss 2/28/03
.SUBCKT 74LV4040 CLR CLK QA QB QC QD QE QF QG QH QI QJ QK QL
+ optional: DPWR_3V=$G_DPWR_3V DGND_3V=$G_DGND_3V
+ params: MNTYMXDLY=0 IO_LEVEL=0
U1 LOGICEXP(1,1) DPWR_3V DGND_3V
+ CLR
+ RESETBAR
+ D0_GATE IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
+ LOGIC:
+ RESETBAR = {~CLR}
U2 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR CLK
+ $D_HI $D_HI Q_A $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U3 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_A
+ $D_HI $D_HI Q_B $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U4 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_B
+ $D_HI $D_HI Q_C $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U5 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_C
+ $D_HI $D_HI Q_D $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U6 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_D
+ $D_HI $D_HI Q_E $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U7 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_E
+ $D_HI $D_HI Q_F $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U8 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_F
+ $D_HI $D_HI Q_G $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U9 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_G
+ $D_HI $D_HI Q_H $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U10 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_H
+ $D_HI $D_HI Q_I $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U11 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_I
+ $D_HI $D_HI Q_J $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U12 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_J
+ $D_HI $D_HI Q_K $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U13 JKFF(1) DPWR_3V DGND_3V
+ $D_HI RESETBAR Q_K
+ $D_HI $D_HI Q_L $D_NC
+ D0_EFF IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
U14 PINDLY(12,0,2) DPWR_3V DGND_3V
+ Q_A Q_B Q_C Q_D Q_E Q_F Q_G Q_H Q_I Q_J Q_K Q_L
+ CLR CLK
+ QA QB QC QD QE QF QG QH QI QJ QK QL
+ IO_LV-A MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}
+ BOOLEAN:
+ CLEAR = {CHANGED_LH(CLR,0)}
+ ACLK = {CHANGED_HL(CLK,0)}
+ PINDLY:
+ QA = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,7.5ns,15.4ns),
+ DELAY(-1,10ns,17ns))}
+ QB = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,8.7ns,19.8ns),
+ DELAY(-1,10ns,20ns))}
+ QC = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,9.9ns,24.2ns),
+ DELAY(-1,10ns,25ns))}
+ QD = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,11.1ns,28.6ns),
+ DELAY(-1,12ns,29ns))}
+ QE = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,12.3ns,33ns),
+ DELAY(-1,13ns,34ns))}
+ QF = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,13.5ns,37.4ns),
+ DELAY(-1,14ns,38ns))}
+ QG = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,14.7ns,41.8ns),
+ DELAY(-1,15ns,42ns))}
+ QH = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,15.9ns,46.2ns),
+ DELAY(-1,16ns,47ns))}
+ QI = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,17.1ns,50.6ns),
+ DELAY(-1,18ns,51ns))}
+ QJ = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,18.3ns,55ns),
+ DELAY(-1,19ns,56ns))}
+ QK = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,19.5ns,59.4ns),
+ DELAY(-1,20ns,60ns))}
+ QL = {
+ CASE(
+ CLEAR & TRN_HL, DELAY(-1,9ns,16.3ns),
+ ACLK, DELAY(-1,20.7ns,63.8ns),
+ DELAY(-1,21ns,64ns))}
U15 CONSTRAINT(2) DPWR_3V DGND_3V
+ CLK CLR
+ IO_LV-A IO_LEVEL={IO_LEVEL}
+ SETUP_HOLD:
+ CLOCK HL = CLK
+ DATA(1) = CLR
+ SETUPTIME_LO = 5NS
+ WIDTH:
+ NODE = CLK
+ MIN_HI = 5NS
+ MIN_LO = 5NS
+ WIDTH:
+ NODE = CLR
+ MIN_HI = 5NS
+ FREQ:
+ NODE = CLK
+ MAXFREQ = 130MEG
.ENDS 74LV4040
*
.SUBCKT Digital_LV_74LV4040 gnd _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 _net12 _net13
X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 _net9 _net10 _net11 _net12 _net13 74LV4040
.ENDS
</Spice>
<Symbol>
<Line 30 20 20 0 #000080 2 1>
<Text 4 9 12 #000080 0 "QB">
<Text 4 -11 12 #000080 0 "QA">
<Text 4 29 12 #000080 0 "QC">
<Text 4 49 12 #000080 0 "QD">
<Text 4 69 12 #000080 0 "QE">
<Rectangle -30 -20 60 260 #000080 2 1 #c0c0c0 1 0>
<Line 30 0 20 0 #000080 2 1>
<Text 4 89 12 #000080 0 "QF">
<Text 4 109 12 #000080 0 "QG">
<Text 4 129 12 #000080 0 "QH">
<Line 30 60 20 0 #000080 2 1>
<Line 30 40 20 0 #000080 2 1>
<Line 30 100 20 0 #000080 2 1>
<Line 30 80 20 0 #000080 2 1>
<Line 30 140 20 0 #000080 2 1>
<Line 30 120 20 0 #000080 2 1>
<Line 30 160 20 0 #000080 2 1>
<Line 30 180 20 0 #000080 2 1>
<Line 30 200 20 0 #000080 2 1>
<Line 30 220 20 0 #000080 2 1>
<.PortSym 50 0 3 180 QA>
<.PortSym 50 20 4 180 QB>
<.PortSym 50 40 5 180 QC>
<.PortSym 50 60 6 180 QD>
<.PortSym 50 80 7 180 QE>
<.PortSym 50 100 8 180 QF>
<.PortSym 50 120 9 180 QG>
<.PortSym 50 140 10 180 QH>
<.PortSym 50 160 11 180 QI>
<.PortSym 50 180 12 180 QJ>
<Text 4 149 12 #000080 0 "QI">
<Text 4 169 12 #000080 0 "QJ">
<Text 4 189 12 #000080 0 "QK">
<Text 4 209 12 #000080 0 "QL">
<.ID -10 244 Y>
<.PortSym 50 200 13 180 QK>
<.PortSym 50 220 14 180 QL>
<.PortSym -50 0 2 0 CLK>
<Line -50 0 20 0 #000080 2 1>
<Line -15 0 -15 -10 #000080 2 1>
<Line -30 10 15 -10 #000080 2 1>
<Line -50 60 20 0 #000080 2 1>
<Text -28 50 12 #000080 0 "CLR">
<.PortSym -50 60 1 0 CLR>
</Symbol>
</Component>

988
library/Digital_XSPICE.lib Normal file
View File

@ -0,0 +1,988 @@
<Qucs Library 24.4.1 "Digital_XSPICE">
<Component d_AND2>
<Description>
2-Input AND
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_AND2 _net0 _net2 _net1 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net2 _net1 gnd Type="d_and2_cir"
.Def:End
</Model>
<ModelIncludes "d_and2.cir.lst">
<Spice>
**** XSPICE digital 2-Input AND ****
*
.subckt d_and2X A B Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B] Y and1
.model and1 d_and(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_and2X
.SUBCKT Digital_XSPICE_d_AND2 gnd _net0 _net2 _net1 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net2 _net1 d_and2X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line -10 20 0 -40 #0000ff 2 1>
<Line 10 0 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<.PortSym -30 10 2 0 B>
<.PortSym 30 0 3 180 Y>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<.PortSym -30 -10 1 0 A>
</Symbol>
</Component>
<Component d_AND3>
<Description>
3-Input AND
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_AND3 _net0 _net1 _net2 _net3 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 _net2 _net3 gnd Type="d_and3_cir"
.Def:End
</Model>
<ModelIncludes "d_and3.cir.lst">
<Spice>
**** XSPICE digital 3-Input AND ****
*
.subckt d_and3X A B C Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B C] Y and1
.model and1 d_and(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_and3X
.SUBCKT Digital_XSPICE_d_AND3 gnd _net0 _net1 _net2 _net3 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 _net2 _net3 d_and3X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line -10 20 0 -40 #0000ff 2 1>
<Line 10 0 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<.PortSym -30 -10 1 0 A>
<Line -30 0 20 0 #000080 2 1>
<.PortSym -30 0 2 0 B>
<.PortSym -30 10 3 0 C>
<.PortSym 30 0 4 180 Y>
</Symbol>
</Component>
<Component d_AND4>
<Description>
4-Input AND
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_AND4 _net0 _net1 _net2 _net3 _net4 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 _net2 _net3 _net4 gnd Type="d_and4_cir"
.Def:End
</Model>
<ModelIncludes "d_and4.cir.lst">
<Spice>
**** XSPICE digital 4-Input AND ****
*
.subckt d_and4X A B C D Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B C D] Y and1
.model and1 d_and(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_and4X
.SUBCKT Digital_XSPICE_d_AND4 gnd _net0 _net1 _net2 _net3 _net4 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 _net2 _net3 _net4 d_and4X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.PortSym -30 -30 1 0 A>
<.PortSym -30 -10 2 0 B>
<.PortSym -30 10 3 0 C>
<.PortSym -30 30 4 0 D>
<.PortSym 40 0 5 180 Y>
<.ID 20 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<Line -30 -30 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<Line -30 30 20 0 #000080 2 1>
<Line -10 40 0 -80 #0000ff 2 1>
<Line 20 0 20 0 #000080 2 1>
<EArc -20 -20 40 40 4320 2880 #0000ff 2 1>
<Line 0 20 -10 0 #0000ff 2 1>
<Line 0 -20 -10 0 #0000ff 2 1>
</Symbol>
</Component>
<Component d_AND8>
<Description>
8-Input AND
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_AND8 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 gnd Type="d_and8_cir"
.Def:End
</Model>
<ModelIncludes "d_and8.cir.lst">
<Spice>
**** XSPICE digital 8-Input AND ****
*
.subckt d_and8X A B C D E F G H Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B C D E F G H] Y and1
.model and1 d_and(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_and8X
.SUBCKT Digital_XSPICE_d_AND8 gnd _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 d_and8X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.ID 20 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<Line -30 -30 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<Line -30 30 20 0 #000080 2 1>
<Line 20 0 20 0 #000080 2 1>
<EArc -20 -20 40 40 4320 2880 #0000ff 2 1>
<Line 0 20 -10 0 #0000ff 2 1>
<Line 0 -20 -10 0 #0000ff 2 1>
<Line -30 50 20 0 #000080 2 1>
<Line -30 70 20 0 #000080 2 1>
<Line -30 -70 20 0 #000080 2 1>
<Line -30 -50 20 0 #000080 2 1>
<.PortSym -30 -70 1 0 A>
<.PortSym -30 -50 2 0 B>
<.PortSym -30 -30 3 0 C>
<.PortSym -30 -10 4 0 D>
<.PortSym -30 10 5 0 E>
<.PortSym -30 30 6 0 F>
<.PortSym -30 50 7 0 G>
<.PortSym -30 70 8 0 H>
<.PortSym 40 0 9 180 Y>
<Line -10 80 0 -160 #0000ff 2 1>
</Symbol>
</Component>
<Component d_NAND2>
<Description>
2-Input NAND
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_NAND2 _net0 _net1 _net2 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 _net2 gnd Type="d_nand2_cir"
.Def:End
</Model>
<ModelIncludes "d_nand2.cir.lst">
<Spice>
**** XSPICE digital 2-Input NAND ****
*
.subckt d_nand2X A B Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B] Y nand1
.model nand1 d_nand(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_nand2X
.SUBCKT Digital_XSPICE_d_NAND2 gnd _net0 _net1 _net2 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 _net2 d_nand2X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.PortSym -30 10 2 0 B>
<.PortSym 30 0 3 180 Y>
<.PortSym -30 -10 1 0 A>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line -10 20 0 -40 #0000ff 2 1>
<Ellipse 10 -4 8 8 #0000ff 1 1 #0000ff 1 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<Line 18 0 12 0 #000080 2 1>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
</Symbol>
</Component>
<Component d_NAND3>
<Description>
3-Input NAND
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_NAND3 _net0 _net1 _net2 _net3 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 _net2 _net3 gnd Type="d_nand3_cir"
.Def:End
</Model>
<ModelIncludes "d_nand3.cir.lst">
<Spice>
**** XSPICE digital 3-Input NAND ****
*
.subckt d_nand3X A B C Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B C] Y nand1
.model nand1 d_nand(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_nand3X
.SUBCKT Digital_XSPICE_d_NAND3 gnd _net0 _net1 _net2 _net3 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 _net2 _net3 d_nand3X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.PortSym -30 -10 1 0 A>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line -10 20 0 -40 #0000ff 2 1>
<Ellipse 10 -4 8 8 #0000ff 1 1 #0000ff 1 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<Line 18 0 12 0 #000080 2 1>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<Line -30 0 20 0 #000080 2 1>
<.PortSym -30 0 2 0 B>
<.PortSym -30 10 3 0 C>
<.PortSym 30 0 4 180 Y>
</Symbol>
</Component>
<Component d_NAND4>
<Description>
4-Input NAND
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_NAND4 _net0 _net1 _net2 _net3 _net4 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 _net2 _net3 _net4 gnd Type="d_nand4_cir"
.Def:End
</Model>
<ModelIncludes "d_nand4.cir.lst">
<Spice>
**** XSPICE digital 4-Input NAND ****
*
.subckt d_nand4X A B C D Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B C D] Y nand1
.model nand1 d_nand(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_nand4X
.SUBCKT Digital_XSPICE_d_NAND4 gnd _net0 _net1 _net2 _net3 _net4 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 _net2 _net3 _net4 d_nand4X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<Line -30 -30 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<Line -30 30 20 0 #000080 2 1>
<Line -10 40 0 -80 #0000ff 2 1>
<.PortSym -30 -30 1 0 A>
<.PortSym -30 -10 2 0 B>
<.PortSym -30 10 3 0 C>
<.PortSym -30 30 4 0 D>
<.PortSym 40 0 5 180 Y>
<Line 28 0 12 0 #000080 2 1>
<Ellipse 20 -4 8 8 #0000ff 1 1 #0000ff 1 1>
<EArc -20 -20 40 40 4320 2880 #0000ff 2 1>
<Line 0 20 -10 0 #0000ff 2 1>
<Line 0 -20 -10 0 #0000ff 2 1>
<.ID 20 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
</Symbol>
</Component>
<Component d_NAND8>
<Description>
8-Input NAND
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_NAND8 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 gnd Type="d_nand8_cir"
.Def:End
</Model>
<ModelIncludes "d_nand8.cir.lst">
<Spice>
**** XSPICE digital 8-Input AND ****
*
.subckt d_nand8X A B C D E F G H Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B C D E F G H] Y nand1
.model nand1 d_nand(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_nand8X
.SUBCKT Digital_XSPICE_d_NAND8 gnd _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 _net2 _net3 _net4 _net5 _net6 _net7 _net8 d_nand8X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.ID 20 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<Line -30 -30 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<Line -30 30 20 0 #000080 2 1>
<EArc -20 -20 40 40 4320 2880 #0000ff 2 1>
<Line 0 20 -10 0 #0000ff 2 1>
<Line 0 -20 -10 0 #0000ff 2 1>
<Line -30 50 20 0 #000080 2 1>
<Line -30 70 20 0 #000080 2 1>
<Line -30 -70 20 0 #000080 2 1>
<Line -30 -50 20 0 #000080 2 1>
<.PortSym -30 -70 1 0 A>
<.PortSym -30 -50 2 0 B>
<.PortSym -30 -30 3 0 C>
<.PortSym -30 -10 4 0 D>
<.PortSym -30 10 5 0 E>
<.PortSym -30 30 6 0 F>
<.PortSym -30 50 7 0 G>
<.PortSym -30 70 8 0 H>
<.PortSym 40 0 9 180 Y>
<Line -10 80 0 -160 #0000ff 2 1>
<Ellipse 20 -4 8 8 #0000ff 1 1 #0000ff 1 1>
<Line 28 0 12 0 #000080 2 1>
</Symbol>
</Component>
<Component d_OR2>
<Description>
2-Input OR
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_OR2 _net0 _net2 _net1 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net2 _net1 gnd Type="d_or2_cir"
.Def:End
</Model>
<ModelIncludes "d_or2.cir.lst">
<Spice>
**** XSPICE digital 2-Input OR ****
*
.subckt d_or2X A B Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B] Y or1
.model or1 d_or(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_or2X
.SUBCKT Digital_XSPICE_d_OR2 gnd _net0 _net2 _net1 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net2 _net1 d_or2X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.PortSym -30 10 2 0 B>
<.PortSym 30 0 3 180 Y>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<.PortSym -30 -10 1 0 A>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line 10 0 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<EArc -20 -20 10 40 4320 2880 #0000ff 2 1>
<Line -10 20 -5 0 #0000ff 2 1>
<Line -10 -20 -5 0 #0000ff 2 1>
</Symbol>
</Component>
<Component d_OR3>
<Description>
3-Input OR
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_OR3 _net0 _net1 _net2 _net3 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 _net2 _net3 gnd Type="d_or3_cir"
.Def:End
</Model>
<ModelIncludes "d_or3.cir.lst">
<Spice>
**** XSPICE digital 3-Input OR ****
*
.subckt d_or3X A B C Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B C] Y or1
.model or1 d_or(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_or3X
.SUBCKT Digital_XSPICE_d_OR3 gnd _net0 _net1 _net2 _net3 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 _net2 _net3 d_or3X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.PortSym -30 -10 1 0 A>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<EArc -20 -20 10 40 4320 2880 #0000ff 2 1>
<Line -10 20 -5 0 #0000ff 2 1>
<Line -10 -20 -5 0 #0000ff 2 1>
<Line 10 0 20 0 #000080 2 1>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<Line -30 0 20 0 #000080 2 1>
<.PortSym -30 0 2 0 B>
<.PortSym -30 10 3 0 C>
<.PortSym 30 0 4 180 Y>
</Symbol>
</Component>
<Component d_NOR2>
<Description>
2-Input NOR
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_NOR2 _net0 _net2 _net1 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net2 _net1 gnd Type="d_nor2_cir"
.Def:End
</Model>
<ModelIncludes "d_nor2.cir.lst">
<Spice>
**** XSPICE digital 2-Input NOR ****
*
.subckt d_nor2X A B Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B] Y nor1
.model nor1 d_nor(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_nor2X
.SUBCKT Digital_XSPICE_d_NOR2 gnd _net0 _net2 _net1 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net2 _net1 d_nor2X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.PortSym -30 10 2 0 B>
<.PortSym 30 0 3 180 Y>
<.PortSym -30 -10 1 0 A>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<EArc -20 -20 10 40 4320 2880 #0000ff 2 1>
<Line -10 20 -5 0 #0000ff 2 1>
<Line -10 -20 -5 0 #0000ff 2 1>
<Ellipse 10 -4 8 8 #0000ff 1 1 #0000ff 1 1>
<Line 18 0 12 0 #000080 2 1>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
</Symbol>
</Component>
<Component d_NOR3>
<Description>
2-Input NOR
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_NOR3 _net0 _net1 _net2 _net3 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 _net2 _net3 gnd Type="d_nor3_cir"
.Def:End
</Model>
<ModelIncludes "d_nor3.cir.lst">
<Spice>
**** XSPICE digital 3-Input NOR ****
*
.subckt d_nor3X A B C Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B C] Y nor1
.model nor1 d_nor(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_nor3X
.SUBCKT Digital_XSPICE_d_NOR3 gnd _net0 _net1 _net2 _net3 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 _net2 _net3 d_nor3X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.PortSym -30 -10 1 0 A>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<EArc -20 -20 10 40 4320 2880 #0000ff 2 1>
<Line -10 20 -5 0 #0000ff 2 1>
<Line -10 -20 -5 0 #0000ff 2 1>
<Ellipse 10 -4 8 8 #0000ff 1 1 #0000ff 1 1>
<Line 18 0 12 0 #000080 2 1>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<Line -30 0 20 0 #000080 2 1>
<.PortSym -30 0 2 0 B>
<.PortSym -30 10 3 0 C>
<.PortSym 30 0 4 180 Y>
</Symbol>
</Component>
<Component d_XOR2>
<Description>
2-Input XOR
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_XOR2 _net0 _net2 _net1 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net2 _net1 gnd Type="d_xor2_cir"
.Def:End
</Model>
<ModelIncludes "d_xor2.cir.lst">
<Spice>
**** XSPICE digital 2-Input XOR ****
*
.subckt d_xor2X A B Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B] Y xor1
.model xor1 d_xor(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_xor2X
.SUBCKT Digital_XSPICE_d_XOR2 gnd _net0 _net2 _net1 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net2 _net1 d_xor2X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.PortSym -30 10 2 0 B>
<.PortSym 30 0 3 180 Y>
<.PortSym -30 -10 1 0 A>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line 10 0 20 0 #000080 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<EArc -20 -20 10 40 4320 2880 #0000ff 2 1>
<EArc -15 -20 10 40 4320 2880 #0000ff 2 1>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
</Symbol>
</Component>
<Component d_XNOR2>
<Description>
2-Input XNOR
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_XNOR2 _net0 _net2 _net1 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net2 _net1 gnd Type="d_nor2_cir"
.Def:End
</Model>
<ModelIncludes "d_nor2.cir.lst">
<Spice>
**** XSPICE digital 2-Input NOR ****
*
.subckt d_nor2X A B Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 [A B] Y nor1
.model nor1 d_nor(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_nor2X
.SUBCKT Digital_XSPICE_d_XNOR2 gnd _net0 _net2 _net1 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net2 _net1 d_nor2X RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.PortSym -30 10 2 0 B>
<.PortSym 30 0 3 180 Y>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<.PortSym -30 -10 1 0 A>
<EArc -30 -20 40 40 4320 2880 #0000ff 2 1>
<Line -30 -10 20 0 #000080 2 1>
<Line -30 10 20 0 #000080 2 1>
<EArc -20 -20 10 40 4320 2880 #0000ff 2 1>
<EArc -15 -20 10 40 4320 2880 #0000ff 2 1>
<Ellipse 10 -4 8 8 #0000ff 1 1 #0000ff 1 1>
<Line 18 0 12 0 #000080 2 1>
</Symbol>
</Component>
<Component d_BUF>
<Description>
Digital Buffer
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_BUF _net0 _net1 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 gnd Type="d_buf_cir"
.Def:End
</Model>
<ModelIncludes "d_buf.cir.lst">
<Spice>
**** XSPICE digital Buffer ****
*
.subckt d_bufX A Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 A Y buf1
.model buf1 d_buffer(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_bufX
.SUBCKT Digital_XSPICE_d_BUF gnd _net0 _net1 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 d_bufX RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<Line 15 0 15 0 #000080 2 1>
<Line -30 0 20 0 #000080 2 1>
<Line -10 -15 25 15 #0000ff 2 1>
<Line -10 15 0 -30 #0000ff 2 1>
<Line -10 15 25 -15 #0000ff 2 1>
<.PortSym -30 0 1 0 A>
<.PortSym 30 0 2 180 Y>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
</Symbol>
</Component>
<Component d_INV>
<Description>
Digital Inverter
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_INV _net0 _net1 Rise_Delay="1e-10" Fall_Delay="1e-10" Input_Load="0.5e-12"
Sub:X1 _net0 _net1 gnd Type="d_inv_cir"
.Def:End
</Model>
<ModelIncludes "d_inv.cir.lst">
<Spice>
**** XSPICE digital Inverter ****
*
.subckt d_invX A Y rise_delay=1e-10 fall_delay=1e-10 input_load=0.5e-12
*
a1 A Y inv1
.model inv1 d_inverter(rise_delay='rise_delay' fall_delay='fall_delay' input_load='input_load')
*
.ends d_invX
.SUBCKT Digital_XSPICE_d_INV gnd _net0 _net1 Rise_Delay=1e-10 Fall_Delay=1e-10 Input_Load=0.5e-12
X1 _net0 _net1 d_invX RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY INPUT_LOAD=INPUT_LOAD
.ENDS
</Spice>
<Symbol>
<.ID 10 14 Y "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=">
<Line -30 0 20 0 #000080 2 1>
<Line -10 -15 25 15 #0000ff 2 1>
<Line -10 15 0 -30 #0000ff 2 1>
<Line -10 15 25 -15 #0000ff 2 1>
<.PortSym -30 0 1 0 A>
<.PortSym 30 0 2 180 Y>
<Ellipse 10 -4 8 8 #0000ff 1 1 #0000ff 1 1>
<Line 18 0 12 0 #000080 2 1>
</Symbol>
</Component>
<Component d_TRI>
<Description>
Tri-State Buffer
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_TRI _net0 _net2 _net1 Delay="1e-10" Input_Load="0.5e-12" Enable_Load="0.5e-12"
SpLib:X1 _net0 _net2 _net1 File="d_tri.cir" Device="D_TRIX" SymPattern="auto" Params="DELAY=DELAY INPUT_LOAD=INPUT_LOAD ENABLE_LOAD=ENABLE_LOAD" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT Digital_XSPICE_d_TRI gnd _net0 _net2 _net1 Delay=1e-10 Input_Load=0.5e-12 Enable_Load=0.5e-12
XX1 _net0 _net2 _net1 D_TRIX DELAY=DELAY INPUT_LOAD=INPUT_LOAD ENABLE_LOAD=ENABLE_LOAD
.ENDS
</Spice>
<VerilogModel>
module Sub_Digital_XSPICE_d_TRI (net_net0, net_net2, net_net1);
inout net_net0, net_net1, net_net2;
parameter Delay = 1e-10;
parameter Input_Load = 0.5e-12;
parameter Enable_Load = 0.5e-12;
endmodule
</VerilogModel>
<VHDLModel>
library ieee;
use ieee.std_logic_1164.all;
entity Sub_Digital_XSPICE_d_TRI is
generic (Delay : real := 1e-10;
Input_Load : real := 0.5e-12;
Enable_Load : real := 0.5e-12;
);
port (net_net0 : inout ;
net_net2 : inout ;
net_net1 : inout );
end entity;
use work.all;
architecture Arch_Sub_Digital_XSPICE_d_TRI of Sub_Digital_XSPICE_d_TRI is
begin
end architecture;
</VHDLModel>
<Symbol>
<Line 15 0 15 0 #000080 2 1>
<Line -30 0 20 0 #000080 2 1>
<Line -10 -15 25 15 #0000ff 2 1>
<Line -10 15 0 -30 #0000ff 2 1>
<Line -10 15 25 -15 #0000ff 2 1>
<.PortSym -30 0 1 0 A>
<.PortSym 30 0 3 180 Y>
<.ID 20 14 Y "1=Delay=1e-10=Delay (sec)=" "1=Input_Load=0.5e-12=Input Load (F)=" "1=Enable_Load=0.5e-12=Enable Load (F)=">
<Line 0 10 0 10 #000080 2 1>
<.PortSym 0 20 2 0 E>
</Symbol>
</Component>
<Component d_D_FF>
<Description>
D Flip-Flop
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_D_FF _net0 _net1 _net4 _net5 _net2 _net3 Clk_Delay="1e-10" Set_Delay="1e-10" Reset_Delay="1e-10" IC="0" Rise_Delay="1e-10" Fall_Delay="1e-10"
Sub:X1 _net0 _net1 _net4 _net5 _net2 _net3 gnd Type="d_dff_cir"
.Def:End
</Model>
<ModelIncludes "d_dff.cir.lst">
<Spice>
* XSPICE d_dff Digital D Flip-Flop
*
.subckt d_ff d_d d_c d_set d_reset d_q d_q_ clk_delay=1.0e-10 set_delay=1.0e-10 reset_delay=1.0e-10 ic=0 rise_delay=1.0e-10 fall_delay=1e-10
*
ad1 d_d d_c d_set d_reset d_q d_q_ flop1
.model flop1 d_dff(clk_delay='clk_delay' set_delay='set_delay' reset_delay='reset_delay' ic='ic' rise_delay='rise_delay' fall_delay='fall_delay')
*
.ends d_dff
.SUBCKT Digital_XSPICE_d_D_FF gnd _net0 _net1 _net4 _net5 _net2 _net3 Clk_Delay=1e-10 Set_Delay=1e-10 Reset_Delay=1e-10 IC=0 Rise_Delay=1e-10 Fall_Delay=1e-10
X1 _net0 _net1 _net4 _net5 _net2 _net3 d_ff CLK_DELAY=CLK_DELAY SET_DELAY=SET_DELAY RESET_DELAY=RESET_DELAY IC=IC RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY
.ENDS
</Spice>
<Symbol>
<Line 0 -40 0 -20 #000080 2 1>
<Line 0 61 0 -20 #000080 2 1>
<Line -50 20 20 0 #000080 2 1>
<Line -50 -20 20 0 #000080 2 1>
<Line 30 -20 20 0 #000080 2 1>
<Line 30 20 20 0 #000080 2 1>
<Line 14 11 12 0 #000080 2 1>
<Text 14 -31 12 #000080 0 "Q">
<Text 14 9 12 #000080 0 "Q">
<Line -15 20 -15 -10 #000080 2 1>
<Line -30 30 15 -10 #000080 2 1>
<.PortSym -50 -20 1 0 D>
<.PortSym -50 20 2 0 C>
<.PortSym 50 -20 5 180 Q>
<.PortSym 50 20 6 180 Q_>
<Text -6 -40 12 #000080 0 "S">
<Text -6 20 12 #000080 0 "R">
<Text -26 -30 12 #000080 0 "D">
<Rectangle -30 -40 60 80 #0000ff 2 1 #c0c0c0 1 0>
<.PortSym 0 60 4 0 Reset>
<.PortSym 0 -60 3 0 Set>
<.ID 20 44 Y "1=Clk_Delay=1e-10=Clock Delay (sec)=" "1=Set_Delay=1e-10=Set Delay (sec)=" "1=Reset_Delay=1e-10=Reset Delay (sec)=" "1=IC=0=Output Initial State=" "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=">
</Symbol>
</Component>
<Component d_D_FF_B>
<Description>
D Flip-Flop
Set-Reset Swapped
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_D_FF_B _net0 _net1 _net4 _net5 _net2 _net3 Clk_Delay="1e-10" Set_Delay="1e-10" Reset_Delay="1e-10" IC="0" Rise_Delay="1e-10" Fall_Delay="1e-10"
Sub:X1 _net0 _net1 _net4 _net5 _net2 _net3 gnd Type="d_dff_cir"
.Def:End
</Model>
<ModelIncludes "d_dff.cir.lst">
<Spice>
* XSPICE d_dff Digital D Flip-Flop
*
.subckt d_ff d_d d_c d_set d_reset d_q d_q_ clk_delay=1.0e-10 set_delay=1.0e-10 reset_delay=1.0e-10 ic=0 rise_delay=1.0e-10 fall_delay=1e-10
*
ad1 d_d d_c d_set d_reset d_q d_q_ flop1
.model flop1 d_dff(clk_delay='clk_delay' set_delay='set_delay' reset_delay='reset_delay' ic='ic' rise_delay='rise_delay' fall_delay='fall_delay')
*
.ends d_dff
.SUBCKT Digital_XSPICE_d_D_FF_B gnd _net0 _net1 _net4 _net5 _net2 _net3 Clk_Delay=1e-10 Set_Delay=1e-10 Reset_Delay=1e-10 IC=0 Rise_Delay=1e-10 Fall_Delay=1e-10
X1 _net0 _net1 _net4 _net5 _net2 _net3 d_ff CLK_DELAY=CLK_DELAY SET_DELAY=SET_DELAY RESET_DELAY=RESET_DELAY IC=IC RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY
.ENDS
</Spice>
<Symbol>
<Line 0 -40 0 -20 #000080 2 1>
<Line 0 61 0 -20 #000080 2 1>
<Line -50 20 20 0 #000080 2 1>
<Line -50 -20 20 0 #000080 2 1>
<Line 30 -20 20 0 #000080 2 1>
<Line 30 20 20 0 #000080 2 1>
<Line 14 11 12 0 #000080 2 1>
<Text 14 -31 12 #000080 0 "Q">
<Text 14 9 12 #000080 0 "Q">
<Line -15 20 -15 -10 #000080 2 1>
<Line -30 30 15 -10 #000080 2 1>
<.PortSym -50 -20 1 0 D>
<.PortSym -50 20 2 0 C>
<.PortSym 50 -20 5 180 Q>
<.PortSym 50 20 6 180 Q_>
<Text -26 -30 12 #000080 0 "D">
<Rectangle -30 -40 60 80 #0000ff 2 1 #c0c0c0 1 0>
<.ID 20 44 Y "1=Clk_Delay=1e-10=Clock Delay (sec)=" "1=Set_Delay=1e-10=Set Delay (sec)=" "1=Reset_Delay=1e-10=Reset Delay (sec)=" "1=IC=0=Output Initial State=" "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=">
<Text -6 20 12 #000080 0 "S">
<Text -6 -40 12 #000080 0 "R">
<.PortSym 0 -60 4 0 Reset>
<.PortSym 0 60 3 0 Set>
</Symbol>
</Component>
<Component d_JK_FF>
<Description>
JK Flip-Flop
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_JK_FF _net0 _net3 _net1 _net5 _net6 _net4 _net2 Clk_Delay="1e-10" Set_Delay="1e-10" Reset_Delay="1e-10" IC="0" Rise_Delay="1e-10" Fall_Delay="1e-10"
Sub:X1 _net0 _net3 _net1 _net5 _net6 _net4 _net2 gnd Type="d_jkff_cir"
.Def:End
</Model>
<ModelIncludes "d_jkff.cir.lst">
<Spice>
* XSPICE d_jkff Digital J-K Flip-Flop
*
.subckt d_jkff d_j d_k d_c d_set d_reset d_q d_q_ clk_delay=1.0e-10 set_delay=1.0e-10 reset_delay=1.0e-10 ic=0 rise_delay=1.0e-10 fall_delay=1e-10
*
ad1 d_j d_k d_c d_set d_reset d_q d_q_ flop1
.model flop1 d_jkff(clk_delay='clk_delay' set_delay='set_delay' reset_delay='reset_delay' ic='ic' rise_delay='rise_delay' fall_delay='fall_delay')
*
.ends d_jkff
.SUBCKT Digital_XSPICE_d_JK_FF gnd _net0 _net3 _net1 _net5 _net6 _net4 _net2 Clk_Delay=1e-10 Set_Delay=1e-10 Reset_Delay=1e-10 IC=0 Rise_Delay=1e-10 Fall_Delay=1e-10
X1 _net0 _net3 _net1 _net5 _net6 _net4 _net2 d_jkff CLK_DELAY=CLK_DELAY SET_DELAY=SET_DELAY RESET_DELAY=RESET_DELAY IC=IC RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY
.ENDS
</Spice>
<Symbol>
<Line 0 -40 0 -20 #000080 2 1>
<Line 0 61 0 -20 #000080 2 1>
<Line -50 20 20 0 #000080 2 1>
<Line -50 -20 20 0 #000080 2 1>
<Line 30 -20 20 0 #000080 2 1>
<Line 30 20 20 0 #000080 2 1>
<Line 14 11 12 0 #000080 2 1>
<Text 14 -31 12 #000080 0 "Q">
<Text 14 9 12 #000080 0 "Q">
<.PortSym -50 -20 1 0 J>
<.PortSym -50 20 2 0 K>
<Text -6 -40 12 #000080 0 "S">
<Text -6 20 12 #000080 0 "R">
<Text -26 -30 12 #000080 0 "J">
<Rectangle -30 -40 60 80 #0000ff 2 1 #c0c0c0 1 0>
<Line -15 0 -15 -10 #000080 2 1>
<Line -30 10 15 -10 #000080 2 1>
<Line -50 0 20 0 #000080 2 1>
<.PortSym -50 0 3 0 C>
<.PortSym 0 -60 4 0 Set>
<.PortSym 0 60 5 0 Reset>
<.PortSym 50 -20 6 180 Q>
<.PortSym 50 20 7 180 Q_>
<Text -26 10 12 #000080 0 "K">
<.ID 20 44 Y "1=Clk_Delay=1e-10=Clock Delay (sec)=" "1=Set_Delay=1e-10=Set Delay (sec)=" "1=Reset_Delay=1e-10=Reset Delay (sec)=" "1=IC=0=Output Initial State=" "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=">
</Symbol>
</Component>
<Component d_SR_FF>
<Description>
SR Flip-Flop
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_SR_FF _net5 _net6 _net0 _net3 _net4 _net2 _net1 Clk_Delay="1e-10" Set_Delay="1e-10" Reset_Delay="1e-10" IC="0" Rise_Delay="1e-10" Fall_Delay="1e-10"
Sub:X1 _net5 _net6 _net0 _net3 _net4 _net2 _net1 gnd Type="d_srff_cir"
.Def:End
</Model>
<ModelIncludes "d_srff.cir.lst">
<Spice>
* XSPICE d_srff Digital S-R Flip-Flop
*
.subckt d_srff d_s d_r d_c d_set d_reset d_q d_q_ clk_delay=1.0e-10 set_delay=1.0e-10 reset_delay=1.0e-10 ic=0 rise_delay=1.0e-10 fall_delay=1e-10
*
ad1 d_s d_r d_c d_set d_reset d_q d_q_ flop1
.model flop1 d_srff(clk_delay='clk_delay' set_delay='set_delay' reset_delay='reset_delay' ic='ic' rise_delay='rise_delay' fall_delay='fall_delay')
*
.ends d_srff
.SUBCKT Digital_XSPICE_d_SR_FF gnd _net5 _net6 _net0 _net3 _net4 _net2 _net1 Clk_Delay=1e-10 Set_Delay=1e-10 Reset_Delay=1e-10 IC=0 Rise_Delay=1e-10 Fall_Delay=1e-10
X1 _net5 _net6 _net0 _net3 _net4 _net2 _net1 d_srff CLK_DELAY=CLK_DELAY SET_DELAY=SET_DELAY RESET_DELAY=RESET_DELAY IC=IC RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY
.ENDS
</Spice>
<Symbol>
<Line 0 -40 0 -20 #000080 2 1>
<Line 0 61 0 -20 #000080 2 1>
<Line -50 20 20 0 #000080 2 1>
<Line -50 -20 20 0 #000080 2 1>
<Line 30 -20 20 0 #000080 2 1>
<Line 30 20 20 0 #000080 2 1>
<Line 14 11 12 0 #000080 2 1>
<Text 14 -31 12 #000080 0 "Q">
<Text 14 9 12 #000080 0 "Q">
<.PortSym -50 -20 1 0 S>
<.PortSym -50 20 2 0 R>
<Text -6 -40 12 #000080 0 "S">
<Text -6 20 12 #000080 0 "R">
<Text -26 -30 12 #000080 0 "S">
<Rectangle -30 -40 60 80 #0000ff 2 1 #c0c0c0 1 0>
<.ID 20 44 Y "1=Clk_Delay=1e-10=Clock Delay (sec)=" "1=Set_Delay=1e-10=Set Delay (sec)=" "1=Reset_Delay=1e-10=Reset Delay (sec)=" "1=IC=0=Output Initial State=" "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=">
<Line -15 0 -15 -10 #000080 2 1>
<Line -30 10 15 -10 #000080 2 1>
<Line -50 0 20 0 #000080 2 1>
<.PortSym -50 0 3 0 C>
<.PortSym 0 -60 4 0 Set>
<.PortSym 0 60 5 0 Reset>
<.PortSym 50 -20 6 180 Q>
<.PortSym 50 20 7 180 Q_>
<Text -26 10 12 #000080 0 "R">
</Symbol>
</Component>
<Component d_Divider>
<Description>
Digital Divider
50/50 Duty Requires
High-Cycles=(Div-Factor)/2
XSPICE Based
</Description>
<Model>
.Def:Digital_XSPICE_d_Divider _net0 _net1 Div_Factor="2" High_Cycles="1" I_Count="0" Rise_Delay="1e-10" Fall_Delay="1e-10"
Sub:X1 _net0 _net1 gnd Type="d_divider_cir"
.Def:End
</Model>
<ModelIncludes "d_divider.cir.lst">
<Spice>
**** XSPICE digital divider d_fdiv ****
*
* d_fin - digital input
* d_fout - digital output
*
.subckt dig_div d_fin d_fout div_factor=2 high_cycles=1 i_count=0 rise_delay=1e-10 fall_delay=1e-10)
*
adiv1 d_fin d_fout divider
*
.model divider d_fdiv(div_factor='div_factor' high_cycles='high_cycles' i_count='i_count' rise_delay='rise_delay' fall_delay='fall_delay')
*
.ends dig_div
.SUBCKT Digital_XSPICE_d_Divider gnd _net0 _net1 Div_Factor=2 High_Cycles=1 I_Count=0 Rise_Delay=1e-10 Fall_Delay=1e-10
X1 _net0 _net1 dig_div DIV_FACTOR=DIV_FACTOR HIGH_CYCLES=HIGH_CYCLES I_COUNT=I_COUNT RISE_DELAY=RISE_DELAY FALL_DELAY=FALL_DELAY
.ENDS
</Spice>
<Symbol>
<Line 9 0 -17 0 #000000 2 1>
<Ellipse -3 5 6 6 #000000 1 1 #000000 1 1>
<Ellipse -3 -11 6 6 #000000 1 1 #000000 1 1>
<.PortSym -50 0 1 0 IN>
<.PortSym 50 0 2 180 OUT>
<Rectangle -30 -20 60 40 #0000ff 2 1 #c0c0c0 1 0>
<Line -50 0 20 0 #000080 2 1>
<Line 30 0 20 0 #000080 2 1>
<Text -24 -10 12 #000080 0 "I">
<Text 15 -10 12 #000080 0 "O">
<.ID -20 24 DIV "1=Div_Factor=2=Division Ratio=" "1=High_Cycles=1=Number of high clock cycles=" "1=I_Count=0=Initial count value=" "1=Rise_Delay=1e-10=Rise Delay (sec)=" "1=Fall_Delay=1e-10=Fall Delay (sec)=">
</Symbol>
</Component>

306
library/DualGateMOSFET.lib Normal file
View File

@ -0,0 +1,306 @@
<Qucs Library 25.1.0 "DualGateMOSFET">
<Component BF980>
<Description>
BF980 dual gate MOSFET
</Description>
<Model>
.Def:DualGateMOSFET_BF980 _net0 _net1 _net2 _net3
SpLib:X1 _net0 _net1 _net2 _net3 File="DualGateMos.cir" Device="BF980A" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT DualGateMOSFET_BF980 gnd _net0 _net1 _net2 _net3
XX1 _net0 _net1 _net2 _net3 BF980A
.ENDS
</Spice>
<SpiceAttach "DualGateMos.cir">
<Symbol>
<.ID 8 -26 T>
<Line -10 -11 10 0 #000080 2 1>
<Line 0 -11 0 -19 #000080 2 1>
<Line -10 11 10 0 #000080 2 1>
<Line 0 0 0 30 #000080 2 1>
<Line -10 0 10 0 #000080 2 1>
<Line -10 -4 0 8 #000080 3 1>
<Line -10 7 0 9 #000080 3 1>
<Line -9 0 5 -5 #000080 2 1>
<Line -9 0 5 5 #000080 2 1>
<Line -30 10 16 0 #000080 2 1>
<Line -30 -10 16 0 #000080 2 1>
<Line -10 -16 0 9 #000080 3 1>
<Line -14 -15 0 5 #000080 3 1>
<Line -14 5 0 5 #000080 3 1>
<.PortSym 0 30 4 0 P4>
<.PortSym 0 -30 1 0 P1>
<.PortSym -30 10 3 0 P3>
<.PortSym -30 -10 2 0 P2>
</Symbol>
</Component>
<Component BF981>
<Description>
BF981 dual gate MOSFET
</Description>
<Model>
.Def:DualGateMOSFET_BF981 _net1 _net2 _net3 _net0
SpLib:X1 _net0 _net1 _net2 _net3 File="DualGateMos.cir" Device="BF981" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT DualGateMOSFET_BF981 gnd _net1 _net2 _net3 _net0
XX1 _net0 _net1 _net2 _net3 BF981
.ENDS
</Spice>
<SpiceAttach "DualGateMos.cir">
<Symbol>
<.ID 8 -26 T>
<Line -10 -11 10 0 #000080 2 1>
<Line 0 -11 0 -19 #000080 2 1>
<Line -10 11 10 0 #000080 2 1>
<Line 0 0 0 30 #000080 2 1>
<Line -10 0 10 0 #000080 2 1>
<Line -10 -4 0 8 #000080 3 1>
<Line -10 7 0 9 #000080 3 1>
<Line -9 0 5 -5 #000080 2 1>
<Line -9 0 5 5 #000080 2 1>
<Line -30 10 16 0 #000080 2 1>
<Line -30 -10 16 0 #000080 2 1>
<Line -10 -16 0 9 #000080 3 1>
<Line -14 -15 0 5 #000080 3 1>
<Line -14 5 0 5 #000080 3 1>
<.PortSym 0 30 1 0 P1>
<.PortSym 0 -30 2 0 P2>
<.PortSym -30 -10 3 0 P3>
<.PortSym -30 10 4 0 P4>
</Symbol>
</Component>
<Component BF992>
<Description>
BF992 dual gate MOSFET
</Description>
<Model>
.Def:DualGateMOSFET_BF992 _net0 _net1 _net3 _net2
SpLib:X1 _net0 _net1 _net3 _net2 File="DualGateMos.cir" Device="BF992" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT DualGateMOSFET_BF992 gnd _net0 _net1 _net3 _net2
XX1 _net0 _net1 _net3 _net2 BF992
.ENDS
</Spice>
<SpiceAttach "DualGateMos.cir">
<Symbol>
<.ID 8 -26 T>
<Line -10 -11 10 0 #000080 2 1>
<Line 0 -11 0 -19 #000080 2 1>
<Line -10 11 10 0 #000080 2 1>
<Line 0 0 0 30 #000080 2 1>
<Line -10 0 10 0 #000080 2 1>
<Line -10 -4 0 8 #000080 3 1>
<Line -10 7 0 9 #000080 3 1>
<Line -9 0 5 -5 #000080 2 1>
<Line -9 0 5 5 #000080 2 1>
<Line -30 10 16 0 #000080 2 1>
<Line -30 -10 16 0 #000080 2 1>
<Line -10 -16 0 9 #000080 3 1>
<Line -14 -15 0 5 #000080 3 1>
<Line -14 5 0 5 #000080 3 1>
<.PortSym 0 30 1 0 P1>
<.PortSym 0 -30 2 0 P2>
<.PortSym -30 -10 3 0 P3>
<.PortSym -30 10 4 0 P4>
</Symbol>
</Component>
<Component BF993>
<Description>
BF993 dual gate MOSFET
</Description>
<Model>
.Def:DualGateMOSFET_BF993 _net0 _net1 _net2 _net3
SpLib:X1 _net0 _net1 _net2 _net3 File="DualGateMos.cir" Device="BF993" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT DualGateMOSFET_BF993 gnd _net0 _net1 _net2 _net3
XX1 _net0 _net1 _net2 _net3 BF993
.ENDS
</Spice>
<SpiceAttach "DualGateMos.cir">
<Symbol>
<.ID 8 -26 T>
<Line -10 -11 10 0 #000080 2 1>
<Line 0 -11 0 -19 #000080 2 1>
<Line -10 11 10 0 #000080 2 1>
<Line 0 0 0 30 #000080 2 1>
<Line -10 0 10 0 #000080 2 1>
<Line -10 -4 0 8 #000080 3 1>
<Line -10 7 0 9 #000080 3 1>
<Line -9 0 5 -5 #000080 2 1>
<Line -9 0 5 5 #000080 2 1>
<Line -30 10 16 0 #000080 2 1>
<Line -30 -10 16 0 #000080 2 1>
<Line -10 -16 0 9 #000080 3 1>
<Line -14 -15 0 5 #000080 3 1>
<Line -14 5 0 5 #000080 3 1>
<.PortSym 0 -30 1 0 P1>
<.PortSym -30 -10 2 0 P2>
<.PortSym -30 10 3 0 P3>
<.PortSym 0 30 4 0 P4>
</Symbol>
</Component>
<Component BF994>
<Description>
BF994 dual gate MOSFET
</Description>
<Model>
.Def:DualGateMOSFET_BF994 _net0 _net1 _net3 _net2
SpLib:X1 _net0 _net1 _net3 _net2 File="DualGateMos.cir" Device="BF994S" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT DualGateMOSFET_BF994 gnd _net0 _net1 _net3 _net2
XX1 _net0 _net1 _net3 _net2 BF994S
.ENDS
</Spice>
<SpiceAttach "DualGateMos.cir">
<Symbol>
<.ID 8 -26 T>
<Line -10 -11 10 0 #000080 2 1>
<Line 0 -11 0 -19 #000080 2 1>
<Line -10 11 10 0 #000080 2 1>
<Line 0 0 0 30 #000080 2 1>
<Line -10 0 10 0 #000080 2 1>
<Line -10 -4 0 8 #000080 3 1>
<Line -10 7 0 9 #000080 3 1>
<Line -9 0 5 -5 #000080 2 1>
<Line -9 0 5 5 #000080 2 1>
<Line -30 10 16 0 #000080 2 1>
<Line -30 -10 16 0 #000080 2 1>
<Line -10 -16 0 9 #000080 3 1>
<Line -14 -15 0 5 #000080 3 1>
<Line -14 5 0 5 #000080 3 1>
<.PortSym 0 30 1 0 P1>
<.PortSym 0 -30 2 0 P2>
<.PortSym -30 -10 3 0 P3>
<.PortSym -30 10 4 0 P4>
</Symbol>
</Component>
<Component BF998>
<Description>
BF998 dual gate MOSFET
</Description>
<Model>
.Def:DualGateMOSFET_BF998 _net0 _net1 _net3 _net2
SpLib:X1 _net0 _net1 _net3 _net2 File="DualGateMos.cir" Device="BF998" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT DualGateMOSFET_BF998 gnd _net0 _net1 _net3 _net2
XX1 _net0 _net1 _net3 _net2 BF998
.ENDS
</Spice>
<SpiceAttach "DualGateMos.cir">
<Symbol>
<.ID 8 -26 T>
<Line -10 -11 10 0 #000080 2 1>
<Line 0 -11 0 -19 #000080 2 1>
<Line -10 11 10 0 #000080 2 1>
<Line 0 0 0 30 #000080 2 1>
<Line -10 0 10 0 #000080 2 1>
<Line -10 -4 0 8 #000080 3 1>
<Line -10 7 0 9 #000080 3 1>
<Line -9 0 5 -5 #000080 2 1>
<Line -9 0 5 5 #000080 2 1>
<Line -30 10 16 0 #000080 2 1>
<Line -30 -10 16 0 #000080 2 1>
<Line -10 -16 0 9 #000080 3 1>
<Line -14 -15 0 5 #000080 3 1>
<Line -14 5 0 5 #000080 3 1>
<.PortSym 0 30 1 0 P1>
<.PortSym 0 -30 2 0 P2>
<.PortSym -30 -10 3 0 P3>
<.PortSym -30 10 4 0 P4>
</Symbol>
</Component>
<Component BF998WR>
<Description>
BF998WR dual gate MOSFET
</Description>
<Model>
.Def:DualGateMOSFET_BF998WR _net0 _net1 _net3 _net2
SpLib:X1 _net0 _net1 _net3 _net2 File="DualGateMos.cir" Device="BF998WR" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT DualGateMOSFET_BF998WR gnd _net0 _net1 _net3 _net2
XX1 _net0 _net1 _net3 _net2 BF998WR
.ENDS
</Spice>
<SpiceAttach "DualGateMos.cir">
<Symbol>
<.ID 8 -26 T>
<Line -10 -11 10 0 #000080 2 1>
<Line 0 -11 0 -19 #000080 2 1>
<Line -10 11 10 0 #000080 2 1>
<Line 0 0 0 30 #000080 2 1>
<Line -10 0 10 0 #000080 2 1>
<Line -10 -4 0 8 #000080 3 1>
<Line -10 7 0 9 #000080 3 1>
<Line -9 0 5 -5 #000080 2 1>
<Line -9 0 5 5 #000080 2 1>
<Line -30 10 16 0 #000080 2 1>
<Line -30 -10 16 0 #000080 2 1>
<Line -10 -16 0 9 #000080 3 1>
<Line -14 -15 0 5 #000080 3 1>
<Line -14 5 0 5 #000080 3 1>
<.PortSym 0 30 1 0 P1>
<.PortSym 0 -30 2 0 P2>
<.PortSym -30 -10 3 0 P3>
<.PortSym -30 10 4 0 P4>
</Symbol>
</Component>
<Component MN201>
<Description>
MN201 (3N201) dual gate MOSFET
</Description>
<Model>
.Def:DualGateMOSFET_MN201 _net0 _net2 _net1 _net3
SpLib:X1 _net0 _net2 _net1 _net3 File="DualGateMos.cir" Device="MN201" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT DualGateMOSFET_MN201 gnd _net0 _net2 _net1 _net3
XX1 _net0 _net2 _net1 _net3 MN201
.ENDS
</Spice>
<SpiceAttach "DualGateMos.cir">
<Symbol>
<.ID 8 -26 T>
<Line -10 -11 10 0 #000080 2 1>
<Line 0 -11 0 -19 #000080 2 1>
<Line -10 11 10 0 #000080 2 1>
<Line 0 0 0 30 #000080 2 1>
<Line -10 0 10 0 #000080 2 1>
<Line -10 -4 0 8 #000080 3 1>
<Line -10 7 0 9 #000080 3 1>
<Line -9 0 5 -5 #000080 2 1>
<Line -9 0 5 5 #000080 2 1>
<Line -30 10 16 0 #000080 2 1>
<Line -30 -10 16 0 #000080 2 1>
<Line -10 -16 0 9 #000080 3 1>
<Line -14 -15 0 5 #000080 3 1>
<Line -14 5 0 5 #000080 3 1>
<.PortSym 0 30 4 0 P4>
<.PortSym 0 -30 1 0 P1>
<.PortSym -30 10 3 0 P3>
<.PortSym -30 -10 2 0 P2>
</Symbol>
</Component>

View File

@ -0,0 +1,242 @@
* BF992 SPICE MODEL JANUARY 1996 PHILIPS SEMICONDUCTORS
* ENVELOPE SOT143
* 1.: SOURCE; 2.: DRAIN; 3.: GATE 2; 4.: GATE 1;
.SUBCKT BF992 1 2 3 4
L10 1 10 0.12N
L20 2 20 0.12N
L30 3 30 0.12N
L40 4 40 0.12N
L11 10 11 1.20N
L21 20 21 1.20N
L31 30 31 1.20N
L41 40 41 1.20N
C13 10 30 0.085P
C14 10 40 0.085P
C21 10 20 0.017P
C23 20 30 0.085P
C24 20 40 0.005P
D11 42 11 ZENER
D12 42 41 ZENER
D21 32 11 ZENER
D22 32 31 ZENER
RS 10 12 100
MOS1 61 41 11 12 GATE1 L=2E-6 W=2200E-6
MOS2 21 31 61 12 GATE2 L=3.0E-6 W=2200E-6
.MODEL ZENER D BV=10 CJO=1.2E-12 RS=10
.MODEL GATE1
+ NMOS LEVEL=3 UO=904.9 VTO=-0.2051 NFS=300E9 TOX=60E-9
+ NSUB=3E15 VMAX=140E3 RS=2.0 RD=2.0 XJ=500E-9 THETA=0.11
+ ETA=0.2095 KAPPA=0.6488 LD=0.3E-6
+ CGSO=0.3E-9 CGDO=0.3E-9 CBD=0.5E-12 CBS=0.5E-12
.MODEL GATE2
+ NMOS LEVEL=3 UO=600 VTO=-0.2051 NFS=300E9 TOX=60E-9
+ NSUB=3E15 VMAX=100E3 RS=2.0 RD=2.0 XJ=500E-9 THETA=0.11
+ ETA=0.06 KAPPA=2 LD=0.3E-6
+ CGSO=0.3E-9 CGDO=0.3E-9 CBD=1.467E-12 CBS=0.5E-12
.ENDS BF992
* BF998 SPICE MODEL OCTOBER 1993 PHILIPS SEMICONDUCTORS
* ENVELOPE SOT143
* 1.: SOURCE; 2.: DRAIN; 3.: GATE 2; 4.: GATE 1;
.SUBCKT BF998 1 2 3 4
L10 1 10 0.12N
L20 2 20 0.12N
L30 3 30 0.12N
L40 4 40 0.12N
L11 10 11 1.20N
L21 20 21 1.20N
L31 30 31 1.20N
L41 40 41 1.20N
C13 10 30 0.085P
C14 10 40 0.085P
C21 10 20 0.017P
C23 20 30 0.085P
C24 20 40 0.005P
D11 42 11 ZENER
D12 42 41 ZENER
D21 32 11 ZENER
D22 32 31 ZENER
RS 10 12 100
MOS1 61 41 11 12 GATE1 L=1.1E-6 W=1150E-6
MOS2 21 31 61 12 GATE2 L=2.0E-6 W=1150E-6
.MODEL ZENER D BV=10 CJO=1.2E-12 RS=10
.MODEL GATE1
+ NMOS LEVEL=3 UO=600 VTO=-0.250 NFS=300E9 TOX=42E-9
+ NSUB=3E15 VMAX=140E3 RS=2.0 RD=2.0 XJ=200E-9 THETA=0.11
+ ETA=0.06 KAPPA=2 LD=0.1E-6
+ CGSO=0.3E-9 CGDO=0.3E-9 CBD=0.5E-12 CBS=0.5E-12
.MODEL GATE2
+ NMOS LEVEL=3 UO=600 VTO=-0.250 NFS=300E9 TOX=42E-9
+ NSUB=3E15 VMAX=100E3 RS=2.0 RD=2.0 XJ=200E-9 THETA=0.11
+ ETA=0.06 KAPPA=2 LD=0.1E-6
+ CGSO=0.3E-9 CGDO=0.3E-9 CBD=0.5E-12 CBS=0.5E-12
.ENDS BF998
* BF998WR SPICE MODEL OCTOBER 1993 PHILIPS SEMICONDUCTORS
* ENVELOPE SOT343R
* 1.: SOURCE; 2.: DRAIN; 3.: GATE 2; 4.: GATE 1;
.SUBCKT BF998WR 1 2 3 4
L10 1 10 0.10N
L20 2 20 0.34N
L30 3 30 0.34N
L40 4 40 0.34N
L11 10 11 1.10N
L21 20 21 1.10N
L31 30 31 1.10N
L41 40 41 1.10N
C13 10 30 0.060P
C14 10 40 0.060P
C21 10 20 0.050P
C23 20 30 0.070P
C24 20 40 0.005P
D11 42 11 ZENER
D12 42 41 ZENER
D21 32 11 ZENER
D22 32 31 ZENER
RS 10 12 100
MOS1 61 41 11 12 GATE1 L=1.1E-6 W=1150E-6
MOS2 21 31 61 12 GATE2 L=2.0E-6 W=1150E-6
.MODEL ZENER D BV=10 CJO=1.2E-12 RS=10
.MODEL GATE1
+ NMOS LEVEL=3 UO=600 VTO=-0.250 NFS=300E9 TOX=42E-9
+ NSUB=3E15 VMAX=140E3 RS=2.0 RD=2.0 XJ=200E-9 THETA=0.11
+ ETA=0.06 KAPPA=2 LD=0.1E-6
+ CGSO=0.3E-9 CGDO=0.3E-9 CBD=0.5E-12 CBS=0.5E-12
.MODEL GATE2
+ NMOS LEVEL=3 UO=600 VTO=-0.250 NFS=300E9 TOX=42E-9
+ NSUB=3E15 VMAX=100E3 RS=2.0 RD=2.0 XJ=200E-9 THETA=0.11
+ ETA=0.06 KAPPA=2 LD=0.1E-6
+ CGSO=0.3E-9 CGDO=0.3E-9 CBD=0.5E-12 CBS=0.5E-12
.ENDS BF998WR
* BF994S SPICE MODEL MARCH 1996 PHILIPS SEMICONDUCTORS
* ENVELOPE SOT143
* 1.: SOURCE; 2.: DRAIN; 3.: GATE 2; 4.: GATE 1;
.SUBCKT BF994S 1 2 3 4
L10 1 10 0.12N
L20 2 20 0.12N
L30 3 30 0.12N
L40 4 40 0.12N
L11 10 11 1.20N
L21 20 21 1.20N
L31 30 31 1.20N
L41 40 41 1.20N
C13 10 30 0.085P
C14 10 40 0.085P
C21 10 20 0.017P
C23 20 30 0.085P
C24 20 40 0.005P
D11 42 11 ZENER
D12 42 41 ZENER
D21 32 11 ZENER
D22 32 31 ZENER
RS 10 12 100
MOS1 61 41 11 12 GATE1 L=2E-6 W=1280E-6
MOS2 21 31 61 12 GATE2 L=3.0E-6 W=1280E-6
.MODEL ZENER D BV=10 CJO=1.2E-12 RS=10
.MODEL GATE1
+ NMOS LEVEL=3 UO=750 VTO=-0.4357 NFS=300E9 TOX=60E-9
+ NSUB=3E15 VMAX=140E3 RS=2.0 RD=2.0 XJ=200E-9 THETA=0.11
+ ETA=0.1686 KAPPA=2.282 LD=0.3E-6
+ CGSO=0.3E-9 CGDO=0.3E-9 CBD=0.5E-12 CBS=0.5E-12
.MODEL GATE2
+ NMOS LEVEL=3 UO=600 VTO=-0.4357 NFS=300E9 TOX=60E-9
+ NSUB=3E15 VMAX=100E3 RS=2.0 RD=2.0 XJ=200E-9 THETA=0.11
+ ETA=0.06 KAPPA=2 LD=0.3E-6
+ CGSO=0.3E-9 CGDO=0.3E-9 CBD=0.5E-12 CBS=0.5E-12
.ENDS BF994S
*.SUBCKT BF981 1 2 3 4
*Drain Gate2 Gate1 Source
* Pin order changed in BF981 model
* 1.: SOURCE; 2.: DRAIN; 3.: GATE 2; 4.: GATE 1;
.SUBCKT BF981 4 1 2 3
*Dual Gate Mosfet
MD1 5 3 4 4 BF981A
MD2 1 2 5 4 BF981B W=50U
.MODEL BF981A NMOS (LEVEL=1 VTO=-1.1 KP=15M GAMMA=3.3U
+ PHI=.75 LAMBDA=3.75M RS=2.2 IS=12.5F PB=.8 MJ=.46
+ CBD=3.43P CBS=4.11P CGSO=240P CGDO=200P CGBO=20.5N)
.MODEL BF981B NMOS (LEVEL=1 VTO=-.9 KP=18M GAMMA=19.08U
+ PHI=.75 LAMBDA=13.75M RD=41.3 IS=12.5F PB=.8 MJ=.46
+ CBD=3.43P CBS=4.11P CGSO=240P CGDO=200P CGBO=14.5N)
* Philips
* N-Channel Depletion DG-MOSFET
.ENDS BF981
*
**********
* Copyright Intusoft 1991
* All Rights Reserved
**********
*SYM=DGMOS
.SUBCKT BF993 1 2 3 4
*Connections Drain Gate2 Gate1 Source
*Dual Gate Mosfet
MD1 5 3 4 4 BF993G1
MD2 1 2 5 4 BF993G2 W=65U
.MODEL BF993G1 NMOS (LEVEL=1 VTO=-1.0 KP=23M GAMMA=7.4U
+ PHI=.75 LAMBDA=13.75M RS=2.5 IS=31.2F PB=.8 MJ=.46
+ CBD=9.66P CBS=11.5P CGSO=600P CGDO=500P CGBO=61.4N
.MODEL BF993G2 NMOS (LEVEL=1 VTO=-.9 KP=25M GAMMA=30.4U
+ PHI=.75 LAMBDA=23.75M RD=74.4 IS=31.2F PB=.8 MJ=.46
+ CBD=9.66P CBS=11.5P CGSO=600P CGDO=500P CGBO=61.4N
* Siemens
* N-Channel Depletion DG-MOSFET
.ENDS
**********
*SYM=DGMOS
.SUBCKT BF980A 1 2 3 4
*Connections Drain Gate2 Gate1 Source
*Dual Gate Mosfet
MD1 5 3 4 4 BF980AA
MD2 1 2 5 4 BF980AB W=50U
.MODEL BF980AA NMOS (LEVEL=1 VTO=-1.0 KP=17M GAMMA=4.34U
+ PHI=.75 LAMBDA=4.16M RS=3.2 IS=20.8F PB=.8 MJ=.46
+ CBD=2.89P CBS=3.47P CGSO=300P CGDO=250P CGBO=25.4N)
.MODEL BF980AB NMOS (LEVEL=1 VTO=-.9 KP=20M GAMMA=17.47U
+ PHI=.75 LAMBDA=14.16M RD=30 IS=20.8F PB=.8 MJ=.46
+ CBD=2.89P CBS=3.47P CGSO=300P CGDO=250P CGBO=25.4N)
* Philips
* N-Channel Depletion DG-MOSFET
.ENDS
**********
*SYM=DGMOS
.SUBCKT MN201 1 2 3 4
*Connections Drain Gate2 Gate1 Source
*Dual Gate Mosfet
MD1 5 3 4 4 MN201-1
MD2 1 2 5 4 MN201-2 W=35U
.MODEL MN201-1 NMOS (LEVEL=1 VTO=-1.45 KP=11.8M GAMMA=3.26U
+ PHI=.75 LAMBDA=30M RD=1M RS=20.8 IS=25F PB=.8 MJ=.46
+ CBD=6.64P CBS=7.97P CGSO=168P CGDO=140P CGBO=32.6N)
.MODEL MN201-2 NMOS (LEVEL=1 VTO=-1.00 KP=12.5M GAMMA=27.26U
+ PHI=.75 LAMBDA=37M RD=15.3 RS=1M IS=30F PB=.8 MJ=.46
+ CBD=6.64P CBS=7.97P CGSO=168P CGDO=140P CGBO=32.6N)
* Motorola
* N-Channel Depletion DG-MOSFET
.ENDS
*************

264
library/LaserDiodes.lib Normal file
View File

@ -0,0 +1,264 @@
<Qucs Library 24.3.0 "LaserDiodes">
<Component LaserDiodeRed>
<Description>
Generic 650nm 100mw Laser Diode
LD=150ma, PD=15piv
by Alexander Bordodynov
</Description>
<Model>
.Def:LaserDiodes_LaserDiodeRed _net0 _net2 _net1 _net3
Sub:X1 _net0 _net2 _net1 _net3 gnd Type="LaserDiodeRed_cir"
.Def:End
</Model>
<ModelIncludes "LaserDiodeRed.cir.lst">
<Spice>
* Alexander Bordodynov
* 650nm 100mw Laser Diode
.Subckt Laser com lk pha pw Pnom=100m inom=150m ith=35m iphnom=0.1m Pth=1m cLd=10p cph=40p rsLd=1 nLd=2 isLD=1e-17 tauLD=1n tauFd=5n
.param k=(Pnom-Pth*inom/ith)/(inom-ith)
.param kf=iphnom/Pnom
.param ctau=0.001*tauFd
cLd com lk {cLD}
cph com pha {cph}
D1 5 lk0 dLd
D10 com lk0 dLd2
rs lk0 lk {rsLd}
VAm1 com 5 0
rut lk com 10Meg
v1 ith 0 {ith}
*v3 kf 0 {iphnom/Pnom}
Hled pwled 0 vam1 {2*Pth/ith}
B1 pw pwled v=uramp(2*i(vam1)-v(ith))*{k}
CtauFd pwtau 0 {ctau}
Rtau pwtau pw 1k
B2 com pha i=v(pwtau)*{kf}
.model dLd D is={isLd/2} n={nLd} eg={nLd*1.11}
.model dLd2 D is={isLd/2} n={nLd} eg={nLd*1.11} tt={tauLD*2}
.ends Laser
*
.SUBCKT LaserDiodes_LaserDiodeRed gnd _net0 _net2 _net1 _net3
X1 _net0 _net2 _net1 _net3 Laser
.ENDS
</Spice>
<Symbol>
<Line -40 -20 0 40 #000080 2 1>
<Line -40 20 80 0 #000080 2 1>
<Line 20 30 0 -20 #000080 2 1>
<Line 40 -20 0 40 #000080 2 1>
<Line 40 0 10 0 #000080 2 1>
<Line -40 -20 80 0 #000080 2 1>
<Line 11 11 18 0 #000080 2 1>
<Line 11 -1 18 0 #000080 2 1>
<Line 20 11 -9 -12 #000080 2 1>
<Line 20 11 9 -12 #000080 2 1>
<Line -11 -1 -18 0 #000080 2 1>
<Line -11 11 -18 0 #000080 2 1>
<Line -20 -1 9 12 #000080 2 1>
<Line -20 -1 -9 12 #000080 2 1>
<Line 15 4 10 0 #000080 2 1>
<Line 20 -10 0 9 #000080 2 1>
<Line -20 -10 0 9 #000080 2 1>
<Ellipse -3 -13 6 6 #000080 1 1 #000080 1 1>
<Line -20 -10 40 0 #000080 2 1>
<Line -20 11 0 19 #000080 2 1>
<Line 0 -30 0 20 #000080 2 1>
<Text -36 -18 8 #000000 0 "PD">
<Text 24 -18 8 #000000 0 "LD">
<Line 36 5 -8 0 #000080 2 1>
<Line 8 5 -15 0 #000080 2 1>
<.PortSym 0 -30 1 0 COM>
<.PortSym -20 30 3 0 PHA>
<.PortSym 20 30 2 180 LK>
<.PortSym 50 0 4 180 PW>
<.ID 20 -46 LD>
<Line 34 2 3 3 #000080 2 1>
<Line 34 8 3 -3 #000080 2 1>
<Line -5 8 -3 -3 #000080 2 1>
<Line -5 2 -3 3 #000080 2 1>
</Symbol>
</Component>
<Component SLD1121VS>
<Description>
Sony SLD1121VS
670nm 5mw Laser Diode
PIN Diode Power Monitor
LD=50ma, PD=15piv
</Description>
<Model>
.Def:LaserDiodes_SLD1121VS _net0 _net2 _net1
Sub:X1 _net0 _net2 _net1 gnd Type="SLD1121VS_cir"
.Def:End
</Model>
<ModelIncludes "SLD1121VS.cir.lst">
<Spice>
* SLD1121VS from Sony EDN, RAP 7/97
* LD = Laser diode cathode
* C = Common pin
* PD = Photodiode anode
.SUBCKT SLD1121 LD C PD
Dld C I dlaser
Vid I LD
Eop op 0 TABLE {I(Vid)} (0,0) (37m,0.3m) (40m,0.5m) (47m,5m) (100m,40m)
Rdummy op 0 1k
Gopd C PD TABLE {V(op)} (0,0) (30m,1.5m) (60m,3.0m)
Dpd PD C pdetec
.model dlaser D IS=5E-37 N=1 RS=2 BV=2 IBV=10u
*EG=2.8 XTI=3
.model pdetec D CJO=5p BV=15 IBV=10u
.ends SLD1121
*
.SUBCKT LaserDiodes_SLD1121VS gnd _net0 _net2 _net1
X1 _net0 _net2 _net1 SLD1121
.ENDS
</Spice>
<Symbol>
<Line -40 -20 0 40 #000080 2 1>
<Line -40 20 80 0 #000080 2 1>
<Line 20 30 0 -20 #000080 2 1>
<Line 40 -20 0 40 #000080 2 1>
<Line -40 -20 80 0 #000080 2 1>
<Line 11 11 18 0 #000080 2 1>
<Line 11 -1 18 0 #000080 2 1>
<Line 20 11 -9 -12 #000080 2 1>
<Line 20 11 9 -12 #000080 2 1>
<Line -11 -1 -18 0 #000080 2 1>
<Line -11 11 -18 0 #000080 2 1>
<Line -20 -1 9 12 #000080 2 1>
<Line -20 -1 -9 12 #000080 2 1>
<Line 15 4 10 0 #000080 2 1>
<Line 20 -10 0 9 #000080 2 1>
<Line -20 -10 0 9 #000080 2 1>
<Ellipse -3 -13 6 6 #000080 1 1 #000080 1 1>
<Line -20 -10 40 0 #000080 2 1>
<Line -20 11 0 19 #000080 2 1>
<Line 0 -30 0 20 #000080 2 1>
<Text -36 -18 8 #000000 0 "PD">
<Text 24 -18 8 #000000 0 "LD">
<Line 36 5 -8 0 #000080 2 1>
<Line 8 5 -15 0 #000080 2 1>
<.PortSym -20 30 3 0 PD>
<.ID 20 -46 LD>
<Line 34 2 3 3 #000080 2 1>
<Line 34 8 3 -3 #000080 2 1>
<Line -5 8 -3 -3 #000080 2 1>
<Line -5 2 -3 3 #000080 2 1>
<.PortSym 0 -30 2 0 C>
<.PortSym 20 30 1 180 LD>
</Symbol>
</Component>
<Component RLD90QZW3>
<Description>
Rolm RLD90QZW3
905nm 90W Pulsed Laser Diode
LD=28A, Duty Cycle=0.1%
Requirements:
.spiceinit: set ngbehavior=psa
</Description>
<Model>
.Def:LaserDiodes_RLD90QZW3 _net0 _net1 _net2 _net3
Sub:X1 _net0 _net1 _net2 _net3 gnd Type="RLD90QZW3_cir"
.Def:End
</Model>
<ModelIncludes "RLD90QZW3.cir.lst">
<Spice>
* RLD90QZW3
* Optical Power model
* LD
* 4V 50A
* Model Generated by ROHM
* All Rights Reserved
* Commercial Use or Resale Restricted
* Date: 2020/06/10
* model version: 1
**********************A C
.SUBCKT RLD90QZW3_sub 1 2 OPT GND
.PARAM T0=25
*
.PARAM s_rate= 1
*
.PARAM K1_fw= 794.3u
.PARAM M1_fw= -5.817k
.PARAM N1_fw= -498.5
.PARAM k2_fw= 790m
.PARAM M2_fw= -9.271k
.PARAM k3_fw= 230m
.PARAM M3_fw= 448.3
.PARAM N3_fw= -89.69
*
.PARAM k1_rv= 1.259u
.PARAM K2_rv= 500
.PARAM M1_rv= 16.67
.PARAM k3_rv= 115.3n
.PARAM M3_rv= -1k
.PARAM N3_rv= 314.6
.PARAM K4_rv= 55.56
.PARAM M4_rv= -5.405k
*
.PARAM k1_cr= 10.43
.PARAM k2_cr= 3.956
.PARAM k3_cr= 40.13
.PARAM k4_cr= 7.911
.PARAM k5_cr= -653.7m
.PARAM k6_cr= -5k
*
.PARAM v1_lm_n= 300k
.PARAM v1_lm_p= 400k
.PARAM v42_lm_n= 6k
.PARAM v42_lm_p= 10000
*
.FUNC R1(I) {k3_fw*I*EXP((TEMP-T0)/M3_fw*EXP((TEMP-T0)/N3_fw))}
.FUNC I1(V) {MIN(MAX(IF(TIME>0,IF(V>0,{K1_fw*(EXP(V/k2_fw/EXP((TEMP-T0)/M2_fw))-1)*
+ EXP((TEMP-T0)/M1_fw*EXP((TEMP-T0)/N1_fw))},0),0),-1MEG),1MEG)}
.FUNC I2(V) {(EXP(V/K2_rv)-1)*k1_rv*EXP((TEMP-T0)/M1_rv)}
.FUNC I3(V) {(EXP(-V/(K4_rv *EXP((TEMP-T0)/M4_rv)))-1)*
+ k3_rv*EXP((TEMP-T0)/M3_rv *EXP((TEMP-T0)/N3_rv))}
.FUNC C1(V,W) {k1_cr*(V-k2_cr)+k3_cr*(1-(-k6_cr)*TANH(W/(-k6_cr))/k4_cr)**k5_cr}
V1 1 3 0
E1 3 4 VALUE={R1(MIN(MAX(I(V1)/s_rate,-v1_lm_n),v1_lm_p))}
V2 4 5 0
C1 5 2 {1p * s_rate}
G1 4 2 VALUE={s_rate*(I1(MIN(V(4,2),v42_lm_p))+
+ I2(MIN(V(4,2),v42_lm_p))-I3(MAX(V(4,2),-v42_lm_n)))+
+ I(V2)*C1(MAX(V(4,2),k2_cr),MIN(V(4,2),k2_cr))}
R1 4 2 10T
********* ********* ********* ********* ********* ********* ********* ********* ********* ********* *********
E11 OPT GND VALUE={MIN(MAX(IF(TIME>0,IF(I(V1)>0.95,(-4.00458853433877E-05)*I(V1)*I(V1)*I(V1)+(-0.00857231667301519)*I(V1)*I(V1)+(3.42809879019094)*I(V1)+(-3.21312517416111),0),0),-1MEG),1MEG)}
*
.ENDS RLD90QZW3_sub
.SUBCKT LaserDiodes_RLD90QZW3 gnd _net0 _net1 _net2 _net3
X1 _net0 _net1 _net2 _net3 RLD90QZW3_sub
.ENDS
</Spice>
<Symbol>
<Line -30 20 60 0 #000080 2 1>
<Line 0 -6 0 -24 #000080 2 1>
<Line 0 30 0 -24 #000080 2 1>
<Line -9 6 18 0 #000080 2 1>
<Line -9 -6 18 0 #000080 2 1>
<Line 0 6 -9 -12 #000080 2 1>
<Line 0 6 9 -12 #000080 2 1>
<Line -5 -1 10 0 #000080 2 1>
<Line 16 0 -8 0 #000080 2 1>
<Line 14 -3 3 3 #000080 2 1>
<Line 14 3 3 -3 #000080 2 1>
<Line 30 -20 0 40 #000080 2 1>
<Line 30 -10 10 0 #000080 2 1>
<Line 30 10 10 0 #000080 2 1>
<Line -30 -20 0 40 #000080 2 1>
<Line -30 -20 60 0 #000080 2 1>
<Text -26 -18 8 #000000 0 "LD">
<Text 14 -18 8 #000000 0 "PO">
<Text 14 2 8 #000000 0 "GD">
<.PortSym 40 10 4 180 GND>
<.PortSym 40 -10 3 180 OPT>
<.PortSym 0 -30 1 0 A>
<.PortSym 0 30 2 0 C>
<.ID 20 -46 LD>
</Symbol>
</Component>

51
library/Neon.lib Normal file
View File

@ -0,0 +1,51 @@
<Qucs Library 24.3.0 "Neon">
<Component Neon>
<Description>
65V Neon Lamp Spice Model
Author: Zabb Csaba
</Description>
<Model>
.Def:Neon_Neon _net0 _net1
Sub:X1 _net0 _net1 gnd Type="Neon_sp"
.Def:End
</Model>
<ModelIncludes "Neon.sp.lst">
<Spice>
.SUBCKT NB1 10 20
D1 10 1 D1
D2 20 1 D1
D3 2 10 D1
D4 2 20 D1
D5 1 4 D2
V1 4 5 0
H1 6 0 V1 4.8E4
R1 0 6 1E6
B1 5 7 I=3.7E-4*V(5,7)+5.75E-3*V(5,7)*V(6)
C1 5 7 1.3E-11
R2 7 2 2.13E3
R3 3 5 3.5E3
R4 3 8 1.85E3
V2 8 2 1.442E2
.MODEL D1 D(IS=8E-16)
.MODEL D2 D(IS=2.1E-13 N=1.8)
.ENDS NB1
.SUBCKT Neon_Neon gnd _net0 _net1
X1 _net0 _net1 NB1
.ENDS
</Spice>
<Symbol>
<Line -40 0 30 0 #000080 2 1>
<Line 10 0 30 0 #000080 2 1>
<Line -10 -20 0 40 #000080 2 1>
<Line 10 -20 0 40 #000080 2 1>
<Ellipse -30 -30 60 60 #ffaa00 2 1 #c0c0c0 12 1>
<.PortSym -40 0 1 0 P1>
<.PortSym 40 0 2 180 P2>
<.ID -20 44 NB>
</Symbol>
</Component>

View File

@ -516,3 +516,108 @@ X1 _net0 _net3 _net1 _net2 moc3082_sub
</Symbol>
</Component>
<Component MOC3052>
<Description>
600V triac optocoupler; no zero-cross. LTspice mode is required for this model. Designed by Zabb Csaba: https://fotoelektronika.com/spice-models/
</Description>
<Model>
.Def:Optocoupler_MOC3052 _net0 _net3 _net1 _net2
SpLib:X1 _net0 _net3 _net1 _net2 File="moc3052_3062.cir" Device="MOC3052" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT Optocoupler_MOC3052 gnd _net0 _net3 _net1 _net2
XX1 _net0 _net3 _net1 _net2 MOC3052
.ENDS
</Spice>
<SpiceAttach "moc3052_3062.cir">
<Symbol>
<.ID -40 -96 X>
<.PortSym -60 -30 1 0 P1>
<.PortSym -60 30 2 0 P2>
<.PortSym 80 -30 3 180 P3>
<.PortSym 80 30 4 180 P4>
<Line -30 -30 -30 0 #000080 2 1>
<Line -60 30 30 0 #000080 2 1>
<Line -40 -10 20 0 #000080 2 1>
<Line -40 -10 10 20 #000080 2 1>
<Line -40 10 20 0 #000080 2 1>
<Line -30 30 0 -20 #000080 2 1>
<Line -30 -30 0 20 #000080 2 1>
<Line -30 10 10 -20 #000080 2 1>
<Rectangle -50 -50 120 100 #000080 2 1 #c0c0c0 1 0>
<Line 40 6 0 24 #000080 2 1>
<Line 40 -30 0 24 #000080 2 1>
<Line 58 6 -36 0 #000080 2 1>
<Line 31 6 -9 -12 #000080 2 1>
<Line 31 6 9 -12 #000080 2 1>
<Line 49 -6 9 12 #000080 2 1>
<Line 49 -6 -9 12 #000080 2 1>
<Line 58 -6 -36 0 #000080 2 1>
<Line 80 30 -40 0 #000080 2 1>
<Line 80 -30 -40 0 #000080 2 1>
<Line 0 2 4 -4 #000080 2 1>
<Line -6 -4 6 6 #000080 2 1>
<Arrow 4 -2 10 10 9 3 #000080 2 1 1>
<Arrow 2 8 10 10 9 3 #000080 2 1 1>
<Line -2 12 4 -4 #000080 2 1>
<Line -8 6 6 6 #000080 2 1>
</Symbol>
</Component>
<Component MOC3063>
<Description>
600V triac optocoupler with zero-cross detector. LTspice mode is required for this model. Designed by Zabb Csaba: https://fotoelektronika.com/spice-models/
</Description>
<Model>
.Def:Optocoupler_MOC3063 _net0 _net3 _net1 _net2
SpLib:X1 _net0 _net3 _net1 _net2 File="moc3052_3062.cir" Device="MOC3063" SymPattern="auto" Params="" PinAssign=""
.Def:End
</Model>
<Spice>
.SUBCKT Optocoupler_MOC3063 gnd _net0 _net3 _net1 _net2
XX1 _net0 _net3 _net1 _net2 MOC3063
.ENDS
</Spice>
<SpiceAttach "moc3052_3062.cir">
<Symbol>
<.ID -40 -96 X>
<.PortSym -60 -30 1 0 P1>
<.PortSym -60 30 2 0 P2>
<.PortSym 80 -30 3 180 P3>
<.PortSym 80 30 4 180 P4>
<Line -30 -30 -30 0 #000080 2 1>
<Line -60 30 30 0 #000080 2 1>
<Line -40 -10 20 0 #000080 2 1>
<Line -40 -10 10 20 #000080 2 1>
<Line -40 10 20 0 #000080 2 1>
<Line -30 30 0 -20 #000080 2 1>
<Line -30 -30 0 20 #000080 2 1>
<Line -30 10 10 -20 #000080 2 1>
<Rectangle -50 -50 120 100 #000080 2 1 #c0c0c0 1 0>
<Line 40 6 0 24 #000080 2 1>
<Line 40 -30 0 24 #000080 2 1>
<Line 58 6 -36 0 #000080 2 1>
<Line 22 10 5 0 #000080 2 3>
<Line 27 10 4 -4 #000080 2 3>
<Line 31 6 -9 -12 #000080 2 1>
<Line 31 6 9 -12 #000080 2 1>
<Line 49 -6 9 12 #000080 2 1>
<Line 49 -6 -9 12 #000080 2 1>
<Line 58 -6 -36 0 #000080 2 1>
<Line -10 2 4 -4 #000080 2 1>
<Line -16 -4 6 6 #000080 2 1>
<Arrow -6 -2 10 10 9 3 #000080 2 1 1>
<Arrow -8 8 10 10 9 3 #000080 2 1 1>
<Line -12 12 4 -4 #000080 2 1>
<Line -18 6 6 6 #000080 2 1>
<Rectangle 6 14 24 20 #000080 2 1 #c0c0c0 1 0>
<Line 22 14 0 -4 #000080 2 3>
<Text 8 18 8 #000080 0 "ZCC">
<Line 14 14 0 -28 #000080 2 3>
<Line 14 -14 26 0 #000080 2 3>
<Line 30 24 10 0 #000080 2 3>
<Line 80 30 -40 0 #000080 2 1>
<Line 80 -30 -40 0 #000080 2 1>
</Symbol>
</Component>

View File

@ -0,0 +1,144 @@
* MOC3063 Zero-Cross Optoisolators Triac Driver Output Spice Model
* Date : 08/09/2024
* Author: Zabb Csaba
* IRED emitting diodes optically coupled to monolithic silicon detectors
* performing the functions of Zero Voltage Crossing bilateral triac drivers.
* VINH=Inhibit Voltage (MT1MT2 Voltage above which device will not trigger.)
*
.SUBCKT MOC3063 1 2 6 4
* A K MT2 MT1
DL 1 3 IRLED
V1 3 2 0
H1 17 0 V1 1
E1 DEL 0 TABLE {V(17)}
+ (5m, 50)
+ (10m, 30)
+ (15m, 19)
+ (20m, 14)
+ (25m, 11)
+ (30m, 10)
+ (35m, 9.0)
+ (40m, 8.0)
+ (45m, 7.0)
+ (50m, 6.5)
+ (55m, 6.1)
E2 11 0 VALUE {IF(V(17)>5m,1,0)}
X1 11 10 DEL 0 VCRES
C1 10 0 1n
E3 12 4 VALUE {IF(V(10)>0.63,1,0)}
S1 6 13 11 0 SW1
R1 13 8 3MEG
C2 8 4 10p
D1 8 7 DX
D2 4 7 DX
E4 9 4 VALUE {IF(ABS(V(8,4))<12,1,0)}
B1 G 4 I=V(12,4)*V(9,4)*10m
C3 2 4 800f
R2 2 4 10G
X2 6 4 G TRIAC Ih=0.25m
.MODEL DX D(BV=50 IBV=10u)
.MODEL SW1 VSWITCH (ROFF=1G RON=1 VOFF=0 VON=1)
.MODEL IRLED D (IS=8E-17 N=1.5 RS=2 IKF=7.5E-2 IBV=1.5E-08 NBV=7E1 BV=1.6E1 CJO=4E-11 TT=1E-08 EG=1.46)
.ENDS MOC3063
* Author: Zabb Csaba
* IRED emitting diode optically coupled to a non-zero-crossing silicon bilateral AC switch (triac).
*
.SUBCKT MOC3052 1 2 6 4
* A K MT2 MT1
DL 1 5 IRLED
V1 5 2 0
H1 7 0 V1 1
E1 DEL 0 TABLE {V(7)}
+ (10m, 30)
+ (15m, 19)
+ (20m, 14)
+ (25m, 11)
+ (30m, 10)
+ (35m, 9.0)
+ (40m, 8.0)
+ (45m, 7.0)
+ (50m, 6.5)
+ (55m, 6.1)
E2 11 0 VALUE {IF(V(7)>10m,1,0)}
X1 11 9 DEL 0 VCRES
C1 9 0 1n
E3 8 4 VALUE {IF(V(9)>0.63,1,0)}
G1 G 4 8 4 10m
C2 2 4 800f
R1 2 4 10G
X2 6 4 G TRIAC Ih=0.28m
.MODEL IRLED D (IS=8E-17 N=1.5 RS=2 IKF=7.5E-2 IBV=1.5E-08 NBV=7E1 BV=1.6E1 CJO=4E-11 TT=1E-08 EG=1.46)
.ENDS MOC3052
*
.SUBCKT VCRES 1 2 4 5
+PARAMS: R1=1k
ERES 1 3 VALUE={IF(V(4,5)>0,I(VSENSE)*{R1}*V(4,5),-I(VSENSE)*{R1}*V(4,5))}
VSENSE 3 2 0
.ENDS VCRES
*
.SUBCKT TRIAC MT2 MT1 G params:
+ Vdrm=600
+ Igt=5m
+ Ih=0.28m
+ Rt=3.3
+ Standard=1
S1 MT2 2 3 0 SW1
D1 2 4 DAK
R1 2 4 1k
V1 4 MT1 0
S2 MT2 5 6 0 SW1
D2 7 5 DAK
R2 5 7 1k
V2 MT1 7 0
R3 G MT1 1G
D3 8 G DGK
D4 G 8 DGK
V3 8 MT1 0
R4 G 8 1k
R5 9 3 2.2
C1 0 3 5u
E1 9 0 VALUE {IF(((V(10)>0.5)|(V(13)>0.5)|(V(12)>0.5)),400,0)}
R6 14 6 2.2
C2 0 6 5u
E2 14 0 VALUE {IF(((V(10)>0.5)|(V(11)>0.5)|(V(12)>0.5)),400,0)}
E3 15 0 VALUE {IF((ABS(I(V3)))>(Igt-1u),1,0)}
E4 16 0 VALUE {V(17)*V(15)}
E5 17 0 VALUE {IF(((I(V3)>(Igt-1u))&((V(MT2)-V(MT1))<0)&(Standard==0)),0,1)}
X1 16 10 BUFDELAY
E6 18 0 VALUE {IF(((I(V1))>(Ih/2)),1,0)}
E7 19 0 VALUE {IF(((I(V1))>(Ih/3)),1,0)}
E8 20 0 VALUE {IF((V(18)*V(19)+V(19)*(1-V(18))*(V(21)))>0.5,1,0)}
C3 21 0 1n
R7 20 21 1k
R8 21 0 100MEG
X2 21 13 BUFDELAY
E9 22 0 VALUE {IF(((I(V2))>(Ih/2)),1,0)}
E10 23 0 VALUE {IF(((I(V2))>(Ih/3)),1,0)}
E11 24 0 VALUE {IF((V(22)*V(23)+V(23)*(1-V(22))*(V(25)))>0.5,1,0)}
C4 25 0 1n
R9 24 25 1k
R10 25 0 100MEG
X3 25 11 BUFDELAY
E12 26 0 VALUE {IF((ABS(V(MT2)-V(MT1))>(Vdrm*1.3)),1,0)}
E13 27 0 VALUE {IF((I(V1)>(Vdrm*1.3)/5MEG)|(I(V2)>(Vdrm*1.3)/5MEG),1,0)}
E14 28 0 VALUE {IF((V(26)+(1-V(26))*V(27)*V(29) )>0.5,1,0)}
C5 29 0 1n
R11 28 29 100
R12 29 0 100MEG
X4 29 12 BUFDELAY
.MODEL SW1 VSWITCH (ROFF=1G RON={Rt} VOFF=0 VON=1)
.MODEL DAK D(IS=3E-12 N=1.66 CJO=5p)
.MODEL DGK D(IS=1E-16 CJO=50p Rs=5)
.ENDS TRIAC
*
.SUBCKT BUFDELAY A Y PARAMS:DELAY=1u
E1 Y1 0 VALUE {IF(V(A)>0.5,1,0)}
R1 Y1 Y2 1
C1 Y2 0 {DELAY*1.44}
E2 Y3 0 VALUE {IF(V(Y2)>0.5,1,0)}
R2 Y3 Y 1
C2 Y 0 1n
.ENDS BUFDELAY
*$

124
library/RC.lib Normal file
View File

@ -0,0 +1,124 @@
<Qucs Library 25.1.0 "RC">
<Component C>
<Description>
Capacitor with parasitic inductance and ESR. The model contains the generic data. Substitute the ESR and parasitic inductance value after RF measurements before insertion in the schematic!
</Description>
<Model>
.Def:RC_C _net0 _net1 Cs="100n" Rs="1" Ls="1n"
C:C1 _net0 _net2 C="Cs" V=""
L:L1 _net3 _net1 L="Ls" I=""
R:R1 _net2 _net3 R="Rs" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
.Def:End
</Model>
<Spice>
.SUBCKT RC_C gnd _net0 _net1 Cs=100n Rs=1 Ls=1n
C1 _net0 _net2 {CS}
L1 _net3 _net1 {LS}
R1 _net2 _net3 {RS} tc1=0.0 tc2=0.0
.ENDS
</Spice>
<Symbol>
<.ID -20 14 SUB "1=Cs=100n=Capacitance (F)=" "1=Rs=1=Series resististance ESR (Ohms)=" "1=Ls=1n=Series inductance (H)=">
<.PortSym -30 0 1 0 P1>
<.PortSym 30 0 2 0 P2>
<Line -30 0 26 0 #000080 2 1>
<Line -4 -11 0 22 #000080 3 1>
<Line 4 -11 0 22 #000080 3 1>
<Line 4 0 26 0 #000080 2 1>
<Text -20 -40 12 #000000 0 "PAR">
</Symbol>
</Component>
<Component C_ESR>
<Description>
Capacitor with ESR. The model contains the generic data. Substitute the ESR value before insertion in the schematic!
</Description>
<Model>
.Def:RC_C_ESR _net0 _net1 Cs="10u" Rs="1"
R:R1 _net2 _net1 R="Rs" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
C:C1 _net0 _net2 C="Cs" V=""
.Def:End
</Model>
<Spice>
.SUBCKT RC_C_ESR gnd _net0 _net1 Cs=10u Rs=1
R1 _net2 _net1 {RS} tc1=0.0 tc2=0.0
C1 _net0 _net2 {CS}
.ENDS
</Spice>
<Symbol>
<.ID -20 14 X "1=Cs=10u=Series capacitance (F)=" "1=Rs=1=Series resistance ESD (Ohms)=">
<.PortSym -30 0 1 0 P1>
<.PortSym 30 0 2 0 P2>
<Line -30 0 26 0 #000080 2 1>
<Line 4 0 26 0 #000080 2 1>
<Line -14 -8 6 0 #ff0000 2 1>
<Line -4 -11 0 22 #000080 3 1>
<EArc 4 -12 20 24 1952 1856 #000080 3 1>
<Line -11 -5 0 -6 #ff0000 2 1>
<Text -10 -40 12 #000000 0 "ESR">
</Symbol>
</Component>
<Component R>
<Description>
Resistor with parasitic inductance and capacitance. The model contains the generic data. Substitute the parasitics value after RF measurements before insertion in the schematic!
</Description>
<Model>
.Def:RC_R _net2 _net1 Rs="1k" Ls="10n" Cp="1p"
L:L1 _net0 _net1 L="Ls" I=""
R:R1 _net2 _net0 R="Rs" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
C:C1 _net2 _net1 C="Cp" V=""
.Def:End
</Model>
<Spice>
.SUBCKT RC_R gnd _net2 _net1 Rs=1k Ls=10n Cp=1p
L1 _net0 _net1 {LS}
R1 _net2 _net0 {RS} tc1=0.0 tc2=0.0
C1 _net2 _net1 {CP}
.ENDS
</Spice>
<Symbol>
<Line -30 0 12 0 #000080 2 1>
<Line 18 0 12 0 #000080 2 1>
<Line -18 -9 36 0 #000080 2 1>
<Line 18 -9 0 18 #000080 2 1>
<Line 18 9 -36 0 #000080 2 1>
<Line -18 9 0 -18 #000080 2 1>
<.PortSym -30 0 1 0 P1>
<.PortSym 30 0 2 0 P2>
<.ID -20 14 X "1=Rs=1k=Resistance (Ohms)=" "1=Ls=10n=Series inductance (H)=" "1=Cp=1p=Parallel capacitance (F)=">
<Text -20 -30 12 #000000 0 "PAR">
</Symbol>
</Component>
<Component R_L>
<Description>
Resistor with parasitic inductance. The model contains the generic data. Substitute the parasitic inductance value after measurements before insertion in the schematic!
</Description>
<Model>
.Def:RC_R_L _net2 _net1 Rs="1k" Ls="10n"
L:L1 _net0 _net1 L="Ls" I=""
R:R1 _net2 _net0 R="Rs" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
.Def:End
</Model>
<Spice>
.SUBCKT RC_R_L gnd _net2 _net1 Rs=1k Ls=10n
L1 _net0 _net1 {LS}
R1 _net2 _net0 {RS} tc1=0.0 tc2=0.0
.ENDS
</Spice>
<Symbol>
<Line -30 0 12 0 #000080 2 1>
<Line 18 0 12 0 #000080 2 1>
<Line -18 -9 36 0 #000080 2 1>
<Line 18 -9 0 18 #000080 2 1>
<Line 18 9 -36 0 #000080 2 1>
<Line -18 9 0 -18 #000080 2 1>
<.PortSym -30 0 1 0 P1>
<.PortSym 30 0 2 0 P2>
<.ID -20 14 X "1=Rs=1k=Resistance (Ohms)=" "1=Ls=10n=Series inductance (H)=">
<Text -20 -30 12 #000000 0 "PAR">
</Symbol>
</Component>

View File

@ -333,3 +333,158 @@ X1 _net0 _net1 _net2 XS8020L
</Symbol>
</Component>
<Component TriacGeneric>
<Description>
Generic triac model from ST microelectronics. This model works only with LTSpice compatibility option:
============================
* Vdrm : Repetitive forward off-state voltage
* Ih : Holding current
* Igt : Gate trigger current
* Rt : Dynamic on-state resistance
* Standard : Differenciation between Snubberless and Standard TRIACs
* (Standard=0 => Snubberless TRIACs, Standard=1 => Standard TRIACs)
</Description>
<Model>
.Def:Thyristor_TriacGeneric _net0 _net1 _net2 Vdrm="400" Igt="20m" Ih="6m" Rt="0.10" Standard="1"
Sub:X1 _net0 _net2 _net1 gnd Type="TriacST_orig_cir"
.Def:End
</Model>
<ModelIncludes "TriacST_orig.cir.lst">
<Spice>
.subckt Triac_ST A K G PARAMS:
+ Vdrm=400v
+ Igt=20ma
+ Ih=6ma
+ Rt=0.01
+ Standard=1
*
* Vdrm : Repetitive forward off-state voltage
* Ih : Holding current
* Igt : Gate trigger current
* Rt : Dynamic on-state resistance
* Standard : Differenciation between Snubberless and Standard TRIACs
* (Standard=0 => Snubberless TRIACs, Standard=1 => Standard TRIACs)
*
****************************
* Power circuit *
****************************
*
****************************
*Switch circuit*
****************************
* Q1 & Q2 Conduction
S_S3 A Plip1 positive 0 Smain
*RS_S3 positive 0 1G
D_DAK1 Plip1 Plip2 Dak
R_Rlip Plip1 Plip2 1k
V_Viak Plip2 K DC 0 AC 0
*
* Q3 & Q4 Conduction
S_S4 A Plin1 negative 0 Smain
*RS_S4 negative 0 1G
D_DKA1 Plin2 Plin1 Dak
R_Rlin Plin1 Plin2 1k
V_Vika K Plin2 DC 0 AC 0
****************************
*Gate circuit*
****************************
R_Rgk G K 10G
D_DGKi Pg2 G Dgk
D_DGKd G Pg2 Dgk
V_Vig Pg2 K DC 0 AC 0
R_Rlig G Pg2 1k
*
****************************
*Interface circuit*
****************************
* positive pilot
R_Rp Controlp positive 2.2
C_Cp 0 positive 1u
E_IF15OR3 Controlp 0 VALUE {IF( ( (V(CMDIG)>0.5) | (V(CMDILIH)>0.5) | (V(CMDVdrm)>0.5) ),400,0 )}
*
* negative pilot
R_Rn Controln negative 2.2
C_Cn 0 negative 1u
E_IF14OR3 Controln 0 VALUE {IF( ( (V(CMDIG)>0.5) | (V(CMDILIHN)>0.5) | (V(CMDVdrm)>0.5) ),400,0 )}
*
****************************
* Pilots circuit *
****************************
****************************
* Pilot Gate *
****************************
E_IF1IG inIG 0 VALUE {IF( ( ABS(I(V_Vig)) ) > (Igt-1u) ,1,0 )}
E_MULT2MULT CMDIG 0 VALUE {V(Q4)*V(inIG)}
E_IF2Quadrant4 Q4 0 VALUE {IF(((I(V_Vig)>(Igt-0.000001))&((V(A)-V(K))<0)&(Standard==0)),0,1)}
*
****************************
* Pilot IHIL *
****************************
*
E_IF10IL inIL 0 VALUE {IF( ((I(V_Viak))>(Ih/2)),1,0 )}
E_IF5IH inIH 0 VALUE {IF( ((I(V_Viak))>(Ih/3)),1,0 )}
*
* Flip_flop IHIL
E_IF6DIHIL SDIHIL 0 VALUE {IF((V(inIL)*V(inIH)+V(inIH)*(1-V(inIL))*(V(CMDILIH)) )>0.5,1,0)}
C_CIHIL CMDILIH 0 1n
R_RIHIL SDIHIL CMDILIH 1K
R_RIHIL2 CMDILIH 0 100Meg
*
****************************
* Pilot IHILN *
****************************
*
E_IF11ILn inILn 0 VALUE {IF( ((I(V_Vika))>(Ih/2)),1,0 )}
E_IF3IHn inIHn 0 VALUE {IF( ((I(V_Vika))>(Ih/3)),1,0 )}
* Flip_flop IHILn
E_IF4DIHILN SDIHILN 0 VALUE {IF((V(inILn)*V(inIHn)+V(inIHn)*(1-V(inILn))*(V(CMDILIHN)) )>0.5,1,0)}
C_CIHILn CMDILIHN 0 1n
R_RIHILn SDIHILN CMDILIHN 1K
R_RIHILn2 CMDILIHN 0 100Meg
*
****************************
* Pilot VDRM *
****************************
E_IF8Vdrm inVdrm 0 VALUE {IF( (ABS(V(A)-V(K))>(Vdrm*1.3)),1,0 )}
E_IF9IHVDRM inIhVdrm 0 VALUE {IF( (I(V_Viak)>(Vdrm*1.3)/1.2meg)| (I(V_Vika)>(Vdrm*1.3)/1.2meg),1,0)}
* Flip_flop VDRM
E_IF7DVDRM SDVDRM 0 VALUE {IF((V(inVdrm)+(1-V(inVdrm))*V(inIhVdrm)*V(CMDVdrm) )>0.5,1,0)}
C_CVdrm CMDVdrm 0 1n
R_RVdrm SDVDRM CMDVdrm 100
R_RVdrm2 CMDVdrm 0 100Meg
*
****************************
* Switch Model *
****************************
.MODEL Smain VSWITCH Roff=1.2meg Ron={Rt} Voff=0 Von=100
****************
* Diodes Model *
****************
.MODEL Dak D( Is=3E-12 Cjo=5pf)
.MODEL Dgk D( Is=1E-16 Cjo=50pf Rs=5)
.ends
.SUBCKT Thyristor_TriacGeneric gnd _net0 _net1 _net2 Vdrm=400 Igt=20m Ih=6m Rt=0.10 Standard=1
X1 _net0 _net2 _net1 Triac_ST Vdrm={Vdrm} Igt={Igt} Ih={Ih} Rt={Rt} Standard={Standard}
.ENDS
</Spice>
<Symbol>
<.ID -20 44 SUB "1=Vdrm=400=Repetitive forward off-state voltage=" "1=Igt=20m=Gate trigger current =" "1=Ih=6m=Holding current =" "1=Rt=0.10=Dynamic on-state resistance=" "1=Standard=1=0 -- Snubberless TRIACs;1 -- Standard TRIACs=">
<.PortSym 0 -30 1 0 P1>
<Line 0 6 0 24 #000080 2 1>
<Line 0 -30 0 24 #000080 2 1>
<Line 18 6 -36 0 #000080 2 1>
<Line -30 10 17 0 #000080 2 1>
<Line -13 10 4 -4 #000080 2 1>
<Line -9 6 -9 -12 #000080 2 1>
<Line -9 6 9 -12 #000080 2 1>
<Line 9 -6 9 12 #000080 2 1>
<Line 9 -6 -9 12 #000080 2 1>
<Line 18 -6 -36 0 #000080 2 1>
<.PortSym 0 30 3 0 P3>
<.PortSym -30 10 2 0 P2>
</Symbol>
</Component>

1636
library/TubesExtended.lib Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,27 @@
* 2P2 Miniature Power Pentode Spice Model
* Author: Zabb Csaba
* Date: 4/12/2021
* The following parameters are not modelled:
* (1) Filament and filament warmup time
* (2) Limiting values
* This model is valid for the following tubes (within max. ratings):
* DL92, 3S4, CV484, VT-174
.SUBCKT 2P2 A S G K
+ PARAMS: MU=5.5 KG1=3916 KP=39.04 KVB=12 VCT=0.0025 EX=1.19 KG2=6384 KNEE=2.88 KVC=2.133
+ KLAM=2.75E-7 KLAMG=6.12E-4 KNEE2=11.76 KNEX=2.85
E1 1 0 VALUE={V(S,K)/KP*LOG(1+EXP((1/MU+(VCT+V(G,K))/SQRT(KVB+V(S,K)*V(S,K)))*KP))}
E2 2 0 VALUE={(PWR(V(1),EX)+PWRS(V(1),EX))}
G4 A K VALUE={IF(V(A,K)>0,V(2)/KG1*ATAN((V(A,K)+KNEX)/KNEE)*TANH(V(A,K)/KNEE2)*(1+KLAMG*V(A,K)),0)}
E4 4 K VALUE={IF(V(A,K)>0,V(A,K),0)}
G2 S K VALUE={V(2)/KG2*(KVC-ATAN((V(4,K)+KNEX)/KNEE)*TANH(V(4,K)/KNEE2))/(1+KLAMG*V(4,K))}
B1 G K I=URAMP(V(G,K)+8.68E-1)^1.5*2.1E-5*V(5)
G3 G K VALUE={3.1E-5*(PWR(V(G,K),1.5)+PWRS(V(G,K),1.5))/1.5} ; G1 diode
E3 3 0 VALUE={IF(V(S,K)>0,1/(1+ABS(V(S,K))/20)^2.5,1)} ;G1 Splash current change
E5 5 0 VALUE={IF(V(A,K)>=3,V(3),1)}
R1 3 0 1G
R2 5 0 1G
C1 G K 4.4p
C2 G A 0.4p
C3 A K 6p
.ENDS
*$

View File

@ -0,0 +1,29 @@
* 2P3 Miniature Power Pentode Spice Model
* Author: Zabb Csaba
* Date: 25/02/2023
* The following parameters are not modelled:
* (1) Filament and filament warmup time
* (2) Limiting values
* 2P3 maximum ratings:
* Ua max. 150V
* Ug2 max. 135V
* Ik max. 25mA
* Uf 1.4V
* If 200mA
* The cathode symbol is the negative end of the filament (pin 5, parallel filament).
.SUBCKT 2P3 A S G K
+ PARAMS: MU=5.2 KG1=5535 KP=60.06 KVB=12.96 VCT=0.274 EX=1.4 KG2=6852 KNEE=12 KVC=1.874
+ KLAMG=5.61E-4 KNEE2=21.41 KNEX=26.4
E1 1 0 VALUE={V(S,K)/KP*LOG(1+EXP((1/MU+(VCT+V(G,K))/SQRT(KVB+V(S,K)*V(S,K)))*KP))}
E2 2 0 VALUE={(PWR(V(1),EX)+PWRS(V(1),EX))}
G1 A K VALUE={IF(V(A,K)>0,V(2)/KG1*ATAN((V(A,K)+KNEX)/KNEE)*TANH(V(A,K)/KNEE2)*(1+KLAMG*V(A,K)),0)}
E3 4 K VALUE={IF(V(A,K)>0,V(A,K),0)}
G2 S K VALUE={V(2)/KG2*(KVC-ATAN((V(4,K)+KNEX)/KNEE)*TANH(V(4,K)/KNEE2))/(1+KLAMG*V(4,K))}
B1 G K I=URAMP(V(G,K)+960m)^1.5*5.3E-5
G3 G K VALUE={3.1E-5*(PWR(V(G,K),1.5)+PWRS(V(G,K),1.5))/1.5} ; G1 diode
C1 K G 4.8p
C2 G A 0.36p
C3 K A 4.2p
.ENDS 2P3
*

View File

@ -0,0 +1,22 @@
* 5899 Special Quality Variable-mu Pentode Spice Model
* Author: Zabb Csaba
* Date: 30/10/2021
* The following parameters are not modelled:
* (1) Filament and filament warmup time
* (2) Limiting values
.SUBCKT 5899 A S G K
+ PARAMS: MU=27.2 KG1=11545.6 KP=35.3 KVB=11.88 VCT=8.438E-5 EX=2.64 KG2=7324 KNEE=7.44 KVC=1.772
+ KLAM=3E-8 KLAMG=2.04E-4 KNEE2=15.64 KNEX=10.8
E1 1 0 VALUE={V(S,K)/KP*LOG(1+EXP((1/MU+(VCT+V(G,K)*V(3))/SQRT(KVB+V(S,K)*V(S,K)))*KP))}
E2 2 0 VALUE={(PWR(V(1),EX)+PWRS(V(1),EX))}
G1 A K VALUE={IF(V(A,K)>0,V(2)/KG1*ATAN((V(A,K)+KNEX)/KNEE)*TANH(V(A,K)/KNEE2)*(1+KLAMG*V(A,K)),0)}
E4 4 K VALUE={IF(V(A,K)>0,V(A,K),0)}
G2 S K VALUE={V(2)/KG2*(KVC-ATAN((V(4,K)+KNEX)/KNEE)*TANH(V(4,K)/KNEE2))/(1+KLAMG*V(4,K))}
G3 G K VALUE={2.16E-3*(PWR(V(G,K),1.5)+PWRS(V(G,K),1.5))/2} ; G1 diode
E3 3 0 VALUE={IF(V(G,K)<0,(1-EXP(10/V(G,K)))^1.3,1)}
B1 G K I=URAMP(V(G,K)+8.56E-1)^1.5*2.6E-4
C1 G K 4p
C2 A K 1.9p
C3 A G 0.03p
.ENDS 5899
*$

View File

@ -0,0 +1,38 @@
* 6F12P Triode-Pentode Spice Model
* Author: Zabb Csaba
* Date: 27/10/2021
* The following parameters are not modelled:
* (1) Filament and filament warmup time
* (2) Limiting values
.SUBCKT 6F12P A S G K
+ PARAMS: MU=66.4 KG1=352 KP=423.45 KVB=5.64 VCT=6.25E-4 EX=1.596 KG2=672 KNEE=1.14 KVC=2.07
+ KLAM=2.5E-8 KLAMG=3.637E-5 KNEE2=14.56 KNEX=2.1
E1 1 0 VALUE={V(S,K)/KP*LOG(1+EXP((1/MU+(VCT+V(G,K))/SQRT(KVB+V(S,K)*V(S,K)))*KP))}
E2 2 0 VALUE={(PWR(V(1),EX)+PWRS(V(1),EX))}
G4 A K VALUE={IF(V(A,K)>0,V(2)/KG1*ATAN((V(A,K)+KNEX)/KNEE)*TANH(V(A,K)/KNEE2)*(1+KLAMG*V(A,K)),0)}
E4 4 K VALUE={IF(V(A,K)>0,V(A,K),0)}
G2 S K VALUE={V(2)/KG2*(KVC-ATAN((V(4,K)+KNEX)/KNEE)*TANH(V(4,K)/KNEE2))/(1+KLAMG*V(4,K))}
G3 G K VALUE={2.1E-2*(PWR(V(G,K),1.5)+PWRS(V(G,K),1.5))/2} ; G1 diode
B1 G K I=URAMP(V(G,K)+1.045)^1.5*3.2E-4*V(3)
B2 G K I=URAMP(V(G,K)+1.045)^1.5*9.5E-5
E3 3 0 VALUE={IF(V(S,K)>0,1/(1+ABS(V(S,K))/20)^1.8,1)} ;G1 Splash current change
R1 3 0 1G
C1 K G 6.6p
C2 G A 0.02p
C3 K A 1.9p
.ENDS
*$
.SUBCKT 6F12PT A G K
+PARAMS: MU=101 KG1=161.7 KP=691.2 KVB=69.96 VCT=0.1786 EX=1.44
E1 1 0 VALUE={V(A,K)/KP*LOG(1+EXP(KP*(1/MU+(VCT+V(G,K))/SQRT(KVB+V(A,K)*V(A,K)))))}
G1 A K VALUE={(PWR(V(1),EX)+PWRS(V(1),EX))/KG1}
G3 G K VALUE={3.5E-2*(PWR(V(G,K),1.5)+PWRS(V(G,K),1.5))/2} ; G1 diode
B1 G K I=URAMP(V(G,K)+1.05)^1.5*4.6E-4*V(3)
B2 G K I=URAMP(V(G,K)+1.05)^1.5*7E-5
E3 3 0 VALUE={IF(V(A,K)>0,1/(1+ABS(V(A,K))/20)^2,1)} ;G1 Splash current change
R1 3 0 1G
C1 G K 2.1p
C2 A K 0.26p
C3 G A 1.6p
.ENDS
*$

View File

@ -0,0 +1,25 @@
* 6K1J Variable-mu VHF Pentode Spice Model
* Author: Zabb Csaba
* Date: 6/11/2021
* The following parameters are not modelled:
* (1) Filament and filament warmup time
* (2) Limiting values
* This model is valid for the following tubes (within max. ratings):
* RCA 956, VT-238, E2F
.SUBCKT 6K1J A S G K
+ PARAMS: MU=19.2 KG1=95744 KP=12.95 KVB=5.76 VCT=0.0575 EX=2.828 KG2=120960 KNEE=14.4 KVC=2.339
+ KLAM=2.5E-8 KLAMG=7.8E-5 KNEE2=13.39 KNEX=11.1
E1 1 0 VALUE={V(S,K)/KP*LOG(1+EXP((1/MU+(VCT+V(G,K)*V(3))/SQRT(KVB+V(S,K)*V(S,K)))*KP))}
E3 3 0 VALUE={ATAN(V(G,K)/19+1)/2.7+0.5}
E2 2 0 VALUE={(PWR(V(1),EX)+PWRS(V(1),EX))}
G1 A K VALUE={IF(V(A,K)>0,0.831*V(2)/KG1*ATAN((V(A,K)+KNEX)/KNEE)*TANH(V(A,K)/KNEE2)*(1+KLAMG*V(A,K)),0)}
E4 4 K VALUE={IF(V(A,K)>0,V(A,K),0)}
G2 S K VALUE={0.822*V(2)/KG2*(KVC-ATAN((V(4,K)+KNEX)/KNEE)*TANH(V(4,K)/KNEE2))/(1+KLAMG*V(4,K))}
B1 G K I=URAMP(V(G,K)+1.15)^1.5*2.6E-4*V(5)
E5 5 0 VALUE={IF(V(S,K)>0,1/(1+ABS(V(S,K))/20)^1.3,1)} ;G1 Splash current change
R1 5 0 1G
C1 G K 3.4p
C2 A K 3p
C3 G A 0.007p
.ENDS
*$

View File

@ -0,0 +1,25 @@
* EF183 Variable-mu Pentode Spice Model
* Author: Zabb Csaba
* Date: 26/10/2021
* The following parameters are not modelled:
* (1) Filament and filament warmup time
* (2) Limiting values
.SUBCKT EF183 A S G K
+ PARAMS: MU=45.58 KG1=126.5 KP=141.9 KVB=12 VCT=6.25E-4 EX=1.008 KG2=258 KNEE=7.92 KVC=2.82
+ KLAM=2E-7 KLAMG=9.9E-5 KNEE2=7.963 KNEX=2.756
E1 1 0 VALUE={V(S,K)/KP*LOG(1+EXP((1/MU+(VCT+V(G,K)*V(3))/SQRT(KVB+V(S,K)*V(S,K)))*KP))}
E2 2 0 VALUE={(PWR(V(1),EX)+PWRS(V(1),EX))}
G1 A K VALUE={IF(V(A,K)>0,V(2)/KG1*ATAN((V(A,K)+KNEX)/KNEE)*TANH(V(A,K)/KNEE2)*(1+KLAMG*V(A,K)),0)}
E4 4 K VALUE={IF(V(A,K)>0,V(A,K),0)}
G2 S K VALUE={V(2)/KG2*(KVC-ATAN((V(4,K)+KNEX)/KNEE)*TANH(V(4,K)/KNEE2))/(1+KLAMG*V(4,K))}
G3 G K VALUE={3.16E-2*(PWR(V(G,K),1.5)+PWRS(V(G,K),1.5))/2} ; G1 diode
E3 3 0 VALUE={IF(V(G,K)<0,(1-EXP(14/V(G,K)))^1.3,1)}
B1 G K I=URAMP(V(G,K)+1.015)^1.5*5.1E-4*V(6)
B2 G K I=URAMP(V(G,K)+1.015)^1.5*2E-4
E5 5 0 VALUE={IF(V(S,K)>0,1/(1+ABS(V(S,K))/20)^2,1)} ;G1 Splash current change
E6 6 0 VALUE={IF(V(A,K)>=15,V(5),1)}
C1 G K 9p
C2 A K 3p
C3 A G 0.005p
.ENDS EF183
*$

View File

@ -0,0 +1,32 @@
* EF184 Pentode Spice Model
* Copyright 2003--2006 by Ayumi Nakabayashi, All rights reserved.
* Version 3.01, Generated on Wed Mar 22 17:19:41 2006
* -Ig1 splash current modified by Zabb Csaba 21/10/2021
.SUBCKT EF184 A G2 G1 K
BGG GG 0 V=V(G1,K)+0.40321166
BEP EP 0 V=URAMP(V(A,K))+1e-10
BEG EG 0 V=URAMP(V(G1,K))+1e-10
BEG2 EG2 0 V=URAMP(V(G2,K))+1e-10
BM1 M1 0 V=(0.0054275937*(URAMP(V(EG2)-1e-10)+1e-10))^-0.61801526
BM2 M2 0 V=(0.7082102*(URAMP(V(GG)+V(EG2)/53.760436)+1e-10))^2.1180153
BP P 0 V=0.019963362*(URAMP(V(GG)+V(EG2)/75.910283)+1e-10)^1.5
BIK IK 0 V=U(V(GG))*V(P)+(1-U(V(GG)))*0.011540933*V(M1)*V(M2)
BIG IG 0 V=0.0099816812*V(EG)^1.5*(V(EG)/(V(EP)+V(EG))*1.2+0.4)
BIK2 IK2 0 V=V(IK,IG)*(1-0.4*(EXP(-V(EP)/V(EG2)*15)-EXP(-15)))
BIG2T IG2T 0 V=V(IK2)*(0.71666698*(1-V(EP)/(V(EP)+10))^1.5+0.28333302)
BIK3 IK3 0 V=V(IK2)*(V(EP)+5500)/(V(EG2)+5500)
BIK4 IK4 0 V=V(IK3)-URAMP(V(IK3)-(0.010377457*(V(EP)+URAMP(V(EG2,EP)))^1.5))
BIP IP 0 V=URAMP(V(IK4,IG2T)-URAMP(V(IK4,IG2T)-(0.010377457*V(EP)^1.5)))
BIAK A K I=V(IP)+1e-10*V(A,K)
BIG2 G2 K I=URAMP(V(IK4,IP))
B1 G1 K I=URAMP(V(G1,K)+1.3)^1.5*4.3E-4*V(3)
G3 G1 K VALUE={9.516E-3*(PWR(V(G1,K),1.5)+PWRS(V(G1,K),1.5))/2} ; G1 diode
E3 3 0 VALUE={IF(V(G2,K)>0,1/(1+ABS(V(G2,K))/20)^1.3,1)} ;G1 Splash current change
E5 5 0 VALUE={IF(V(A,K)>=8,V(3),1)}
R1 3 0 1G
R2 5 0 1G
CGA G1 A 0.005p
CGK G1 K 7.2p
C12 G1 G2 2.8p
CAK A K 3p
.ENDS

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,10 @@
Analog.lib
SpiceOpamp.lib
Cores.lib
Digital_CD.lib
Digital_HC.lib
Digital_LV.lib
LaserDiodes.lib
Transformers.lib
Xanalogue.lib
BF998.lib
@ -9,3 +14,9 @@ VoltageReferences.lib
PWM_Controller.lib
MixerIC.lib
SPICE_TLine.lib
Digital_AUX.lib
Digital_XSPICE.lib
DualGateMOSFET.lib
TubesExtended.lib
Neon.lib
Optocoupler.lib

14
library/symbols/led.sym Normal file
View File

@ -0,0 +1,14 @@
<Qucs Schematic 24.4.1>
<Symbol>
<Line 0 30 0 -24 #000080 2 1>
<Line 0 -6 0 -24 #000080 2 1>
<Line -9 6 18 0 #000080 2 1>
<Line -9 -6 18 0 #000080 2 1>
<Line 0 6 -9 -12 #000080 2 1>
<Line 0 6 9 -12 #000080 2 1>
<Arrow 13 -5 10 -10 9 3 #000080 2 1 0>
<Arrow 13 5 10 -10 9 3 #000080 2 1 0>
<.ID 30 -16 SUB>
<.PortSym 0 -30 1 0 1>
<.PortSym 0 30 2 0 1>
</Symbol>

View File

@ -0,0 +1,13 @@
<Qucs Schematic 24.4.1>
<Symbol>
<Line 9 -6 -18 0 #000080 2 1>
<Line 9 6 -18 0 #000080 2 1>
<Line 0 -30 0 24 #000080 2 1>
<Line 0 6 0 24 #000080 2 1>
<Line -9 -6 0 5 #000080 2 1>
<Line 0 -6 -9 12 #000080 2 1>
<Line 0 -6 9 12 #000080 2 1>
<.ID 20 -16 SUB>
<.PortSym 0 30 1 0 1>
<.PortSym 0 -30 2 0 2>
</Symbol>

View File

@ -1,4 +1,8 @@
Substrates.lib
Xanalogue.lib
PWM_Controller.lib
Digital_CD.lib
Digital_HC.lib
Digital_LV.lib
Digital_AUX.lib
Digital_XSPICE.lib

View File

@ -33,30 +33,15 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
if(QT_VERSION_MAJOR EQUAL 6)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg SvgWidgets)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Svg SvgWidgets)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Svg_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}SvgWidgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
${Qt6Svg_INCLUDE_DIRS}
${Qt6SvgWidgets_INCLUDE_DIRS}
)
else()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Svg_INCLUDE_DIRS}
)
endif()
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -80,8 +65,9 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS)
string(REGEX REPLACE "/W3" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/W1" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
add_compile_options(/permissive- /Zc:__cplusplus /Zc:preprocessor /MP /vmg)
add_link_options(/OPT:REF /OPT:ICF)
else()
add_compile_options(-w)
endif()
@ -108,13 +94,8 @@ helpdialog.h
)
SET(RESOURCES qucsactivefilter.qrc)
IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP(QUCS-ACTIVE-FILTER_MOC_SRCS ${QUCS-ACTIVE-FILTER_MOC_HDRS})
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ELSE()
QT5_WRAP_CPP(QUCS-ACTIVE-FILTER_MOC_SRCS ${QUCS-ACTIVE-FILTER_MOC_HDRS})
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ENDIF()
@ -142,13 +123,7 @@ ADD_EXECUTABLE(${QUCS_NAME}activefilter MACOSX_BUNDLE WIN32
${RESOURCES_SRCS} )
if(QT_VERSION_MAJOR EQUAL 6)
TARGET_LINK_LIBRARIES(${QUCS_NAME}activefilter Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::SvgWidgets)
else()
TARGET_LINK_LIBRARIES(${QUCS_NAME}activefilter Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg )
endif()
TARGET_LINK_LIBRARIES(${QUCS_NAME}activefilter Qt6::Core Qt6::Widgets Qt6::Svg Qt6::SvgWidgets)
SET_TARGET_PROPERTIES(${QUCS_NAME}activefilter PROPERTIES POSITION_INDEPENDENT_CODE TRUE)

View File

@ -1,401 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="196.69392"
height="170.28023"
id="svg2"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="AFR.svg">
<defs
id="defs4">
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lstart"
style="overflow:visible">
<path
id="path3763"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="matrix(0.8,0,0,0.8,10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend"
style="overflow:visible">
<path
id="path3766"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="matrix(-0.8,0,0,-0.8,-10,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Lend-0"
style="overflow:visible">
<path
inkscape:connector-curvature="0"
id="path3766-7"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0"
refX="0"
id="marker5927"
style="overflow:visible">
<path
inkscape:connector-curvature="0"
id="path5929"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="82.130173"
inkscape:cy="77.007002"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1366"
inkscape:window-height="722"
inkscape:window-x="-4"
inkscape:window-y="1020"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0">
<inkscape:grid
type="xygrid"
id="grid2985"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
units="mm"
spacingx="1mm"
spacingy="1mm"
originx="-1.0477027mm"
originy="-247.40872mm" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-3.7123325,-5.4368782)">
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:none"
d="m 17.716535,148.81888 0,-124.015753 3.543308,10.629916"
id="path2987"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:none"
d="m 17.716535,148.81888 159.448815,0 -10.62992,-3.54332"
id="path3757"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 17.716535,60.236198 c 6.484394,-6.437719 9.867912,-11.024065 17.716536,-10.629921 7.848624,0.394144 12.081982,10.544488 17.716535,10.629921 5.634553,0.08543 8.026167,-9.970094 17.716536,-10.629921 9.690369,-0.659827 15.13139,5.196517 17.716535,10.629921 l 17.716533,88.582682 c 0.24254,-9.7986 2.43977,-17.40295 17.71654,-17.71654 9.3354,0.36517 16.92556,4.05746 17.71653,17.71654 1.01915,-11.28051 7.17493,-16.91073 17.71654,-17.71654"
id="path4385"
inkscape:connector-curvature="0"
sodipodi:nodetypes="czzzccccc" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 70.866142,49.606277 53.149608,0"
id="path4387"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.63245553px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 35.433071,49.606277 14.173228,0"
id="path4389"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:none"
d="m 46.062992,28.346435 0,21.259842 3.543307,-10.629927"
id="path4391"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:none"
d="m 46.062992,77.952734 0,-17.716536"
id="path4575"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 46.062992,49.606277 0,10.629921"
id="path4759"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="24.80315"
y="74.409424"
id="text4761"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4763"
x="24.80315"
y="74.409424">Rp</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 88.582677,60.236198 0,46.062992"
id="path4765"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:none"
d="m 17.716535,102.75588 70.866142,0"
id="path4767"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="45.714287"
y="94.862183"
id="text5139"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5141"
x="45.714287"
y="94.862183">Fc</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 17.716535,148.81888 0,17.71653"
id="path5143"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 99.212598,113.3858 0,53.14961"
id="path5147"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:none"
d="m 99.212598,162.9921 -81.496063,0 10.629922,-3.54331"
id="path5149"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="50.714287"
y="175.57648"
id="text5519"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5521"
x="50.714287"
y="175.57648">Fs</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 70.866142,49.606277 92.125988,0"
id="path5523"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 99.212598,113.3858 63.779532,0"
id="path5525"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:none"
d="m 159.44882,113.3858 0,-63.779523 3.54331,10.629915"
id="path5527"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="165.71429"
y="86.647896"
id="text5897"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5899"
x="165.71429"
y="86.647896">As</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="17.716536"
y="14.173206"
id="text5901"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5903"
x="17.716536"
y="14.173206">K (dB)</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="167.5"
y="167.36218"
id="text5905"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5907"
x="167.5"
y="167.36218">F (Hz)</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="3.2142856"
y="152.00504"
id="text5909"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5911"
x="3.2142856"
y="152.00504">0</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 42.519685,60.236198 10.629921,0"
id="path5913"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.63245553px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 92.125986,49.606277 14.173234,0"
id="path4389-9"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:none"
d="m 102.75591,28.346435 0,21.259842 3.5433,-10.629927"
id="path4391-4"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:none"
d="m 102.75591,77.952734 0,-17.716536 3.5433,10.629916"
id="path4575-9"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 102.75591,49.606277 0,10.629921"
id="path4759-3"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="113.38583"
y="60.236198"
id="text4761-6"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4763-4"
x="113.38583"
y="60.236198">Ap</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 88.582677,60.236198 17.716533,0"
id="path5965"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 24.634124,93.775692 -10.629921,3.543307 10.629921,3.543311"
id="path6381"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 74.240424,100.86231 84.870345,97.318999 74.240424,93.775692"
id="path6383"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 38.807353,33.539472 42.35066,44.169393"
id="path6761"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 45.893967,65.429236 42.35066,54.799314 38.807353,65.429236"
id="path6763"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 14.004203,19.366243 10.460896,29.996165"
id="path7141"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 14.004203,157.55522 10.629921,3.54331"
id="path7519"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 84.870345,154.01191 10.629921,3.54331 -10.629921,3.54331"
id="path7521"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 173.45302,143.38199 162.8231,146.9253"
id="path7711"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 99.043573,54.799314 95.500266,65.429236"
id="path7901"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 99.043573,44.169393 95.500266,33.539472"
id="path8091"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 155.73649,44.169393 -3.54331,10.629921"
id="path8657"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 159.27979,97.318999 -3.5433,10.629921 -3.54331,-10.629921"
id="path8659"
inkscape:connector-curvature="0"
transform="translate(3.7123325,5.4368782)" />
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="180"><g fill="none"><g stroke-width=".981"><path stroke="#000" d="M17.224 146.777V25.097l3.476 10.43M17.224 146.777h156.45l-10.43-3.477"/><path stroke="red" d="M17.224 59.858c6.362-6.317 9.682-10.816 17.383-10.43S46.46 59.774 51.99 59.858c5.528.084 7.875-9.782 17.383-10.43s14.846 5.098 17.383 10.43l17.383 86.914c.238-9.614 2.393-17.075 17.383-17.383 9.16.358 16.607 3.98 17.383 17.383 1-11.068 7.04-16.592 17.383-17.383"/></g><g stroke="#000"><path stroke-width=".981" d="M69.372 49.428h52.148"/><path stroke-width=".621" d="M34.607 49.428h13.906"/><g stroke-width=".981"><path d="M45.036 28.569v20.859l3.476-10.43M45.036 77.24V59.859M45.036 49.428v10.43"/></g></g></g><text xml:space="preserve" x="27.979" y="78.817" stroke-width=".981" font-family="sans-serif" font-size="11.774" letter-spacing="0" style="line-height:0%" transform="translate(-3.802 -5.053)" word-spacing="0"><tspan x="27.979" y="78.817" style="line-height:1.25">Rp</tspan></text><path fill="none" stroke="#000" stroke-width=".981" d="M86.755 59.858v45.195M17.224 101.577h69.53"/><text xml:space="preserve" x="48.496" y="98.885" stroke-width=".981" font-family="sans-serif" font-size="11.774" letter-spacing="0" style="line-height:0%" transform="translate(-3.802 -5.053)" word-spacing="0"><tspan x="48.496" y="98.885" style="line-height:1.25">Fc</tspan></text><g fill="none" stroke="#000" stroke-width=".981"><path d="M17.224 146.777v17.383M97.188 112.007v52.148M97.188 160.677H17.227l10.43-3.477"/></g><text xml:space="preserve" x="53.402" y="178.079" stroke-width=".981" font-family="sans-serif" font-size="11.774" letter-spacing="0" style="line-height:0%" transform="translate(-3.802 -5.053)" word-spacing="0"><tspan x="53.402" y="178.079" style="line-height:1.25">Fs</tspan></text><g fill="none" stroke="#000" stroke-width=".981"><path d="M69.372 49.428h90.39M97.188 112.007h62.578M156.288 112.007V49.429l3.476 10.43"/></g><g stroke-width=".981" font-family="sans-serif" font-size="11.774" letter-spacing="0" word-spacing="0"><text xml:space="preserve" x="166.236" y="90.825" style="line-height:0%" transform="translate(-3.802 -5.053)"><tspan x="166.236" y="90.825" style="line-height:1.25">As</tspan></text><text xml:space="preserve" x="21.026" y="19.716" style="line-height:0%" transform="translate(-3.802 -5.053)"><tspan x="21.026" y="19.716" style="line-height:1.25">K (dB)</tspan></text><text xml:space="preserve" x="167.988" y="170.019" style="line-height:0%" transform="translate(-3.802 -5.053)"><tspan x="167.988" y="170.019" style="line-height:1.25">F (Hz)</tspan></text><text xml:space="preserve" x="6.797" y="154.951" style="line-height:0%" transform="translate(-3.802 -5.053)"><tspan x="6.797" y="154.951" style="line-height:1.25">0</tspan></text></g><g fill="none" stroke="#000"><path stroke-width=".981" d="M41.56 59.858h10.43"/><path stroke-width=".621" d="M90.232 49.428h13.906"/><g stroke-width=".981"><path d="M100.658 28.569v20.859l3.476-10.43M100.658 77.24V59.859l3.476 10.43M100.658 49.428v10.43"/></g></g><text xml:space="preserve" x="114.893" y="64.911" stroke-width=".981" font-family="sans-serif" font-size="11.774" letter-spacing="0" style="line-height:0%" transform="translate(-3.802 -5.053)" word-spacing="0"><tspan x="114.893" y="64.911" style="line-height:1.25">Ap</tspan></text><g fill="none" stroke="#000" stroke-width=".981"><path d="M86.755 59.858h17.383M27.654 98.097l-10.43 3.476 10.43 3.477M76.325 105.057l10.43-3.477-10.43-3.476M41.56 38.999l3.476 10.43M48.513 70.288l-3.477-10.43-3.477 10.43M17.224 25.092l-3.477 10.43M17.224 160.677l10.43 3.476M86.755 157.197l10.43 3.476-10.43 3.477M173.668 146.777l-10.43 3.476M100.658 59.858l-3.477 10.43M100.658 49.428l-3.477-10.43M156.288 49.428l-3.477 10.43M159.758 101.577l-3.477 10.43-3.476-10.43"/></g></svg>

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -235,7 +235,7 @@ void Filter::calcFirstOrder()
void Filter::createPartList(QStringList &lst) {
lst << QObject::tr("Part list");
lst << QString("%1%2%3%4%5%6%7%8%9").arg("Stage#",6)
lst << QStringLiteral("%1%2%3%4%5%6%7%8%9").arg("Stage#",6)
.arg("C1",12).arg("C2",12).arg("R1(kOhm)",10).arg("R2(kOhm)",10).arg("R3(kOhm)",10).arg("R4(kOhm)",10)
.arg("R5(kOhm)",10).arg("R6(kOhm)",10);
@ -244,7 +244,7 @@ void Filter::createPartList(QStringList &lst) {
double C1 = autoscaleCapacitor(stage.C1, suff1);
double C2 = autoscaleCapacitor(stage.C2, suff2);
lst << QString("%1%2%3%4%5%6%7%8%9%10%11")
lst << QStringLiteral("%1%2%3%4%5%6%7%8%9%10%11")
.arg(stage.N, 6)
.arg(C1, 10, 'f', 3)
.arg(suff1)
@ -283,13 +283,13 @@ void Filter::createFirstOrderComponentsHPF(QString &s,RC_elements stage,int dx)
{
QString suf;
double C1 = autoscaleCapacitor(stage.C1,suf);
s += QString("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(Nopamp+1).arg(270+dx);
s += QString("<GND * 1 %1 270 0 0 0 0>\n").arg(170+dx);
s += QString("<GND * 1 %1 370 0 0 0 0>\n").arg(220+dx);
s += QString("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+2).arg(220+dx).arg(stage.R2,0,'f',3);
s += QString("<R R%1 1 %2 240 -75 -26 1 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+1).arg(170+dx).arg(stage.R1,0,'f',3);
s += QString("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+3).arg(310+dx).arg(stage.R3,0,'f',3);
s += QString("<C C%1 1 %2 190 -26 -45 1 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(Nc+1).arg(100+dx).arg(C1,0,'f',3).arg(suf);
s += QStringLiteral("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(Nopamp+1).arg(270+dx);
s += QStringLiteral("<GND * 1 %1 270 0 0 0 0>\n").arg(170+dx);
s += QStringLiteral("<GND * 1 %1 370 0 0 0 0>\n").arg(220+dx);
s += QStringLiteral("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+2).arg(220+dx).arg(stage.R2,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 240 -75 -26 1 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+1).arg(170+dx).arg(stage.R1,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+3).arg(310+dx).arg(stage.R3,0,'f',3);
s += QStringLiteral("<C C%1 1 %2 190 -26 -45 1 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(Nc+1).arg(100+dx).arg(C1,0,'f',3).arg(suf);
}
@ -297,32 +297,32 @@ void Filter::createFirstOrderComponentsLPF(QString &s,RC_elements stage,int dx)
{
QString suf;
double C1 = autoscaleCapacitor(stage.C1,suf);
s += QString("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(Nopamp+1).arg(270+dx);
s += QString("<GND * 1 %1 270 0 0 0 0>\n").arg(170+dx);
s += QString("<GND * 1 %1 370 0 0 0 0>\n").arg(220+dx);
s += QString("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+2).arg(220+dx).arg(stage.R2,0,'f',3);
s += QString("<R R%1 1 %2 190 -75 -52 1 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+1).arg(100+dx).arg(stage.R1,0,'f',3);
s += QString("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+3).arg(310+dx).arg(stage.R3,0,'f',3);
s += QString("<C C%1 1 %2 240 26 -45 1 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(Nc+1).arg(170+dx).arg(C1,0,'f',3).arg(suf);
s += QStringLiteral("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(Nopamp+1).arg(270+dx);
s += QStringLiteral("<GND * 1 %1 270 0 0 0 0>\n").arg(170+dx);
s += QStringLiteral("<GND * 1 %1 370 0 0 0 0>\n").arg(220+dx);
s += QStringLiteral("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+2).arg(220+dx).arg(stage.R2,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 190 -75 -52 1 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+1).arg(100+dx).arg(stage.R1,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(Nr+3).arg(310+dx).arg(stage.R3,0,'f',3);
s += QStringLiteral("<C C%1 1 %2 240 26 -45 1 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(Nc+1).arg(170+dx).arg(C1,0,'f',3).arg(suf);
}
void Filter::createFirstOrderWires(QString &s, int dx, int y)
{
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx);
s += QString("<%1 190 %2 %3 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20).arg(y);
s += QString("<%1 %2 %3 %4 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(y).arg(dx-50).arg(y);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx);
s += QStringLiteral("<%1 190 %2 %3 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20).arg(y);
s += QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(y).arg(dx-50).arg(y);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(170+dx);
s += QString("<%1 160 %2 160 \"out\" %3 130 39 \"\">\n").arg(310+dx).arg(360+dx).arg(380+dx);
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(340+dx).arg(360+dx);
s += QString("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx);
s += QString("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(170+dx);
s += QString("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(170+dx);
s += QString("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(240+dx);
s += QString("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx);
s += QString("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(240+dx);
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(280+dx);
s += QString("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(170+dx);
s += QStringLiteral("<%1 160 %2 160 \"out\" %3 130 39 \"\">\n").arg(310+dx).arg(360+dx).arg(380+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(340+dx).arg(360+dx);
s += QStringLiteral("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx);
s += QStringLiteral("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(170+dx);
s += QStringLiteral("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(170+dx);
s += QStringLiteral("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(240+dx);
s += QStringLiteral("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx);
s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(240+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(280+dx);
s += QStringLiteral("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx);
}

View File

@ -89,7 +89,7 @@ int main(int argc, char *argv[])
QString Lang = QucsSettings.Language;
if(Lang.isEmpty())
Lang = QString(QLocale::system().name());
tor.load( QString("qucs_") + Lang, LangDir);
static_cast<void>(tor.load( QStringLiteral("qucs_") + Lang, LangDir));
a.installTranslator( &tor );
QucsActiveFilter *w = new QucsActiveFilter();

View File

@ -59,24 +59,24 @@ void MFBfilter::createLowPassSchematic(QString &s)
s += PACKAGE_VERSION;
s += ">\n";
s += "<Components>\n";
s += QString("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0);
s += QStringLiteral("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0);
s += "<.DC DC1 1 60 440 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n";
s += "<Eqn Eqn1 1 610 450 -30 14 0 0 \"K=dB(out.v/in.v)\" 1 \"yes\" 0>\n";
s += QString("<Vac V1 1 %1 330 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(70+dx);
s += QString("<GND * 1 %1 360 0 0 0 0>\n").arg(70+dx);
s += QStringLiteral("<Vac V1 1 %1 330 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(70+dx);
s += QStringLiteral("<GND * 1 %1 360 0 0 0 0>\n").arg(70+dx);
for (int i=1; i<=N2ord; i++) {
stage = Sections.at(i-1);
QString suffix1, suffix2;
double C1 = autoscaleCapacitor(stage.C1,suffix1);
double C2 = autoscaleCapacitor(stage.C2,suffix2);
s += QString("<GND * 1 %1 380 0 0 0 0>\n").arg(200+dx);
s += QString("<GND * 1 %1 350 0 0 0 0>\n").arg(360+dx);
s += QString("<OpAmp OP%1 1 %2 270 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(1+(i-1)*Nop1).arg(390+dx);
s += QString("<C C%1 1 %2 350 17 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nc1).arg(200+dx).arg(C2,0,'f',3).arg(suffix2);
s += QString("<C C%1 1 %2 180 17 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(320+dx).arg(C1,0,'f',3).arg(suffix1);
s += QString("<R R%1 1 %2 180 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(200+dx).arg(stage.R1,0,'f',3);
s += QString("<R R%1 1 %2 250 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(150+dx).arg(stage.R2,0,'f',3);
s += QString("<R R%1 1 %2 250 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*Nr1).arg(250+dx).arg(stage.R3,0,'f',3);
s += QStringLiteral("<GND * 1 %1 380 0 0 0 0>\n").arg(200+dx);
s += QStringLiteral("<GND * 1 %1 350 0 0 0 0>\n").arg(360+dx);
s += QStringLiteral("<OpAmp OP%1 1 %2 270 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(1+(i-1)*Nop1).arg(390+dx);
s += QStringLiteral("<C C%1 1 %2 350 17 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nc1).arg(200+dx).arg(C2,0,'f',3).arg(suffix2);
s += QStringLiteral("<C C%1 1 %2 180 17 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(320+dx).arg(C1,0,'f',3).arg(suffix1);
s += QStringLiteral("<R R%1 1 %2 180 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(200+dx).arg(stage.R1,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 250 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(150+dx).arg(stage.R2,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 250 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*Nr1).arg(250+dx).arg(stage.R3,0,'f',3);
dx += 510;
}
@ -91,26 +91,26 @@ void MFBfilter::createLowPassSchematic(QString &s)
s += "<70 250 70 300 \"\" 0 0 0 \"\">\n";
for (int i=1; i<=N2ord; i++) {
if (i!=1) {
s += QString("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx);
s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx-40).arg(120+dx);
s += QStringLiteral("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx);
s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx-40).arg(120+dx);
}
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx);
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx);
s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QString("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QString("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx);
s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx);
s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx);
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx);
s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx);
s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx);
s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QStringLiteral("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QStringLiteral("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx);
s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx);
s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx);
s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx);
s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx);
if ((2*i)==order) {
s += QString("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx);
s += QStringLiteral("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx);
} else {
s += QString("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx);
s += QStringLiteral("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx);
}
dx += 510;
}
@ -133,24 +133,24 @@ void MFBfilter::createHighPassSchematic(QString &s)
s += PACKAGE_VERSION;
s += ">\n";
s += "<Components>\n";
s += QString("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0);
s += QStringLiteral("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0);
s += "<.DC DC1 1 60 440 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n";
s += "<Eqn Eqn1 1 610 450 -30 14 0 0 \"K=dB(out.v/in.v)\" 1 \"yes\" 0>\n";
s += QString("<Vac V1 1 %1 330 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(70+dx);
s += QString("<GND * 1 %1 360 0 0 0 0>\n").arg(70+dx);
s += QStringLiteral("<Vac V1 1 %1 330 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(70+dx);
s += QStringLiteral("<GND * 1 %1 360 0 0 0 0>\n").arg(70+dx);
for (int i=1; i<=N2ord; i++) {
stage = Sections.at(i-1);
QString suffix1, suffix2;
double C1 = autoscaleCapacitor(stage.C1,suffix1);
double C2 = autoscaleCapacitor(stage.C2,suffix2);
s += QString("<GND * 1 %1 380 0 0 0 0>\n").arg(200+dx);
s += QString("<GND * 1 %1 350 0 0 0 0>\n").arg(360+dx);
s += QString("<OpAmp OP%1 1 %2 270 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(1+(i-1)*Nop1).arg(390+dx);
s += QString("<R R%1 1 %2 350 17 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(200+dx).arg(stage.R1,0,'f',3);
s += QString("<R R%1 1 %2 180 17 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(320+dx).arg(stage.R2,0,'f',3);
s += QString("<C C%1 1 %2 180 15 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(200+dx).arg(C1,0,'f',3).arg(suffix1);
s += QString("<C C%1 1 %2 250 -26 15 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nc1).arg(150+dx).arg(C2,0,'f',3).arg(suffix2);
s += QString("<C C%1 1 %2 250 -26 15 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(3+(i-1)*Nc1).arg(250+dx).arg(C1,0,'f',3).arg(suffix1);
s += QStringLiteral("<GND * 1 %1 380 0 0 0 0>\n").arg(200+dx);
s += QStringLiteral("<GND * 1 %1 350 0 0 0 0>\n").arg(360+dx);
s += QStringLiteral("<OpAmp OP%1 1 %2 270 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(1+(i-1)*Nop1).arg(390+dx);
s += QStringLiteral("<R R%1 1 %2 350 17 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(200+dx).arg(stage.R1,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 180 17 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(320+dx).arg(stage.R2,0,'f',3);
s += QStringLiteral("<C C%1 1 %2 180 15 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(200+dx).arg(C1,0,'f',3).arg(suffix1);
s += QStringLiteral("<C C%1 1 %2 250 -26 15 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nc1).arg(150+dx).arg(C2,0,'f',3).arg(suffix2);
s += QStringLiteral("<C C%1 1 %2 250 -26 15 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(3+(i-1)*Nc1).arg(250+dx).arg(C1,0,'f',3).arg(suffix1);
dx += 510;
}
@ -165,26 +165,26 @@ void MFBfilter::createHighPassSchematic(QString &s)
s += "<70 250 70 300 \"\" 0 0 0 \"\">\n";
for (int i=1; i<=N2ord; i++) {
if (i!=1) {
s += QString("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx);
s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx-40).arg(120+dx);
s += QStringLiteral("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx);
s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx-40).arg(120+dx);
}
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx);
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx);
s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QString("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QString("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx);
s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx);
s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx);
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx);
s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx);
s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx);
s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QStringLiteral("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QStringLiteral("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx);
s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx);
s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx);
s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx);
s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx);
if ((2*i)==order) {
s += QString("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx);
s += QStringLiteral("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx);
} else {
s += QString("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx);
s += QStringLiteral("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx);
}
dx += 510;
}
@ -205,24 +205,24 @@ void MFBfilter::createBandPassSchematic(QString &s)
s += PACKAGE_VERSION;
s += ">\n";
s += "<Components>\n";
s += QString("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((Fu+1000)/1000.0);
s += QStringLiteral("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((Fu+1000)/1000.0);
s += "<.DC DC1 1 60 440 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n";
s += "<Eqn Eqn1 1 610 450 -30 14 0 0 \"K=dB(out.v/in.v)\" 1 \"yes\" 0>\n";
s += QString("<Vac V1 1 %1 330 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(70+dx);
s += QString("<GND * 1 %1 360 0 0 0 0>\n").arg(70+dx);
s += QStringLiteral("<Vac V1 1 %1 330 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(70+dx);
s += QStringLiteral("<GND * 1 %1 360 0 0 0 0>\n").arg(70+dx);
for (int i=1; i<=Sections.count(); i++) {
stage = Sections.at(i-1);
QString suffix1, suffix2;
double C1 = autoscaleCapacitor(stage.C1,suffix1);
double C2 = autoscaleCapacitor(stage.C2,suffix2);
s += QString("<GND * 1 %1 380 0 0 0 0>\n").arg(200+dx);
s += QString("<GND * 1 %1 350 0 0 0 0>\n").arg(360+dx);
s += QString("<OpAmp OP%1 1 %2 270 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(1+(i-1)*Nop1).arg(390+dx);
s += QString("<C C%1 1 %2 180 15 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(200+dx).arg(C1,0,'f',3).arg(suffix1);
s += QString("<C C%1 1 %2 250 -26 15 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nc1).arg(250+dx).arg(C2,0,'f',3).arg(suffix2);
s += QString("<R R%1 1 %2 250 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(150+dx).arg(stage.R1,0,'f',3);
s += QString("<R R%1 1 %2 350 17 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(200+dx).arg(stage.R2,0,'f',3);
s += QString("<R R%1 1 %2 180 17 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*Nr1).arg(320+dx).arg(stage.R3,0,'f',3);
s += QStringLiteral("<GND * 1 %1 380 0 0 0 0>\n").arg(200+dx);
s += QStringLiteral("<GND * 1 %1 350 0 0 0 0>\n").arg(360+dx);
s += QStringLiteral("<OpAmp OP%1 1 %2 270 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(1+(i-1)*Nop1).arg(390+dx);
s += QStringLiteral("<C C%1 1 %2 180 15 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(200+dx).arg(C1,0,'f',3).arg(suffix1);
s += QStringLiteral("<C C%1 1 %2 250 -26 15 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nc1).arg(250+dx).arg(C2,0,'f',3).arg(suffix2);
s += QStringLiteral("<R R%1 1 %2 250 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(150+dx).arg(stage.R1,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 350 17 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(200+dx).arg(stage.R2,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 180 17 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*Nr1).arg(320+dx).arg(stage.R3,0,'f',3);
dx += 400;
}
@ -234,26 +234,26 @@ void MFBfilter::createBandPassSchematic(QString &s)
s += "<70 250 70 300 \"\" 0 0 0 \"\">\n";
for (int i=1; i<=Sections.count(); i++) {
if (i!=1) {
s += QString("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx);
s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx+70).arg(120+dx);
s += QStringLiteral("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx);
s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx+70).arg(120+dx);
}
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx);
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx);
s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QString("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QString("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx);
s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx);
s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx);
s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx);
s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx);
s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx);
s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QStringLiteral("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QStringLiteral("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx);
s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx);
s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx);
s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx);
s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx);
s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx);
s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx);
if (i==order) {
s += QString("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx);
s += QStringLiteral("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx);
} else {
s += QString("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx);
s += QStringLiteral("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx);
}
dx += 400;
}

View File

@ -222,8 +222,9 @@ QucsActiveFilter::QucsActiveFilter(QWidget *parent)
QSize sz;
QString s1 = ":/images/bitmaps/AFR.svg";
imgAFR = new QSvgWidget(s1);
imgAFR->setStyleSheet("background-color: white;");
sz = gpbPar->size(); // take left box size as reference size
sz *= 0.6;
sz *= 0.75;
imgAFR->setFixedSize(sz);
vl1->addWidget(imgAFR);
vl1->setAlignment(imgAFR, Qt::AlignHCenter);
@ -234,6 +235,7 @@ QucsActiveFilter::QucsActiveFilter(QWidget *parent)
gpbSCH->setLayout(vl2);
s1 = ":/images/bitmaps/cauer.svg";
sch_pic = new QSvgWidget(s1);
sch_pic->setStyleSheet("background-color: white;");
sz = gpbFunc->size(); // take lefbox size as reference size
sz *= 0.95;
sch_pic->setFixedSize(sz);

View File

@ -267,25 +267,25 @@ void SallenKey::createHighPassSchematic(QString &s)
s += PACKAGE_VERSION;
s += ">\n";
s += "<Components>\n";
s += QString("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0);
s += QStringLiteral("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0);
s += "<.DC DC1 1 280 410 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n";
s += "<Eqn Eqn1 1 270 540 -30 14 0 0 \"K=(out.v/in.v)\" 1 \"yes\" 0>\n";
s += QString("<Vac V1 1 %1 260 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(20+dx);
s += QString("<GND * 1 %1 290 0 0 0 0>\n").arg(20+dx);
s += QStringLiteral("<Vac V1 1 %1 260 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(20+dx);
s += QStringLiteral("<GND * 1 %1 290 0 0 0 0>\n").arg(20+dx);
for (int i=1; i<=N2ord; i++) {
stage = Sections.at(i-1);
QString suffix1, suffix2;
double C1 = autoscaleCapacitor(stage.C1,suffix1);
double C2 = autoscaleCapacitor(stage.C2,suffix2);
s += QString("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(stage.N).arg(370+dx);
s += QString("<GND * 1 %1 270 0 0 0 0>\n").arg(270+dx);
s += QString("<GND * 1 %1 370 0 0 0 0>\n").arg(320+dx);
s += QString("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*N_R).arg(320+dx).arg(stage.R3,0,'f',3);
s += QString("<C C%1 1 %2 190 -26 -45 1 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*N_C).arg(200+dx).arg(C2,0,'f',3).arg(suffix2);
s += QString("<C C%1 1 %2 190 -26 17 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*N_C).arg(100+dx).arg(C1,0,'f',3).arg(suffix1);
s += QString("<R R%1 1 %2 240 -75 -26 1 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*N_R).arg(270+dx).arg(stage.R2,0,'f',3);
s += QString("<R R%1 1 %2 70 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*N_R).arg(330+dx).arg(stage.R1,0,'f',3);
s += QString("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(4+(i-1)*N_R).arg(410+dx).arg(stage.R4,0,'f',3);
s += QStringLiteral("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(stage.N).arg(370+dx);
s += QStringLiteral("<GND * 1 %1 270 0 0 0 0>\n").arg(270+dx);
s += QStringLiteral("<GND * 1 %1 370 0 0 0 0>\n").arg(320+dx);
s += QStringLiteral("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*N_R).arg(320+dx).arg(stage.R3,0,'f',3);
s += QStringLiteral("<C C%1 1 %2 190 -26 -45 1 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*N_C).arg(200+dx).arg(C2,0,'f',3).arg(suffix2);
s += QStringLiteral("<C C%1 1 %2 190 -26 17 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*N_C).arg(100+dx).arg(C1,0,'f',3).arg(suffix1);
s += QStringLiteral("<R R%1 1 %2 240 -75 -26 1 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*N_R).arg(270+dx).arg(stage.R2,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 70 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*N_R).arg(330+dx).arg(stage.R1,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(4+(i-1)*N_R).arg(410+dx).arg(stage.R4,0,'f',3);
dx += 510;
}
@ -296,35 +296,35 @@ void SallenKey::createHighPassSchematic(QString &s)
s += "</Components>\n";
s += "<Wires>\n";
dx = 0;
s += QString("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx);
s += QString("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx);
s += QStringLiteral("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx);
s += QStringLiteral("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx);
for (int i=1; i<=N2ord; i++) {
if (i!=1) {
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx);
s += QString("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20);
s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx);
s += QStringLiteral("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20);
s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50);
}
s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx);
s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx);
if ((2*i)==order) {
s += QString("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx);
s += QStringLiteral("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx);
} else {
s += QString("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
s += QStringLiteral("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
}
s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx);
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx);
s += QString("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
s += QString("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx);
s += QString("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx);
s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx);
s += QString("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QString("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx);
s += QString("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx);
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx);
s += QString("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx);
s += QStringLiteral("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
s += QStringLiteral("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx);
s += QStringLiteral("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx);
s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx);
s += QStringLiteral("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QStringLiteral("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx);
s += QStringLiteral("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx);
s += QStringLiteral("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
dx += 510;
}
@ -348,26 +348,26 @@ void SallenKey::createLowPassSchematic(QString &s)
s += PACKAGE_VERSION;
s += ">\n";
s += "<Components>\n";
s += QString("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0);
s += QStringLiteral("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0);
s += "<.DC DC1 1 280 410 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n";
s += "<Eqn Eqn1 1 270 540 -30 14 0 0 \"K=(out.v/in.v)\" 1 \"yes\" 0>\n";
s += QString("<Vac V1 1 %1 260 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(20+dx);
s += QString("<GND * 1 %1 290 0 0 0 0>\n").arg(20+dx);
s += QStringLiteral("<Vac V1 1 %1 260 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(20+dx);
s += QStringLiteral("<GND * 1 %1 290 0 0 0 0>\n").arg(20+dx);
for (int i=1; i<=N2ord; i++) {
stage = Sections.at(i-1);
//qDebug()<<stage.N;
QString suffix1, suffix2;
double C1 = autoscaleCapacitor(stage.C1,suffix1);
double C2 = autoscaleCapacitor(stage.C2,suffix2);
s += QString("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(stage.N).arg(370+dx);
s += QString("<GND * 1 %1 270 0 0 0 0>\n").arg(270+dx);
s += QString("<GND * 1 %1 370 0 0 0 0>\n").arg(320+dx);
s += QString("<C C%1 1 %2 70 -26 15 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*N_C).arg(330+dx).arg(C2,0,'f',3).arg(suffix2);
s += QString("<C C%1 1 %2 240 -75 -26 1 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*N_C).arg(270+dx).arg(C1,0,'f',3).arg(suffix1);
s += QString("<R R%1 1 %2 190 -26 -45 1 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*N_R).arg(200+dx).arg(stage.R2,0,'f',3);
s += QString("<R R%1 1 %2 190 -26 17 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*N_R).arg(100+dx).arg(stage.R1,0,'f',3);
s += QString("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*N_R).arg(320+dx).arg(stage.R3,0,'f',3);
s += QString("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(4+(i-1)*N_R).arg(410+dx).arg(stage.R4,0,'f',3);
s += QStringLiteral("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(stage.N).arg(370+dx);
s += QStringLiteral("<GND * 1 %1 270 0 0 0 0>\n").arg(270+dx);
s += QStringLiteral("<GND * 1 %1 370 0 0 0 0>\n").arg(320+dx);
s += QStringLiteral("<C C%1 1 %2 70 -26 15 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*N_C).arg(330+dx).arg(C2,0,'f',3).arg(suffix2);
s += QStringLiteral("<C C%1 1 %2 240 -75 -26 1 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*N_C).arg(270+dx).arg(C1,0,'f',3).arg(suffix1);
s += QStringLiteral("<R R%1 1 %2 190 -26 -45 1 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*N_R).arg(200+dx).arg(stage.R2,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 190 -26 17 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*N_R).arg(100+dx).arg(stage.R1,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*N_R).arg(320+dx).arg(stage.R3,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(4+(i-1)*N_R).arg(410+dx).arg(stage.R4,0,'f',3);
dx += 510;
}
@ -378,35 +378,35 @@ void SallenKey::createLowPassSchematic(QString &s)
s += "</Components>\n";
s += "<Wires>\n";
dx = 0;
s += QString("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx);
s += QString("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx);
s += QStringLiteral("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx);
s += QStringLiteral("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx);
for (int i=1; i<=N2ord; i++) {
if (i!=1) {
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx);
s += QString("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20);
s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx);
s += QStringLiteral("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20);
s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50);
}
s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx);
s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx);
if ((2*i)==order) {
s += QString("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx);
s += QStringLiteral("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx);
} else {
s += QString("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
s += QStringLiteral("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
}
s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx);
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx);
s += QString("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
s += QString("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx);
s += QString("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx);
s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx);
s += QString("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QString("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx);
s += QString("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx);
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx);
s += QString("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx);
s += QStringLiteral("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
s += QStringLiteral("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx);
s += QStringLiteral("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx);
s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx);
s += QStringLiteral("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QStringLiteral("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx);
s += QStringLiteral("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx);
s += QStringLiteral("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
dx += 510;
}
@ -426,28 +426,28 @@ void SallenKey::createBandPassSchematic(QString &s)
s += PACKAGE_VERSION;
s += ">\n";
s += "<Components>\n";
s += QString("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((Fu+1000)/1000.0);
s += QStringLiteral("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((Fu+1000)/1000.0);
s += "<.DC DC1 1 280 410 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n";
s += "<Eqn Eqn1 1 270 540 -30 14 0 0 \"K=(out.v/in.v)\" 1 \"yes\" 0>\n";
s += QString("<Vac V1 1 %1 260 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(20+dx);
s += QString("<GND * 1 %1 290 0 0 0 0>\n").arg(20+dx);
s += QStringLiteral("<Vac V1 1 %1 260 18 -26 0 1 \"1 V\" 1 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n").arg(20+dx);
s += QStringLiteral("<GND * 1 %1 290 0 0 0 0>\n").arg(20+dx);
for (int i=1; i<=Sections.count(); i++) {
stage = Sections.at(i-1);
//qDebug()<<stage.N;
QString suffix1, suffix2;
double C1 = autoscaleCapacitor(stage.C1,suffix1);
double C2 = autoscaleCapacitor(stage.C2,suffix2);
s += QString("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(stage.N).arg(370+dx);
s += QString("<GND * 1 %1 270 0 0 0 0>\n").arg(270+dx);
s += QString("<GND * 1 %1 370 0 0 0 0>\n").arg(320+dx);
s += QString("<GND * 1 %1 310 0 0 0 0>\n").arg(150+dx);
s += QString("<C C%1 1 %2 280 17 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(150+dx).arg(C1,0,'f',3).arg(suffix1);
s += QString("<C C%1 1 %2 190 -26 -45 1 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nr1).arg(200+dx).arg(C2,0,'f',3).arg(suffix2);
s += QString("<R R%1 1 %2 190 -26 17 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(100+dx).arg(stage.R1,0,'f',3);
s += QString("<R R%1 1 %2 70 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(330+dx).arg(stage.R2,0,'f',3);
s += QString("<R R%1 1 %2 240 -75 -26 1 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*Nr1).arg(270+dx).arg(stage.R3,0,'f',3);
s += QString("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(4+(i-1)*Nr1).arg(320+dx).arg(stage.R4,0,'f',3);
s += QString("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(5+(i-1)*Nr1).arg(410+dx).arg(stage.R4,0,'f',3);
s += QStringLiteral("<OpAmp OP%1 1 %2 160 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(stage.N).arg(370+dx);
s += QStringLiteral("<GND * 1 %1 270 0 0 0 0>\n").arg(270+dx);
s += QStringLiteral("<GND * 1 %1 370 0 0 0 0>\n").arg(320+dx);
s += QStringLiteral("<GND * 1 %1 310 0 0 0 0>\n").arg(150+dx);
s += QStringLiteral("<C C%1 1 %2 280 17 -26 0 1 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(150+dx).arg(C1,0,'f',3).arg(suffix1);
s += QStringLiteral("<C C%1 1 %2 190 -26 -45 1 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nr1).arg(200+dx).arg(C2,0,'f',3).arg(suffix2);
s += QStringLiteral("<R R%1 1 %2 190 -26 17 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(100+dx).arg(stage.R1,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 70 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(330+dx).arg(stage.R2,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 240 -75 -26 1 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*Nr1).arg(270+dx).arg(stage.R3,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 340 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(4+(i-1)*Nr1).arg(320+dx).arg(stage.R4,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 260 -26 15 1 2 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(5+(i-1)*Nr1).arg(410+dx).arg(stage.R4,0,'f',3);
dx += 510;
}
@ -455,36 +455,36 @@ void SallenKey::createBandPassSchematic(QString &s)
s += "</Components>\n";
s += "<Wires>\n";
dx = 0;
s += QString("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx);
s += QString("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx);
s += QStringLiteral("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx);
s += QStringLiteral("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx);
for (int i=1; i<=Sections.count(); i++) {
if (i!=1) {
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx);
s += QString("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20);
s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx);
s += QStringLiteral("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20);
s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50);
}
s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx);
s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx);
if (i==order) {
s += QString("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx);
s += QStringLiteral("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx);
} else {
s += QString("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
s += QStringLiteral("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
}
s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx);
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx);
s += QString("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
s += QString("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx);
s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx);
s += QString("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx);
s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx);
s += QString("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QString("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx);
s += QString("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx);
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx);
s += QString("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QString("<%1 190 %2 250 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx);
s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx);
s += QStringLiteral("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx);
s += QStringLiteral("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx);
s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx);
s += QStringLiteral("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx);
s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx);
s += QStringLiteral("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx);
s += QStringLiteral("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx);
s += QStringLiteral("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx);
s += QStringLiteral("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx);
s += QStringLiteral("<%1 190 %2 250 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx);
dx += 510;
}

View File

@ -318,7 +318,7 @@ void SchCauer::createGenericSchematic(QString &s)
s += "<Vac V1 1 80 290 18 -26 0 1 \"1 V\" 0 \"1 kHz\" 0 \"0\" 0 \"0\" 0>\n";
s += "<.DC DC1 1 40 510 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n";
s += "<Eqn Eqn1 1 640 520 -30 14 0 0 \"K=dB(out.v/in.v)\" 1 \"yes\" 0>\n";
s += QString("<.AC AC1 1 320 510 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"1001\" 1 \"no\" 0>\n").arg(Fac);
s += QStringLiteral("<.AC AC1 1 320 510 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"1001\" 1 \"no\" 0>\n").arg(Fac);
s += "<GND * 1 80 320 0 0 0 0>\n";
for (int i=1; i<=N2ord; i++) {
@ -326,23 +326,23 @@ void SchCauer::createGenericSchematic(QString &s)
QString suffix1, suffix2;
double C1 = autoscaleCapacitor(stage.C1,suffix1);
double C2 = autoscaleCapacitor(stage.C2,suffix2);
s += QString("<OpAmp OP%1 1 %2 240 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(1+(i-1)*Nop1).arg(270+dx);
s += QString("<OpAmp OP%1 1 %2 400 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(2+(i-1)*Nop1).arg(300+dx);
s += QString("<OpAmp OP%1 1 %2 260 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(3+(i-1)*Nop1).arg(560+dx);
s += QString("<C C%1 1 %2 150 -26 17 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(330+dx).arg(C1,0,'f',3).arg(suffix1);
s += QString("<C C%1 1 %2 400 -26 17 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nc1).arg(450+dx).arg(C2,0,'f',3).arg(suffix2);
s += QString("<R R%1 1 %2 220 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(180+dx).arg(stage.R1,0,'f',3);
s += QString("<R R%1 1 %2 240 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(410+dx).arg(stage.R2,0,'f',3);
s += QString("<R R%1 1 %2 110 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*Nr1).arg(440+dx).arg(stage.R3,0,'f',3);
s += QString("<R R%1 1 %2 320 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(4+(i-1)*Nr1).arg(360+dx).arg(stage.R4,0,'f',3);
s += QString("<R R%1 1 %2 380 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(5+(i-1)*Nr1).arg(190+dx).arg(stage.R5,0,'f',3);
s += QString("<GND * 1 %1 290 0 0 0 0>\n").arg(240+dx);
s += QString("<GND * 1 %1 440 0 0 0 0>\n").arg(250+dx);
s += QStringLiteral("<OpAmp OP%1 1 %2 240 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(1+(i-1)*Nop1).arg(270+dx);
s += QStringLiteral("<OpAmp OP%1 1 %2 400 -26 -70 1 0 \"1e6\" 1 \"15 V\" 0>\n").arg(2+(i-1)*Nop1).arg(300+dx);
s += QStringLiteral("<OpAmp OP%1 1 %2 260 -26 42 0 0 \"1e6\" 1 \"15 V\" 0>\n").arg(3+(i-1)*Nop1).arg(560+dx);
s += QStringLiteral("<C C%1 1 %2 150 -26 17 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(1+(i-1)*Nc1).arg(330+dx).arg(C1,0,'f',3).arg(suffix1);
s += QStringLiteral("<C C%1 1 %2 400 -26 17 0 0 \"%3%4\" 1 \"\" 0 \"neutral\" 0>\n").arg(2+(i-1)*Nc1).arg(450+dx).arg(C2,0,'f',3).arg(suffix2);
s += QStringLiteral("<R R%1 1 %2 220 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(1+(i-1)*Nr1).arg(180+dx).arg(stage.R1,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 240 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(2+(i-1)*Nr1).arg(410+dx).arg(stage.R2,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 110 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(3+(i-1)*Nr1).arg(440+dx).arg(stage.R3,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 320 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(4+(i-1)*Nr1).arg(360+dx).arg(stage.R4,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 380 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(5+(i-1)*Nr1).arg(190+dx).arg(stage.R5,0,'f',3);
s += QStringLiteral("<GND * 1 %1 290 0 0 0 0>\n").arg(240+dx);
s += QStringLiteral("<GND * 1 %1 440 0 0 0 0>\n").arg(250+dx);
if ((ftype==Filter::BandPass)||(ftype==Filter::BandStop)) {
s += QString("<GND * 1 %1 470 0 0 0 0>\n").arg(500+dx);
s += QString("<R R%1 1 %2 370 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(6+(i-1)*Nr1).arg(570+dx).arg(stage.R6,0,'f',3);
s += QString("<R R%1 1 %2 440 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(7+(i+1)*Nr1).arg(500+dx).arg(stage.R6,0,'f',3);
s += QStringLiteral("<GND * 1 %1 470 0 0 0 0>\n").arg(500+dx);
s += QStringLiteral("<R R%1 1 %2 370 -26 15 0 0 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(6+(i-1)*Nr1).arg(570+dx).arg(stage.R6,0,'f',3);
s += QStringLiteral("<R R%1 1 %2 440 15 -26 0 1 \"%3k\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"european\" 0>\n").arg(7+(i+1)*Nr1).arg(500+dx).arg(stage.R6,0,'f',3);
}
dx += 580;
@ -369,32 +369,32 @@ void SchCauer::createGenericSchematic(QString &s)
for (int i=1; i<=N2ord; i++) {
if (i!=1) {
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(dx+30).arg(140+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(dx+30).arg(140+dx);
}
s += QString("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(210+dx).arg(220+dx);
s += QString("<%1 280 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(500+dx);
s += QString("<%1 280 %2 280 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(530+dx);
s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(600+dx).arg(610+dx);
s += QString("<%1 260 %2 370 \"\" 0 0 0 \"\">\n").arg(610+dx).arg(610+dx);
s += QStringLiteral("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(210+dx).arg(220+dx);
s += QStringLiteral("<%1 280 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(500+dx);
s += QStringLiteral("<%1 280 %2 280 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(530+dx);
s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(600+dx).arg(610+dx);
s += QStringLiteral("<%1 260 %2 370 \"\" 0 0 0 \"\">\n").arg(610+dx).arg(610+dx);
if ((ftype==Filter::BandPass)||(ftype==Filter::BandStop)) {
s += QString("<%1 370 %2 410 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(500+dx);
s += QString("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(600+dx).arg(610+dx);
s += QString("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(540+dx);
s += QStringLiteral("<%1 370 %2 410 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(500+dx);
s += QStringLiteral("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(600+dx).arg(610+dx);
s += QStringLiteral("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(540+dx);
} else {
s += QString("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(610+dx);
s += QStringLiteral("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(610+dx);
}
s += QString("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(480+dx);
s += QString("<%1 400 %2 400 \"\" 0 0 0 \"\">\n").arg(340+dx).arg(420+dx);
s += QString("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(260+dx);
s += QString("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(270+dx);
s += QString("<%1 150 %2 220 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx);
s += QString("<%1 150 %2 150 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(300+dx);
s += QString("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(310+dx).arg(380+dx);
s += QString("<%1 260 %2 290 \"\" 0 0 0 \"\">\n").arg(240+dx).arg(240+dx);
s += QString("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(240+dx);
s += QString("<%1 420 %2 420 \"\" 0 0 0 \"\">\n").arg(250+dx).arg(270+dx);
s += QString("<%1 420 %2 440 \"\" 0 0 0 \"\">\n").arg(250+dx).arg(250+dx);
s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(480+dx);
s += QStringLiteral("<%1 400 %2 400 \"\" 0 0 0 \"\">\n").arg(340+dx).arg(420+dx);
s += QStringLiteral("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(260+dx);
s += QStringLiteral("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(270+dx);
s += QStringLiteral("<%1 150 %2 220 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx);
s += QStringLiteral("<%1 150 %2 150 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(300+dx);
s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(310+dx).arg(380+dx);
s += QStringLiteral("<%1 260 %2 290 \"\" 0 0 0 \"\">\n").arg(240+dx).arg(240+dx);
s += QStringLiteral("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(240+dx);
s += QStringLiteral("<%1 420 %2 420 \"\" 0 0 0 \"\">\n").arg(250+dx).arg(270+dx);
s += QStringLiteral("<%1 420 %2 440 \"\" 0 0 0 \"\">\n").arg(250+dx).arg(250+dx);
int n;
if ((ftype==Filter::BandPass)||(ftype==Filter::BandStop)) {
@ -403,25 +403,25 @@ void SchCauer::createGenericSchematic(QString &s)
n = 2*i;
}
if (n==order) {
s += QString("<%1 110 %2 260 \"out\" %3 160 101 \"\">\n").arg(610+dx).arg(610+dx).arg(540+dx);
s += QStringLiteral("<%1 110 %2 260 \"out\" %3 160 101 \"\">\n").arg(610+dx).arg(610+dx).arg(540+dx);
} else {
s += QString("<%1 110 %2 260 \"\" 0 0 0 \"\">\n").arg(610+dx).arg(610+dx);
s += QStringLiteral("<%1 110 %2 260 \"\" 0 0 0 \"\">\n").arg(610+dx).arg(610+dx);
}
s += QString("<%1 110 %2 110 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(610+dx);
s += QString("<%1 110 %2 150 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx);
s += QString("<%1 110 %2 110 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(410+dx);
s += QString("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(150+dx);
s += QString("<%1 220 %2 260 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(140+dx);
s += QString("<%1 260 %2 380 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(140+dx);
s += QString("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(160+dx);
s += QString("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(480+dx).arg(530+dx);
s += QString("<%1 240 %2 400 \"\" 0 0 0 \"\">\n").arg(480+dx).arg(480+dx);
s += QString("<%1 320 %2 400 \"\" 0 0 0 \"\">\n").arg(420+dx).arg(420+dx);
s += QString("<%1 320 %2 320 \"\" 0 0 0 \"\">\n").arg(390+dx).arg(420+dx);
s += QString("<%1 320 %2 380 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(260+dx);
s += QString("<%1 320 %2 320 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(330+dx);
s += QString("<%1 150 %2 150 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(380+dx);
s += QString("<%1 150 %2 240 \"\" 0 0 0 \"\">\n").arg(380+dx).arg(380+dx);
s += QStringLiteral("<%1 110 %2 110 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(610+dx);
s += QStringLiteral("<%1 110 %2 150 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx);
s += QStringLiteral("<%1 110 %2 110 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(410+dx);
s += QStringLiteral("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(150+dx);
s += QStringLiteral("<%1 220 %2 260 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(140+dx);
s += QStringLiteral("<%1 260 %2 380 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(140+dx);
s += QStringLiteral("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(160+dx);
s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(480+dx).arg(530+dx);
s += QStringLiteral("<%1 240 %2 400 \"\" 0 0 0 \"\">\n").arg(480+dx).arg(480+dx);
s += QStringLiteral("<%1 320 %2 400 \"\" 0 0 0 \"\">\n").arg(420+dx).arg(420+dx);
s += QStringLiteral("<%1 320 %2 320 \"\" 0 0 0 \"\">\n").arg(390+dx).arg(420+dx);
s += QStringLiteral("<%1 320 %2 380 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(260+dx);
s += QStringLiteral("<%1 320 %2 320 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(330+dx);
s += QStringLiteral("<%1 150 %2 150 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(380+dx);
s += QStringLiteral("<%1 150 %2 240 \"\" 0 0 0 \"\">\n").arg(380+dx).arg(380+dx);
dx +=580;
}

View File

@ -32,20 +32,14 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Gui_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Gui_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
)
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -69,8 +63,9 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS)
string(REGEX REPLACE "/W3" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/W1" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
add_compile_options(/permissive- /Zc:__cplusplus /Zc:preprocessor /MP /vmg)
add_link_options(/OPT:REF /OPT:ICF)
else()
add_compile_options(-w)
endif()
@ -86,13 +81,8 @@ SET( attenuator_moc_headers qucsattenuator.h )
SET(RESOURCES qucsattenuator.qrc)
if(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( attenuator_moc_sources ${attenuator_moc_headers} )
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
else()
QT5_WRAP_CPP( attenuator_moc_sources ${attenuator_moc_headers} )
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
endif()
IF(APPLE)
# set information on Info.plist file
@ -117,7 +107,7 @@ ADD_EXECUTABLE( ${QUCS_NAME}attenuator MACOSX_BUNDLE WIN32
${attenuator_moc_sources}
${RESOURCES_SRCS} )
TARGET_LINK_LIBRARIES( ${QUCS_NAME}attenuator Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets )
TARGET_LINK_LIBRARIES( ${QUCS_NAME}attenuator Qt6::Core Qt6::Gui Qt6::Widgets )
SET_TARGET_PROPERTIES(${QUCS_NAME}attenuator PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
#INSTALL (TARGETS ${QUCS_NAME}attenuator DESTINATION bin)
#

View File

@ -199,9 +199,9 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
switch(ATT->Topology)
{
case PI_TYPE:
*s += QString("<R R1 1 180 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QString("<R R2 1 255 130 -35 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += QString("<R R3 1 330 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R3, 'f', 1));
*s += QStringLiteral("<R R1 1 180 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R2 1 255 130 -35 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += QStringLiteral("<R R3 1 330 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R3, 'f', 1));
*s += "<GND * 1 180 230 0 0 0 0>\n";
*s += "<GND * 1 330 230 0 0 0 0>\n";
if (SP_box)
@ -216,11 +216,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Eqn Eqn1 1 360 350 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 50 230 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 460 230 0 0 0 0>\n";
}
*s += "</Components>\n";
@ -244,20 +244,20 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Diagrams>\n";
*s += "</Diagrams>\n";
*s += "<Paintings>\n";
*s += QString("<Text 160 60 12 #000000 0 \"%1 dB Pi-Type Attenuator\">\n").arg(ATT->Attenuation);
*s += QStringLiteral("<Text 160 60 12 #000000 0 \"%1 dB Pi-Type Attenuator\">\n").arg(ATT->Attenuation);
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
*s += QStringLiteral("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
}
*s += "</Paintings>\n";
break;
case TEE_TYPE:
*s += QString("<R R1 1 180 130 -40 20 0 2 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QString("<R R2 1 270 200 -20 60 0 3 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += QString("<R R3 1 350 130 -40 20 0 2 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R3, 'f', 1));
*s += QStringLiteral("<R R1 1 180 130 -40 20 0 2 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R2 1 270 200 -20 60 0 3 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += QStringLiteral("<R R3 1 350 130 -40 20 0 2 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R3, 'f', 1));
*s += "<GND * 1 270 230 0 0 0 0>\n";
if (SP_box)
{
@ -271,11 +271,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Eqn Eqn1 1 360 350 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 70 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 70 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 70 230 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 460 230 0 0 0 0>\n";
}
*s +="</Components>\n";
@ -298,21 +298,21 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Diagrams>\n";
*s += "</Diagrams>\n";
*s += "<Paintings>\n";
*s += QString("<Text 170 60 12 #000000 0 \"%1 dB Tee-Type Attenuator\">\n").arg(ATT->Attenuation);
*s += QStringLiteral("<Text 170 60 12 #000000 0 \"%1 dB Tee-Type Attenuator\">\n").arg(ATT->Attenuation);
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 390 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
*s += QStringLiteral("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 390 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
}
*s += "</Paintings>\n";
break;
case BRIDGE_TYPE:
*s += QString("<R R1 1 260 130 -30 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QString("<R R2 1 180 200 -90 -30 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(ATT->Zin);
*s += QString("<R R3 1 340 200 11 -30 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(ATT->Zout);
*s += QString("<R R4 1 260 260 11 -14 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += QStringLiteral("<R R1 1 260 130 -30 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R2 1 180 200 -90 -30 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<R R3 1 340 200 11 -30 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<R R4 1 260 260 11 -14 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += "<GND * 1 260 290 0 0 0 0>\n";
if (SP_box)
{
@ -326,11 +326,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Eqn Eqn1 1 360 350 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 50 200 -100 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 50 200 -100 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 50 230 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 460 230 0 0 0 0>\n";
}
*s += "</Components>\n";
@ -355,21 +355,21 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Diagrams>\n";
*s += "</Diagrams>\n";
*s += "<Paintings>\n";
*s += QString("<Text 140 60 12 #000000 0 \"%1 dB Bridged-Tee-Type Attenuator\">\n").arg(ATT->Attenuation);
*s += QStringLiteral("<Text 140 60 12 #000000 0 \"%1 dB Bridged-Tee-Type Attenuator\">\n").arg(ATT->Attenuation);
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 400 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
*s += QStringLiteral("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 400 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
}
*s += "</Paintings>\n";
break;
case REFLECTION_TYPE:
*s += QString("<R R1 1 130 300 15 -26 0 1 \"%1\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R1 1 130 300 15 -26 0 1 \"%1\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += "<GND * 1 130 330 0 0 0 0>\n";
*s += QString("<Coupler X1 5 200 200 29 -26 0 1 \"0.7071\" 0 \"90\" 0 \"%1\" 0>\n").arg(ATT->Zin);
*s += QString("<R R1 1 270 300 15 -26 0 1 \"%1\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<Coupler X1 5 200 200 29 -26 0 1 \"0.7071\" 0 \"90\" 0 \"%1\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<R R1 1 270 300 15 -26 0 1 \"%1\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += "<GND * 1 270 330 0 0 0 0>\n";
if (SP_box)
@ -378,17 +378,17 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
//-----------------------------
// Resistor attenuators are broadband ckts, so it's pointless to ask the user to input the analysis freq sweep. Let's do a wideband
// sweep and then the user can modify that in the schematic
*s += QString("<.SP SP1 1 80 400 0 83 0 0 \"lin\" 1 \"50 MHz\" 1 \"3 GHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n");
*s += QStringLiteral("<.SP SP1 1 80 400 0 83 0 0 \"lin\" 1 \"50 MHz\" 1 \"3 GHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n");
// Equations
*s += "<Eqn Eqn1 1 300 400 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 50 200 -100 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 50 200 -100 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 50 230 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 350 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 350 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 350 230 0 0 0 0>\n";
}
*s += "</Components>\n";
@ -421,12 +421,12 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Diagrams>\n";
*s += "</Diagrams>\n";
*s += "<Paintings>\n";
*s += QString("<Text 100 100 12 #000000 0 \"%1 dB Reflection Attenuator\">\n").arg(ATT->Attenuation);
*s += QStringLiteral("<Text 100 100 12 #000000 0 \"%1 dB Reflection Attenuator\">\n").arg(ATT->Attenuation);
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 70 135 10 #000000 0 \"Z0: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 270 135 10 #000000 0 \"Z0: %1 Ohm\">\n").arg(ATT->Zout);
*s += QStringLiteral("<Text 70 135 10 #000000 0 \"Z0: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 270 135 10 #000000 0 \"Z0: %1 Ohm\">\n").arg(ATT->Zout);
}
*s += "</Paintings>\n";
@ -436,20 +436,20 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
if (ATT->useLumped)
{
double w = 2*PI*ATT->freq;
*s += QString("<L L1 1 250 0 -40 -60 0 0 \"%1H\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(num2str(ATT->Zin/w));
*s += QString("<C C1 1 180 -60 -90 -20 0 1 \"%1F\" 1 \"\" 0 \"neutral\" 0>\n").arg(num2str(1/(ATT->Zin*w)));
*s += QStringLiteral("<L L1 1 250 0 -40 -60 0 0 \"%1H\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(num2str(ATT->Zin/w));
*s += QStringLiteral("<C C1 1 180 -60 -90 -20 0 1 \"%1F\" 1 \"\" 0 \"neutral\" 0>\n").arg(num2str(1/(ATT->Zin*w)));
*s += "<GND * 1 180 -90 0 0 1 0>\n";
*s += QString("<C C1 1 320 -60 20 -20 0 1 \"%1F\" 1 \"\" 0 \"neutral\" 0>\n").arg(num2str(1/(ATT->Zin*w)));
*s += QStringLiteral("<C C1 1 320 -60 20 -20 0 1 \"%1F\" 1 \"\" 0 \"neutral\" 0>\n").arg(num2str(1/(ATT->Zin*w)));
*s += "<GND * 1 320 -90 0 0 1 0>\n";
}
else
{
*s += QString("<TLIN Line1 1 250 0 -38 -75 0 0 \"%1 Ohm\" 1 \"%2 mm\" 1 \"0 dB\" 0 \"26.85\" 0>\n").arg(ATT->Zin).arg(QString::number(ATT->L*1e3, 'f', 1));
*s += QStringLiteral("<TLIN Line1 1 250 0 -38 -75 0 0 \"%1 Ohm\" 1 \"%2 mm\" 1 \"0 dB\" 0 \"26.85\" 0>\n").arg(ATT->Zin).arg(QString::number(ATT->L*1e3, 'f', 1));
}
*s += QString("<R R1 1 100 50 15 -26 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QString("<R R1 1 100 150 15 -26 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<R R1 1 100 50 15 -26 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R1 1 100 150 15 -26 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 100 180 0 0 0 0>\n";
*s += QString("<R R1 1 400 150 -100 -15 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R1 1 400 150 -100 -15 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += "<GND * 1 400 180 0 0 0 0>\n";
if (SP_box)
@ -457,19 +457,19 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
// S-parameter simulation block
//-----------------------------
// The quarter-wave line is a narrowband device... so let's set the SP sweep from f0/2 to 3*f0/2
QString freq_start = QString("%1").arg(0.5*ATT->freq*1e-6);//MHz
QString freq_stop = QString("%1").arg(1.5*ATT->freq*1e-6);//MHz
*s += QString("<.SP SP1 1 100 270 0 83 0 0 \"lin\" 1 \"%1 MHz\" 1 \"%2 MHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n").arg(freq_start).arg(freq_stop);
QString freq_start = QStringLiteral("%1").arg(0.5*ATT->freq*1e-6);//MHz
QString freq_stop = QStringLiteral("%1").arg(1.5*ATT->freq*1e-6);//MHz
*s += QStringLiteral("<.SP SP1 1 100 270 0 83 0 0 \"lin\" 1 \"%1 MHz\" 1 \"%2 MHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n").arg(freq_start).arg(freq_stop);
// Equations
*s += "<Eqn Eqn1 1 320 270 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 0 150 -100 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 0 150 -100 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 0 180 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 500 150 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 500 150 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 500 180 0 0 0 0>\n";
}
*s += "</Components>\n";
@ -502,14 +502,14 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Paintings>\n";
//In the case of the Pi-equivalent of the quarter wavelength line it is needed to put the title slighly higher.
if (ATT->useLumped) *s += QString("<Text 80 -140 12 #000000 0 \"%1 dB @ %2Hz Quarter-Wave series attenuator\">\n").arg(ATT->Attenuation).arg(num2str(ATT->freq));
else *s += QString("<Text 80 -120 12 #000000 0 \"%1 dB @ %2Hz Quarter-Wave series attenuator\">\n").arg(ATT->Attenuation).arg(num2str(ATT->freq));
if (ATT->useLumped) *s += QStringLiteral("<Text 80 -140 12 #000000 0 \"%1 dB @ %2Hz Quarter-Wave series attenuator\">\n").arg(ATT->Attenuation).arg(num2str(ATT->freq));
else *s += QStringLiteral("<Text 80 -120 12 #000000 0 \"%1 dB @ %2Hz Quarter-Wave series attenuator\">\n").arg(ATT->Attenuation).arg(num2str(ATT->freq));
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 50 -30 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 390 -30 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
*s += QStringLiteral("<Text 50 -30 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 390 -30 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
}
*s += "</Paintings>\n";
break;
@ -517,40 +517,40 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
if (ATT->useLumped)
{
double w = 2*PI*ATT->freq;
*s += QString("<L L1 1 200 60 20 -35 0 1 \"%1H\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(num2str(ATT->Zin/w));
*s += QString("<C C1 1 200 -60 -90 -20 0 1 \"%1F\" 1 \"\" 0 \"neutral\" 0>\n").arg(num2str(1/(ATT->Zin*w)));
*s += QStringLiteral("<L L1 1 200 60 20 -35 0 1 \"%1H\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(num2str(ATT->Zin/w));
*s += QStringLiteral("<C C1 1 200 -60 -90 -20 0 1 \"%1F\" 1 \"\" 0 \"neutral\" 0>\n").arg(num2str(1/(ATT->Zin*w)));
*s += "<GND * 1 200 -90 0 0 1 0>\n";
*s += QString("<C C1 1 320 150 0 60 0 1 \"%1F\" 1 \"\" 0 \"neutral\" 0>\n").arg(num2str(1/(ATT->Zin*w)));
*s += QStringLiteral("<C C1 1 320 150 0 60 0 1 \"%1F\" 1 \"\" 0 \"neutral\" 0>\n").arg(num2str(1/(ATT->Zin*w)));
*s += "<GND * 1 320 180 0 0 0 0>\n";
}
else
{
*s += QString("<TLIN Line1 1 200 60 20 -35 0 1 \"%1 Ohm\" 1 \"%2 mm\" 1 \"0 dB\" 0 \"26.85\" 0>\n").arg(ATT->Zin).arg(QString::number(ATT->L*1e3, 'f', 1));
*s += QStringLiteral("<TLIN Line1 1 200 60 20 -35 0 1 \"%1 Ohm\" 1 \"%2 mm\" 1 \"0 dB\" 0 \"26.85\" 0>\n").arg(ATT->Zin).arg(QString::number(ATT->L*1e3, 'f', 1));
}
*s += QString("<R R1 1 160 150 -40 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R1 1 160 150 -40 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += "<GND * 1 160 180 0 0 0 0>\n";
*s += QString("<R R1 1 240 150 -20 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<R R1 1 240 150 -20 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 240 180 0 0 0 0>\n";
*s += QString("<R R1 1 300 0 -30 -60 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R1 1 300 0 -30 -60 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
if (SP_box)
{
// S-parameter simulation block
//-----------------------------
// The quarter-wave line is a narrowband device... so let's set the SP sweep from f0/2 to 3*f0/2
QString freq_start = QString("%1").arg(0.5*ATT->freq*1e-6);//MHz
QString freq_stop = QString("%1").arg(1.5*ATT->freq*1e-6);//MHz
*s += QString("<.SP SP1 1 100 270 0 83 0 0 \"lin\" 1 \"%1 MHz\" 1 \"%2 MHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n").arg(freq_start).arg(freq_stop);
QString freq_start = QStringLiteral("%1").arg(0.5*ATT->freq*1e-6);//MHz
QString freq_stop = QStringLiteral("%1").arg(1.5*ATT->freq*1e-6);//MHz
*s += QStringLiteral("<.SP SP1 1 100 270 0 83 0 0 \"lin\" 1 \"%1 MHz\" 1 \"%2 MHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n").arg(freq_start).arg(freq_stop);
// Equations
*s += "<Eqn Eqn1 1 320 270 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 0 150 -100 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 0 150 -100 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 0 180 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 500 150 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 500 150 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 500 180 0 0 0 0>\n";
}
*s += "</Components>\n";
@ -594,20 +594,20 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Paintings>\n";
//Put the title a little bit higher because of the shunt cpa
if (ATT->useLumped) *s += QString("<Text 80 -140 12 #000000 0 \"%1 dB @ %2Hz Quarter-Wave shunt attenuator\">\n").arg(ATT->Attenuation).arg(num2str(ATT->freq));
else *s += QString("<Text 80 -120 12 #000000 0 \"%1 dB @ %2Hz Quarter-Wave shunt attenuator\">\n").arg(ATT->Attenuation).arg(num2str(ATT->freq));
if (ATT->useLumped) *s += QStringLiteral("<Text 80 -140 12 #000000 0 \"%1 dB @ %2Hz Quarter-Wave shunt attenuator\">\n").arg(ATT->Attenuation).arg(num2str(ATT->freq));
else *s += QStringLiteral("<Text 80 -120 12 #000000 0 \"%1 dB @ %2Hz Quarter-Wave shunt attenuator\">\n").arg(ATT->Attenuation).arg(num2str(ATT->freq));
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 50 -30 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 390 -30 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
*s += QStringLiteral("<Text 50 -30 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 390 -30 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
}
*s += "</Paintings>\n";
break;
case L_PAD_1ST_SERIES:
*s += QString("<R R1 1 255 130 -35 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QString("<R R2 1 330 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += QStringLiteral("<R R1 1 255 130 -35 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R2 1 330 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += "<GND * 1 330 230 0 0 0 0>\n";
if (SP_box)
{
@ -621,11 +621,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Eqn Eqn1 1 360 350 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 50 230 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 460 230 0 0 0 0>\n";
}
*s += "</Components>\n";
@ -648,19 +648,19 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Diagrams>\n";
*s += "</Diagrams>\n";
*s += "<Paintings>\n";
*s += QString("<Text 160 60 12 #000000 0 \"%1 dB L-pad 1st Series Attenuator\">\n").arg(ATT->Attenuation);
*s += QStringLiteral("<Text 160 60 12 #000000 0 \"%1 dB L-pad 1st Series Attenuator\">\n").arg(ATT->Attenuation);
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(QString::number(ATT->R3, 'f', 1));
*s += QStringLiteral("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(QString::number(ATT->R3, 'f', 1));
}
*s += "</Paintings>\n";
break;
case L_PAD_1ST_SHUNT:
*s += QString("<R R1 1 180 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QString("<R R2 1 255 130 -35 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += QStringLiteral("<R R1 1 180 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R2 1 255 130 -35 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R2, 'f', 1));
*s += "<GND * 1 180 230 0 0 0 0>\n";
if (SP_box)
@ -675,11 +675,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Eqn Eqn1 1 360 350 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 50 230 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 460 230 0 0 0 0>\n";
}
*s += "</Components>\n";
@ -702,17 +702,17 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Diagrams>\n";
*s += "</Diagrams>\n";
*s += "<Paintings>\n";
*s += QString("<Text 160 60 12 #000000 0 \"%1 dB L-pad 1st Shunt Attenuator\">\n").arg(ATT->Attenuation);
*s += QStringLiteral("<Text 160 60 12 #000000 0 \"%1 dB L-pad 1st Shunt Attenuator\">\n").arg(ATT->Attenuation);
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(QString::number(ATT->R3, 'f', 1));
*s += QStringLiteral("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(QString::number(ATT->R3, 'f', 1));
}
*s += "</Paintings>\n";
break;
case R_SERIES:
*s += QString("<R R1 1 255 130 -35 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R1 1 255 130 -35 -45 0 0 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
if (SP_box)
{
// S-parameter simulation block
@ -725,11 +725,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Eqn Eqn1 1 360 350 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 50 230 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 460 230 0 0 0 0>\n";
}
*s += "</Components>\n";
@ -752,19 +752,19 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Diagrams>\n";
*s += "</Diagrams>\n";
*s += "<Paintings>\n";
*s += QString("<Text 160 60 12 #000000 0 \"%1 dB R Series Attenuator\">\n").arg(ATT->Attenuation);
*s += QStringLiteral("<Text 160 60 12 #000000 0 \"%1 dB R Series Attenuator\">\n").arg(ATT->Attenuation);
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
*s += QStringLiteral("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
}
*s += "</Paintings>\n";
break;
case R_SHUNT:
*s += QString("<R R1 1 250 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += QStringLiteral("<R R1 1 250 200 -15 60 0 1 \"%1 Ohm\" 1 \"26.85\" 0 \"0.0\" 0 \"0.0\" 0 \"26.85\" 0 \"US\" 0>\n").arg(QString::number(ATT->R1, 'f', 1));
*s += "<GND * 1 250 230 0 0 0 0>\n";
if (SP_box)
{
@ -778,11 +778,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Eqn Eqn1 1 360 350 -32 19 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"S22_dB=dB(S[2,2])\" 1 \"yes\" 0>\n";
// Input term
*s += QString("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += QStringLiteral("<Pac P1 1 50 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zin);
*s += "<GND * 1 50 230 0 0 0 0>\n";
// Output term
*s += QString("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += QStringLiteral("<Pac P1 1 460 200 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0 \"26.85\" 0>\n").arg(ATT->Zout);
*s += "<GND * 1 460 230 0 0 0 0>\n";
}
*s += "</Components>\n";
@ -804,12 +804,12 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box)
*s += "<Diagrams>\n";
*s += "</Diagrams>\n";
*s += "<Paintings>\n";
*s += QString("<Text 160 60 12 #000000 0 \"%1 dB Shunt R Attenuator\">\n").arg(ATT->Attenuation);
*s += QStringLiteral("<Text 160 60 12 #000000 0 \"%1 dB Shunt R Attenuator\">\n").arg(ATT->Attenuation);
if (!SP_box)
{// If the SP simulation box option is activated, then the input and output ports are attached.
// Thus, it doesn't make sense to have a text field indicating the input/output impedance
*s += QString("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QString("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
*s += QStringLiteral("<Text 50 122 10 #000000 0 \"Z1: %1 Ohm\">\n").arg(ATT->Zin);
*s += QStringLiteral("<Text 360 122 10 #000000 0 \"Z2: %1 Ohm\">\n").arg(ATT->Zout);
}
*s += "</Paintings>\n";
break;

View File

@ -94,7 +94,7 @@ int main( int argc, char ** argv )
QString lang = QucsSettings.Language;
if(lang.isEmpty())
lang = QString(QLocale::system().name());
tor.load( QString("qucs_") + lang, QucsSettings.LangDir);
static_cast<void>(tor.load( QStringLiteral("qucs_") + lang, QucsSettings.LangDir));
a.installTranslator( &tor );
QucsAttenuator *qucs = new QucsAttenuator();

View File

@ -97,6 +97,7 @@ QucsAttenuator::QucsAttenuator()
topoGrid->addWidget(ComboTopology, 1,0,1,2);
pixTopology = new QLabel(TopoGroup);//====================Pixmap for Topology
pixTopology->setStyleSheet("background-color: white;");
pixTopology->setPixmap(QPixmap((":/bitmaps/att_pi.png")));
topoGrid->addWidget(pixTopology,2,0,3,2);
@ -171,10 +172,10 @@ QucsAttenuator::QucsAttenuator()
powerunits.append("mW");
powerunits.append("W");
powerunits.append("dBm");
powerunits.append(QString("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)));
powerunits.append(QString("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)));
powerunits.append(QString("dBmV [75%1]").arg(QChar(0xa9, 0x03)));
powerunits.append(QString("dBmV [50%1]").arg(QChar(0xa9, 0x03)));
powerunits.append(QStringLiteral("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)));
powerunits.append(QStringLiteral("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)));
powerunits.append(QStringLiteral("dBmV [75%1]").arg(QChar(0xa9, 0x03)));
powerunits.append(QStringLiteral("dBmV [50%1]").arg(QChar(0xa9, 0x03)));
Combo_InputPowerUnits = new QComboBox();
Combo_InputPowerUnits->addItems(powerunits);
Combo_InputPowerUnits->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
@ -696,7 +697,7 @@ void QucsAttenuator::slotCalculate()
lineEdit_R3->setText(QString::number(Values.R3, 'f', 1));
lineEdit_R4->setText(QString::number(Values.R4, 'f', 1));
lineEdit_R1_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR1, QString("W"), ComboR1_PowerUnits->currentText()), 'f', 5));
lineEdit_R1_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR1, QStringLiteral("W"), ComboR1_PowerUnits->currentText()), 'f', 5));
lineEdit_R2_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR2, "W", ComboR2_PowerUnits->currentText()), 'f', 5));
lineEdit_R3_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR3, "W", ComboR3_PowerUnits->currentText()), 'f', 5));
lineEdit_R4_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR4, "W", ComboR4_PowerUnits->currentText()), 'f', 5));
@ -744,7 +745,7 @@ void QucsAttenuator::slot_ComboR1PowerUnits_Changed(const QString& new_units)
//Convert power
double P = lineEdit_R1_Pdiss->text().toDouble();
P =ConvertPowerUnits(P, LastUnits[1], new_units);
lineEdit_R1_Pdiss->setText(QString("%1").arg(P));
lineEdit_R1_Pdiss->setText(QStringLiteral("%1").arg(P));
LastUnits[1] = new_units;
//Change lineedit input policy
@ -761,7 +762,7 @@ void QucsAttenuator::slot_ComboR2PowerUnits_Changed(const QString& new_units)
//Convert power
double P = lineEdit_R2_Pdiss->text().toDouble();
P =ConvertPowerUnits(P, LastUnits[2], new_units);
lineEdit_R2_Pdiss->setText(QString("%1").arg(P));
lineEdit_R2_Pdiss->setText(QStringLiteral("%1").arg(P));
LastUnits[2] = new_units;
//Change lineedit input policy
@ -778,7 +779,7 @@ void QucsAttenuator::slot_ComboR3PowerUnits_Changed(const QString& new_units)
//Convert power
double P = lineEdit_R3_Pdiss->text().toDouble();
P =ConvertPowerUnits(P, LastUnits[3], new_units);
lineEdit_R3_Pdiss->setText(QString("%1").arg(P));
lineEdit_R3_Pdiss->setText(QStringLiteral("%1").arg(P));
LastUnits[3] = new_units;
//Change lineedit input policy
@ -795,7 +796,7 @@ void QucsAttenuator::slot_ComboR4PowerUnits_Changed(const QString& new_units)
//Convert power
double P = lineEdit_R4_Pdiss->text().toDouble();
P =ConvertPowerUnits(P, LastUnits[4], new_units);
lineEdit_R4_Pdiss->setText(QString("%1").arg(P));
lineEdit_R4_Pdiss->setText(QStringLiteral("%1").arg(P));
LastUnits[4] = new_units;
//Change lineedit input policy
@ -817,16 +818,16 @@ double QucsAttenuator::ConvertPowerUnits(double Pin, QString from_units, QString
if (from_units == "dBm")
Pin = pow(10, 0.1*(Pin-30));//dBm -> W
else
if (from_units == QString("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)))
if (from_units == QStringLiteral("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)))
Pin = pow(10, (0.1*Pin-12))/75;//dBuV [75Ohm] -> W
else
if (from_units == QString("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)))
if (from_units == QStringLiteral("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)))
Pin = pow(10, (0.1*Pin-12))/50;//dBuV [50Ohm] -> W
else
if (from_units == QString("dBmV [75%2]").arg(QChar(0xa9, 0x03)))
if (from_units == QStringLiteral("dBmV [75%2]").arg(QChar(0xa9, 0x03)))
Pin = pow(10, (0.1*Pin-6))/75;//dBmV [75Ohm] -> W
else
if (from_units == QString("dBmV [50%2]").arg(QChar(0xa9, 0x03)))
if (from_units == QStringLiteral("dBmV [50%2]").arg(QChar(0xa9, 0x03)))
Pin = pow(10, (0.1*Pin-6))/50;//dBmV [50Ohm] -> W
else
if (from_units == "mW")
@ -842,16 +843,16 @@ double QucsAttenuator::ConvertPowerUnits(double Pin, QString from_units, QString
if (to_units == "dBm")
return Pin;//Already done
else
if (to_units == QString("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)))
if (to_units == QStringLiteral("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)))
Pin += 108.7506126339170004686755011380612925566374910126647878220;//W -> dBuV [75Ohm]
else
if (to_units == QString("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)))
if (to_units == QStringLiteral("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03)))
Pin += 106.9897000433601880478626110527550697323181011853789145868;//W -> dBuV [50Ohm]
else
if (to_units == QString("dBmV [75%2]").arg(QChar(0xa9, 0x03)))
if (to_units == QStringLiteral("dBmV [75%2]").arg(QChar(0xa9, 0x03)))
Pin += 48.7506126339170004686755011380612925566374910126647878220;//W -> dBmV [75Ohm]
else
if (to_units == QString("dBmV [50%2]").arg(QChar(0xa9, 0x03)))
if (to_units == QStringLiteral("dBmV [50%2]").arg(QChar(0xa9, 0x03)))
Pin += 46.9897000433601880478626110527550697323181011853789145868;//W -> dBmV [50Ohm]
return Pin;

View File

@ -33,21 +33,15 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Gui_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Gui_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
)
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -71,8 +65,9 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS)
string(REGEX REPLACE "/W3" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/W1" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
add_compile_options(/permissive- /Zc:__cplusplus /Zc:preprocessor /MP /vmg)
add_link_options(/OPT:REF /OPT:ICF)
else()
add_compile_options(-w)
endif()
@ -120,13 +115,8 @@ SET(QUCS-FILTER_MOC_HDRS
SET(RESOURCES qucsfilter.qrc)
if(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP(QUCS-FILTER_MOC_SRCS ${QUCS-FILTER_MOC_HDRS})
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
else()
QT5_WRAP_CPP(QUCS-FILTER_MOC_SRCS ${QUCS-FILTER_MOC_HDRS})
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
endif()
IF(APPLE)
# set information on Info.plist file
@ -152,7 +142,7 @@ ADD_EXECUTABLE(${QUCS_NAME}filter MACOSX_BUNDLE WIN32
${QUCS-FILTER_MOC_SRCS}
${RESOURCES_SRCS} )
TARGET_LINK_LIBRARIES(${QUCS_NAME}filter Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets)
TARGET_LINK_LIBRARIES(${QUCS_NAME}filter Qt6::Core Qt6::Gui Qt6::Widgets)
SET_TARGET_PROPERTIES(${QUCS_NAME}filter PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
INSTALL(TARGETS ${QUCS_NAME}filter

View File

@ -39,8 +39,8 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr
x = 60;
*s += "<Components>\n";
*s += QString("<Pac P1 1 %1 380 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QString("<GND * 1 %1 410 0 0 0 0>\n").arg(x);
*s += QStringLiteral("<Pac P1 1 %1 380 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 %1 410 0 0 0 0>\n").arg(x);
x -= 30;
y = 170;
@ -79,15 +79,15 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr
if(isMicrostrip) {
y += 40;
len -= dl * Substrate->height;
*s += QString("<MCOUPLED MS1 1 %1 %2 -26 37 0 0 \"Sub1\" 1 \"%3\" 1 \"%4\" 1 \"%5\" 1 \"Kirschning\" 0 \"Kirschning\" 0 \"26.85\" 0>\n").arg(x).arg(y).arg(num2str(width)).arg(num2str(len)).arg(num2str(gap));
*s += QString("<MOPEN MS1 1 %1 %2 -12 15 1 2 \"Sub1\" 1 \"%3\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x-60).arg(y+30).arg(num2str(width));
*s += QString("<MOPEN MS1 1 %1 %2 -26 -81 1 0 \"Sub1\" 1 \"%3\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x+60).arg(y-30).arg(num2str(width));
*s += QStringLiteral("<MCOUPLED MS1 1 %1 %2 -26 37 0 0 \"Sub1\" 1 \"%3\" 1 \"%4\" 1 \"%5\" 1 \"Kirschning\" 0 \"Kirschning\" 0 \"26.85\" 0>\n").arg(x).arg(y).arg(num2str(width)).arg(num2str(len)).arg(num2str(gap));
*s += QStringLiteral("<MOPEN MS1 1 %1 %2 -12 15 1 2 \"Sub1\" 1 \"%3\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x-60).arg(y+30).arg(num2str(width));
*s += QStringLiteral("<MOPEN MS1 1 %1 %2 -26 -81 1 0 \"Sub1\" 1 \"%3\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x+60).arg(y-30).arg(num2str(width));
y += 20;
x += 60;
}
else {
y += 20;
*s += QString("<CTLIN Line1 1 %1 %2 -26 16 0 0 \"%3\" 1 \"%4\" 1 \"%5\" 1 \"1\" 0 \"1\" 0 \"0 dB\" 0 \"0 dB\" 0 \"26.85\" 0>\n").arg(x).arg(y).arg(Z0e).arg(Z0o).arg(num2str(len));
*s += QStringLiteral("<CTLIN Line1 1 %1 %2 -26 16 0 0 \"%3\" 1 \"%4\" 1 \"%5\" 1 \"1\" 0 \"1\" 0 \"0 dB\" 0 \"0 dB\" 0 \"26.85\" 0>\n").arg(x).arg(y).arg(Z0e).arg(Z0o).arg(num2str(len));
}
}
@ -96,25 +96,25 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr
x += 20;
else
x += 80;
*s += QString("<Pac P2 1 %1 %2 18 -26 0 1 \"2\" 1 \"%3 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(y+70).arg(Filter->Impedance);
*s += QString("<GND * 1 %1 %2 0 0 0 0>\n").arg(x).arg(y+100);
*s += QStringLiteral("<Pac P2 1 %1 %2 18 -26 0 1 \"2\" 1 \"%3 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(y+70).arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 %1 %2 0 0 0 0>\n").arg(x).arg(y+100);
*s += QString("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(2.0 * Filter->Frequency - Filter->Frequency2)).arg(num2str(2.0 * Filter->Frequency2 - Filter->Frequency));
*s += QStringLiteral("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(2.0 * Filter->Frequency - Filter->Frequency2)).arg(num2str(2.0 * Filter->Frequency2 - Filter->Frequency));
if(isMicrostrip)
*s += QString("<SUBST Sub1 1 310 500 -30 24 0 0 \"%1\" 1 \"%2m\" 1 \"%3m\" 1 \"%4\" 1 \"%5\" 1 \"%6\" 1>\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness);
*s += QString("<Eqn Eqn1 1 450 560 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
*s += QStringLiteral("<SUBST Sub1 1 310 500 -30 24 0 0 \"%1\" 1 \"%2m\" 1 \"%3m\" 1 \"%4\" 1 \"%5\" 1 \"%6\" 1>\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness);
*s += QStringLiteral("<Eqn Eqn1 1 450 560 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
*s += "</Components>\n";
*s += "<Wires>\n";
// connect left source
*s += QString("<60 180 60 350 \"\" 0 0 0>\n");
*s += QString("<60 180 90 180 \"\" 0 0 0>\n");
*s += QStringLiteral("<60 180 60 350 \"\" 0 0 0>\n");
*s += QStringLiteral("<60 180 90 180 \"\" 0 0 0>\n");
// connect right source
y += 10;
*s += QString("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x).arg(y).arg(x).arg(y+30);
*s += QString("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x-50).arg(y).arg(x).arg(y);
*s += QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x).arg(y).arg(x).arg(y+30);
*s += QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x-50).arg(y).arg(x).arg(y);
// wires between components
x = 150;
@ -125,7 +125,7 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr
y += 40;
}
for(i = 0; i < Filter->Order; i++) {
*s += QString("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x).arg(y).arg(x+dx).arg(y);
*s += QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x).arg(y).arg(x+dx).arg(y);
if(isMicrostrip) {
x += 150;
y += 60;
@ -143,15 +143,15 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr
*s += "<Paintings>\n";
*s += QString("<Text 70 650 12 #000000 0 \"Coupled-line bandpass filter \\n ");
*s += QStringLiteral("<Text 70 650 12 #000000 0 \"Coupled-line bandpass filter \\n ");
switch(Filter->Type) {
case TYPE_BESSEL: *s += QString("Bessel"); break;
case TYPE_BUTTERWORTH: *s += QString("Butterworth"); break;
case TYPE_CHEBYSHEV: *s += QString("Chebyshev"); break;
case TYPE_BESSEL: *s += QStringLiteral("Bessel"); break;
case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth"); break;
case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev"); break;
}
*s += QString(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2));
*s += QString("Impedance matching %3 Ohm\">\n").arg(Filter->Impedance);
*s += QStringLiteral(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2));
*s += QStringLiteral("Impedance matching %3 Ohm\">\n").arg(Filter->Impedance);
*s += "</Paintings>\n";
return s;

View File

@ -50,11 +50,11 @@ QString* Equation_Filter::createSchematic(tFilter *Filter)
}
// create the Qucs schematic
QString *s = new QString("<Qucs Schematic " PACKAGE_VERSION ">\n");
QString *s = new QString("<qucs Schematic " PACKAGE_VERSION ">\n");
*s += "<Components>\n";
*s += QString("<Pac P1 1 100 30 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(Filter->Impedance);
*s += QString("<GND * 1 100 60 0 0 0 0>\n");
*s += QStringLiteral("<Pac P1 1 100 30 18 -26 0 1 \"1\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 100 60 0 0 0 0>\n");
QString eqn = "2"; // because of 50ohms input and output
@ -77,11 +77,11 @@ QString* Equation_Filter::createSchematic(tFilter *Filter)
Omega = 1.0 / Omega;
break;
case CLASS_BANDPASS: // transform to bandpass
varS = QString("*(S+%1/S)").arg(Omega*Omega);
varS = QStringLiteral("*(S+%1/S)").arg(Omega*Omega);
Omega = 0.5 / pi / fabs(Filter->Frequency2 - Filter->Frequency);
break;
case CLASS_BANDSTOP: // transform to bandstop
varS = QString("/(S+%1/S)").arg(Omega*Omega);
varS = QStringLiteral("/(S+%1/S)").arg(Omega*Omega);
Omega = 2.0 * pi * fabs(Filter->Frequency2 - Filter->Frequency);
break;
}
@ -89,35 +89,35 @@ QString* Equation_Filter::createSchematic(tFilter *Filter)
if(Filter->Order & 1) {
a = getQuadraticNormValues(0, Filter, b);
eqn += QString(" / (1 + %1%2)").arg(a / Omega).arg(varS);
eqn += QStringLiteral(" / (1 + %1%2)").arg(a / Omega).arg(varS);
}
for(i = 1; i <= Filter->Order/2; i++) {
a = getQuadraticNormValues(i, Filter, b);
eqn += QString(" / (1 + %1%2 + %3%4%5)")
eqn += QStringLiteral(" / (1 + %1%2 + %3%4%5)")
.arg(a/Omega).arg(varS).arg(b/Omega/Omega).arg(varS).arg(varS);
}
*s += QString("<RFEDD X1 1 260 0 -26 21 0 0 \"G\" 0 \"2\" 0 \"open\" 0 \"%1\" 1 \"0\" 1 \"%2\" 1 \"%3\" 1>\n").arg(1.0/Filter->Impedance).arg(eqn).arg(Filter->Impedance);
*s += QStringLiteral("<RFEDD X1 1 260 0 -26 21 0 0 \"G\" 0 \"2\" 0 \"open\" 0 \"%1\" 1 \"0\" 1 \"%2\" 1 \"%3\" 1>\n").arg(1.0/Filter->Impedance).arg(eqn).arg(Filter->Impedance);
*s += QString("<Pac P2 1 400 30 18 -26 0 1 \"2\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(Filter->Impedance);
*s += QString("<GND * 1 400 60 0 0 0 0>\n");
*s += QStringLiteral("<Pac P2 1 400 30 18 -26 0 1 \"2\" 1 \"%1 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 400 60 0 0 0 0>\n");
if((Filter->Class == CLASS_BANDPASS) || (Filter->Class == CLASS_BANDSTOP))
a = 10.0 * Filter->Frequency2;
else
a = 10.0 * Filter->Frequency;
*s += QString("<.SP SP1 1 110 160 0 67 0 0 \"log\" 1 \"%1Hz\" 1 \"%2Hz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1*Filter->Frequency)).arg(num2str(a));
*s += QString("<Eqn Eqn1 1 350 170 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
*s += QStringLiteral("<.SP SP1 1 110 160 0 67 0 0 \"log\" 1 \"%1Hz\" 1 \"%2Hz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1*Filter->Frequency)).arg(num2str(a));
*s += QStringLiteral("<Eqn Eqn1 1 350 170 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
*s += "</Components>\n";
*s += "<Wires>\n";
// connect left source
*s += QString("<100 0 230 0 \"\" 0 0 0>\n");
*s += QStringLiteral("<100 0 230 0 \"\" 0 0 0>\n");
// connect right source
*s += QString("<290 0 400 0 \"\" 0 0 0>\n");
*s += QStringLiteral("<290 0 400 0 \"\" 0 0 0>\n");
*s += "</Wires>\n";
@ -126,24 +126,24 @@ QString* Equation_Filter::createSchematic(tFilter *Filter)
*s += "<Paintings>\n";
*s += QString("<Text 450 150 12 #000000 0 \"");
*s += QStringLiteral("<Text 450 150 12 #000000 0 \"");
switch(Filter->Type) {
case TYPE_BESSEL: *s += QString("Bessel "); break;
case TYPE_BUTTERWORTH: *s += QString("Butterworth "); break;
case TYPE_CHEBYSHEV: *s += QString("Chebyshev "); break;
case TYPE_BESSEL: *s += QStringLiteral("Bessel "); break;
case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth "); break;
case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev "); break;
}
switch(Filter->Class) {
case CLASS_LOWPASS:
*s += QString("low-pass filter, %1Hz cutoff").arg(num2str(Filter->Frequency)); break;
*s += QStringLiteral("low-pass filter, %1Hz cutoff").arg(num2str(Filter->Frequency)); break;
case CLASS_HIGHPASS:
*s += QString("high-pass filter, %1Hz cutoff").arg(num2str(Filter->Frequency)); break;
*s += QStringLiteral("high-pass filter, %1Hz cutoff").arg(num2str(Filter->Frequency)); break;
case CLASS_BANDPASS:
*s += QString("band-pass filter, %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break;
*s += QStringLiteral("band-pass filter, %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break;
case CLASS_BANDSTOP:
*s += QString("band-reject filter, %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break;
*s += QStringLiteral("band-reject filter, %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break;
}
*s += QString(" \\n PI-type, impedance matching %1 Ohm\">\n").arg(Filter->Impedance);
*s += QStringLiteral(" \\n PI-type, impedance matching %1 Ohm\">\n").arg(Filter->Impedance);
*s += "</Paintings>\n";
return s;

View File

@ -369,7 +369,7 @@ QString Filter::getLineString(bool isMicrostrip, double width_or_impedance, doub
text_x = -30;
text_y = -70;
}
code = QString("<MLIN MS1 1 %1 %2 %3 %4 0 %5 \"Sub1\" 0 \"%6 mm\" 1 \"%7 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"26.85\" 0>\n")
code = QStringLiteral("<MLIN MS1 1 %1 %2 %3 %4 0 %5 \"Sub1\" 0 \"%6 mm\" 1 \"%7 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"26.85\" 0>\n")
.arg(x).arg(y).arg(text_x).arg(text_y).arg(rotate)
.arg(QString::number(width_or_impedance*1e3, 'f', 2)).arg(QString::number(l*1e3, 'f', 2));
}
@ -385,7 +385,7 @@ QString Filter::getLineString(bool isMicrostrip, double width_or_impedance, doub
text_x = -30;
text_y = -60;
}
code = QString("<TLIN Line1 1 %1 %2 %3 %4 0 %5 \"%6 Ohm\" 1 \"%7 mm\" 1 \"0 dB\" 0 \"26.85\" 0>\n")
code = QStringLiteral("<TLIN Line1 1 %1 %2 %3 %4 0 %5 \"%6 Ohm\" 1 \"%7 mm\" 1 \"0 dB\" 0 \"26.85\" 0>\n")
.arg(x).arg(y).arg(text_x).arg(text_y).arg(rotate).arg(QString::number(width_or_impedance, 'f', 1)).arg(QString::number(l*1e3, 'f', 2));
}
return code;
@ -397,19 +397,19 @@ QString Filter::getMS_Via(double height, int x, int y, int rotate)
switch (rotate)
{
case 0: // No rotation
code = QString("<MVIA MS31 1 %1 %2 20 -10 0 0 \"Sub1\" 0 \"%3 mm\" 1 \"26.85\" 0>\n").arg(x).arg(y).arg(height);
code = QStringLiteral("<MVIA MS31 1 %1 %2 20 -10 0 0 \"Sub1\" 0 \"%3 mm\" 1 \"26.85\" 0>\n").arg(x).arg(y).arg(height);
break;
case 1: // CTRL+R
code = QString("<MVIA MS31 1 %1 %2 40 -20 0 1 \"Sub1\" 0 \"%3 mm\" 1 \"26.85\" 0>\n").arg(x).arg(y).arg(height);
code = QStringLiteral("<MVIA MS31 1 %1 %2 40 -20 0 1 \"Sub1\" 0 \"%3 mm\" 1 \"26.85\" 0>\n").arg(x).arg(y).arg(height);
break;
case 2: // 2 x (CTRL+R)
code = QString("<MVIA MS31 1 %1 %2 -85 -40 0 2 \"Sub1\" 0 \"%3 mm\" 1 \"26.85\" 0>\n").arg(x).arg(y).arg(height);
code = QStringLiteral("<MVIA MS31 1 %1 %2 -85 -40 0 2 \"Sub1\" 0 \"%3 mm\" 1 \"26.85\" 0>\n").arg(x).arg(y).arg(height);
break;
case 3: // 3 x (CTRL+R)
code = QString("<MVIA MS31 1 %1 %2 -90 -20 0 3 \"Sub1\" 0 \"%3 mm\" 1 \"26.85\" 0>\n").arg(x).arg(y).arg(height);
code = QStringLiteral("<MVIA MS31 1 %1 %2 -90 -20 0 3 \"Sub1\" 0 \"%3 mm\" 1 \"26.85\" 0>\n").arg(x).arg(y).arg(height);
break;
}
return code;
@ -421,19 +421,19 @@ QString Filter::getMS_Open(double width, int x, int y, int rotate)
switch (rotate)
{
case 0: // No rotation
code = QString("<MOPEN MS93 1 %1 %2 -20 -50 0 0 \"Sub1\" 0 \"%3 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2));
code = QStringLiteral("<MOPEN MS93 1 %1 %2 -20 -50 0 0 \"Sub1\" 0 \"%3 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2));
break;
case 1: // CTRL+R
code = QString("<MOPEN MS93 1 %1 %2 15 -12 0 1 \"Sub1\" 0 \"%3 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2));
code = QStringLiteral("<MOPEN MS93 1 %1 %2 15 -12 0 1 \"Sub1\" 0 \"%3 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2));
break;
case 2: // 2 x (CTRL+R)
code = QString("<MOPEN MS93 1 %1 %2 -20 -50 0 2 \"Sub1\" 0 \"%3 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2));
code = QStringLiteral("<MOPEN MS93 1 %1 %2 -20 -50 0 2 \"Sub1\" 0 \"%3 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2));
break;
case 3: // 3 x (CTRL+R)
code = QString("<MOPEN MS93 1 %1 %2 15 -20 0 3 \"Sub1\" 0 \"%3 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2));
code = QStringLiteral("<MOPEN MS93 1 %1 %2 15 -20 0 3 \"Sub1\" 0 \"%3 mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"Kirschning\" 0>\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2));
break;
}
return code;
@ -441,10 +441,10 @@ QString Filter::getMS_Open(double width, int x, int y, int rotate)
QString Filter::getWireString(int x1, int y1, int x2, int y2)
{
return QString("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x1).arg(y1).arg(x2).arg(y2);
return QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x1).arg(y1).arg(x2).arg(y2);
}
QString Filter::getTeeString(int x, int y, double width1, double width2, double width3)
{
return QString("<MTEE MS1 1 %1 %2 -26 20 1 0 \"Sub1\" 0 \"%3mm\" 1 \"%4mm\" 1 \"%5mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"26.85\" 0>\n")
return QStringLiteral("<MTEE MS1 1 %1 %2 -26 20 1 0 \"Sub1\" 0 \"%3mm\" 1 \"%4mm\" 1 \"%5mm\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"26.85\" 0>\n")
.arg(x).arg(y).arg(QString::number(width1*1e3, 'f', 2)).arg(QString::number(width2*1e3, 'f', 2)).arg(QString::number(width3*1e3, 'f', 2));
}

View File

@ -66,8 +66,8 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
x = 20;
if(Filter->Class != CLASS_BANDPASS) x += 40;
*s += "<Components>\n";
*s += QString("<Pac P1 1 %1 320 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QString("<GND * 1 %1 350 0 0 0 0>\n").arg(x);
*s += QStringLiteral("<Pac P1 1 %1 320 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 %1 350 0 0 0 0>\n").arg(x);
for(i = 0; i < Filter->Order; i++) {
x = 100 +((i+1) * 70);
@ -93,18 +93,18 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
case CLASS_LOWPASS:
if(i & 1)
*s += QString("<L L1 1 %1 %2 -26 10 0 0 \"%3H\" 1>\n").arg(x).arg(yl).arg(num2str(Value));
*s += QStringLiteral("<L L1 1 %1 %2 -26 10 0 0 \"%3H\" 1>\n").arg(x).arg(yl).arg(num2str(Value));
else
*s += QString("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n").arg(x).arg(yc).arg(num2str(Value));
*s += QStringLiteral("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n").arg(x).arg(yc).arg(num2str(Value));
break;
case CLASS_HIGHPASS:
Value = 1.0 / Omega / Omega / Value; // transform to highpass
if(i & 1)
*s += QString("<C C1 1 %1 %2 -27 10 0 0 \"%3F\" 1>\n").arg(x).arg(yl).arg(num2str(Value));
*s += QStringLiteral("<C C1 1 %1 %2 -27 10 0 0 \"%3F\" 1>\n").arg(x).arg(yl).arg(num2str(Value));
else
*s += QString("<L L1 1 %1 %2 17 -26 0 1 \"%3H\" 1>\n").arg(x).arg(yc).arg(num2str(Value));
*s += QStringLiteral("<L L1 1 %1 %2 17 -26 0 1 \"%3H\" 1>\n").arg(x).arg(yc).arg(num2str(Value));
break;
@ -112,12 +112,12 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
Value /= Bandwidth; // transform to bandpass
Value2 = 0.25 / Filter->Frequency / Filter->Frequency2 / pi / pi / Value;
if(i & 1) {
*s += QString("<L L1 1 %1 %2 -26 -44 0 0 \"%3H\" 1>\n").arg(x+40).arg(yl).arg(num2str(Value));
*s += QString("<C C1 1 %1 %2 -26 10 0 0 \"%3F\" 1>\n").arg(x-20).arg(yl).arg(num2str(Value2));
*s += QStringLiteral("<L L1 1 %1 %2 -26 -44 0 0 \"%3H\" 1>\n").arg(x+40).arg(yl).arg(num2str(Value));
*s += QStringLiteral("<C C1 1 %1 %2 -26 10 0 0 \"%3F\" 1>\n").arg(x-20).arg(yl).arg(num2str(Value2));
}
else {
*s += QString("<L L1 1 %1 %2 8 -26 0 1 \"%3H\" 1>\n").arg(x).arg(yc).arg(num2str(Value2));
*s += QString("<C C1 1 %1 %2 -8 46 0 1 \"%3F\" 1>\n").arg(x-30).arg(yc).arg(num2str(Value));
*s += QStringLiteral("<L L1 1 %1 %2 8 -26 0 1 \"%3H\" 1>\n").arg(x).arg(yc).arg(num2str(Value2));
*s += QStringLiteral("<C C1 1 %1 %2 -8 46 0 1 \"%3F\" 1>\n").arg(x-30).arg(yc).arg(num2str(Value));
}
break;
@ -126,12 +126,12 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
Value2 = 1.0 / Omega / Omega / Bandwidth / Value; // transform to bandstop
Value *= 0.5 * fabs(Filter->Frequency2/Filter->Frequency - Filter->Frequency/Filter->Frequency2);
if(i & 1) {
*s += QString("<L L1 1 %1 %2 -26 -44 0 0 \"%3H\" 1>\n").arg(x).arg(yl-35).arg(num2str(Value));
*s += QString("<C C1 1 %1 %2 -26 10 0 0 \"%3F\" 1>\n").arg(x).arg(yl).arg(num2str(Value2));
*s += QStringLiteral("<L L1 1 %1 %2 -26 -44 0 0 \"%3H\" 1>\n").arg(x).arg(yl-35).arg(num2str(Value));
*s += QStringLiteral("<C C1 1 %1 %2 -26 10 0 0 \"%3F\" 1>\n").arg(x).arg(yl).arg(num2str(Value2));
}
else {
*s += QString("<L L1 1 %1 %2 17 -26 0 1 \"%3H\" 1>\n").arg(x).arg(yc).arg(num2str(Value2));
*s += QString("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n").arg(x).arg(yc+60).arg(num2str(Value));
*s += QStringLiteral("<L L1 1 %1 %2 17 -26 0 1 \"%3H\" 1>\n").arg(x).arg(yc).arg(num2str(Value2));
*s += QStringLiteral("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n").arg(x).arg(yc+60).arg(num2str(Value));
}
yc += 60;
break;
@ -139,7 +139,7 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
}
if((i & 1) == 0)
*s += QString("<GND * 1 %1 %2 0 0 0 0>\n").arg(x).arg(yc + 30);
*s += QStringLiteral("<GND * 1 %1 %2 0 0 0 0>\n").arg(x).arg(yc + 30);
if(!piType)
i--;
@ -155,8 +155,8 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
if((Filter->Order & 1) == 0)
x += 70;
}
*s += QString("<Pac P2 1 %1 320 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QString("<GND * 1 %1 350 0 0 0 0>\n").arg(x);
*s += QStringLiteral("<Pac P2 1 %1 320 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 %1 350 0 0 0 0>\n").arg(x);
yc += 100;
Value = Filter->Frequency / 10.0;
@ -164,15 +164,15 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
Value2 = 10.0 * Filter->Frequency2;
else
Value2 = 10.0 * Filter->Frequency;
*s += QString("<.SP SP1 1 70 %1 0 67 0 0 \"log\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"201\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(yc).arg(num2str(Value)).arg(num2str(Value2));
*s += QStringLiteral("<.SP SP1 1 70 %1 0 67 0 0 \"log\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"201\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(yc).arg(num2str(Value)).arg(num2str(Value2));
QString eqn_string;
switch (QucsSettings.DefaultSimulator) {
case spicecompat::simQucsator:
eqn_string = QString("<Eqn Eqn1 1 290 %1 -28 15 0 0 \"dBS21=dB(S[2,1])\" 1 \"dBS11=dB(S[1,1])\" 1 \"yes\" 0>\n").arg(yc+10);
eqn_string = QStringLiteral("<Eqn Eqn1 1 290 %1 -28 15 0 0 \"dBS21=dB(S[2,1])\" 1 \"dBS11=dB(S[1,1])\" 1 \"yes\" 0>\n").arg(yc+10);
break;
case spicecompat::simNgspice :
eqn_string = QString("<NutmegEq NutmegEq1 1 290 %1 -28 15 0 0 \"SP1\" 1 \"dBS21=dB(S_2_1)\" 1 \"dBS11=dB(S_1_1)\" 1>\n").arg(yc+10);
eqn_string = QStringLiteral("<NutmegEq NutmegEq1 1 290 %1 -28 15 0 0 \"SP1\" 1 \"dBS21=dB(S_2_1)\" 1 \"dBS11=dB(S_1_1)\" 1>\n").arg(yc+10);
break;
case spicecompat::simSpiceOpus:
case spicecompat::simXyce:
@ -188,13 +188,13 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
x = 20;
if(Filter->Class != CLASS_BANDPASS)
x += 40;
*s += QString("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QStringLiteral("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x);
if(piType)
*s += QString("<%1 240 170 240 \"\" 0 0 0>\n").arg(x);
*s += QStringLiteral("<%1 240 170 240 \"\" 0 0 0>\n").arg(x);
else if(Filter->Class == CLASS_BANDPASS)
*s += QString("<%1 240 120 240 \"\" 0 0 0>\n").arg(x);
*s += QStringLiteral("<%1 240 120 240 \"\" 0 0 0>\n").arg(x);
else
*s += QString("<%1 240 140 240 \"\" 0 0 0>\n").arg(x);
*s += QStringLiteral("<%1 240 140 240 \"\" 0 0 0>\n").arg(x);
// wires down to shunt components
x = 30;
@ -202,7 +202,7 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
x += 70;
for(i = 0; i < (Filter->Order / 2) + 1; i++) {
x += 140;
*s += QString("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QStringLiteral("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x);
}
// horizontal wires for series components
@ -210,32 +210,32 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
if(piType) {
for(i = 0; i < (Filter->Order / 2); i++) {
x = 170 + (i * 140);
*s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+20);
*s += QString("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x-30).arg(x);
*s += QString("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x-30).arg(x);
*s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+20);
*s += QStringLiteral("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x-30).arg(x);
*s += QStringLiteral("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x-30).arg(x);
}
if(Filter->Order & 1) {
*s += QString("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x+110).arg(x+140);
*s += QString("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x+110).arg(x+140);
*s += QStringLiteral("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x+110).arg(x+140);
*s += QStringLiteral("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x+110).arg(x+140);
}
}
else
for(i = 0; i < (Filter->Order / 2); i++) {
x = 240 + (i * 140);
*s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+20);
*s += QString("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x-30).arg(x);
*s += QString("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x-30).arg(x);
*s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+20);
*s += QStringLiteral("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x-30).arg(x);
*s += QStringLiteral("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x-30).arg(x);
}
}
else
for(i = 0; i < (Filter->Order / 2); i++) {
x = 170 + (i * 140);
if(piType) {
*s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+40);
*s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+100).arg(x+140);
*s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+40);
*s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+100).arg(x+140);
}
else
*s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+30).arg(x+110);
*s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+30).arg(x+110);
}
// vertical wires for connecting the second series component
@ -249,8 +249,8 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
i = (Filter->Order+1) / 2 - 1;
for(; i>=0; i--) {
x += 140;
*s += QString("<%1 240 %2 205 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QString("<%1 240 %2 205 \"\" 0 0 0>\n").arg(x+60).arg(x+60);
*s += QStringLiteral("<%1 240 %2 205 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QStringLiteral("<%1 240 %2 205 \"\" 0 0 0>\n").arg(x+60).arg(x+60);
}
if(piType)
x -= 40;
@ -262,20 +262,20 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
if(piType) {
if(Filter->Order & 1) {
x += 140 + 110;
*s += QString("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x-110).arg(x);
*s += QStringLiteral("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x-110).arg(x);
}
}
else {
if(Filter->Class == CLASS_BANDPASS) {
if((Filter->Order & 1) == 0)
*s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+20).arg(x+140);
*s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+20).arg(x+140);
}
else {
if(Filter->Order & 1)
*s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+170).arg(x+210);
*s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+170).arg(x+210);
else
*s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+110).arg(x+210);
*s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+110).arg(x+210);
}
}
*s += "</Wires>\n";
@ -285,27 +285,27 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType)
*s += "<Paintings>\n";
*s += QString("<Text 400 %1 12 #000000 0 \"").arg(yc);
*s += QStringLiteral("<Text 400 %1 12 #000000 0 \"").arg(yc);
switch(Filter->Type) {
case TYPE_BESSEL: *s += QString("Bessel "); break;
case TYPE_BUTTERWORTH: *s += QString("Butterworth "); break;
case TYPE_CHEBYSHEV: *s += QString("Chebyshev "); break;
case TYPE_BESSEL: *s += QStringLiteral("Bessel "); break;
case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth "); break;
case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev "); break;
}
switch(Filter->Class) {
case CLASS_LOWPASS:
*s += QString("low-pass filter \\n %1Hz cutoff").arg(num2str(Filter->Frequency)); break;
*s += QStringLiteral("low-pass filter \\n %1Hz cutoff").arg(num2str(Filter->Frequency)); break;
case CLASS_HIGHPASS:
*s += QString("high-pass filter \\n %1Hz cutoff").arg(num2str(Filter->Frequency)); break;
*s += QStringLiteral("high-pass filter \\n %1Hz cutoff").arg(num2str(Filter->Frequency)); break;
case CLASS_BANDPASS:
*s += QString("band-pass filter \\n %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break;
*s += QStringLiteral("band-pass filter \\n %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break;
case CLASS_BANDSTOP:
*s += QString("band-stop filter \\n %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break;
*s += QStringLiteral("band-stop filter \\n %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break;
}
if (piType == true)
*s += QString(", pi-type, \\n impedance matching %1 Ohm\">\n").arg(Filter->Impedance);
*s += QStringLiteral(", pi-type, \\n impedance matching %1 Ohm\">\n").arg(Filter->Impedance);
else
*s += QString(", tee-type, \\n impedance matching %1 Ohm\">\n").arg(Filter->Impedance);
*s += QStringLiteral(", tee-type, \\n impedance matching %1 Ohm\">\n").arg(Filter->Impedance);
*s += "</Paintings>\n";
return s;

View File

@ -46,8 +46,8 @@ QString* Line_Filter::createSchematic(tFilter *Filter, tSubstrate *Substrate, bo
int i, x, yc;
x = 60;
*s += "<Components>\n";
*s += QString("<Pac P1 1 %1 320 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QString("<GND * 1 %1 350 0 0 0 0>\n").arg(x);
*s += QStringLiteral("<Pac P1 1 %1 320 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 %1 350 0 0 0 0>\n").arg(x);
x -= 30;
yc = 180;
@ -114,45 +114,45 @@ QString* Line_Filter::createSchematic(tFilter *Filter, tSubstrate *Substrate, bo
if(i > 0) {
len -= dl;
if(isMicrostrip)
*s += QString("<MLIN MS1 1 %1 %2 -26 15 0 0 \"Subst1\" 0 \"%3\" 1 \"%4\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"26.85\" 0>\n").arg(x).arg(yc).arg(num2str(width)).arg(num2str(len));
*s += QStringLiteral("<MLIN MS1 1 %1 %2 -26 15 0 0 \"Subst1\" 0 \"%3\" 1 \"%4\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"26.85\" 0>\n").arg(x).arg(yc).arg(num2str(width)).arg(num2str(len));
else
*s += QString("<TLIN Line1 1 %1 %2 -26 20 0 0 \"%3\" 1 \"%4\" 1 \"0 dB\" 0 \"26.85\" 0>\n").arg(x).arg(yc).arg(Filter->Impedance).arg(num2str(len));
*s += QStringLiteral("<TLIN Line1 1 %1 %2 -26 20 0 0 \"%3\" 1 \"%4\" 1 \"0 dB\" 0 \"26.85\" 0>\n").arg(x).arg(yc).arg(Filter->Impedance).arg(num2str(len));
x += 90;
}
if(isMicrostrip)
*s += QString("<MGAP MS1 1 %1 %2 -26 15 0 0 \"Subst1\" 0 \"%3\" 1 \"%4\" 1 \"%5\" 1 \"Hammerstad\" 0 \"Kirschning\" 0>\n").arg(x).arg(yc).arg(num2str(width)).arg(num2str(width)).arg(num2str(gap));
*s += QStringLiteral("<MGAP MS1 1 %1 %2 -26 15 0 0 \"Subst1\" 0 \"%3\" 1 \"%4\" 1 \"%5\" 1 \"Hammerstad\" 0 \"Kirschning\" 0>\n").arg(x).arg(yc).arg(num2str(width)).arg(num2str(width)).arg(num2str(gap));
else
*s += QString("<C C1 1 %1 %2 -26 17 0 0 \"%3\" 1>\n").arg(x).arg(yc).arg(num2str(gap));
*s += QStringLiteral("<C C1 1 %1 %2 -26 17 0 0 \"%3\" 1>\n").arg(x).arg(yc).arg(num2str(gap));
}
x += 80;
*s += QString("<Pac P2 1 %1 320 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QString("<GND * 1 %1 350 0 0 0 0>\n").arg(x);
*s += QStringLiteral("<Pac P2 1 %1 320 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 %1 350 0 0 0 0>\n").arg(x);
Value = 2.0 * Filter->Frequency - Filter->Frequency2;
Value2 = 2.0 * Filter->Frequency2 - Filter->Frequency;
*s += QString("<.SP SP1 1 70 420 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(Value)).arg(num2str(Value2));
*s += QStringLiteral("<.SP SP1 1 70 420 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(Value)).arg(num2str(Value2));
if(isMicrostrip)
*s += QString("<SUBST Subst1 1 300 460 -30 24 0 0 \"%1\" 1 \"%2m\" 1 \"%3m\" 1 \"%4\" 1 \"%5\" 1 \"%6\" 1>\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness);
*s += QString("<Eqn Eqn1 1 450 520 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
*s += QStringLiteral("<SUBST Subst1 1 300 460 -30 24 0 0 \"%1\" 1 \"%2m\" 1 \"%3m\" 1 \"%4\" 1 \"%5\" 1 \"%6\" 1>\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness);
*s += QStringLiteral("<Eqn Eqn1 1 450 520 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
*s += "</Components>\n";
*s += "<Wires>\n";
// connect left source
*s += QString("<60 180 60 290 \"\" 0 0 0>\n");
*s += QString("<60 180 90 180 \"\" 0 0 0>\n");
*s += QStringLiteral("<60 180 60 290 \"\" 0 0 0>\n");
*s += QStringLiteral("<60 180 90 180 \"\" 0 0 0>\n");
// connect right source
*s += QString("<%1 180 %2 290 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QString("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x-50).arg(x);
*s += QStringLiteral("<%1 180 %2 290 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x-50).arg(x);
// wires between components
x = 150;
for(i = 0; i < 2*Filter->Order; i++) {
*s += QString("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x).arg(x+30);
*s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x).arg(x+30);
x += 90;
}
@ -163,15 +163,15 @@ QString* Line_Filter::createSchematic(tFilter *Filter, tSubstrate *Substrate, bo
*s += "<Paintings>\n";
*s += QString("<Text 420 420 12 #000000 0 \"end-coupled, half-wavelength bandpass filter \\n ");
*s += QStringLiteral("<Text 420 420 12 #000000 0 \"end-coupled, half-wavelength bandpass filter \\n ");
switch(Filter->Type) {
case TYPE_BESSEL: *s += QString("Bessel"); break;
case TYPE_BUTTERWORTH: *s += QString("Butterworth"); break;
case TYPE_CHEBYSHEV: *s += QString("Chebyshev"); break;
case TYPE_BESSEL: *s += QStringLiteral("Bessel"); break;
case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth"); break;
case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev"); break;
}
*s += QString(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2));
*s += QString("impedance matching %3 Ohm\">\n").arg(Filter->Impedance);
*s += QStringLiteral(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2));
*s += QStringLiteral("impedance matching %3 Ohm\">\n").arg(Filter->Impedance);
*s += "</Paintings>\n";
return s;

View File

@ -102,7 +102,7 @@ int main(int argc, char *argv[])
QString lang = QucsSettings.Language;
if(lang.isEmpty())
lang = QString(QLocale::system().name());
tor.load( QString("qucs_") + lang, QucsSettings.LangDir);
static_cast<void>(tor.load( QStringLiteral("qucs_") + lang, QucsSettings.LangDir));
a.installTranslator( &tor );
QucsFilter *qucs = new QucsFilter();

View File

@ -14,6 +14,10 @@
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <cmath>
#include <iostream>
#include <sstream>
@ -144,134 +148,134 @@ QString filter::to_qucs() {
int x = 0;
// Draw left power source
compos += QString("<Pac P1 1 %1 290 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 "
compos += QStringLiteral("<Pac P1 1 %1 290 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 "
"dBm\" 0 \"1 GHz\" 0>\n")
.arg(x)
.arg((double)imp_);
compos += QString("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
wires += QString("<0 200 %1 200 \"\" 0 0 0>\n").arg(space / 2);
wires += QString("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x);
compos += QStringLiteral("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
wires += QStringLiteral("<0 200 %1 200 \"\" 0 0 0>\n").arg(space / 2);
wires += QStringLiteral("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x);
// Draw filter sections
for (auto& subsec : subsecs_) {
x += space;
if (subsec.wiring == SERIES) {
if (subsec.content == INDUC) {
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QString("<L L1 1 %1 %2 -26 -50 0 0 \"%3H\" 1>\n")
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QStringLiteral("<L L1 1 %1 %2 -26 -50 0 0 \"%3H\" 1>\n")
.arg(x)
.arg(200)
.arg(num2str(subsec.indc_v));
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
} else if (subsec.content == CAPA) {
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QString("<C C1 1 %1 %2 -26 -50 0 0 \"%3F\" 1>\n")
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QStringLiteral("<C C1 1 %1 %2 -26 -50 0 0 \"%3F\" 1>\n")
.arg(x)
.arg(200)
.arg(num2str(subsec.capa_v));
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
} else if (subsec.content == PARA_CAPA_INDUC) {
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QString("<C C1 1 %1 %2 -26 -80 0 0 \"%3F\" 1>\n")
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QStringLiteral("<C C1 1 %1 %2 -26 -80 0 0 \"%3F\" 1>\n")
.arg(x)
.arg(200)
.arg(num2str(subsec.capa_v));
wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x - 30).arg(200).arg(170);
wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x + 30).arg(200).arg(170);
compos += QString("<L L1 1 %1 %2 -26 -90 0 0 \"%3H\" 1>\n")
wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x - 30).arg(200).arg(170);
wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x + 30).arg(200).arg(170);
compos += QStringLiteral("<L L1 1 %1 %2 -26 -90 0 0 \"%3H\" 1>\n")
.arg(x)
.arg(170)
.arg(num2str(subsec.indc_v));
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
} else if (subsec.content == SERIES_CAPA_INDUC) {
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QString("<C C1 1 %1 %2 -26 -50 0 0 \"%3F\" 1>\n")
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QStringLiteral("<C C1 1 %1 %2 -26 -50 0 0 \"%3F\" 1>\n")
.arg(x)
.arg(200)
.arg(num2str(subsec.capa_v));
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
x += space;
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QString("<L L1 1 %1 %2 -26 -50 0 0 \"%3H\" 1>\n")
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30);
compos += QStringLiteral("<L L1 1 %1 %2 -26 -50 0 0 \"%3H\" 1>\n")
.arg(x)
.arg(200)
.arg(num2str(subsec.indc_v));
wires +=
QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2);
}
} else if (subsec.wiring == SHUNT) {
if (subsec.content == INDUC) {
wires += QString("<%1 200 %2 200 0 0 0>\n")
wires += QStringLiteral("<%1 200 %2 200 0 0 0>\n")
.arg(x - space / 2)
.arg(x + space / 2);
wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260);
compos += QString("<L L1 1 %1 %2 17 -26 0 1 \"%3H\" 1>\n")
wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260);
compos += QStringLiteral("<L L1 1 %1 %2 17 -26 0 1 \"%3H\" 1>\n")
.arg(x)
.arg(290)
.arg(num2str(subsec.indc_v));
compos += QString("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
compos += QStringLiteral("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
} else if (subsec.content == CAPA) {
wires += QString("<%1 200 %2 200 0 0 0>\n")
wires += QStringLiteral("<%1 200 %2 200 0 0 0>\n")
.arg(x - space / 2)
.arg(x + space / 2);
wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260);
compos += QString("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n")
wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260);
compos += QStringLiteral("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n")
.arg(x)
.arg(290)
.arg(num2str(subsec.capa_v));
compos += QString("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
compos += QStringLiteral("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
} else if (subsec.content == SERIES_CAPA_INDUC) {
wires += QString("<%1 200 %2 200 0 0 0>\n")
wires += QStringLiteral("<%1 200 %2 200 0 0 0>\n")
.arg(x - space / 2)
.arg(x + space / 2);
compos += QString("<L L1 1 %1 %2 17 -26 0 1 \"%3H\" 1>\n")
compos += QStringLiteral("<L L1 1 %1 %2 17 -26 0 1 \"%3H\" 1>\n")
.arg(x)
.arg(230)
.arg(num2str(subsec.indc_v));
compos += QString("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n")
compos += QStringLiteral("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n")
.arg(x)
.arg(290)
.arg(num2str(subsec.capa_v));
compos += QString("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
compos += QStringLiteral("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
} else if (subsec.content == PARA_CAPA_INDUC) {
wires += QString("<%1 200 %2 200 0 0 0>\n")
wires += QStringLiteral("<%1 200 %2 200 0 0 0>\n")
.arg(x - space / 2)
.arg(x + space / 2);
wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260);
compos += QString("<L L1 1 %1 %2 47 16 0 1 \"%3H\" 1>\n")
wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260);
compos += QStringLiteral("<L L1 1 %1 %2 47 16 0 1 \"%3H\" 1>\n")
.arg(x)
.arg(290)
.arg(num2str(subsec.indc_v));
wires += QString("<%1 260 %2 260 0 0 0>\n").arg(x).arg(x + 30);
compos += QString("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n")
wires += QStringLiteral("<%1 260 %2 260 0 0 0>\n").arg(x).arg(x + 30);
compos += QStringLiteral("<C C1 1 %1 %2 17 -26 0 1 \"%3F\" 1>\n")
.arg(x + 30)
.arg(290)
.arg(num2str(subsec.capa_v));
wires += QString("<%1 320 %2 320 0 0 0>\n").arg(x).arg(x + 30);
compos += QString("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
wires += QStringLiteral("<%1 320 %2 320 0 0 0>\n").arg(x).arg(x + 30);
compos += QStringLiteral("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
}
}
}
// Draw right power source
x += space;
wires += QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x);
compos += QString("<Pac P2 1 %1 290 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 "
wires += QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x);
compos += QStringLiteral("<Pac P2 1 %1 290 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 "
"dBm\" 0 \"1 GHz\" 0>\n")
.arg(x)
.arg((double)imp_);
compos += QString("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
wires += QString("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x);
compos += QStringLiteral("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
wires += QStringLiteral("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x);
QString s = "";
s += "<Qucs Schematic 24.2.1>\n";
s += QStringLiteral("<Qucs Schematic " PACKAGE_VERSION ">\n");
s += "<Components>\n";
s += compos;
@ -289,7 +293,7 @@ QString filter::to_qucs() {
eqn_string += "\"dBS11=dB(S[1,1])\" 1 \"yes\" 0>\n";
break;
case spicecompat::simNgspice :
eqn_string = QString("<NutmegEq NutmegEq1 1 260 410 -28 15 0 0 \"SP1\" 1 \"dBS21=dB(S_2_1)\" 1 \"dBS11=dB(S_1_1)\" 1>\n");
eqn_string = QStringLiteral("<NutmegEq NutmegEq1 1 260 410 -28 15 0 0 \"SP1\" 1 \"dBS21=dB(S_2_1)\" 1 \"dBS11=dB(S_1_1)\" 1>\n");
break;
case spicecompat::simSpiceOpus:
case spicecompat::simXyce:

View File

@ -64,8 +64,8 @@ QString *QuarterWave_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr
int x_space = 50;
// First power and ground
c_s += QString("<Pac P1 1 %1 330 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
c_s += QString("<GND * 1 %1 360 0 0 0 0>\n").arg(x);
c_s += QStringLiteral("<Pac P1 1 %1 330 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
c_s += QStringLiteral("<GND * 1 %1 360 0 0 0 0>\n").arg(x);
w_s += getWireString(60, 180, 60, 300);
w_s += getWireString(60, 180, 90, 180);
x += 60;
@ -116,7 +116,7 @@ QString *QuarterWave_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr
c_s += getMS_Via(0.5, x+40 + x_space, 30, 2); // MS via diameter = 0.5 mm
}
else{
c_s += QString("<GND * 1 %1 30 0 0 1 0>\n").arg(x + 60 + x_space);
c_s += QStringLiteral("<GND * 1 %1 30 0 0 1 0>\n").arg(x + 60 + x_space);
}
}
@ -135,30 +135,30 @@ QString *QuarterWave_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr
// Last power and ground
x += 80;
c_s += QString("<Pac P2 1 %1 330 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
c_s += QString("<GND * 1 %1 360 0 0 0 0>\n").arg(x);
c_s += QStringLiteral("<Pac P2 1 %1 330 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
c_s += QStringLiteral("<GND * 1 %1 360 0 0 0 0>\n").arg(x);
w_s += getWireString(x, 180, x, 300);
w_s += getWireString(x-50, 180, x, 180);
// Components footer
c_s += QString("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1 * Filter->Frequency)).arg(num2str(10.0 * Filter->Frequency));
c_s += QStringLiteral("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1 * Filter->Frequency)).arg(num2str(10.0 * Filter->Frequency));
if (isMicrostrip)
c_s += QString("<SUBST Sub1 1 300 500 -30 24 0 0 \"%1\" 1 \"%2m\" 1 \"%3m\" 1 \"%4\" 1 \"%5\" 1 \"%6\" 1>\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness);
c_s += QString("<Eqn Eqn1 1 450 560 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
c_s += QStringLiteral("<SUBST Sub1 1 300 500 -30 24 0 0 \"%1\" 1 \"%2m\" 1 \"%3m\" 1 \"%4\" 1 \"%5\" 1 \"%6\" 1>\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness);
c_s += QStringLiteral("<Eqn Eqn1 1 450 560 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
*s += c_s + "</Components>\n";
*s += w_s + "</Wires>\n";
// Footer
*s += "<Diagrams>\n";
*s += "</Diagrams>\n";
*s += "<Paintings>\n";
*s += QString("<Text 420 460 12 #000000 0 \"Quarter wave bandpass filter \\n ");
*s += QStringLiteral("<Text 420 460 12 #000000 0 \"Quarter wave bandpass filter \\n ");
switch (Filter->Type)
{
case TYPE_BESSEL: *s += QString("Bessel"); break;
case TYPE_BUTTERWORTH: *s += QString("Butterworth"); break;
case TYPE_CHEBYSHEV: *s += QString("Chebyshev"); break;
case TYPE_BESSEL: *s += QStringLiteral("Bessel"); break;
case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth"); break;
case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev"); break;
}
*s += QString(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2));
*s += QString("Impedance matching %3 Ohm\">\n").arg(Filter->Impedance);
*s += QStringLiteral(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2));
*s += QStringLiteral("Impedance matching %3 Ohm\">\n").arg(Filter->Impedance);
*s += "</Paintings>\n";
return s;
}

View File

@ -511,7 +511,7 @@ void QucsFilter::slotShowResult()
ResultState++;
if(ResultState & 1) c = 0xFF;
else c = 0x80;
QString s = QString("<font color=\"#00%1000\"><b> ").arg(c, 2, 16);
QString s = QStringLiteral("<font color=\"#00%1000\"><b> ").arg(c, 2, 16);
LabelResult->setText(tr("Result:") + s + tr("Successful") + "</b></font>");
c = 500;

View File

@ -53,8 +53,8 @@ QString* StepImpedance_Filter::createSchematic(tFilter *Filter, tSubstrate *Subs
x = 60;
*s += "<Components>\n";
*s += QString("<Pac P1 1 %1 330 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QString("<GND * 1 %1 360 0 0 0 0>\n").arg(x);
*s += QStringLiteral("<Pac P1 1 %1 330 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 %1 360 0 0 0 0>\n").arg(x);
x -= 30;
for(i = 0; i < Filter->Order; i++) {
@ -85,36 +85,36 @@ QString* StepImpedance_Filter::createSchematic(tFilter *Filter, tSubstrate *Subs
}
if(isMicrostrip)
*s += QString("<MLIN MS1 1 %1 180 -26 15 0 0 \"Sub1\" 1 \"%2\" 1 \"%3\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"26.85\" 0>\n").arg(x).arg(num2str(width)).arg(num2str(len));
*s += QStringLiteral("<MLIN MS1 1 %1 180 -26 15 0 0 \"Sub1\" 1 \"%2\" 1 \"%3\" 1 \"Hammerstad\" 0 \"Kirschning\" 0 \"26.85\" 0>\n").arg(x).arg(num2str(width)).arg(num2str(len));
else
*s += QString("<TLIN Line1 1 %1 180 -26 20 0 0 \"%2\" 1 \"%3\" 1 \"0 dB\" 0 \"26.85\" 0>\n").arg(x).arg(Z0).arg(num2str(len));
*s += QStringLiteral("<TLIN Line1 1 %1 180 -26 20 0 0 \"%2\" 1 \"%3\" 1 \"0 dB\" 0 \"26.85\" 0>\n").arg(x).arg(Z0).arg(num2str(len));
}
x += 80;
*s += QString("<Pac P2 1 %1 330 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QString("<GND * 1 %1 360 0 0 0 0>\n").arg(x);
*s += QStringLiteral("<Pac P2 1 %1 330 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 dBm\" 0 \"1 GHz\" 0>\n").arg(x).arg(Filter->Impedance);
*s += QStringLiteral("<GND * 1 %1 360 0 0 0 0>\n").arg(x);
*s += QString("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1 * Filter->Frequency)).arg(num2str(10.0 * Filter->Frequency));
*s += QStringLiteral("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1 * Filter->Frequency)).arg(num2str(10.0 * Filter->Frequency));
if(isMicrostrip)
*s += QString("<SUBST Sub1 1 300 500 -30 24 0 0 \"%1\" 1 \"%2m\" 1 \"%3m\" 1 \"%4\" 1 \"%5\" 1 \"%6\" 1>\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness);
*s += QString("<Eqn Eqn1 1 450 560 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
*s += QStringLiteral("<SUBST Sub1 1 300 500 -30 24 0 0 \"%1\" 1 \"%2m\" 1 \"%3m\" 1 \"%4\" 1 \"%5\" 1 \"%6\" 1>\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness);
*s += QStringLiteral("<Eqn Eqn1 1 450 560 -28 15 0 0 \"S21_dB=dB(S[2,1])\" 1 \"S11_dB=dB(S[1,1])\" 1 \"yes\" 0>\n");
*s += "</Components>\n";
*s += "<Wires>\n";
// connect left source
*s += QString("<60 180 60 300 \"\" 0 0 0>\n");
*s += QString("<60 180 90 180 \"\" 0 0 0>\n");
*s += QStringLiteral("<60 180 60 300 \"\" 0 0 0>\n");
*s += QStringLiteral("<60 180 90 180 \"\" 0 0 0>\n");
// connect right source
*s += QString("<%1 180 %2 300 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QString("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x-50).arg(x);
*s += QStringLiteral("<%1 180 %2 300 \"\" 0 0 0>\n").arg(x).arg(x);
*s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x-50).arg(x);
// wires between components
x = 150;
for(i = 1; i < Filter->Order; i++) {
*s += QString("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x).arg(x+30);
*s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x).arg(x+30);
x += 90;
}
@ -125,15 +125,15 @@ QString* StepImpedance_Filter::createSchematic(tFilter *Filter, tSubstrate *Subs
*s += "<Paintings>\n";
*s += QString("<Text 420 460 12 #000000 0 \"stepped-impedance lowpass filter \\n ");
*s += QStringLiteral("<Text 420 460 12 #000000 0 \"stepped-impedance lowpass filter \\n ");
switch(Filter->Type) {
case TYPE_BESSEL: *s += QString("Bessel"); break;
case TYPE_BUTTERWORTH: *s += QString("Butterworth"); break;
case TYPE_CHEBYSHEV: *s += QString("Chebyshev"); break;
case TYPE_BESSEL: *s += QStringLiteral("Bessel"); break;
case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth"); break;
case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev"); break;
}
*s += QString(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2));
*s += QString("impedance matching %3 Ohm\">\n").arg(Filter->Impedance);
*s += QStringLiteral(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2));
*s += QStringLiteral("impedance matching %3 Ohm\">\n").arg(Filter->Impedance);
*s += "</Paintings>\n";
return s;

View File

@ -33,30 +33,15 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
if(QT_VERSION_MAJOR EQUAL 6)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg SvgWidgets)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Svg SvgWidgets)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Svg_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}SvgWidgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
${Qt6Svg_INCLUDE_DIRS}
${Qt6SvgWidgets_INCLUDE_DIRS}
)
else()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Svg_INCLUDE_DIRS}
)
endif()
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -80,8 +65,9 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS)
string(REGEX REPLACE "/W3" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/W1" "/w" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
add_compile_options(/permissive- /Zc:__cplusplus /Zc:preprocessor /MP /vmg)
add_link_options(/OPT:REF /OPT:ICF)
else()
add_compile_options(-w)
endif()
@ -103,13 +89,9 @@ SET(QUCS-POWCOMB_MOC_HDRS
)
SET(RESOURCES qucspowercombining.qrc)
IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP(QUCS-POWCOMB_MOC_SRCS ${QUCS-POWCOMB_MOC_HDRS})
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ELSE()
QT5_WRAP_CPP(QUCS-POWCOMB_MOC_SRCS ${QUCS-POWCOMB_MOC_HDRS})
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ENDIF()
IF(APPLE)
# set information on Info.plist file
@ -135,13 +117,8 @@ ADD_EXECUTABLE(${QUCS_NAME}powercombining MACOSX_BUNDLE WIN32
${QUCS-POWCOMB_MOC_SRCS}
${RESOURCES_SRCS} )
if(QT_VERSION_MAJOR EQUAL 6)
TARGET_LINK_LIBRARIES(${QUCS_NAME}powercombining Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::SvgWidgets)
else()
TARGET_LINK_LIBRARIES(${QUCS_NAME}powercombining Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg )
endif()
TARGET_LINK_LIBRARIES(${QUCS_NAME}powercombining Qt6::Core
Qt6::Widgets Qt6::Svg Qt6::SvgWidgets)
SET_TARGET_PROPERTIES(${QUCS_NAME}powercombining PROPERTIES POSITION_INDEPENDENT_CODE TRUE)

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,350 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="500"
height="380"
version="1.2"
id="svg2"
inkscape:version="0.48.4 r9939"
sodipodi:docname="Tee.svg">
<metadata
id="metadata122">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Qt Svg Document</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="713"
id="namedview120"
showgrid="false"
inkscape:zoom="0.76725193"
inkscape:cx="120.98216"
inkscape:cy="127.12482"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<title
id="title4">Qt Svg Document</title>
<desc
id="desc6">Generated with Qt</desc>
<defs
id="defs8" />
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g16"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<polyline
style="fill:none"
id="polyline18"
points="15,79 75,79 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline20"
points="17,86 73,86 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline22"
points="17,93 24,86 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline24"
points="24,93 31,86 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline26"
points="31,93 38,86 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline28"
points="38,93 45,86 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline30"
points="45,93 52,86 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline32"
points="52,93 59,86 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline34"
points="59,93 66,86 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline36"
points="66,93 73,86 "
vector-effect="none" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g38"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)" />
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g40"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<polyline
style="fill:none"
id="polyline42"
points="115,139 175,139 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline44"
points="117,146 173,146 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline46"
points="117,153 124,146 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline48"
points="124,153 131,146 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline50"
points="131,153 138,146 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline52"
points="138,153 145,146 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline54"
points="145,153 152,146 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline56"
points="152,153 159,146 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline58"
points="159,153 166,146 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline60"
points="166,153 173,146 "
vector-effect="none" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g62"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)" />
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g64"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<polyline
style="fill:none"
id="polyline66"
points="115,19 175,19 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline68"
points="117,26 173,26 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline70"
points="117,33 124,26 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline72"
points="124,33 131,26 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline74"
points="131,33 138,26 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline76"
points="138,33 145,26 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline78"
points="145,33 152,26 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline80"
points="152,33 159,26 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline82"
points="159,33 166,26 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline84"
points="166,33 173,26 "
vector-effect="none" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g86"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)" />
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g88"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<polyline
style="fill:none"
id="polyline90"
points="75,79 75,139 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline92"
points="75,19 75,79 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline94"
points="75,139 115,139 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline96"
points="75,19 115,19 "
vector-effect="none" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#ff0000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g98"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
inkscape:connector-curvature="0"
id="path100"
d="m 19,79 c 0,2.2091 -1.7909,4 -4,4 -2.2091,0 -4,-1.7909 -4,-4 0,-2.2091 1.7909,-4 4,-4 2.2091,0 4,1.7909 4,4"
vector-effect="none" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:#000080;fill-opacity:1;stroke:#000080;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g102"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
style="fill-rule:evenodd"
inkscape:connector-curvature="0"
id="path104"
d="m 78,79 c 0,1.6569 -1.3431,3 -3,3 -1.6569,0 -3,-1.3431 -3,-3 0,-1.6569 1.3431,-3 3,-3 1.6569,0 3,1.3431 3,3"
vector-effect="none" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:#000080;fill-opacity:1;stroke:none;font-family:Helvetica"
id="g106"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
style="fill-rule:evenodd"
inkscape:connector-curvature="0"
id="path108"
d="m 113,17 4,0 0,4 -4,0 0,-4"
vector-effect="non-scaling-stroke" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:#000080;fill-opacity:1;stroke:none;font-family:Helvetica"
id="g110"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
style="fill-rule:evenodd"
inkscape:connector-curvature="0"
id="path112"
d="m 113,137 4,0 0,4 -4,0 0,-4"
vector-effect="non-scaling-stroke" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#ff0000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g114"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
inkscape:connector-curvature="0"
id="path116"
d="m 179,139 c 0,2.209 -1.791,4 -4,4 -2.209,0 -4,-1.791 -4,-4 0,-2.209 1.791,-4 4,-4 2.209,0 4,1.791 4,4"
vector-effect="none" />
<path
inkscape:connector-curvature="0"
id="path118"
d="m 179,19 c 0,2.2091 -1.791,4 -4,4 -2.209,0 -4,-1.7909 -4,-4 0,-2.2091 1.791,-4 4,-4 2.209,0 4,1.7909 4,4"
vector-effect="none" />
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="380" version="1.2"><desc>Generated with Qt</desc><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:navy;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"><path d="M15 79h60M17 86h56M17 93l7-7M24 93l7-7M31 93l7-7M38 93l7-7M45 93l7-7M52 93l7-7M59 93l7-7M66 93l7-7" style="fill:none" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)"/></g><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:navy;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"><path d="M115 139h60M117 146h56M117 153l7-7M124 153l7-7M131 153l7-7M138 153l7-7M145 153l7-7M152 153l7-7M159 153l7-7M166 153l7-7" style="fill:none" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)"/></g><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:navy;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"><path d="M115 19h60M117 26h56M117 33l7-7M124 33l7-7M131 33l7-7M138 33l7-7M145 33l7-7M152 33l7-7M159 33l7-7M166 33l7-7" style="fill:none" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)"/></g><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:navy;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"><path d="M75 79v60M75 19v60M75 139h40M75 19h40" style="fill:none" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)"/></g><path d="M19 79a4 4 0 1 1-8 0 4 4 0 0 1 8 0" font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:red;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)"/><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:navy;fill-opacity:1;stroke:navy;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"><path d="M78 79a3 3 0 1 1-6 0 3 3 0 0 1 6 0" style="fill-rule:evenodd" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)"/></g><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:navy;fill-opacity:1;stroke:none;font-family:Helvetica"><path d="M113 17h4v4h-4z" style="fill-rule:evenodd" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)" vector-effect="non-scaling-stroke"/></g><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:navy;fill-opacity:1;stroke:none;font-family:Helvetica"><path d="M113 137h4v4h-4z" style="fill-rule:evenodd" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)" vector-effect="non-scaling-stroke"/></g><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:red;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"><path stroke-width="1.96628" d="M400.188 288.534a7.865 7.865 0 1 1-15.731 0 7.865 7.865 0 0 1 15.731 0M400.188 52.58a7.865 7.865 0 1 1-15.73 0 7.865 7.865 0 0 1 15.73 0"/></g></svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1,284 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="500"
height="380"
version="1.2"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="Tee_microstrip.svg">
<metadata
id="metadata122">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Qt Svg Document</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="704"
id="namedview120"
showgrid="false"
inkscape:zoom="1.0850581"
inkscape:cx="160.44055"
inkscape:cy="272.4927"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<title
id="title4">Qt Svg Document</title>
<desc
id="desc6">Generated with Qt</desc>
<defs
id="defs8" />
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g38"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)" />
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g62"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)" />
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g86"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)" />
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#000080;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g88"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<polyline
style="fill:none"
id="polyline90"
points="75,79 75,139 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline92"
points="75,19 75,79 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline94"
points="75,139 115,139 "
vector-effect="none" />
<polyline
style="fill:none"
id="polyline96"
points="75,19 115,19 "
vector-effect="none" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#ff0000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g98"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
inkscape:connector-curvature="0"
id="path100"
d="m 19,79 c 0,2.2091 -1.7909,4 -4,4 -2.2091,0 -4,-1.7909 -4,-4 0,-2.2091 1.7909,-4 4,-4 2.2091,0 4,1.7909 4,4"
vector-effect="none" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:#000080;fill-opacity:1;stroke:#000080;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g102"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
style="fill-rule:evenodd"
inkscape:connector-curvature="0"
id="path104"
d="m 78,79 c 0,1.6569 -1.3431,3 -3,3 -1.6569,0 -3,-1.3431 -3,-3 0,-1.6569 1.3431,-3 3,-3 1.6569,0 3,1.3431 3,3"
vector-effect="none" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:#000080;fill-opacity:1;stroke:none;font-family:Helvetica"
id="g106"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
style="fill-rule:evenodd"
inkscape:connector-curvature="0"
id="path108"
d="m 113,17 4,0 0,4 -4,0 0,-4"
vector-effect="non-scaling-stroke" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:#000080;fill-opacity:1;stroke:none;font-family:Helvetica"
id="g110"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
style="fill-rule:evenodd"
inkscape:connector-curvature="0"
id="path112"
d="m 113,137 4,0 0,4 -4,0 0,-4"
vector-effect="non-scaling-stroke" />
</g>
<g
style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:#ff0000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"
id="g114"
font-style="normal"
font-weight="400"
font-size="12"
transform="matrix(1.9662788,0,0,1.9662788,48.224056,15.221246)">
<path
inkscape:connector-curvature="0"
id="path116"
d="m 179,139 c 0,2.209 -1.791,4 -4,4 -2.209,0 -4,-1.791 -4,-4 0,-2.209 1.791,-4 4,-4 2.209,0 4,1.791 4,4"
vector-effect="none" />
<path
inkscape:connector-curvature="0"
id="path118"
d="m 179,19 c 0,2.2091 -1.791,4 -4,4 -2.209,0 -4,-1.7909 -4,-4 0,-2.2091 1.791,-4 4,-4 2.209,0 4,1.7909 4,4"
vector-effect="none" />
</g>
<path
inkscape:connector-curvature="0"
id="path24-5"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 270.85493,288.47059 23.85548,0.0204"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path26-3"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 369.03738,288.70768 22.70256,-0.007"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path28-5"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;image-rendering:auto"
d="m 306.33419,270.27301 71.42981,0.51756"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path30-6"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 288.30259,307.05698 68.62544,-0.1774"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path32-2"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 305.15302,271.02651 -19.54354,35.3286"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path34-9"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 377.02492,273.41259 -18.85113,32.73887"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path24-5-6"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 269.73951,52.596123 23.85548,0.0204"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path26-3-7"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 367.92196,52.833213 22.70256,-0.007"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path28-5-5"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;image-rendering:auto"
d="m 305.21877,34.398542 71.42981,0.51756"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path30-6-3"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 287.18717,71.182516 68.62544,-0.1774"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path32-2-5"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="M 304.0376,35.152042 284.49406,70.480646"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path34-9-6"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="M 375.9095,37.538122 357.05837,70.276996"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path24-5-2"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 78.638431,170.54631 23.855479,0.0204"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path26-3-9"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 176.82088,170.7834 22.70256,-0.007"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path28-5-1"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;image-rendering:auto"
d="m 114.11769,152.34873 71.42981,0.51756"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path30-6-2"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 96.086091,189.1327 68.625439,-0.1774"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path32-2-7"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 112.93652,153.10223 -19.543539,35.3286"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path34-9-0"
style="fill:none;stroke:#000080;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
d="m 184.80842,155.48831 -18.85113,32.73887"
sodipodi:nodetypes="cc" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="380" version="1.2"><desc>Generated with Qt</desc><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:navy;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"><path d="M75 79v60M75 19v60M75 139h40M75 19h40" style="fill:none" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)"/></g><path d="M19 79a4 4 0 1 1-8 0 4 4 0 0 1 8 0" font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:red;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)"/><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:navy;fill-opacity:1;stroke:navy;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"><path d="M78 79a3 3 0 1 1-6 0 3 3 0 0 1 6 0" style="fill-rule:evenodd" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)"/></g><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:navy;fill-opacity:1;stroke:none;font-family:Helvetica"><path d="M113 17h4v4h-4z" style="fill-rule:evenodd" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)" vector-effect="non-scaling-stroke"/></g><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:navy;fill-opacity:1;stroke:none;font-family:Helvetica"><path d="M113 137h4v4h-4z" style="fill-rule:evenodd" transform="matrix(1.96628 0 0 1.96628 48.224 15.221)" vector-effect="non-scaling-stroke"/></g><g font-size="12" font-weight="400" style="font-size:12px;font-style:normal;font-weight:400;fill:none;stroke:red;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1;font-family:Helvetica"><path stroke-width="1.96628" d="M400.188 288.534a7.865 7.865 0 1 1-15.731 0 7.865 7.865 0 0 1 15.731 0M400.188 52.58a7.865 7.865 0 1 1-15.73 0 7.865 7.865 0 0 1 15.73 0"/></g><path d="m270.855 288.47 23.855.021M369.037 288.708l22.703-.007" style="fill:none;stroke:navy;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"/><path d="m306.334 270.273 71.43.518" style="fill:none;stroke:navy;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;image-rendering:auto"/><path d="m288.303 307.057 68.625-.177M305.153 271.027l-19.544 35.328M377.025 273.413l-18.851 32.738M269.74 52.596l23.855.02M367.922 52.833l22.703-.007" style="fill:none;stroke:navy;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"/><path d="m305.219 34.399 71.43.517" style="fill:none;stroke:navy;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;image-rendering:auto"/><path d="m287.187 71.183 68.626-.178M304.038 35.152l-19.544 35.329M375.91 37.538l-18.852 32.739M78.638 170.546l23.856.02M176.82 170.783l22.703-.007" style="fill:none;stroke:navy;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"/><path d="m114.118 152.349 71.43.517" style="fill:none;stroke:navy;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;image-rendering:auto"/><path d="m96.086 189.133 68.626-.178M112.937 153.102l-19.544 35.329M184.808 155.488l-18.85 32.74" style="fill:none;stroke:navy;stroke-width:3.9000001;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"/></svg>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Some files were not shown because too many files have changed in this diff Show More