Tessent Integrated Flow Lab2 IJTAG Introduction Ex2-3
Tessent Integrated Flow Lab2 IJTAG Introduction Ex2-3
Lab2:
IJTAG Introduction; Exercise 2 and 3
The terms and conditions governing the sale and licensing of Mentor Graphics products are set forth in
written agreements between Mentor Graphics and its customers. No representation or other affirmation
of fact contained in this publication shall be deemed to be a warranty or give rise to any liability of Mentor
Graphics whatsoever.
MENTOR GRAPHICS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE.
MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR
CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS)
ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT,
EVEN IF MENTOR GRAPHICS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
U.S. GOVERNMENT LICENSE RIGHTS: The software and documentation were developed entirely at
private expense and are commercial computer software and commercial computer software
documentation within the meaning of the applicable acquisition regulations. Accordingly, pursuant to
FAR 48 CFR 12.212 and DFARS 48 CFR 227.7202, use, duplication and disclosure by or for the U.S.
Government or a U.S. Government subcontractor is subject solely to the terms and conditions set forth
in the license agreement provided with the software, except for provisions which are contrary to
applicable mandatory federal laws.
TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of
Mentor Graphics Corporation or other parties. No one is permitted to use these Marks without the prior
written consent of Mentor Graphics or the owner of the Mark, as applicable. The use herein of a third-
party Mark is not an attempt to indicate Mentor Graphics as a source of a product, but is intended to
indicate a product from, or associated with, a particular third party. A current list of Mentor Graphics’
trademarks may be viewed at: www.mentor.com/trademarks.
End-User License Agreement: You can print a copy of the End-User License Agreement from:
www.mentor.com/eula.
Telephone: 503.685.7000
Website: www.mentor.com
Table of Contents
Before you Begin ...............................................................................................................................2
Notes............................................................................................................................................... 21
If this is the first time you are launching this VM (Virtual Machine), you must download and extract
the lab data as described in the "Obtaining Lab Data section below.
Whenever you are using the VM for lab exercises and are finished with your session, please use the
Caution
"Disconnect" feature of the Desktop Viewer before the VM times out to preserve the data from one
session to the next. Failure to do so will remove the VM, and its contents.
If the VM was removed, you will be presented with a new VM requiring you to follow the download
and extract process. This allows you to "refresh" the lab data so you can go through the labs again
with a new database.
If this is the first time you are starting a session for this VM, the flow_data directory will not be in the
home directory and you will need to download and extract it using the following instructions.
1. Double click on the Desktop icon Download_lab_data, . This launches a web browser.
3. In the resultant window, select the Download button, enable the Save File button, then, select the
OK button to download the file.
4. Move the file in the Downloads directory to the home directory. If you are using the terminal
(Applications>Favorites>Terminal) you can use the following command:
mv ./Downloads/tessent_flow_data_v2020.3_20201025.tgz .
5. In a terminal window, extract the files from the compressed tar file using the command:
IJTAG Introduction – Exercises 2-3 2
Lab Workbook
You should now have a directory named flow_data in your Home directory. That directory contains all
the files you need to perform the exercises, in this learning path.
Lab2:
IJTAG Introduction – Exercises 2-3
Objectives
Upon completing this lab, you should be able to
Introduction
This lab is comprised of several exercises. In one exercise, you will create a basic ICL description for a
PLL and generate a PDL for the PLL ICL.
In exercises 2 and 3, you will invoke Tessent IJTAG within Tessent Shell in order to extract the ICL
network accessing the instruments, then create a pattern set to access an instrument in the IJTAG
network.
Overview
In this exercise, you will invoke Tessent Shell and extract the ICL network for block3. You will then run
supplied scripts to extract the ICL for other blocks.
The Design
This lab uses the top-level design module called chip. The hierarchical components of chip are described
in the following schematic. The module contains four different blocks; each block contains different
instruments that need to be tested. The top-level contains a TAP controller at the chip interface that
connects to the SIB network that selects the particular block and instrument to be tested. Instruments
inside each block are accessed differently. Accessing the structure of each instrument is not the focus of
this exercise; however, it is should be noted as follows.
Figure 2-1. Top level Schematic
1. Block1_0, Block1_1
a. Two instruments (raw*) are accessed via Test Data Registers (tdr*).
b. Test instruments can be accessed either serially or in parallel. This will be determined by
the state of the SIBs.
c. The illustration above shows the situation where both instruments are tested in parallel.
2. Block 2
a. There are two instruments to be tested raw1_I1 and raw1_I2.
b. The Test Data Register TDR2_I1 has three functions:
i. It selects the instrument.
ii. It provides the stimuli.
iii. It captures the response.
c. Based on the selection logic, either DR1 or DR2 captures the data from the TDR and
passes it on.
d. The data register that is not selected, keeps its data.
Figure 2-4. Block3 Schematic
3. Block3 - The selection port on the MUX selects each instrument. A test data register (not shown
in the top-level schematic) accesses each instrument.
a. The register connected to SO is a 2-bit IEEE P1687-compliant register.
b. This 2-bit IEEE P1687-compliant register controls the MUX, which selects the instrument
to be tested.
c. IEEE P1687-compliant TDRs access four instruments (tdr1_I1 to tdr1_I4).
d. Only one instrument can be accessed at a time.
Lab Database
The files that are required for all three exercises are:
libs - contains the data directories required to run the lab
o atpglib - contains the ATPG libraries used for scan pattern generation
o icl - Contains the ICL descriptions for the blocks
o icl_primitives - Contains the ICL descriptions for the low-level components (SIB,TDR,
TAP, …)
o pdl - Contains iProc definitions
o rtl - Verilog netlist of the top-level design
results/generated_icl - Repository for the results of the exercises
Exercise[2-3] – Scripts
solutions - .tcl files to run labs
If there are additional design constraints required, you would add those
in this section
Note
You can use this command any time after the set_current_design
step above. Verilog and ICL modules are mapped to each other by
Note executing the command, set_current_design.
12. Write out the generated ICL file with and without lower-level model definitions
a) Write out the ICL files. Use the -created option to include the ICL modules that were
generated in this session, and reference the existing ICL modules.
ANALYSIS> write_icl -output_file \
results/generated_icl/generated_chip_block3.wrapper.icl \
–created -replace
b) Write out the ICL files and include all modules definitions:
ANALYSIS> write_icl -output_file \
results/generated_icl/generated_chip_block3.all.icl \
-replace
13. Exit Tessent Shell
ANALYSIS> exit
1. Run the provided scripts to extract TCL networks for block1 ,block2 and block3.
$ ./1a.run_icl_extraction_block1
$ ./1b.run_icl_extraction_block2
$ ./1c.run_icl_extraction_block3
2. Review the extracted ICL networks in results/generated_icl
Overview
In this lab exercise you will invoke Tessent shell to setup and create PDL patterns utilizing some
advanced PDL syntax.
Design Overview
This lab uses the top-level ICL for the design named chip that includes the ICL components as shown on
the schematic.
$ cd $FLOW_LABS/Lab2/Exercise3/
Notice the following directories:
libs - Includes the instrument level ICL and pdl files for this lab.
solutions - Includes the scripts that will be used during the labs including a completed
script that can be used as a reference.
design - Includes the ICL for chip.icl
2. Change directory into libs/icl, then, using a text editor, review the ICL files as described
below.
a) $ cd libs/icl
b) sib1.icl - Segment-insertion-bit ICL module. It is the same ICL description for the SIB used
in exercise 2.
c) tdr1.icl - Data register ICL for the TDR used in BLOCK1. This is similar to the one used in
the previous lab, but since it has a parameterized register size, it can be used for
multiple TDR configurations.
Parameter Regmax = 3;
Parameter Regmin = 0;
ii. Notice how the parameters are used in the ScanRegister command.
ScanRegister R[$Regmax:$Regmin];
iii. Using an alias allows us to define a shorthand notation of the LSB and the rest of
the register
d) tdr2.icl - ICL for the TDR in Block2. This is similar to the one used in the previous lab. It
uses parameters as we saw in tdr1.tcl, and utilizes an enumeration table as well.
ScanRegister R[$Regmax:$Regmin] {
IJTAG Introduction – Exercises 2-3
12
Lab Workbook
ScanInSource si;
RefEnum OptionalValues ;
}
Enum OptionalValues {
reset = 8'b0 ;
set = 8'b11111111 ;
chain = 8'b11001100 ;
green = 8'hee ;
blue = 8'd198 ;
}
Parameter Regmax = 5 ;
This declaration will override the value that is declared in the file tdr1.icl. The effect is
that the TDR1 will be a 6-bit register instead of the default 4-bit register defined in the
file tdr1.icl
$ cd ../pdl
iProcsForModule tdr2
one of the eNum defined in the .tcl model. If no argument is passed, then
the value “set” will be used.
ii. read_from_tdr2 - a procedure used to read data from the scan register. If
there is one argument, value becomes the expected value for testing. If
there is no argument, the default value in “set” becomes the expected value
for the test.
1. Edit the file chip_test.tcl, which is a tcl script to run the process. This file includes comments
that will prompt you where to enter commands as well as having some commands already
entered. Complete the file using the following directions:
a) Set the context for IJTAG pattern generation by adding the following command to
the file:
set_context patterns -ijtag
b) Read the required ICL files for the design. This can be done with either individual
commands, or by using a TCL script that utilized a foreach command to read a list of
modules and issue the appropriate read_icl command.
Add the following lines to the Tcl script to perform this step.
read_icl design/icl/chip.icl
set modules {sib1 tdr1 tdr2}
foreach module \
$modules {read_icl libs/icl/${module}.icl}
You will notice when this is run in Tessent Shell, it generates the following
commands:
Notice that the command to source the file tdr2.pdl file has already been added to
the script. This allows the procedures to be available for use later in the script.
Note
c) Notice the command which will set the hierarchical level of the design we're
operating on has been specified using the command:
set_current_design
d) Notice the command which will run the DRCs has already been specified. When this
command is executed, Tessent Shell transitions to analysis mode when there are no
errors. If errors exist, you will need to fix them.
check_design_rules
e) In the next few sub-steps, using the parameters, alias and enumerations defined in
tdr1.icl and tdr2.icl, you will add the commands which will open a pattern set,
initialize both TDR1, and TDR2 and close the pattern to the Tcl script.
ii. Initialize TDR1 per the information provided in the iNote statements, which
are already in the file and are provided here for completeness.
iii. Initialize TDR2 per the information provided in the iNote statements,
keeping in mind that set has the value defined in the enumeration table in
the tdr2.icl file.
close_pattern_set
f) Using iCall to utilize the iProc procedures, create a new pattern set, read the
TDR2, with the expected value of “green”, then close the pattern set.
ii. Initialize TDR2 per the information provided in the iNote statements, which
are already in file and are, as well as the comment, provided here for
completeness.
close_pattern_set
When creating pattern sets, you can use both iWrite and iCall.
Initialize TDR1
Initialize MyTdr1
Open the file results/pattern_set_1.pdl and notice the following:
1. Even though you do not see an iReset statement, it is implicitly implied by Tessent IJTAG.
2. In order to write to TDR1 (in BLOCK1), the path must be activated. Since we're only initializing TDR1,
we need to make sure that the path to TDR2 is not initialized by confirming the PDL you just
generated has the following statements:
iWrite MySib1.SIB 0b1
iRead MySib1.SIB 0b0
iWrite MySib2.SIB 0b0
iRead MySib2.SIB 0b0
iApply
Initialize MyTdr2
4. Confirm the path to TDR1 is disabled and the path to TDR2 is enabled by the presence of the
following statements:
Notes