Basic Hspice runner with Python

Overview

HSpicePy

Bilgisayarınıza PATH değişkenlerine eklediğiniz HSPICE programını python ile çalıştırmanızı sağlayan basit bir araç.

A simple tool that allows you to run the HSPICE program that you add to the PATH variables on your computer with python.

Usage/Examples

HSPICE Simulating

from hspicpy import HSpicePy

meAbsPath = os.path.dirname(os.path.realpath(__file__))
h = HSpicePy(file_name="amp",design_file_name="designparam",path=meAbsPath)
h.run()

Asynchronous HSPICE Simulating

Simülasyonların arkaplanda çalışmasını istiyorsanız bu yöntemi kullanmalısınız.

You should use this method if you want the simulations to run in the background.

from hspicpy import HSpicePy
import asyncio

meAbsPath = os.path.dirname(os.path.realpath(__file__))
h = HSpicePy(file_name="your_sp_file",design_file_name="your_cir_file",path=meAbsPath)
asyncio.run(h.run_async())

Simulasyon çalıştırıldıktan sonra projenizin bulunduğu dizinde "out" klasörü oluşacaktır. Simulasyon sonuçları bu klasöre kaydedilecektir.

Sadece bir adet .sp ve .cir dosyası girişte parametre olarak vermelisiniz.

After the simulation is run, an "out" folder will be created in the directory where your project is located. The simulation results will be saved in this folder.

You must provide only one .sp and .cir file as parameters at the entrance.

Results

from hspicpy import HSpicePy
import asyncio

meAbsPath = os.path.dirname(os.path.realpath(__file__))
h = HSpicePy(file_name="your_sp_file",design_file_name="your_cir_file",path=meAbsPath)
asyncio.run(h.run_async())

print(h.result)
print(h.operation_point_result)

Simulasyon sonuçlarını .json olarak out klasöründe bulabilirsiniz.

You can find operation point result and measure result which are saved json file format in "out" folder

Change Parameters on .cir File

//old
//my_parameters.cir

.PARAM
+ R1 = 8000
+ LM2 = 4.272405486964919e-06
+ LM3 = 5.066472271942056e-06
from hspicpy import HSpicePy
import asyncio

meAbsPath = os.path.dirname(os.path.realpath(__file__))
h = HSpicePy(file_name="amp",design_file_name="designparam",path=meAbsPath,timeout="")
h.change_parameters_to_cir(R1 = 12000, LM2 = 6.272405486964919e-06, LM3 = 7.272405486964919e-06)

asyncio.run(h.run_async())

print(h.result)
print(h.operation_point_result)
//new
//my_parameters.cir

.PARAM
+ R1 = 12000
+ LM2 = 6.272405486964919e-06
+ LM3 = 7.272405486964919e-06

Authors

You might also like...
Exploring basic lambda calculus in Python

Lambda Exploring basic lambda calculus in Python. In this repo I have used the lambda function built into python to get a more intiutive feel of lambd

A basic tic tac toe game on python!

A basic tic tac toe game on python!

A basic interpreted programming language written in python

shin A basic interpreted programming language written in python. extension You can use our own extension ".shin". Example: main.shin How to start Clon

Basic cryptography done in Python for study purposes

criptografia Criptografia básica feita em Python para fins de estudo Converte letras em numeros partindo do indice 0 e vice-versa A criptografia é fei

Rock-paper-scissors basic game in terminal with Python

piedra-papel-tijera Juego básico de piedra, papel o tijera en terminal con Python. El juego incluye: Nombre de jugador Número de veces a jugar Resulta

A basic DIY-project made using Python and MySQL

Banking-Using-Python-MySQL This is a basic DIY-project made using Python and MySQL. Pre-Requisite needed:-- MySQL command Line:- creating a database

Basic infrastructure for writing scripts in Python

Base Script Python is an excellent language that makes writing scripts very straightforward. Over the course of writing many scripts, we realized that

lets learn Python language with basic examples. highly recommended for beginners who just start coding.
lets learn Python language with basic examples. highly recommended for beginners who just start coding.

Lets Learn Python 🐍 Learn python from basic programs. learn python from scratch. 1.Online python compiler: https://www.onlinegdb.com/online_python_co

A series of basic programs written in Python
A series of basic programs written in Python

Primeros programas en Python Una serie de programas básicos escritos en Python

Owner
null
HSPICE can not perform Monte Carlo (MC) simulations while considering aging effects

HSPICE can not perform Monte Carlo (MC) simulations while considering aging effects. I developed a python wrapper that automatically performs MC and aging simulations using HPSICE to save engineering hours.

Habib Kazemi 2 Nov 22, 2021
A step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application.

This project has a step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application.

Steve Macenski 49 Dec 22, 2022
this is a basic python project that I made using python

this is a basic python project that I made using python. This project is only for practice because my python skills are still newbie.

Elvira Firmansyah 2 Dec 14, 2022
Minutaria is a basic educational Python timer used to learn python and software testing libraries.

minutaria minutaria is a basic educational Python timer. The project is educational, it aims to teach myself programming, python programming, python's

null 1 Jul 16, 2021
The purpose is to have a fairly simple python assignment that introduces the basic features and tools of python

This repository contains the code for the python introduction lab. The purpose is to have a fairly simple python assignment that introduces the basic

null 1 Jan 24, 2022
A basic python project which replicates the functionalities on an 8 Ball.

Magic-8-Ball To the people who wish to make decisions using a Magic 8 Ball but can't get one? I gotchu. This is a basic python project which replicate

null 3 Jun 24, 2021
This is a pretty basic but relatively nice looking Python Pomodoro Timer.

Python Pomodoro-Timer This is a pretty basic but relatively nice looking Pomodoro Timer. Currently its set to a very basic mode, but the funcationalit

EmmHarris 2 Oct 18, 2021
B-Pkg is a simple tool in python for installing all basic package in termux

Basic-Pkg ???? Basic-Pkg ???? B-Pkg is a simple tool in python for installing all basic package in termux This is my first tool, I hope you will like

Macgaiver 3 Oct 21, 2021
This repository requires you to solve a problem by writing some basic python code.

Can You Solve a Problem? A beginner friendly repository that requires you to solve familiar problems with python. This could be as simple as implement

Precious Kolawole 11 Nov 30, 2022
Yet another basic python package.

ironmelts A basic python package. Easy to use. Minimum requirements. Installing Linux python3 -m pip install -U ironmelts macOS python3 -m pip install

IRONMELTS 1 Oct 26, 2021