Installing XSCHEM: Difference between revisions

From Center for Integrated Circuits and Devices Research (CIDR)
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
Line 11: Line 11:


== Using XSCHEM with the SkyWater 130nm PDK ==
== Using XSCHEM with the SkyWater 130nm PDK ==
To test your XSCHEM installation, you can use this sample [https://github.com/louisalarcon/ee220/blob/17b0d3bcd65fbbf05296293176a63dbc918f835b/cidr/cs-amp-gain-lvt.sch schematic] of a common-source amplifier, with the (1) test voltages and load capacitors, and (2) the simulation analyses added added as NGSPICE code. A screenshot of the schematic is shown in Fig. 1.  
After installing, you will need to copy the SkyWater 130nm design kit XSCHEM configuration file <code>/usr/local/share/pdk/sky130A/libs.tech/xschem/xschemrc</code> to your working directory to access the design kit features.


[[File:Cs-amp-gain-lvt.png|center|thumb|800px|Figure 1: A sample XSCHEM schematic of a common-source amplifier]]
To test your XSCHEM installation, you can download and use this sample [https://github.com/louisalarcon/ee220/blob/17b0d3bcd65fbbf05296293176a63dbc918f835b/cidr/cs-amp-gain-lvt.sch schematic] of a common-source amplifier, with the (1) test voltages and load capacitors, and (2) the simulation analyses added added as NGSPICE code. A screenshot of the schematic is shown in Fig. 1.
 
[[File:Cs-amp-gain-lvt.png|none|thumb|900px|Figure 1: A sample XSCHEM schematic of a common-source amplifier]]


To run the simulation, first click on the ''Netlist'' tab located at the upper right corner of the XSCHEM window, then click on the ''Simulate'' tab. This will call NGSPICE, and will run the simulation. Note that this assumes you have setup NGSPICE, XSCHEM, and the SkyWater 130nm design kit using the default file locations.
To run the simulation, first click on the ''Netlist'' tab located at the upper right corner of the XSCHEM window, then click on the ''Simulate'' tab. This will call NGSPICE, and will run the simulation. Note that this assumes you have setup NGSPICE, XSCHEM, and the SkyWater 130nm design kit using the default file locations.
Line 20: Line 22:


{|
{|
| [File:Cs-amp-transfer-char.png|thumb|400px|Figure 2: Common-source amplifier transfer characteristics.]]
| [[File:Cs-amp-transfer-char.png|thumb|400px|Figure 2: Common-source amplifier transfer characteristics.]]
| File:Cs-amp-gain.png|thumb|400px|Figure 3: CS amplifier small-signal gain.]]
| [[File:Cs-amp-gain.png|thumb|400px|Figure 3: CS amplifier small-signal gain.]]
|-
| [[File:Cs-amp-gmoverid.png|thumb|400px|Figure 4: CS amplifier <math>\tfrac{g_m}{I_D}</math>.]]
| [[File:Cs-amp-freq-resp.png|thumb|400px|Figure 5: CS amplifier frequency (magnitude) response.]]
|-
|-
| [[File:Cs-amp-output-noise.png|thumb|400px|Figure 6: CS amplifier output noise power spectral density.]]
|
|}
|}

Latest revision as of 16:35, 28 July 2022

XSCHEM is a schematic capture program that allows to interactively enter an electronic circuit using a graphical interface. When the schematic has been created a circuit netlist can be generated for simulation.

Installation

You can install XSCHEM via git using:

$ git clone https://github.com/StefanSchippers/xschem

The XSCHEM documentation is here.

Using XSCHEM with the SkyWater 130nm PDK

After installing, you will need to copy the SkyWater 130nm design kit XSCHEM configuration file /usr/local/share/pdk/sky130A/libs.tech/xschem/xschemrc to your working directory to access the design kit features.

To test your XSCHEM installation, you can download and use this sample schematic of a common-source amplifier, with the (1) test voltages and load capacitors, and (2) the simulation analyses added added as NGSPICE code. A screenshot of the schematic is shown in Fig. 1.

Figure 1: A sample XSCHEM schematic of a common-source amplifier

To run the simulation, first click on the Netlist tab located at the upper right corner of the XSCHEM window, then click on the Simulate tab. This will call NGSPICE, and will run the simulation. Note that this assumes you have setup NGSPICE, XSCHEM, and the SkyWater 130nm design kit using the default file locations.

Once the simulation completes, you will get plots for the common-source amplifier transfer characteristic, low frequency gain as a function of output swing, the power efficiency metric , the frequency response, and the output noise power spectral density, as shown in Figs. 2-6.

Figure 2: Common-source amplifier transfer characteristics.
Figure 3: CS amplifier small-signal gain.
Figure 4: CS amplifier .
Figure 5: CS amplifier frequency (magnitude) response.
Figure 6: CS amplifier output noise power spectral density.