Skip to content

project-x51/xschem-waveformsynthesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Xschem-waveform Synthesis

Synthesis_2

--This document provides a guide for synthesizing simulated current or voltage waveforms generated in the XSCHEM schematic editor. The waveforms obtained from XSCHEM transient simulations can be reproduced on any compatible instrument. As an example, this guide demonstrates waveform synthesis from XSCHEM using the Keithley 2450 Source Measure Unit (SMU).

-- Source meters can source or sink current and voltage

-- Use launcher.sym in XSCHEM to START and STOP the execution of waveform synthesis.

-- By pressing CTRL + Click on START SYNTHESIS (launcher.sym) in XSCHEM, the simulated waveform data is sent to the SourceMeter Unit, and the output of the SourceMeter will switched on.

--Similarly, pressing CTRL + Click on STOP SYNTHESIS in XSCHEM, will switch off the output of the Sourcemeter.

-- Use Python and PyVISA library to configure the Sourcemeter (Make sure the instrument supports SCPI)

sythesis_4

--Launch the shell script run_python.sh from launcher.sym to run the Python script in the background, allowing Xschem to remain active during execution.

--To terminate or abort the trigger, use the Tcl script stop_script.tcl, which can also be launched via launcher.sym (This setup provides a convenient way to control both the start and stop of the arbitrary current or voltage wave generation from XSCHEM)

Configuration of Keithley 2450 SourceMeter

-- Create and store a Source Configuration List that can includes settings such as voltage or current ranges, maximum limits, specific values and other relevant settings.

--Current or voltage values stored in a .csv file can be loaded into a Python array and incorporated into this Source Configuration List.

--Configure Timer 1 on the 2450 SMU to set the required time intervals for your source steps.

--Build a Trigger Model to invoke the Source Configuration List. This will source the desired current or voltage values at each defined time step. The trigger model ensures that the SMU automatically applies each source setting in synchronization with the configured timer steps.

Sample NGSpice code to export simulation results to a CSV file is provided below.

name=Stimuli2

only_toplevel=true

value= " .lib /home/ihpopenpdk/asic_tools/pdk/IHP-Open-PDK/ihp-sg13g2/libs.tech/ngspice/models/cornerMOShv.lib mos_tt

.option savecurrents

.save all

.control

set wr_vecnames *** Ensure ngspice includes vectors such as node voltages and current.

set wr_singlescale *** Ensure that ngspice does not repeat time or frequency values in the output file .

save all

tran 0.05 50

write test_23_csv.raw

wrdata ~/current.csv @n.xm5.nsg13_hv_pmos[ids] ***write drain current (ids) of mosfet 5 to a csv file.

set appendwrite

op

remzerovec

write test_23_csv.raw

save all

.endc” .

~

About

Synthesis of a waveform simulated in XSchem using various lab instruments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •