missing NULL terminator in set_config_x
[geda-gaf.git] / examples / RF_Amp / README
blob91feb8fb928b8c9cec7667373e5523dd28dc915e
1 This README created 3.31.2003
3 ---------------------  Contents of directories  -----------------------
5 This directory holds the schematics and associated materials for a
6 SPICE model of Agilent's MSA-2643 bipolar amp.  The model was obtained
7 from Agilent's datasheet 5980-2396E.  The directory structure is as
8 follows:
10 RF_Amp (base directory)
12 MSA-2643.sch -- schematic of stuff inside device package (as shown in
13 p. 7 of datasheet.  Note that I have not included the transmission 
14 lines in this schematic because no value of Z was included in the data
15 sheet.   (Yes, it's probably 50 ohms, but including them was a
16 sideshow compared to my main intent: build a hierarchical model of an
17 RF circuit.)
18 MSA-2643.cir -- netlisted circuit ready for SPICE simulation.
20 Q1.sch -- schematic model of Q1 MSA-26 transistor shown on p. 8 of datasheet.
21 Q1.cir -- netlisted circuit holding .SUBCKT model of Q1.
23 Q2.sch -- schematic model of Q2 MSA-26 transistor shown on p. 8 of datasheet.
24 Q2.cir -- netlisted circuit holding .SUBCKT model of Q2.
26 README -- this file.
28 Simulation.cmd -- a file holding SPICE analysis commands which is read
29 at simulation time by the SPICE simulator.  
31 5980-2396E.pdf -- Agilent datasheet about the MSA-2643.
34 ./model/
36 BJTM1_Q1.mod -- text-based SPICE model of BJT1 used in Q1 .SUBCKT
37 DiodeM1_Q1.mod -- text-based SPICE model of diode M1 used in Q1 .SUBCKT
38 DiodeM2_Q1.mod -- SPICE model of diode M2 used in Q1 .SUBCKT
39 DiodeM3_Q1.mod -- SPICE model of diode M3 used in Q1 .SUBCKT
40 (similar files for Q2 models. . . .)
41 These models were obtained from parameters give in p. 8 of the datasheet.
43 ./sym/
45 BJT_Model.sym
46 spice-subcircuit-IO-1.sym
47 spice-subcircuit-LL-1.sym
48 Q_Model.sym -- symbol pointing to lower level models placed on upper
49 level schematic.
51 ------------  Usage of hierarchical spice models ---------------------
52 This project exemplifies construction of a hierarchical SPICE
53 simulation using gEDA.  The project is built in the following way:
55 1.  Use a text editor to create .mod files containing SPICE models of
56 the transistors and diodes on p. 8 of the datasheet.  
58 2.  Create Q1 and Q2 transistor model schematics using gschem.  Place
59 the .SUBCKT SPICE block on the schematic to alert the netlister that
60 the schematic is a lower level .SUBCKT for incorporation into other
61 schematics.  Place spice-IO pads on the schematic to instantiate the
62 IOs.  Make sure to number the spice-IO pads in the same order as you
63 wish them to appear in the .SUBCKT line in the .cir.
65 3.  Generate the .SUBCKT netlist by saying:
67 gnetlist -g spice-sdb -o Q1.cir Q1.sch
68 gnetlist -g spice-sdb -o Q2.cir Q2.sch
70 4.  Create a symbol for Q1.cir and Q2.cir which will be dropped onto
71 the higher lever schematic.  Name the symbol Q_Model.sym.  Set the
72 symbol "DEVICE" attribute = NPN_TRANSISTOR_subcircuit.  This causes
73 the netlister to use "write-default-component" to write out the SPICE
74 line for the component.  Make sure that the "REFDES" attribute is X?
75 and not Q? -- this enables the .SUBCKT file to be attached to the
76 device. 
78 5.  Create the higher layer schematic MSA-2643.sch.  Place
79 two copies of Q_Model.sym onto the schematic, corresponding to Q1 and
80 Q2.  Make Q1 point to its model by setting the following attributes: 
82 model-name: Q1_MSA26F
83 file: Q1.cir
85 Do the same for Q2.
87 6.  Create the rest of the higher layer schematic the usual way.  Make
88 sure to place a spice-include block on the schematic and point it to
89 "Simulation.cmd".  Place any analysis commands (e.g. .DC, .AC, .TRAN,
90 etc.) into the file "Simulation.cmd".
92 7.  Netlist the higher layer design:
94 gnetlist -g spice-sdb -o MSA-2643.cir MSA-2643.sch
96 8.  The circuit may be simulated by any desired SPICE simulation
97 and analysis package, e.g. LTSpice.
99 --------------------  Contact  ----------------------------
100 Documentation and other materials relevant to SPICE simulation under
101 gEDA lives at http://www.brorson.com/gEDA/SPICE
103 For inquiries or bug reports, please contact me:
105 Stuart Brorson
106 mailto:sdb@cloud9.net