User Commands MKCP(1) NAME mkcp - Make Crystal parameters SYNOPSIS mkcp [vlow vinv vhigh] DESCRIPTION Mkcp is a program that generates the model parameters used by Crystal's slope model. It reads a SPICE deck from its standard input, runs SPICE several times using modified ver- sions of that SPICE deck, extracts Crystal parameter infor- mation from the SPICE output, and writes the parameters to standard output. A single run of Mkcp will generate all of the slope parameters for a single transistor type driving its output either high or low (but not both in the same Mkcp run). The SPICE input deck describes a simple circuit to test the characteristics of a single transistor type. See the files in ~cad/lib/mkcp for examples of input decks. Each deck must contain two particular capacitor cards: one with ``c1'' in the first columns, and one with ``c2'' in the first columns. The ``c1'' card must describe the capaci- tance on the gate of the transistor being modelled. It has the standard format for a SPICE capacitor card, except that there may be any number of capacitance values, separated by spaces (each of the capacitances must be specified in pfs). Mkcp makes one SPICE run with each of the given values and expects that changing the capacitance will change the edge speed of the signal on the transistor gate. The first capacitance value should generate an edge that rises or falls as quickly as possible. The ``c2'' card describes the capacitance being driven by the transistor, and is used to compute the effective resistance of the device. This card is not modified by Mkcp. The deck must also have a ``.print'' card that generates three columns of output. The first column must be time, the second column must be the voltage on the gate of the tran- sistor being modelled, and the third column must be the out- put being driven by the transistor. There must be a ``.tran'' card in the deck that allows enough simulation time for the the output to stabilize when using the first value of c1. Mkcp will modify the ``.tran'' card before each run after the first one so that the simulation time will be long enough for signals to settle in that run. Mkcp makes one SPICE run for each c1 value that is given. After each run it outputs four values: the edge speed on the gate of the transistor, the ratio of that edge speed to the edge speed on the output of the transistor during the first SPICE run, the effective resistance of the transistor SunOS 5.6 Last change: 1 User Commands MKCP(1) (delay from input to output divided by c2), and the edge speed on the output being driven by the transistor, divided by c2. If the driving transistor is a minimum-size device, then the last three of these values are exactly the slope parameters needed by Crystal. If the transistor isn't mini- mum-size, then you must divide each of the last two parame- ters by the length/width ratio of the driving transistor. Three voltages are used by Mkcp to compute edge speeds and resistances. They can be specified on the command line as vlow, vinv, and vhigh. If any of these voltages is given, then all must be given. The defaults are 2.0 volts for vlow, 2.2 volts for vinv, and 2.4 volts for vhigh; these are about right for the standard MOSIS nMOS process. Vinv is the logic threshold voltage; the delay from input to output is the time from when the input reaches vinv to when the output reaches vinv. Vlow and vhigh are used to compute edge speeds: the speed of an edge is the time it takes its voltage to pass from vlow to vhigh (or vice versa) divided by the voltage difference between vlow and vhigh. HINTS FOR USING MKCP You should choose the c2 value and the c1 values so that the range of edge speed ratios is about what you expect to encounter when running Crystal. The fewer data points you use for each transistor, the faster Crystal will run. How- ever, Crystal uses linear interpolation between points, so use enough points to keep the interpolation error low. Make sure that you use a relatively large value for c2. If you use a small value for c2, then the delay of the circuit will be determined primarily by the internal capacitance of the driving transistor (which Mkcp ignores). To get accu- rate results, use a c2 value that's larger than the internal capacitance of the circuit. If you're not sure whether you've chosen a good c2 value, try doubling it; if you get a different effective resistance for the same edge speed ratio, then your initial c2 value was probably too small. It's not at all unusual for a resistance value to come out negative. This happens if the vinv value you're using isn't exactly the logic threshold of the circuit; under some con- ditions the output may reach vinv before the input. This is nothing to worry about: negative values can be entered into Crystal and will produce correct results. SEE ALSO crystal(1) J. Ousterhout, Using Crystal for Timing Analysis SunOS 5.6 Last change: 2 User Commands MKCP(1) FILES ~cad/lib/mkcp/* AUTHOR John Ousterhout SunOS 5.6 Last change: 3