JTAG TCL Library - Byte Paradigm

2y ago
100 Views
3 Downloads
325.54 KB
14 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Hayden Brunner
Transcription

JTAG TCL LibraryUser's GuideRevision 1.03 - 13 November 2007Byte Paradigm – info@byteparadigm.com1/14

JTAG TCL LibraryUser's GuideTable of ContentTable of Content .2Table of Tables .2Table of Pictures .2References . 3History . 31 Introduction .42 TCL Interpreter .52.1 Starting a TCL Session . 52.2 Getting Information on TCL Procedures . 73 JTAG Library - JTAGITclLib . 83.1 Quick Reference Table . 83.2 Procedures Detailed Description .83.2.1 Initialisation . 9Init {} .9ResetJtagFSM {} . 93.2.2 Signal Level. 9SetConstantOutput {TMS TDI TRST} .9SetSignals {TMS TDI TRST} . 93.2.3 State Level . 9State {State {Repeat 1} } . 9GetCurrentState { } . 10Idle { } . 103.2.4 Instruction/Data Level . 10Shift { BufDir ShiftType pDataOut {pDataIn -1} {EndState IDLE} {Display 0}}. 10SetInstrWidth {Width } . 11SetDataWidth {Width } . 11GetInstrWidth { }. 11GetDataWidth { } . 11SetInstrPreAmble {Length {pAmble 0x0}} . 11SetInstrPostAmble {Length {pAmble 0x0}}. 12SetDataPreAmble {Length {pAmble 0x0}} . 12SetDataPostAmble {Length {pAmble 0x0}}. 12GetInstrPreAmble {{pAmble 0x0}} . 12GetInstrPostAmble {{pAmble 0x0}} . 12GetDataPreAmble {{pAmble 0x0}} . 13GetDataPostAmble {{pAmble 0x0}} . 133.2.5 Miscellaneous Procedures . 13SetTCKFreq {Freq} . 13GetTCKFreq { }. 13SetContTCK {Cont } . 133.3 Reference Sequences and Scripts . 14Table of TablesTable 1:Quick reference table of JTAG procedures (by functionality) . 8Table of PicturesFigureFigureFigureFigure1:2:3:4:Tcl session start-up example .5TCL console shortcut in 8PI Control Panel program group .6Tcl console at start-up . 6Program group with TCL script examples. 14Revision 1.03 - 13 November 2007http://www.byteparadigm.com2/14

JTAG TCL LibraryUser's 19-Oct-2005Initial ted to comply with software version 1.031.0313-Nov-2007Update for GP Series introductionRevision 1.03 - 13 November 2007http://www.byteparadigm.com3/14

JTAG TCL LibraryUser's Guide1 IntroductionThe objective of this document is to list and describe all the TCL procedures available in the JTAG libraryprovided to control the JTAG operating mode of the GP Series device. Each procedure functionality andparameters are described in detail. Scripts examples, which use some of these procedures, are alsoprovided to help the users build their own test environments.A section is also dedicated to the TCL interpreter provided with the 8PI Control Panel application. Theway to start it and to use it is briefly described.Revision 1.03 - 13 November 2007http://www.byteparadigm.com4/14

JTAG TCL LibraryUser's Guide2 TCL Interpreter2.1 Starting a TCL SessionTo start a TCL session from the 8PI Control Panel GUI:1. From the 8PI Control Panel GUI, access the desired operating mode sheet.2. Click on the ‘Open Tcl Console’ button (Figure 1).This opens the Tcl console, loads the Tcl libraries relative to the chosen operating mode andinitialises the Tcl session.Figure 1: Tcl session start-up exampleOpen Tcl Console buttonRevision 1.03 - 13 November 2007http://www.byteparadigm.com5/14

JTAG TCL LibraryUser's GuideTo start a stand-alone TCL session (without running GUI):1. From the ‘Byte Paradigm 8PI Control Panel’ program group, click on the ‘TCL Console’ shortcut.This starts the Wish84 interpreter with the tkcon console.2. In the Tcl console, type: % source JTAGITclLib.tclThis initialises your TCL session in Analyser operating mode.Figure 2: TCL console shortcut in 8PI Control Panel program groupTcl Console shortcutBy default, the GP Series device software environment uses the WISH interpreter with the TKCON console(interactive mode) (Figure 3). For more information about the TKCON console, please check the followinglinks: http://tkcon.sourceforge.net/ - http://wiki.tcl.tk/1878.Please note that TCL is case sensitive.Figure 3: Tcl console at start-upLoaded libraryTcl and Tk versionsTCL console promptRevision 1.03 - 13 November 2007http://www.byteparadigm.com6/14

JTAG TCL LibraryUser's Guide2.2 Getting Information on TCL ProceduresTcl provides built-in commands for getting information about the elements loaded in memory during a Tclsession. We simply describe a few of them for those unfamiliar to the Tcl language.To list the libraries loaded in the TCL environment:% info loadedTo list all the procedures loaded in the TCL environment:% info procsTo list the arguments of a given procedure:% info args procedure name To list the body of a given procedure:% info body procedure name To learn more about the TCL/TK language, numerous man pages, tutorials and references can be foundat the following location: http://www.tcl.tk/doc/ .Revision 1.03 - 13 November 2007http://www.byteparadigm.com7/14

JTAG TCL LibraryUser's Guide3 JTAG Library - JTAGITclLibThis library contains all the procedures available to control the GP Series device when operating in JTAGmode. Using these procedures in scripts or command lines allows the user to control any JTAG compliantTest Access Port (TAP) controller3.1 Quick Reference TableTable 1 gives a list of all procedures available for the JTAG mode. They are grouped by type and level ofabstraction.Table 1:Quick reference table of JTAG procedures (by nit {}JTAG mode initialisation. This procedure is called automaticallywhen the Tcl shell is started.ResetJtagFSM {}Resets the TAP controller to the RESET state.Signal LevelSetConstantOutput {TMS TDI TRST}Forces a signal to 1.SetSignals {TMS TDI TRST}Sets the JTAG signals at once.State LevelState {State {Repeat 1}}Moves to the specified state and loop if needed.GetCurrentState {}Gets the current TAP controller state.Idle {}Moves the TAP controller to the IDLE state.Instruction/Data LevelShift {BufDir ShiftType pDataOut {pDataIn - Shifts an instruction or data.1} {EndState IDLE} {Display 0}}SetInstrWidth {Width}Sets the width of the instruction register.SetDataWidth {Width}Sets the width of the data register.GetInstrWidth {}Gets the width of the instruction register.GetDataWidth {}Gets the width of the data register.SetInstrPreAmble {Length {pAmble 0x0}}Configures the instruction pre-amble.SetInstrPostAmble {Length {pAmble 0x0}}Configures the instruction post-amble.SetDataPreAmble {Length {pAmble 0x0}}Configures the data pre-amble.SetDataPostAmble {Length {pAmble 0x0}}Configures the data post-amble.GetInstrPreAmble {{pAmble 0x0}}Gets the instruction pre-amble.GetInstrPostAmble {{pAmble 0x0}}Gets the instruction post-amble.GetDataPreAmble {{pAmble 0x0}}Gets the data pre-amble.GetDataPostAmble {{pAmble 0x0}}Gets the data post-amble.Miscellaneous ProceduresSetTCKFreq {Freq}Specifies the frequency of the TCK clock.GetTCKFreq {}Returns the programmed TCK clock frequency.SetContTCK {Cont}Specifies the clock ‘continuity’ (continuous or ‘hole’ clock)3.2 Procedures Detailed DescriptionThis section gives a detailed description of each procedure available to control the GP Series device JTAGoperating mode.Revision 1.03 - 13 November 2007http://www.byteparadigm.com8/14

JTAG TCL LibraryUser's Guide3.2.1InitialisationInit {}parameters:returns:description:conditions:see also:ResetJtagFSM {}parameters:returns:description:conditions:see also:3.2.2NoneDownloads the configuration into the GP Series device and prepares it tooperate in JTAG mode.NoneNoneResets the TAP controller to the RESET state. The TAP controller is reset bygenerating five pulses on TCK with TMS equal to one.NoneSignal LevelSetConstantOutput {TMS TDI TRST}parameters: TMS:TMS value to be appliedTDI:TDI value to be appliedTRST:TRST value to be appliedreturns:description:This procedure allows to force one or more of the three JTAG signals to alogic one. The specified values are ORed with JTAG signal. If for example,SetConstantOutput {0 0 1} is specified, TRST will be 1 whatever value isspecified elsewhere. TMS and TDI are not affected. This procedure doesnot enable to force a signal to 0.conditions:Nonesee also:SetSignals {TMS TDI TRST}parameters: TMS:TMS value to be appliedTDI:TDI value to be appliedTRST:TRST value to be appliedreturns:1 if the TDO signal is high0 if the TDO signal is lowdescription:Sets the three JTAG signals (TMS, TDI and TRST) at once and generates apulse on TCK. TDO is read back and is assigned to the return value.conditions:Nonesee also:3.2.3State LevelState {State {Repeat 1} }parameters:State:Target state for the TAP controller state machine. The state canbe entered as a full state name or an encoding, as describedhereafter:State NameRESETRevision 1.03 - 13 November 2007or Encoding0http://www.byteparadigm.com9/14

JTAG TCL LibraryUser's REXIT112IRPAUSE13IREXIT214IRUPDATE15Repeat: Optional. Number of times the state machine must cycle in thetarget state.returns:description:conditions:see also:GetCurrentState { }parameters:returns:description:conditions:see also:The TAP controller state machine moves to the specified state. Once in thatstate the Repeat number of clock cycles are generated to loop in thedestination state.NoneGetCurrentState{ }NoneintThe code of the current state.Retrieves the code of the current state. For the state encoding see theprevious procedure.NoneState{State {Repeat 1}}Idle { }parameters:returns:description:conditions:see also:3.2.4NoneMoves the TAP controller to the IDLE state.NoneInstruction/Data LevelShift { BufDir ShiftType pDataOut {pDataIn -1} {EndState IDLE} {Display 0}}parameters:BufDir:Specifies the direction of the shift operation. The allowedvalues are:Allowed ValueDescriptionDIR READshift to TDIDIR WRITEshift from TDODIR READWRITEshift to TDI and from TDOShiftType: Specifies if an instruction or a data is shifted. The allowedvalues are:Allowed ValueDescriptionSHIFT INSTRshift an instructionSHIFT DATAshift dataRevision 1.03 - 13 November 2007http://www.byteparadigm.com10/14

JTAG TCL LibraryUser's cription:conditions:see also:SetInstrWidth {Width }parameters:returns:description:conditions:see also:SetDataWidth {Width }parameters:returns:description:conditions:see also:GetInstrWidth { }parameters:returns:description:conditions:see also:GetDataWidth { }parameters:returns:description:conditions:see also:String containing the data to be sent on TDI.Optional. String allocated to receive the data coming out ofTDO.Optional. Specifies the state the TAP controller ends in afterthe shift operation. EndState must be specified using the stateencoding. For the state encoding see the description of“NextState” above.Optional. Display the result of the shift operation in the tclshell if set.Shifts an instruction or data to the TAP controller and retrieves the TDOoutput on request.NoneWidth:Width of the instruction register.Specifies the width of the instruction register. The specified value is usedfor all subsequent instruction shift operations until otherwise specified by anew call to the SetInstrWidth procedure.NoneGetInstrWidth{}Width:Width of the data register.Specifies the width of the data register. The specified value is used for allsubsequent data shift operations until otherwise specified by a new call tothe SetDataWidth procedure.NoneGetDataWidth{}NoneintWidth of the instruction registerRetrieves the width of the instruction register as specified with theSetInstrWidth procedure.NoneSetInstrWidth{Width}NoneintWidth of the data registerRetrieves the width of the data register as specified with the strPreAmble {Length {pAmble 0x0}}parameters:Length:Instruction pre-amble length.pAmpble:Optional. Reserved for future extensions.returns:Revision 1.03 - 13 November 2007http://www.byteparadigm.com11/14

JTAG TCL LibraryUser's Guidedescription:conditions:see also:Specifies the length of the instruction pre-amble. The instruction pre-ambleis equal to the sum of all the instruction register’s lengths of the TAPcontrollers following the device under test in the JTAG scan chain.NoneGetInstrPreAmble {}SetInstrPostAmble {Length {pAmble 0x0}}parameters:Length:Instruction post-amble length.pAmpble:Optional. Reserved for future extensions.returns:description:Specifies the length of the instruction post-amble. The instruction postamble is equal to the sum of all the instruction register’s lengths of the TAPcontrollers preceding the device under test in the JTAG scan chain.conditions:Nonesee also:GetInstrPostAmble {}SetDataPreAmble {Length {pAmble 0x0}}parameters:Length:Data pre-amble length.pAmpble:Optional. Reserved for future extensions.returns:description:Specifies the length of the data pre-amble. The data pre-amble is equal tothe sum of all the data register’s lengths of the TAP controllers followingthe device under test in the JTAG scan chain.conditions:Nonesee also:GetDataPreAmble {}SetDataPostAmble {Length {pAmble 0x0}}parameters:Length:Data post-amble length.pAmpble:Optional. Reserved for future extensions.returns:description:Specifies the length of the data post-amble. The data post-amble is equalto the sum of all the data register’s lengths of the TAP controllerspreceding the device under test in the JTAG scan chain.conditions:Nonesee also:GetDataPostAmble {}GetInstrPreAmble {{pAmble 0x0}}parameters:pAmpble:Optional. Reserved for future extensions.returns:intInstruction pre-amble length as specified with the SetInstrPreAmbleprocedure.description:Retrieves the length of the instruction pre-amble. The instruction preamble is equal to the sum of all the instruction register’s lengths of the TAPcontrollers following the device under test in the JTAG scan chain.conditions:Nonesee also:SetInstrPreAmble {Length {pAmble 0x0}}GetInstrPostAmble {{pAmble 0x0}}parameters:pAmpble:Optional. Reserved for future extensions.returns:intInstruction post-amble length as specified with theSetInstrPostAmble procedure.description:Retrieves the length of the instruction post-amble. The instruction postamble is equal to the sum of all the instruction register’s lengths of the TAPRevision 1.03 - 13 November 2007http://www.byteparadigm.com12/14

JTAG TCL LibraryUser's Guideconditions:see also:controllers preceding the device under test in the JTAG scan chain.NoneSetInstrPostAmble {Length {pAmble 0x0}}GetDataPreAmble {{pAmble 0x0}}parameters:pAmpble:Optional. Reserved for future extensions.returns:intData pre-amble length as specified with the SetDataPreAmbleprocedure.description:Retrieves the length of the data pre-amble. The data pre-amble is equal tothe sum of all the instruction register’s lengths of the TAP controllersfollowing the device under test in the JTAG scan chain.conditions:Nonesee also:SetDataPreAmble {Length {pAmble 0x0}}GetDataPostAmble {{pAmble 0x0}}parameters:pAmpble:Optional. Reserved for future extensions.returns:intData post-amble length as specified with the SetDataPostAmbleprocedure.description:Retrieves the length of the data post-amble. The data post-amble is equalto the sum of all the instruction register’s lengths of the TAP controllerspreceding the device under test in the JTAG scan chain.conditions:Nonesee also:SetDataPostAmble {Length {pAmble 0x0}}3.2.5Miscellaneous ProceduresSetTCKFreq e also:GetTCKFreq { }parameters:returns:description:conditions:see also:SetContTCK {Cont }parameters:returns:description:conditions:see also:Freq:Frequency of the TCK clock in kHz.intSynthesised frequency in kHz.Specifies the frequency of the TCK clock in kHz. This procedure computesthe achievable frequency and assigns it to its return value.NoneGetTCKFreq {}NoneintSynthesised frequency in kHz.Retrieves the synthesised frequency of the TCK clock in kHz.NoneSetTCKFreq {Freq}Cont:Clock continuity. Hole clock otherwise if 0, continuous otherwise.Specifies the clock continuity. A free running clock is generated when acontinuous clock is selected. If hole clock mode is selected, a clock isgenerated only when a data bit or an instruction bit is shifted.NoneRevision 1.03 - 13 November 2007http://www.byteparadigm.com13/14

JTAG TCL LibraryUser's Guide3.3 Reference Sequences and ScriptsExamples of the TCL scripts are provided with the TCL library. They can be accessed in the Examplesgroup located under the 8PI Control Panel program group created in your start menu during theinstallation of the application and driver on your computer.Figure 4: Program group with TCL script examplesRevision 1.03 - 13 November 2007http://www.byteparadigm.com14/14

Tcl provides built -in commands for getting information about the elements loaded in memory during a Tcl session. We simply describe a few of them f or those unfamiliar to the Tcl language. To list the libraries loaded in the TCL environment: % info loaded To lis

Related Documents:

BGP EVPN Route Fields Route Distinguisher – 8 byte Ethernet Segment ID – 10 byte Ethernet Tag ID – 4 byte MAC Address Length – 1 byte MAC Address – 6 byte IP Address Length – 1 byte IP Address – 0, 4, 16 byte MPLS Label 1 – 3 byte, L2VN MPLS Label 2- 3

any Tcl built-in command. See Appendix A, “Basics of Tcl,” for information on Tcl syntax and on the extensions that have been added to the Tcl interpreter. Using Hierarchy Separators in Tcl Commands Many Tcl commands take an object name as an argument. The path

Tcl application. TclPro Wrapper makes it easy to distribute Tcl applications to your users and manage upgrades in Tcl versions. Tcl/Tk 8.2 The latest version of Tcl/Tk is pre-compiled and ready for use. Bundled extensions Several popular Tcl ext

The JTAG UART core is supported by the Nios II hardware abstraction layer (HAL) system library. To view the character stream on the host PC, the JTAG UART core must be used in conjunction with the JTAG terminal software provided by Altera. Nios II processor users access the JTAG UART via the Nios II IDE or

Tcl lists, which share the syntax rules of Tcl com-mands, are explained in Chapter 5. Control structure like loops and if statements are described in Chapter 6. Chapter 7 describes Tcl procedures, which are new commands that you write in Tcl. Chapter 8 discusses Tcl arrays. Arrays are the mo

Tcl interpreters from the C code and start feeding them Tcl commands to evaluate. It is also possible to de ne new Tcl commands that when evaluated by the Tcl interpreter call C functions de ned by the user. The tcltklibrary sets up the event loop and initializes a Tcl interpreter

The TCL series is used for service purposes and for different industrial and laboratory tasks. For example, thermometers, temperature switches/thermostats, resistance thermometers and thermo-elements can be directly connected and checked. Versions: The TCL series of calibr

2 Adventure Tourism in Scotland – what do we mean? Introduction 2.1 This chapter details the definition of Adventure Tourism (AT) used by the study team for this commission and any assumptions which were made throughout the research. Definition of Adventure Tourism 2.2 The definition of the AT sector used for this study is the now commonly held sector definition developed in the Adventure .