[ Chapter start ] [ Previous page ] [ Next page ] 13.5 Cell ModelsThere are several different kinds of logic cell models:
A logic cell model is different from the cell delay model, which is used to calculate the delay of the logic cell, from the power model , which is used to calculate power dissipation of the logic cell, and from the interconnect timing model , which is used to calculate the delays between logic cells (we return to these in Section 13.6 ). 13.5.1 Primitive ModelsThe following is an example of a primitive model from an ASIC library company (Compass Design Automation). This particular model (for a two-input NAND cell) is complex because it is intended for a 0.35 m m process and has some advanced delay modeling features. The contents are not important to an ASIC designer, but almost all of the information about a logic cell is derived from the primitive model. The designer does not normally see this primitive model; it may only be used by an ASIC library company to generate other models—Verilog or VHDL, for example. (timingModel = oneOf("ism","pr"); powerModel = oneOf("pin"); ) Logic = Function (A1; A2; )Rec ZN = not (A1 AND A2); End; End; miscInfo = Rec Title = "2-Input NAND, 1X Drive"; freq_fact = 0.5; tml = "nd02d1 nand 2 * zn a1 a2"; MaxParallel = 1; Transistors = 4; power = 0.179018; Width = 4.2; Height = 12.6; productName = "stdcell35"; libraryName = "cb35sc"; End; A1 = Rec input; cap = 0.010; doc = "Data Input"; End; A2 = Rec input; cap = 0.010; doc = "Data Input"; End; ZN = Rec output; cap = 0.009; doc = "Data Output"; End; End; tA1D_fr = |( Rec prop = 0.078; ramp = 2.749; End); tA1D_rf = |( Rec prop = 0.047; ramp = 2.506; End); tA2D_fr = |( Rec prop = 0.063; ramp = 2.750; End); tA2D_rf = |( Rec prop = 0.052; ramp = 2.507; End); End tA1D_fr = |( Rec A0 = 0.0015; dA = 0.0789; D0 = -0.2828; dD = 4.6642; B = 0.6879; Z = 0.5630; End ); tA1D_rf = |( Rec A0 = 0.0185; dA = 0.0477; D0 = -0.1380; dD = 4.0678; B = 0.5329; Z = 0.3785; End ); tA2D_fr = |( Rec A0 = 0.0079; dA = 0.0462; D0 = -0.2819; dD = 4.6646; B = 0.6856; Z = 0.5282; End ); tA2D_rf = |( Rec A0 = 0.0060; dA = 0.0464; D0 = -0.1408; dD = 4.0731; B = 0.6152; Z = 0.4064; End ); End; End; Delay = |( Rec from = pin.A1; to = pin.ZN; edges = Rec fr = Symbol.tA1D_fr; rf = Symbol.tA1D_rf; End; End, Rec from = pin.A2; to = pin.ZN; edges = Rec fr = Symbol.tA2D_fr; rf = Symbol.tA2D_rf; End; End ); MaxRampTime = |( Rec check = pin.A1; riseTime = 3.000; fallTime = 3.000; End, Rec check = pin.A2; riseTime = 3.000; fallTime = 3.000; End, Rec check = pin.ZN; riseTime = 3.000; fallTime = 3.000; End ); DynamicPower = |( Rec rise = { ZN }; val = 0.003; End); End; End This primitive model contains the following information:
13.5.2 Synopsys ModelsThe ASIC library company may provide vendor models in formats unique to each CAD tool company. The following is an example of a Synopsys model derived from a primitive model similar to the example in Section 13.5.1 . In a Synopsys library, each logic cell is part of a large file that also contains wire-load models and other characterization information for the cell library. /* title : 2-Input NAND, 1X Drive */ /* pmd checksum : 'HBA7EB26C */ pin(a1) { direction : input; capacitance : 0.088; pin(a2) { direction : input; capacitance : 0.087; pin(zn) { direction : output; max_fanout : 1.786; max_transition : 3; function : "(a1 a2)'"; timing_sense : "negative_unate" intrinsic_rise : 0.24 intrinsic_fall : 0.17 rise_resistance : 1.68 fall_resistance : 1.13 timing() { timing_sense : "negative_unate" intrinsic_rise : 0.32 intrinsic_fall : 0.18 rise_resistance : 1.68 fall_resistance : 1.13 This file contains the only information the Synopsys logic synthesizer, simulator, and other design tools use. If the information is not in this model, the tools cannot produce it. You can see that not all of the information from a primitive model is necessarily present in a vendor model. 13.5.3 Verilog ModelsThe following is a Verilog model for an inverter (derived from a primitive model): module in01d1 (zn, i); input i; output zn; not G2(zn, i); InCap1 = 0.060, OutCap = 0.038, MaxLoad = 1.538, R_Ramp1 = 0.542:0.980:1.750, F_Ramp1 = 0.605:1.092:1.950; specparam cell_count = 1.000000; specparam Transistors = 4 ; specparam Power = 1.400000; specparam MaxLoadedRamp = 3 ; (i => zn) = (0.031:0.056:0.100, 0.028:0.050:0.090); This is very similar in form to the model for the MUX of Section 13.2.1 , except that this model includes additional timing parameters (at the beginning of the specify block). These timing parameters were omitted to simplify the model of Section 13.2.1 (see Section 13.6 for an explanation of their function). There are no standards on writing Verilog logic cell models. In the Verilog model, in01d1 , fixed delays (corresponding to zero load capacitance) are embedded in a specify block. The parameters describing the delay equations for the timing model and other logic cell parameters (area, power-model parameters, and so on) are specified using the Verilog specparam feature. Writing the model in this way allows the model information to be accessed using the Verilog PLI routines. It also allows us to back-annotate timing information by overriding the data in the specify block. The following Verilog code tests the model for logic cell in01d1 : module SDF_b; reg A; in01d1 i1 (B, A); initial begin A = 0; #5; A = 1; #5; A = 0; end initial ("T=%6g",," A=",A," B=",B); In this case the simulator has used the fixed, typical timing delays (0.056 ns for the rising delay, and 0.05 ns for the falling delay—both from line 12 in module in01d1 ). Here is an example SDF file (filename SDF_b.sdf ) containing back-annotation timing delays: (SDFVERSION "3.0") (DESIGN "SDF.v") (DATE "Aug-13-96") (VENDOR "MJSS") (PROGRAM "MJSS") (VERSION "v0") (IOPATH i zn (1.151:1.151:1.151) (1.363:1.363:1.363)) (Notice that since Verilog is case sensitive, the instance names and node names in the SDF file are also case sensitive.) This SDF file describes the path delay between input (pin i ) and output (pin zn ) as 1.151 ns (rising delay—minimum, typical, and maximum are identical in this simple example) and 1.363 ns (falling delay). These delays are calculated by a delay calculator . The delay calculator may be a stand-alone tool or part of the simulator. This tool calculates the delay values by using the delay parameters in the logic cell model (lines 8 – 9 in module in01d1 ). We call a system task, , to perform back-annotation, module SDF_b; reg A; in01d1 i1 (B, A); ( "SDF_b.sdf", SDF_b, , "sdf_b.log", "minimum", , ); A = 0; #5; A = 1; #5; A = 0; end initial ("T=%6g",," A=",A," B=",B); Here is the output (from MTI V-System/Plus) including back-annotated timing: The delay information from the SDF file has been passed to the simulator. Back-annotation is not part of the IEEE 1364 Verilog standard, although many Verilog-compatible simulators do support the system task. Many ASIC vendors require the use of Verilog to complete a back-annotated timing simulation before they will accept a design for manufacture. Used in this way Verilog is referred to as a golden simulator , since an ASIC vendor uses Verilog to judge whether an ASIC design fabricated using its process will work. 13.5.4 VHDL ModelsInitially VHDL did not offer a standard way to perform back-annotation. Here is an example of a VHDL model for an inverter used to perform a back-annotated timing simulation using an Altera programmable ASIC: library IEEE; use IEEE.STD_LOGIC_1164. all ; library COMPASS_LIB; use COMPASS_LIB.COMPASS_ETC. all ; generic (derating : REAL := 1.0; Z1_cap : REAL := 0.000; INSTANCE_NAME : STRING := "bknot"); port (Z2 : in Std_Logic; Z1 : out STD_LOGIC); architecture bknot of bknot is constant tplh_Z2_Z1 : TIME := (1.00 ns + (0.01 ns * Z1_Cap)) * derating; constant tphl_Z2_Z1 : TIME := (1.00 ns + (0.01 ns * Z1_Cap)) * derating; variable int_Z1 : Std_Logic := 'U'; variable tplh_Z1, tphl_Z1, Z1_delay : time := 0 ns; tplh_Z1 := tplh_Z2_Z1; tphl_Z1 := tphl_Z2_Z1; Z1_delay := F_Delay(int_Z1, tplh_Z1, tphl_Z1); configuration bknot_CON of bknot is for bknot end for ; This model accepts two generic parameters: load capacitance, Z1_cap , and a derating factor, derating , used to adjust postlayout timing delays. The proliferation of different VHDL back-annotation techniques drove the VHDL community to develop a standard method to complete back-annotation—VITAL. 13.5.5 VITAL ModelsVITAL is the VHDL Initiative Toward ASIC Libraries, IEEE Std 1076.4 [ 1995]. 1 VITAL allows the use of sign-off quality ASIC libraries with VHDL simulators. Sign-off is the transfer of a design from a customer to an ASIC vendor. If the customer has completed simulation of a design using sign-off quality models from an approved cell library and a golden simulator, the customer and ASIC vendor will sign off the design (by signing a contract) and the vendor guarantees that the silicon will match the simulation. VITAL models, like Verilog models, may be generated from primitive models. Here is an example of a VITAL-compliant model for an inverter, library IEEE; use IEEE.STD_LOGIC_1164. all ; use IEEE.VITAL_timing. all ; use IEEE.VITAL_primitives. all ; tipd_I : VitalDelayType01 := (0 ns, 0 ns); tpd_I_ZN : VitalDelayType01 := (0 ns, 0 ns) ); attribute VITAL_LEVEL0 of IN01D1 : entity is TRUE; architecture IN01D1 of IN01D1 is attribute VITAL_LEVEL1 of IN01D1 : architecture is TRUE; signal I_ipd : STD_LOGIC := 'X'; begin VitalWireDelay(I_ipd, I, tipd_I); end block ; VITALbehavior : process (I_ipd) variable ZN_GlitchData : VitalGlitchDataType; Paths => (0 => (I_ipd'LAST_EVENT, tpd_I_ZN, TRUE)), DefaultDelay => VitalZeroDelay01, The following testbench, SDF_testbench , contains an entity, SDF , that in turn instantiates a copy of an inverter, in01d1 : library IEEE; use IEEE.STD_LOGIC_1164. all ; entity SDF is port ( A : in STD_LOGIC; B : out STD_LOGIC ); component in01d1 port ( I : in STD_LOGIC; ZN : out STD_LOGIC ); begin i1: in01d1 port map ( I => A, ZN => B); library STD; use STD.TEXTIO. all ; library IEEE; use IEEE.STD_LOGIC_1164. all ; entity SDF_testbench is end SDF_testbench; architecture SDF_testbench of SDF_testbench is component SDF port ( A : in STD_LOGIC; B : out STD_LOGIC ); signal A, B : STD_LOGIC := '0'; SDF_b : SDF port map ( A => A, B => B); A <= '0'; wait for 5 ns; A <= '1'; wait for 5 ns; A <= '0'; wait ; process (A, B) variable L: LINE; begin write(L, now, right, 10, TIME'(ps)); write(L, STRING'(" A=")); write(L, TO_BIT(A)); write(L, STRING'(" B=")); write(L, TO_BIT(B)); Here is an SDF file ( SDF_b.sdf ) that contains back-annotation timing information (min/typ/max timing values are identical in this example): (SDFVERSION "3.0") (DESIGN "SDF.vhd") (DATE "Aug-13-96") (VENDOR "MJSS") (PROGRAM "MJSS") (VERSION "v0") (IOPATH i zn (1.151:1.151:1.151) (1.363:1.363:1.363)) (PORT i (0.021:0.021:0.021) (0.025:0.025:0.025)) (VHDL is case insensitive, but to allow the use of an SDF file with both Verilog and VHDL we must maintain case.) As in the Verilog example in Section 13.5.3 the logic cell delay (from the input pin of the inverter, i , to the output pin, zn ) follows the IOPATH keyword. In this example there is also an interconnect delay that follows the PORT keyword. The interconnect delay has been placed, or lumped, at the input of the inverter. In order to include back-annotation timing using the SDF file, SDF_b.sdf , we use a command-line switch to the simulator. In the case of MTI V-System/Plus the command is as follows: <msmith/MTI/vital> vsim -c -sdfmax /sdf_b=SDF_b.sdf sdf_testbench We have to explain to the simulator where in the design hierarchy to apply the timing information in the SDF file. The situation is like giving someone directions “Go North on the M1 and turn left at the third intersection,” but where do we start? London or Birmingham? VHDL needs much more precise directions. Using VITAL we say we back-annotate to a region . The switch /sdf_b=SDF_b.sdf specifies that all instance names in the SDF file, SDF_b.sdf , are relative to the region /sdf_b . The region refers to instance name sdf_b (line 9 in entity SDF_testbench ), which is an instance of component SDF . Component SDF in turn contains an instance of a component, in01d1 , with instance name i1 (line 7 in architecture SDF ). Through this rather (for us) difficult-to-follow set of directions, the simulator knows that ... (CELL (CELLTYPE "in01d1") (INSTANCE i1) ... refers to (SDF) cell or (VHDL) component in01d1 with instance name i1 in instance SDF_b of the compiled model sdf_testbench . Notice that we cannot use an SDF file of the following form (as we did for the Verilog version of this example): ... (CELL (CELLTYPE "in01d1") (INSTANCE SDF_b.i1) ... There is no instance in the VHDL model “higher” than instance name SDF_b that we can use as a starting point for VITAL back-annotation. In the Verilog SDF file we can refer to the name of the top-level module ( SDF_b in line 2 in module SDF_b ). We cannot do this in VHDL; we must name an instance. The result is that, unless you are careful in constructing the hierarchy of your VHDL design, you may not be able to use the same SDF file for back-annotating both VHDL and Verilog. 13.5.6 SDF in SimulationSDF was developed to handle back-annotation, but it is also used to describe forward-annotation of timing constraints from logic synthesis. Here is an example of an SDF file that contains the timing information for the halfgate ASIC design: (IOPATH I ZN (1.151:1.151:1.151) (1.363:1.363:1.363)) (IOPATH I PAD (1.216:1.216:1.216) (1.249:1.249:1.249)) (IOPATH PAD CIN (.169:.169:.169) (.199:.199:.199)) This SDF file describes the delay due to the input pad (cell pc5d01r , instance name u0_2 ), our inverter (cell in01d0 , instance name v_1.B1_i1 ), and the output pad (cell pc5o06 , instance name u1_2 ). Since this SDF file was produced before any physical layout, there are no estimates for interconnect delay. The following partial SDF file illustrates how interconnect delay can be specified in SDF. ( INTERCONNECT A.INV8.OUT B.DFF1.Q (:0.6:) (:0.6:)) This SDF file specifies an interconnect delay (using the keyword INTERCONNECT ) of 60 ps (0.6 units with a timescale of 100 ps per unit) between the output port of an inverter with instance name A.INV8 (note that '.' is the hierarchy divider) in block A and the Q input port of a D flip-flop (instance name B.DFF1 ) in block B. The triplet notation (min : typ : max) in SDF corresponds to minimum, typical, and maximum values of a parameter. Specifying two triplets corresponds to rising (the first triplet) and falling delays. A single triplet corresponds to both. A third triplet corresponds to turn-off delay (transitions to or from 'Z' ). You can also specify six triplets (rising, falling, '0' to 'Z' , 'Z' to '1' , '1' to 'Z' , and 'Z' to '0' ). When only the typical value is specified, the minimum and maximum are set equal to the typical value. Logic cell delays can use several models in SDF. Here is one example: ( IOPATH (POSEDGE CLK) Q (12:14:15) (11:13:15)))) The IOPATH construct specifies a delay between the input pin and the output pin of a cell. In this example the delay is between the positive edge of the clock (input port) and the flip-flop output. The following example SDF file is for an AO221 logic cell: (IOPATH A1 Y (1.11:1.42:2.47) (1.39:1.78:3.19)) (IOPATH A2 Y (0.97:1.30:2.34) (1.53:1.94:3.50)) (IOPATH B1 Y (1.26:1.59:2.72) (1.52:2.01:3.79)) (IOPATH B2 Y (1.10:1.45:2.56) (1.66:2.18:4.10)) [ Chapter start ] [ Previous page ] [ Next page ] |
© 2024 Internet Business Systems, Inc. 670 Aberdeen Way, Milpitas, CA 95035 +1 (408) 882-6554 — Contact Us, or visit our other sites: |
|
Privacy PolicyAdvertise |