Write-Through Method For Embedded Memory
Write-Through Method For Embedded Memory
Hong Kim
Baker Mohammad
Qualcomm
Austin, U.S.A
[email protected]
I. I NTRODUCTION
One of the most common design-for-test strategies for SOCs
is scan design which structures a general design to behave
as combinational logic gates. These gates models have been
understood by state-of the art ATPG tool and successfully
detected faults with patterns which are generated from ATPG.
However most processors and SOCs have a mixture of large
and small memories which are based on SRAMs, CAMs,
ROMs, register-files, FIFOS, and many other regular structures
Even though the memory structure itself may be covered using
other testing techniques like Built In Self Test (BIST), there
is a lot of logic between the regular structure and the rest of
the design (shadow logic) as shown in Figure 1.
Several ATPG vendors have provided the capability to
model memory structures with a behavioral model [1]. In
[2], Sitram and Sanjay presented impact and cost of handling
memory models for ATPG in which they showed improvement
of the stuck-at and transition fault test coverage with memory
modeling methodology.
Another major trend for SOC is to use on chip test compression [3]. A design with a compression methodology can
reduce test data volume and testing time. However one of the
major problems with an on-chip test compressor is that, if
there is feedback logic like memory in the scan chain whose
contents cannot be uniquely determined to be known values
during simulation (also called Xs or unknown logic values),
then the entire signature will get corrupted and will be of
c
978-1-4673-1074-1/12/$31.00 2012
IEEE
Scanable
FF
Scanable
FF
Scanable
FF
Shadow
Logic
Memory
Shadow
Logic
Scanable
FF
Scanable
FF
Fig. 1.
158
Scanable
FF
(2)
(1)
RTL Development
Syntesis
Schematic Design
Fig. 2.
High Level Overview of Design Flow with Custom Embedded
Memory Showing The ATPG Flow and The Memory Model
often improper for a critical path. This method has issues with
at-speed testing coverage because the memory is modeled as
a black-box.
The second method for memory during ATPG is to use a
write through mode, it uses a memory model and requires
the control of read and write enable signals and the memory
clock. This method needs sequential ATPG to test the shadow
logic. Sequential ATPG patterns have more than two pulses
during capturing time. This allows input values to propagate
to the output of the memory like one cycle for writing and
another cycle for reading into memory. This technique is
attractive because it can provide at-speed testing coverage. It
can cover up macro to macro paths which are often timing
critical paths. However, Currently the write through method
has the following drawbacks:
1) Xs propagation; the ATPG memory model can generate
Xs if the memory accesses a location that was not written
to. It is difficult for the ATPG tool to understand all the
combinations of read, write, data and address. This may
result in reading memory contents that have not been written
to already through previous patterns. Due to the limitation
in tool capability for write through mode, the number of
patterns is increased to cover up to desired test coverage and
if the design has a scan compressor, the generated Xs give
more impact to pattern count. Table I shows how Xs from
memories can impact to static ATPG test coverage. The test
coverage came from the same design with different setup
mode, uncompress and compress mode. If there is no Xs
propagation, test coverage of compress mode is equal to or
greater than uncompress mode, but due to Xs from memories,
it suffered with Xs in scan chains. Because the outputs of the
scan chains must correspond exactly to the expected simulated
states, any dont-care bits will corrupt other scan chains.
Dont-care states from memories need to be eliminated if
XOR compression is used. By doing Xs source analysis the
percentage of Xs due to memory is found to be about 34
percent of the total Xs. Unfortunately, even some Xs can be
eliminated from the design, uncontrolled memories affect the
contents of scan chains during write-through mode due to
improper control of write and read enable signal. To avoid
further testability transgressions during automated test pattern
generation, the ATPG tool requires paying special attention to
the support needed for memories. However, it is difficult for
an ATPG algorithm to understand each custom macro design
and have proper control of the read and write enable signal
control. In order for the ATPG algorithm to create patterns
which pass data through memory, one of the requirements is
TABLE I
Test Coverage
Pattern Count
Uncompress mode
98.57%
1247
Compress mode
93.24%
1743
that the write control lines need to be available from the top
level module, but it is impossible to add an additional top level
pin just for ATPG.
2) Improper memory model and verification time; Many
custom memories can not be described as simple behavior
codes. For example, memory can have multi-port read/write
access. Even after these modeling, it requires a lot of time to
verify ATPG model vs. real circuit behavior.
wAddr0
(5'b00000)
RdData0
Memory model - 1
32bit data set
Memory model - 2
32bit data set
Memory model - 3
32bit data set
Fig. 3.
RdData2
RdData3
rAddr3
(5'b00010)
RdData4
RdData5
rAddr5
(5'b00100)
rAddr6
(5'b01000)
Write Data
port 3
wAddr3
(5'b01000)
rAddr1
(5'b00000)
rAddr4
(5'b00100)
Write Data
port 2
wAddr2
(5'b00100)
RdData1
rAddr2
(5'b00010)
Write Data
port 1
wAddr1
(5'b00010)
Like high performance multi-port register files, some memories can write the data at the rising edge and read the data at the
falling edge. The benefit from this behavior with constrained
address values is that scan patterns require only two capture
pulses for stuck-at-fault detection during write through, The
first pulse is for write and read into the memory. The second
one is for capture from scanable flip-flops. The register file is
handling high timing critical path which is not allowed to use
the bypass method (Section III) which requires MUXs in the
memory output path. Usually accessing memory data through
a read operation is a timing critical. It is important not to
insert additional delay into this path. Figure 3 shows a multiported register file which has 4 write and 8 read ports. During
ATPG mode, all write and read address ports are constrained
and allow to write and read into memory at the same cycle.
To allow accessing memory locations per wordline simultaneously, different write addresses (wAddr0, wAddr1, wAddr2,
wAddr3) and read addresses (rAddr0, rAddr1, rAddr2, rAddr3,
rAddr4, rAddr5, rAddr6, rAddr7) are applied to each memory
during ATPG mode. 32 bit data memory cells are modeled as
32 flip flops. It is worth to mention that the address paths are
tested by MBIST and the primary concern is the data path.
The modeling og memory as flip-flops has the following
advantages:
1) For transition delay testing, it requires only three cycles
for capturing. For example, Write 0, Read0 and
capture (W0R0, W1R1, Capture) are needed rather than
five cycles for capturing (W0A1, W1A2, R0A1, R1A2,
Capture). this reduces the sequential depth for ATPG.
2) It does not need complicated memory modeling and
RAM-sequential ATPG.
3) It does not need time-consuming fault coverage management to know which paths are not covered by MBIST
rAddr0
(5'b00000)
Write Data
port 0
Memory model - 4
32bit data set
RdData6
RdData7
rAddr7
(5'b01000)
160
Shift
Shift
Si
ATPG_mode
Xmask
So
CLK
Phi2
Latch
CLK
Functional enable
Clock
Clk
Shift
C1
C2
C3
Clk
Xmask
Clock
Fig. 5.
X Masking Logic
(a)
Read cycle
Write cycle
conditional clock and does not require any gate in the data
path, timing impact to critical path is minimal. Note that this
approach is compatible with any commercial ATPG tool.
cllk
precharge
WL
wren
rden
Bitline
development
BL/BLB
Td
Sense_en
Ta
dataout
(b)
Fig. 4.
161
Memory Address
initalization
write enable
invalid pattern
#0; ->WRITE_OP;
Dummy_bus
contention
Check address
end
always @(rclk or a or WRITE_OP)
if (rclk) begin
valid_pattern_1 = check_addr[a];
valid pattern
ATPG Capture clock Bus
contention checking
Rejected patterns
Dummy_bus
Non-contention
end
wire iclk, iwclk, wi_clk, i_clk;
wire [1:0] drv;
Fig. 6.
check_addr[0:255]
check_addr[0:255]
00000000
00000001
00000010
00000011
.
.
.
.
0
.
.
.
.
0
0
.
.
.
.
0
Address initalization
Update address
11111111
Read address
00000000
Dummy_bus
contention
0
Write address
00000010
Read address
00000010
endmodule
Dummy_bus noncontention
Fig. 9.
shown in Figure 9.
B. Two-Step ATPG Pattern Generation
Fig. 7.
Clock on
Pre-clock
Clock on
Post-clock
rclk
vaild_pattern_1
Fig. 8.
162
TABLE II
T HE E FFECT OF R EGISTER BASED T ESTING AND
P REVENTION ATPG M ETHOD
Design
A
B
C
Regular
Mode
49.63%
67.57%
97.80%
(A)
Regular Mode + Write through Mode (2 steps)
Coverage % of Xs
Pattern Count - Basic(Seq)
91.59%
34.71%
17(316)
93.11%
36.83%
10(173)
97.85%
34%
1091(345)
ACKNOWLEDGMENT
The Authors would like to thank the engineers at Qualcomm. We thank Paul Basset and Willie Anderson for their
absolutely exceptional support. Special thanks also to the
fantastic team at Austin.
R EFERENCES
Design
(B)
A
B
C
Coverage
97.21%
98.02%
98.51%
[1] P. Wohl and J. Waicukauski, USING VERILOG SIMULATION LIBRARIES FOR ATPG, in Proc. of International Test Conference, 1999,
pp. 10111020.
[2] S. Yadavalli and S. Sengupta, Impact and Cost of Modeling Memories
for ATPG for Partial Scan Designs, in Proc. of International Test
Conference, 1997, pp. 274278.
[3] N.A.Touba, Survey of test vector compression techniques, Design Test
of Computers, IEEE, vol. 23, no. 4, pp. 294 303, Apr 2006.
[4] S. Mitra, S. Lumetta, and M. Mitzenmacher, X-tolerant signature analysis, in Proc. of International Test Conference, Oct. 2004, pp. 432
441.
[5] E. K. Vida-Torku and G. Joos, Designing for scan test of high performance embedded memories, in Proc. of International Test Conference,
Oct 1998, pp. 101 108.
[6] TetraMAX, Version E-2010.12-SP2, in Synopsys Inc., 2010.
[7] G. Seok, B. Mohammad, H. Kim, and P. Bassett, Verification of gate
level model for custom design in scan mode, in Microprocessor Test and
Verification, 2007.
VII. C ONCLUSION
This paper addressed the issue of Xs propagating to the
test compressor. When an SOC design uses custom embedded
memories, the ATPG tool could not control write and enable
ports properly during the write through mode. A register based
test strategy and X prevention memory model is presented
for ATPG, which increases the overall test coverage. The test
163