Skip to content

Instantly share code, notes, and snippets.

View 02015678's full-sized avatar

02015678 02015678

View GitHub Profile
@02015678
02015678 / schBindKeys.il
Last active November 8, 2023 11:35
Bind key setting file for Cadence Virtuoso Schematic Composer
; Bindkey setting for Cadence Virtuoso Schematic Composer
; Author: Garrett Zhou
; Reference: Cadence build-in example schBindKeys.il
; 9 to add net probe, SHIFT+9 to delete net probe, CTRL+9 to delete all probe
; Mouse-Btn1 Double click to Descend, Mouse-Btn3 Double click to Return
when( isCallable(`schGetEnv)
hiSetBindKeys("Schematics" list(
list("<Key>9" "geEnterAddNetProbe()" )
list("<Key>(" "geEnterDeleteNetProbe()" )
@02015678
02015678 / XtermAtNetlistFolder.il
Last active August 15, 2022 18:23
Open xterm right into your ADE netlist directory
; ==============================
Append below code to your effective .cdsinit file
; ==============================
; first, define xterm function
procedure(xterm()
let((current_session netlist_directory top_cellview currentWorkingDir)
;get current session
current_session = asiGetCurrentSession()
@02015678
02015678 / auCdlSchNetlistExportSetup.il
Last active August 15, 2022 18:23
auCdl Schematic Netlist Export Setup for Mentor Calibre
; Calibre Netlist Export Setup
; DO NOT MODIFY
; DO NOT DELETE
cdlOutKeys = list(nil
'simStopList '("auCdl")
'simViewList '("auCdl" "schematic")
'globalGndSig ""
'globalPowerSig ""
'shrinkFACTOR 0.0
'checkScale "meter"
@02015678
02015678 / cdslib.vim
Last active August 15, 2022 18:22
Vim Highlight Syntax file for Cadence cds*.lib assura*.lib
" Vim syntax file
" This is based on spice.vim by Noam Halevy
" Language: correct highlight cadence cds*.lib assura*.lib file
" Maintainer: Garrett Zhou
" Last Change: 09/20/2016
" Comments: Add follow line into your ~/.vimrc file
" autocmd BufNewFile,BufRead cds*.lib,assura*.lib set syntax=cdslib
" filetype indent off
" For version 5.x: Clear all syntax items
@02015678
02015678 / PdfConvert2Path.bat
Created June 11, 2016 06:52
PDF: Convert Text to path and crop according to boarding box
@echo off
:: 在下一行设置Inkscape可执行文件的路径
set inkscape="C:\Program FIles\Inkscape\Inkscape.com"
:: 枚举当前文件夹下所有的PDF,将文本转换为路径,并抛弃页面边界以外的对象
for %%i in (*.pdf) do (
echo processing %%i
%inkscape% %%i -C -T -A %%i
)
@02015678
02015678 / GPano.xmp.xml
Created June 3, 2016 07:21
GPano Photo Sphere XMP Tag Sample
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 10.16'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<rdf:Description rdf:about="" xmlns:GPano="http://ns.google.com/photos/1.0/panorama/">
<GPano:UsePanoramaViewer>True</GPano:UsePanoramaViewer>
<GPano:CaptureSoftware>Photo Sphere</GPano:CaptureSoftware>
<GPano:StitchingSoftware>Photo Sphere</GPano:StitchingSoftware>
<GPano:ProjectionType>equirectangular</GPano:ProjectionType>
<GPano:PoseHeadingDegrees>0.0</GPano:PoseHeadingDegrees>
@02015678
02015678 / SimpleAuthServer.py
Created April 28, 2016 08:16 — forked from fxsjy/SimpleAuthServer.py
SimpleAuthServer: A SimpleHTTPServer with authentication
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''
def do_HEAD(self):
@02015678
02015678 / cdsenv.lisp
Last active October 1, 2022 01:33
My customized .cdsenv file for Cadence Virtuoso IV6.1.6
;===============================================
; Created on Jan.10th, 2015
; <------------------Summary------------------>
; Default Simulator : spectre
; Default Folder : ./simulation
; Spectre Options : APS+ 64bit Multi-thread psfbin
; HSPICE Options : HPP 64bit Multi-thread tr0 Waveview
; Anyline starts with a semi-comma (;) is comment and will be omited by Cadence
;===============================================
; Do not show What's new popup window
@02015678
02015678 / Check_ISBN.py
Created April 26, 2015 11:33
Check ISBN Validity (Just check if the last bit is not conflict with the algorithm)
# Copyright (C) 2011, Giovanni Di Milia
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@02015678
02015678 / Resistor_Verilog-AMS.v
Created April 17, 2015 16:38
Resistor Model in Verilog-A, used in Cadence Virtuoso
`include "discipline.h"
module polyres_hdl (n2, n1, ctrl2, ctrl1);
//(wr, lr, rtemp, jc1a, jc1b, jc2a, jc2b, tc1, tc2, etch, tnom, rsh0, rmaxvcoef, rminvcoef)
electrical n2, n1, ctrl2, ctrl1;
parameter real lr=0.0;parameter real wr=0.0;
parameter real rtemp=($temperature - 273.15);
parameter real jc1a = 0;parameter real jc1b = 0;
parameter real jc2a = 0;parameter real jc2b= 0;