❗ Important Note |
---|
This project contains the following Rf building blocks:
- Balanced Gilbert Cell Mixer
- Quadrature Voltage Controlled Oscilator
The design is optimized using python scripts integrated to ngspice shared library. This allows simulatons to be executed automatically in a loop and data to be processes using python scientific libraries. To run the simulations, he following tools need to be installed:
- ngspice compiled with shared libraries
- ignamv/ngspyce python library obtained from https://github.com/ignamv/ngspyce
- xschem and skywater sky130B pdks
The optimization process takes into account different gm/Id ratios for the transistors, all located in the moderate inversion region. To calculate the correct W/L ratios for the design transistors, first a set of Look Up Tables (LUTs) must be built. This is done using a testbench and a python script:
- Open nfet1v8_params_tb schematic
- Set netlist directory to the simulation folder in the repository
- Generate netlist
- Change directory to /python and run
python nfet_gm.py
This will save a numpy array to teh simulation directory containing drain currents for each gm/Id ratio, which will be used by other scripts.
The steps to run the mixer simulations are the following:
- Open mixer_transfer_tb schematic using xschem
- Set netlist directory to the simulation folder in the repository
- Generate netlists
- Run
mixer_transfer.py
This will run simulations in a endless loop, saving all results to the /simulation directory. The will include:
- An image for each point containing the IIP3 analysis
- Four numpy buffer incrementally written with each point result of power, gain, noise and iip3 results.
Results can be analyzed using the mixer_analyze scripts, wich are currently under development.
Refer to README for this sample project documentation.