Hi all, newbie here! I want to simulate a transistor using PySpice. Can anyone tell me the proper wa...
w

Wonjae Ji

over 2 years ago
Hi all, newbie here! I want to simulate a transistor using PySpice. Can anyone tell me the proper way of including "sky130_fd_pr__nfet_01v8_lvt" in my simple python code here? I use PySpice 1.5 / ngspice-32. Including a simple PTM model file and defining a MOSFET just works fine.
circuit.include("./ptm_90nm.model")
circuit.M('1', 'node_drain', 'node_gate',  circuit.gnd, circuit.gnd, model='nmos', width=1e-6, length=1e-6)
However, including
sky130_fd_pr__nfet_01v8_lvt.pm3.spice
and defining a subcircuit does not work.
circuit.include("../share/pdk/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__nfet_01v8_lvt.pm3.spice")
circuit.X('M1', d='node_drain', g='node_gate', s=circuit.gnd, b=circuit.gnd, model='sky130_fd_pr__nfet_01v8', w=1, l=1, subcircuit_name='nfet')
---
Error: unknown subckt: xm1 nfet b=0 d={node_drain} g={node_gate} l=1 model={sky130_fd_pr__nfet_01v8} s=0 w=1
    Simulation interrupted due to error!
Am I missing something? Please refer to the code below. It's just I-V plotting, but I'm lost. Haha
import matplotlib.pyplot as plt
import numpy as np

import PySpice
from PySpice.Spice.Netlist import Circuit, SubCircuit, SubCircuitFactory
from PySpice.Unit import u_V, u_mA

import sys, os
if sys.platform =="linux" or sys.platform =="linux2":
    PySpice.Spice.Simulation.CircuitSimulator.DEFAULT_SIMULATOR = 'ngspice-subprocess'
circuit = Circuit('IVtest')

Vdrain = circuit.V('drain', 'node_drain', circuit.gnd, 1@u_V)
Vgate = circuit.V('gate', 'node_gate', circuit.gnd, 1@u_V)
# circuit.include("./ptm_90nm.model")
# circuit.M('1', 'node_drain', 'node_gate',  circuit.gnd, circuit.gnd, model='nmos', width=1e-6, length=1e-6) # this just works fine

# circuit.lib('../share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice', 'tt')
# circuit.include("../share/pdk/sky130A/libs.tech/ngspice/corners/tt.spice")

circuit.include("../share/pdk/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__nfet_01v8_lvt.pm3.spice")
circuit.X('M1', d='node_drain', g='node_gate', s=circuit.gnd, b=circuit.gnd, model='sky130_fd_pr__nfet_01v8', w=1, l=1, subcircuit_name='nfet')
print(circuit)

simulator = circuit.simulator(temperature=27)
print(simulator)

analysis = simulator.dc(Vgate=slice(0, 2, 0.1))

figure, ax = plt.subplots(figsize=(6,3))
ax.plot(u_V(analysis.node_gate), u_mA(-analysis.Vdrain))
ax.grid()
ax.set_xlabel('Vgs [V]')
ax.set_ylabel('Id [mA]')
ax.set_yscale('log')
plt.tight_layout()
plt.show()
Including the library resulted in ~2000 lines of parsing error and >20min of running time, so I aborted it. Thanks in advance
Hi, everyone. I am trying to install OpenROAD on CentOS 7. I referred to the readme file on github a...
t

Tianyu Wei

over 3 years ago
Hi, everyone. I am trying to install OpenROAD on CentOS 7. I referred to the readme file on github and ran`./etc/DependencyInstaller.sh -dev` (there seems to be a "[elopment]" at the end of the command, but I don't know what it means so I just have it removed) for the dependencies. When I tried to compile the project with
cmake3 ..
, an error occurred: -- The CXX compiler identification is GNU 4.8.5 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- OpenROAD version: 1 -- OpenROAD git sha: 527cd5d8e82308baa1a46265c1338e6c1757858f -- System name: Linux -- Compiler: GNU 4.8.5 -- Build type: RELEASE -- Install prefix: /usr/local -- TCL library: /usr/lib64/libtcl.so -- TCL header: /usr/include/tcl.h -- Found SWIG: /usr/bin/swig (found suitable version "3.0.12", minimum required is "3.0") -- Found Boost: /usr/include (found version "1.53.0") -- Found Python3: /usr/lib64/libpython3.6m.so (found version "3.6.8") found components: Development -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7") CMake Error at src/CMakeLists.txt:107 (find_package): By not providing "Findspdlog.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "spdlog", but CMake did not find one. Could not find a package configuration file provided by "spdlog" with any of the following names: spdlogConfig.cmake spdlog-config.cmake Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set "spdlog_DIR" to a directory containing one of the above files. If "spdlog" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred! See also "/home/weitianyu/OpenROAD/build/CMakeFiles/CMakeOutput.log". I tried to fix it with
sudo yum install spdlog
but it didn't help. Does anyone know how to fix it? Please excuse me if this is something very simple. I am quite new to openroad and Linux.
Hello everyone, I am looking for help to run a gate-level simulation using OpenLane with sky130_fd_s...
j

Johannes Farias

almost 2 years ago
Hello everyone, I am looking for help to run a gate-level simulation using OpenLane with sky130_fd_sc_hd and QuestaSim. I am having issues with the .sdf file. Basically, I have loaded a design and ran the flow in OpenLane. Now, I am trying to load the following files in QuestaSim:
primitives.v
sky130_fd_sc_hd.v
my_module.v
my_module.sdf
I got these messages when QuestaSim loads the sdf file:
# Loading instances from my_module.sdf
# Loading timing data from my_module.sdf
# ** Error (suppressible): (vsim-SDF-12088) my_module.sdf(34): Failed to find matching specify module path for IOPATH.
# ** Error (suppressible): (vsim-SDF-12088) my_module.sdf(35): Failed to find matching specify module path for IOPATH.
# ** Error (suppressible): (vsim-SDF-12088) my_module.sdf(44): Failed to find matching specify module path for IOPATH.
# ** Error (suppressible): (vsim-SDF-12088) my_module.sdf(53): Failed to find matching specify module path for IOPATH.
# ** Error (suppressible): (vsim-SDF-12090) my_module.sdf(57): Failed to find matching specify timing constraint for HOLD. 
# ** Error (suppressible): (vsim-SDF-12090) my_module.sdf(58): Failed to find matching specify timing constraint for HOLD. 
# ** Error (suppressible): (vsim-SDF-12090) my_module.sdf(59): Failed to find matching specify timing constraint for SETUP. 
# ** Error (suppressible): (vsim-SDF-12090) my_module.sdf(60): Failed to find matching specify timing constraint for SETUP. 
# ** Error (suppressible): (vsim-SDF-12088) my_module.sdf(68): Failed to find matching specify module path for IOPATH.
# ** Error (suppressible): (vsim-SDF-12090) my_module.sdf(72): Failed to find matching specify timing constraint for HOLD. 
# ** Error (suppressible): (vsim-SDF-12090) my_module.sdf(73): Failed to find matching specify timing constraint for HOLD. 
# ** Error (suppressible): (vsim-SDF-12090) my_module.sdf(74): Failed to find matching specify timing constraint for SETUP. 
# ** Error (suppressible): (vsim-SDF-12090) my_module.sdf(75): Failed to find matching specify timing constraint for SETUP. 
# ** Fatal: (vsim-SDF-3444) Failed to annotate from SDF file "my_module.sdf".
#    Time: 0 ps  Iteration: 0  Instance: /my_module File: my_module.v
# FATAL ERROR while loading design
How can I correctly load the sdf file? Thanks.