Sei sulla pagina 1di 16

Static Noise Margin Parametric Test

S. Walsh Rev. 1.0 Rev. 1.1 June 2000 March 2006

Contents: Purpose Test Module Description Outline of Test Algorithm Test Procedure Data Reduction Procedure Pseudo-code for Computation of Static Noise Margin Purpose: The static noise margin test is intended to estimate the noise level on one node of a SRAM bit that will flip the bit to its opposite value (i.e., cause an error in the stored value). Test Module Description: The static noise margin (SNM) is measured on a pair of SRAM inverters (i.e., the two driver-load stacks in one SRAM bit. Each inverter is characterized independently, and the results are combined to estimate the SNM. Outline of Test Algorithm: Each inverter is characterized by sweeping the input voltage and measuring the output voltage, as shown:

The two inverter curves are combined to make a butterfly wing graph; the bit-bar inverter curve is rotated about a 45o axis so that the output of the bit inverter forms the input to the bit-bar inverter (and vice versa, just as in the SRAM cell). The static noise margin is defined as the smaller of inscribed squares in the wings of the butterfly curve, as shown:

Test Procedure: 1. Generate the input-output curves for the bit and bit-bar inverters. Check that the outputs at the limits (Vin = 0 and Vdd) are within spec. If Vout fails to attain the spec levels, output an error code 2. Transpose the x and y values for the bit-bar inverter curve (equivalent to rotating about a 45o axis). 3. Check that the two inverter curves cross each other to create a butterfly wing graph. If the curves fail to cross at least three times (minimum to form the butterfly wing), output an error code. The procedure for checking for crossing is detailed below. 4. Compute the largest square that can be inscribed in each lobe of the butterfly wing. The procedure for computing the inscribed square is detailed below. The static noise margin is defined as the length of the side of the smaller of these inscribed squares.

Data Reduction Procedure Assign the bit and bitbar data to X-Y arrays so both curves in the butterfly chart are aligned In the butterfly chart, the bitbar curve is reversed from its normal orientation. To simplify computation of the SNM, the indices of the bitbar data array should be reversed so both bit and bitbar curves start with the lowest index at X = 0 and end with the highest index at X = Vdd 1. Iterate through data arrays Vin-bit(n), Vout-bit(n), Vin-bar(n) and Vout-bar(n) 2. Assign the data values to the X-Y arrays. Note that Npts is the number of data points in each data array Xbit(n) = Vin-bit(n) Ybit(n) = Vout-bit(n) Xbar(n) = Vout-bar(Npts + 1 n) this operation aligns the bitbar curve X array Ybar(n) = Vin-bar(Npts + 1 n) this operation aligns the bitbar curve Y array Procedure for determining curve crossing points There should be three crossing points in the butterfly chart: One near the middle of the chart; the data array indices should be ~ Npts/2 One near the upper end of the chart One near the lower end of the chart We have to find all three to verify we have a good butterfly chart. 1. Start with the line segment formed by the first two data points of the bit inverter curve, (Xbit(1), Ybit(1)) and (Xbit(2), Ybit(2)), and the line segment formed by the first two data points of the bit-bar inverter curve, (Xbar(1), Ybar(1)) and (Xbar(2), Ybar(2)). 2. Compute the coordinates, (Xintcpt, Yintcpt) of the intersection of the lines containing these line segments, per the following ten cases:

[ Xbit(n), Ybit(n) ] [ Xbit(n+1), Ybit(n+1) ]

[ Xbar(n), Ybar(n) ] [ Xbar(n+1), Ybar(n+1) ]

[ Xintcpt, Yintcpt ]

Case 1: both bit and bitbar segments are horizontal, i.e., Ybit(1) = Ybit(2) and Ybar(1) = Ybar(2) In this case, the segments do not intersect Xintcpt = null data value Yintcpt = null data value = Xbar(2) In this case, the segments do not intersect Xintcpt = null data value Yintcpt = null data value Case 2: both bit and bitbar segments are vertical, i.e., Xbit(1) = Xbit(2) and Xbar(1)

Case 3: bit segment is horizontal, i.e., Ybit(1) = Ybit(2), and bitbar segment is vertical, i.e., Xbar(1) = Xbar(2) Xintcpt = Xbar(1) Yintcpt = Ybit(1) Case 4: bit segment is vertical, i.e., Xbit(1) = Xbit(2), and bitbar segment is horizontal, i.e., Ybar(1) = Ybar(2) Xintcpt = Xbit(1) Yintcpt = Ybar(1) Case 5: bit segment is horizontal, i.e., Ybit(1) = Ybit(2), and bitbar segment has finite slope, i.e., Xbar(1) Xbar(2) and Ybar(1) Ybar(2) slopebar = (Ybar(2) - Ybar(1)) / (Xbar(2) Xbar(1)) interceptbar = [(Ybar(1) Xbar(2)) (Ybar(1) Xbar(2))] / (Xbar(2) Xbar(1)) Xintcpt = (Ybit(1) - interceptbar) / slopebar Yintcpt = Ybit(1) Case 6: bitbar segment is horizontal, i.e., Ybar(1) = Ybar(2), and bit segment has finite slope, i.e., Xbit(1) Xbit(2) and Ybit(1) Ybit(2) slopebit = (Ybit(2) - Ybit(1)) / (Xbit(2) Xbit(1)) interceptbit = [(Ybit(1) Xbit(2)) (Ybit(1) Xbit(2))] / (Xbit(2) Xbit(1)) Xintcpt = (Ybar(1) - interceptbit) / slopebit Yintcpt = Ybar(1) Case 7: bit segment is vertical, i.e., Xbit(1) = Xbit(2), and bitbar segment has finite slope, i.e., Xbar(1) Xbar(2) and Ybar(1) Ybar(2) slopebar = (Ybar(2) - Ybar(1)) / (Xbar(2) Xbar(1)) interceptbar = [(Ybar(1) Xbar(2)) (Ybar(1) Xbar(2))] / (Xbar(2) Xbar(1)) Xintcpt = Xbit(1) Yintcpt = (slopebar Xbit(1)) + interceptbar Case 8: bitbar segment is vertical, i.e., Xbar(1) = Xbar(2), and bit segment has finite slope, i.e., Xbit(1) Xbit(2) and Ybit(1) Ybit(2)

slopebit = (Ybit(2) - Ybit(1)) / (Xbitr(2) Xbit(1)) interceptbit = [(Ybit(1) Xbit(2)) (Ybit(1) Xbit(2))] / (Xbit(2) Xbit(1)) Xintcpt = Xbar(1) Yintcpt = (slopebit Xbar(1)) + interceptbit Case 9: both segments have finite slopes, and slopebit = slopebar In this case, the segments do not intersect Xintcpt = null data value Yintcpt = null data value Case 10: both segments have finite slopes, and slopebit slopebar slopebit = (Ybit(2) - Ybit(1)) / (Xbit(2) Xbit(1)) interceptbit = [(Ybit(1) Xbit(2)) (Ybit(1) Xbit(2))] / (Xbit(2) Xbit(1)) slopebar = (Ybar(2) - Ybar(1)) / (Xbar(2) Xbar(1)) interceptbar = [(Ybar(1) Xbar(2)) (Ybar(1) Xbar(2))] / (Xbar(2) Xbar(1)) Xintcpt = (interceptbar interceptbit) / (slopebit slopebar) Yintcpt = (slopebit interceptbar slopebar interceptbit) / (slopebit slopebar) 3. Check for crossing of the two segments. The segments cross if, and only if, minimum(Xbit(1),Xbit(2)) Xintcpt maximum(Xbit(1),Xbit(2)) and minimum(Xbar(1),Xbar(2)) Xintcpt maximum(Xbar(1),Xbar(2)) and minimum(Ybit(1),Ybit(2)) Yintcpt maximum(Ybit(1),Ybit(2)) and minimum(Ybar(1),Ybar(2)) Yintcpt maximum(Ybar(1),Ybar(2)) If the segments cross, record the Xintcpt and Yintcpt and the bit and bitbar indices of the crossing point for use in computing the inscribed square. Keep track of the number of crossings. 4. Repeat this procedure using all pairs of line segments in each inverter curve: bit curve segment 1 and bit-bar curve segment 1 bit curve segment 1 and bit-bar curve segment 2 bit curve segment 1 and bit-bar curve segment 3 etc. bit curve segment 1 and bit-bar curve segment N bit curve segment 2 and bit-bar curve segment 1 bit curve segment 2 and bit-bar curve segment 2 bit curve segment 2 and bit-bar curve segment 3 etc. bit curve segment 2 and bit-bar curve segment N etc. etc.

bit curve segment N and bit-bar curve segment 1 bit curve segment N and bit-bar curve segment 2 bit curve segment N and bit-bar curve segment 3 etc. bit curve segment N and bit-bar curve segment N After all the crossings have been found, if there are exactly three crossings, proceed to the find the SNM. Otherwise, report a defective DUT (i.e., an error code). Procedure for computing the inscribed square in the butterfly wing The maximum inscribe square will have one corner on a data point; this can be seen by imagining a 45o line moving down the lobe. The maximum inscribed square will correspond to the longest 45o line segment that fits in the lobe. The longest segment will intersect a data point, since there are no local maxima in the line segments connecting the data points. 1. Find the extent of the upper lobe of the butterfly wing A. Start with the middle crossing (Xintcpt(m), Yintcpt(m)), and the upper crossing (Xintcpt(u), Yintcpt(u)), as shown in the diagram. Note that the intersections will usually not be at a data point in either of the inverter curves. B. Find the points on each inverter curve between these two intersections: For the bit inverter curve, the points (Xbit(n), Ybit(n))in the upper lobe must satisfy Xintcpt(u) < Xbit(n) < Xintcpt(m) For the bit-bar inverter curve, the points (Xbar(n), Ybar(n))in the upper lobe must satisfy Yintcpt(m) < Ybar(n) < Yintcpt(u)

2. For each bit curve data point (Xbit(n), Y bit(n)) in the upper lobe, compute the length of the diagonal line segment from that data point to the bitbar curve: The equation for a 45o line through the data point (X bit(n), Y bit(n)) is: Y = X + (Y bit(n) X bit(n)) Start with the line segment formed by the first two data points of the opposite curve in the upper lobe, as found in Step 1, (Xbar(1), Ybar (1)) and (Xbar (2), Ybar (2)). The line containing this line segment is given by: Y = slopebar X + interceptbar slopebar = (Ybar (2) Ybar (1)) / (Xbar (2) Xbar (1)) interceptbar = [(Ybar (1) Xbar (2)) - (Ybar (2) Xbar (1))] / (Xbar (2) Xbar (1)) Compute the coordinates of the intersection of these two lines (the 45o line from the bit data point and the line segment of the bitbar curve): Xintcpt = [interceptbar (Ybit(n) Xbit(n))] / (1 slopebar) Yintcpt = [interceptbar slopebar (Ybit(n) Xbit(n))] / (1 slopebar) Check that the intersection is inside the bitbar curve line segment: minimum(Xbar(1), Xbar(2)) Xintcpt maximum(Xbar(1), Xbar(2)) minimum(Xbar(1), Xbar(2)) Xintcpt maximum(Xbar(1), Xbar(2))

and

Make a sanity check that the intersection lies on the correct side of the bit curve: Xintcpt < Xbit(n) (upper lobe only) If this condition is not met, the butterfly chart is not correct; report an error code. 3. If these conditions are met, then the length of the inscribed square from this data point is the absolute value of Xintcpt Xbit(n), i.e., | Xintcpt Xbit(n) | 4. Repeat steps 1-3 for all bit curve data points in the upper lobe. Record the length of the largest inscribed square. 5. Repeat steps 1-4 for the bitbar curve points in the upper lobe. For the bitbar curve, the sanity check condition is Xintcpt > Xbar(n) (upper lobe only). The length of the largest inscribed square for the bit and bitbar curves is the static noise margin for the upper lobe. 6. Repeat the whole procedure for the lower lobe. The data point range for the lower lobe is Xintcpt(m) < Xbit(n) < Xintcpt(l) and Yintcpt(l) < Ybar(n) < Yintcpt(m) The sanity check conditions are Bit curve: Xintcpt > Xbit(n) (lower lobe only) Bitbar curve: Xintcpt < Xbar(n) (lower lobe only) The static noise margin to be reported for this test is the lesser of the static noise margins for the two lobes.

Pseudo-code for computing the Static Noise Margin: Inputs: 1. Array of Vin and Vout for bit inverter (units: volts): Vbit-in(1), Vbit-in(2), . . . Vbit-in(Npts) Vbit-out(1), Vbit-out(2), . . . Vbit-out(Npts) 2. Array of Vin and Vout for bitbar inverter (units: volts): Vbitbar-in(1), Vbitbar-in(2), . . . Vbitbar-in(Npts) Vbitbar-out(1), Vbitbar-out(2), . . . Vbitbar-out(Npts) Output: 1. Static Noise Margin (units: mV) Arrays used in computations: This array keeps track of the crossings of the butterfly curve 1. Crossing_array (crossing number, crossing index) Outline of procedure: 1. Generate the X and Y arrays for the bit inverter curve. X = Vin, Y = Vout. LOOP index from 1 to Npts Xbit(index) = Vbit-in(index) Ybit(index) = Vbit-out(index) NEXT index 2. Generate the X and Y arrays for the bitbar inverter. Note that the X and Y definitions are switched from the bit inverter case. X = Vout, Y = Vin. LOOP index from 1 to Npts Xbar(index) = Vbar-out(Npts+1- index) Ybar(index) = Vbar-in(Npts+1- index) NEXT index 3. Find the crossing points of the butterfly curve LOOP bit_index from 1 to Npts-1 LOOP bitbar_index from 1 to Npts-1 COMMENT: check for a crossing of the bit and bitbar segments, using the ten cases described above COMMENT: this counter keeps track of the number of crossings Crossing_counter = 0 COMMENT: Case 1 both segments are vertical IF Xbit(bit_index) = Xbit(bit_index+1) AND Xbar(bitbar_index) = Xbar(bitbar_index+1) THEN COMMENT: no crossing Xintcpt = -1 Yintcpt = -1

END IF COMMENT: Case 2 both segments are horizontal IF Ybit(bit_index) = Ybit(bit_index+1) AND Ybar(bitbar_index) = Ybar(bitbar_index+1) THEN COMMENT: no crossing Xintcpt = -1 Yintcpt = -1 END IF COMMENT: Case 3 bit segment is horizontal and bitbar segment is vertical IF Ybit(bit_index) = Ybit(bit_index+1) AND Xbar(bitbar_index) = Xbar(bitbar_index+1) THEN COMMENT: Intercept coordinates computed Xintcpt = Xbar(bitbar_index) Yintcpt = Ybit(bit_index) END IF

COMMENT: Case 4 bit segment is vertical and bitbar segment is horizontal IF Xbit(bit_index) = Xbit(bit_index+1) AND Ybar(bitbar_index) = Ybar(bitbar_index+1) THEN COMMENT: Intercept coordinates computed Xintcpt = Xbit(bit_index) Yintcpt = Ybar(bitbar_index) END IF COMMENT : Case 5 bit segment is horizontal and bitbar segment has finite slope IF Ybit(bit_index) = Ybit(bit_index+1) AND Xbar(bitbar_index) Xbar(bitbar_index+1) AND Ybar(bitbar_index) Ybar(bitbar_index+1) THEN COMMENT: Intercept coordinates computed Slope_bar = (Ybar(bitbar_index+1) - Ybar(bitbar_index)) / (Xbar(bitbar_index+1) Xbar(bitbar_index)) Intercept_bar = ((Ybar(bitbar_index) Xbar(bitbar_index+1)) (Ybar(bitbar_index+1) Xbar(bitbar_index+1))) / (Xbar(bitbar_index+1) Xbar(bitbar_index)) Xintcpt = (Ybit(bit_index) - Intercept_bar ) / Slope_bar Yintcpt = Ybit(bit_index) END IF

COMMENT: Case 6 bitbar segment is horizontal and bit segment has finite slope IF Ybar(bitbar_index) = Ybar(bitbar_index+1) AND Xbit(bit_index) Xbit(bit_index+1) AND Ybit(bit_index) Ybit(bit_index+1) THEN COMMENT: Intercept coordinates computed Slope_bit = (Ybit(bit_index+1) - Ybit(bit_index)) / (Xbit(bit_index+1) - Xbit(bit_index)) Intercept_bit = ((Ybit(bit_index) Xbit(bit_index+1)) (Ybit(bit_index+1) Xbit(bit_index+1))) / (Xbitr(bit_index+1) Xbit(bit_index)) Xintcpt = (Ybar(bitbar_index) - Intercept_bit ) / Slope_bit Yintcpt = Ybar(bitbar_index) END IF COMMENT: Case 7 bit segment is vertical and bitbar segment has finite slope IF Xbit(bit_index) = Xbit(bit_index+1) AND Xbar(bitbar_index) Xbar(bitbar_index+1) AND Ybar(bitbar_index) Ybar(bitbar_index+1) THEN COMMENT: Intercept coordinates computed Slope_bar = (Ybar(bitbar_index+1) - Ybar(bitbar_index)) / (Xbar(bitbar_index+1) Xbar(bitbar_index)) Intercept_bar = ((Ybar(bitbar_index) Xbar(bitbar_index+1)) (Ybar(bitbar_index+1) Xbar(bitbar_index+1))) / (Xbar(bitbar_index+1) Xbar(bitbar_index)) Xintcpt = Xbit(bit_index) Yintcpt = (Slope_bar Xbit(bit_index)) + Intercept_bar END IF COMMENT: Case 8 bitbar segment is vertical and bit segment has finite slope IF Xbar(bitbar_index) = Xbar(bitbar_index+1) AND Xbit(bit_index) Xbit(bit_index+1) AND Ybit(bit_index) Ybit(bit_index+1) THEN COMMENT: Intercept coordinates computed Slope_bit = (Ybit(bit_index+1) - Ybit(bit_index)) / (Xbit(bit_index+1) - Xbit(bit_index)) Intercept_bit = ((Ybit(bit_index) Xbit(bit_index+1)) (Ybit(bit_index+1) Xbit(bit_index+1))) / (Xbitr(bit_index+1) Xbit(bit_index)) Xintcpt = Xbar(bitbar_index) Yintcpt = (Slope_bit Xbar(bitbar_index)) + Intercept_bit COMMENT: Case 9 both segments have finite slopes, and bit slope = bitbar slope IF Xbit(bit_index) Xbit(bit_index+1) AND Ybit(bit_index) Ybit(bit_index+1) AND Xbar(bitbar_index) Xbar(bitbar_index+1) AND Ybar(bitbar_index) Ybar(bitbar_index+1) AND = (Ybit(bit_index+1) - Ybit(bit_index)) /

(Xbit(bit_index+1) - Xbit(bit_index)) = (Ybar(bitbar_index+1) - Ybar(bitbar_index)) / (Xbar(bitbar_index+1) Xbar(bitbar_index)) THEN COMMENT: no crossing Xintcpt = -1 Yintcpt = -1 END IF COMMENT: Case 10 both segments have finite slopes, and slopebit slopebar IF Xbit(bit_index) Xbit(bit_index+1) AND Ybit(bit_index) Ybit(bit_index+1) AND Xbar(bitbar_index) Xbar(bitbar_index+1) AND Ybar(bitbar_index) Ybar(bitbar_index+1) AND = (Ybit(bit_index+1) - Ybit(bit_index)) / (Xbit(bit_index+1) - Xbit(bit_index)) = (Ybar(bitbar_index+1) - Ybar(bitbar_index)) / (Xbar(bitbar_index+1) Xbar(bitbar_index)) THEN COMMENT: Intercept coordinates computed Slope_bit = (Ybit(bit_index+1) - Ybit(bit_index)) / (Xbit(bit_index+1) - Xbit(bit_index)) Intercept_bit = ((Ybit(bit_index) Xbit(bit_index+1)) (Ybit(bit_index+1) Xbit(bit_index+1))) / (Xbitr(bit_index+1) Xbit(bit_index)) Slope_bar = (Ybar(bitbar_index+1) - Ybar(bitbar_index)) / (Xbar(bitbar_index+1) Xbar(bitbar_index)) Intercept_bar = ((Ybar(bitbar_index) Xbar(bitbar_index+1)) (Ybar(bitbar_index+1) Xbar(bitbar_index+1))) / (Xbar(bitbar_index+1) Xbar(bitbar_index)) Xintcpt = (Intercept_bar Intercept_bit) / (Slope_bit Slope_bar) Yintcpt = (Slope_bit Intercept_bar Slope_bar Intercept_bit) / (Slope_bit Slope_bar) 4. Check for crossing of the two segments. IF minimum(Xbit(bit_index), Xbit(bit_index+1)) Xintcpt AND Xintcpt maximum(Xbit(bit_index), Xbit(bit_index+1)) AND minimum(Xbar(bitbar_index), Xbar(bitbar_index+1)) Xintcpt AND Xintcpt maximum(Xbar(bitbar_index), Xbar(bitbar_index+1)) AND minimum(Ybit(bit_index), Ybit(bit_index+1)) Yintcpt AND Yintcpt maximum(Ybit(bit_index), Ybit(bit_index+1)) AND minimum(Ybar(bitbar_index), Ybar(bitbar_index+1)) Yintcpt AND Yintcpt maximum(Ybar(bitbar_index), Ybar(bitbar_index+1)) THEN COMMENT: This is a crossing COMMENT: increment the crossing counter Crossing_counter = Crossing_counter +1 COMMENT: record the crossing location Crossing_array(Crossing_counter, 1) = bit_index Crossing_array(Crossing_counter, 2) = bitbar_index END IF

NEXT bit_index NEXT bitbar_index 5. Check for exactly three crossings, otherwise generate an error code IF Crossing_counter 3 THEN COMMENT: generate an error code Exit subroutine END IF 6. Find the static noise margin (SNM) in the upper lobe of the butterfly curve 6.1. measure the diagonals from the bit curve to the bitbar curve, in the upper lobe COMMENT: initialize variables: SNM_upper_lobe = 0 LOOP bit_index from Crossing_array(1, 1)to Crossing_array(2, 1) -1 LOOP bitbar_index from Crossing_array(1, 2)to Crossing_array(2, 2) -1 COMMENT: compute the equation for the bitbar line segment IF Xbitbar(bitbar_index+1) = Xbitbar(bitbar_index) THEN Xintercept = Xbitbar(bitbar_index) Yintercept = Xbitbar(bitbar_index) + Ybit(bit_index) - Xbit(bit_index) ELSE bitbar_slope = [Ybitbar(bitbar_index+1) - Ybitbar(bitbar_index)] / [Xbitbar(bitbar_index+1) - Xbitbar(bitbar_index)] bitbar_intercept = Ybitbar(bitbar_index) [Xbitbar(bitbar_index) bitbar_slope] Xintercept = [bitbar_intercept + Xbit(bit_index) Ybit(bit_index)] / [1 bitbar_slope] Yintercept = Xintercept + Ybit(bit_index) - Xbit(bit_index) END IF COMMENT: check that the intercept occurs inside the line segment of the two bitbar data points under consideration: IF Xintercept Xbitbar(bitbar_index) AND Xintercept Xbitbar(bitbar_index + 1) AND Yintercept Ybitbar(bitbar_index) AND Yintercept Ybitbar(bitbar_index+1) THEN COMMENT: the diagonal intercepts the bitbar line segment COMMENT: compute the SNM for this bit curve data point SNM = Xbit(bit_index) Xintercept COMMENT: compare the SNM for this data point to the max SNM found so far: IF SNM > SNM_upper_lobe THEN SNM_upper_lobe = SNM END IF

END IF NEXT bitbar_index NEXT bit_index 6.2. measure the diagonals from the bitbar curve to the bit curve, in the upper lobe COMMENT: initialize variables: no initialization necessary LOOP bit_index from Crossing_array(1, 1)to Crossing_array(2, 1) -1 LOOP bitbar_index from Crossing_array(1, 2)to Crossing_array(2, 2) -1 COMMENT: compute the equation for the bit line segment IF Xbit (bit_index+1) = Xbit (bit_index) THEN Xintercept = Xbit (bit_index) Yintercept = Xbit (bit_index) + Ybitbar(bit_index) - Xbitbar(bit_index) ELSE bit_slope = [Ybit(bit_index+1) - Ybit(bit_index)] / [Xbit(bit_index+1) - Xbit(bit_index)] bit_intercept = Ybit(bit_index) [Xbit(bit_index) bit_slope] Xintercept = [bit_intercept + Xbitbar(bitbar_index) Ybitbar(bitbar_index)] / [1 bit_slope] Yintercept = Xintercept + Ybitbar(bitbar_index) Xbitbar(bitbar_index) END IF COMMENT : check that the intercept occurs inside the line segment of the two bit data points under consideration: IF Xintercept Xbit (bit_index) AND Xintercept Xbit (bit_index + 1) AND Yintercept Ybit (bit_index) AND Yintercept Ybit (bit_index+1) THEN COMMENT: the diagonal intercepts the bit line segment COMMENT: compute the SNM for this bitbar curve data point SNM = Xintercept - Xbitbar(bitbar_index) COMMENT: compare the SNM for this data point to the max SNM found so far: IF SNM > SNM_upper_lobe THEN SNM_upper_lobe = SNM END IF END IF NEXT bitbar_index NEXT bit_index 7. Find the static noise margin (SNM) in the lower lobe of the butterfly curve 7.1. measure the diagonals from the bit curve to the bitbar curve, in the lower lobe COMMENT: initialize variables: SNM_lower_lobe = 0

LOOP bit_index from Crossing_array(2, 1)+1 to Crossing_array(3, 1)-1 LOOP bitbar_index from Crossing_array(2, 2)+1 to Crossing_array(3, 2)-1 COMMENT: compute the equation for the bitbar line segment IF Xbitbar(bitbar_index+1) = Xbitbar(bitbar_index) THEN Xintercept = Xbitbar(bitbar_index) Yintercept = Xbitbar(bitbar_index) + Ybit(bit_index) - Xbit(bit_index) ELSE bitbar_slope = [Ybitbar(bitbar_index+1) - Ybitbar(bitbar_index)] / [Xbitbar(bitbar_index+1) - Xbitbar(bitbar_index)] bitbar_intercept = Ybitbar(bitbar_index) [Xbitbar(bitbar_index) bitbar_slope] Xintercept = [bitbar_intercept + Xbit(bit_index) Ybit(bit_index)] / [1 bitbar_slope] Yintercept = Xintercept + Ybit(bit_index) - Xbit(bit_index) END IF COMMENT: check that the intercept occurs inside the line segment of the two bitbar data points under consideration: IF Xintercept Xbitbar(bitbar_index) AND Xintercept Xbitbar(bitbar_index + 1) AND Yintercept Ybitbar(bitbar_index) AND Yintercept Ybitbar(bitbar_index+1) THEN COMMENT: the diagonal intercepts the bitbar line segment COMMENT: compute the SNM for this bit curve data point SNM = Xintercept - Xbit(bit_index) COMMENT: compare the SNM for this data point to the max SNM found so far: IF SNM > SNM_lower_lobe THEN SNM_lower_lobe = SNM END IF END IF NEXT bitbar_index NEXT bit_index 7.2. measure the diagonals from the bitbar curve to the bit curve, in the lower lobe initialize variables: no initialization necessary LOOP bit_index from Crossing_array(2, 1)+1 to Crossing_array(3, 1)-1 LOOP bitbar_index from Crossing_array(2, 2)+1 to Crossing_array(3, 2)-1 COMMENT: compute the equation for the bit line segment IF Xbit (bit_index+1) = Xbit (bit_index) THEN Xintercept = Xbit (bit_index) Yintercept = Xbit (bit_index) + Ybitbar(bit_index) - Xbitbar(bit_index) ELSE bit_slope = [Ybit(bit_index+1) - Ybit(bit_index)] /

[Xbit(bit_index+1) - Xbit(bit_index)] bit_intercept = Ybit(bit_index) [Xbit(bit_index) bit_slope] Xintercept = [bit_intercept + Xbitbar(bitbar_index) Ybitbar(bitbar_index)] / [1 bit_slope] Yintercept = Xintercept + Ybitbar(bitbar_index) Xbitbar(bitbar_index) END IF COMMENT : check that the intercept occurs inside the line segment of the two bit data points under consideration: IF Xintercept Xbit (bit_index) AND Xintercept Xbit (bit_index + 1) AND Yintercept Ybit (bit_index) AND Yintercept Ybit (bit_index+1) THEN COMMENT: the diagonal intercepts the bit line segment COMMENT: compute the SNM for this bitbar curve data point SNM = Xbitbar(bitbar_index) - Xintercept COMMENT: compare the SNM for this data point to the max SNM found so far: IF SNM > SNM_lower_lobe THEN SNM_lower_lobe = SNM END IF END IF NEXT bitbar_index NEXT bit_index 8. Compute the Static Noise Margin as the lower of the SNM values in the upper and lower lobes: Static Noise Margin = minimum(SNM_upper_lobe, SNM_lower_lobe)

Potrebbero piacerti anche