ƣsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget1/translations/zh_CN/trace/coresight/coresight-ectmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/zh_TW/trace/coresight/coresight-ectmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/it_IT/trace/coresight/coresight-ectmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ja_JP/trace/coresight/coresight-ectmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ko_KR/trace/coresight/coresight-ectmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/sp_SP/trace/coresight/coresight-ectmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhK/var/lib/git/docbuild/linux/Documentation/trace/coresight/coresight-ect.rsthKubhsection)}(hhh](htitle)}(h-CoreSight Embedded Cross Trigger (CTI & CTM).h]h-CoreSight Embedded Cross Trigger (CTI & CTM).}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh block_quote)}(hG:Author: Mike Leach :Date: November 2019 h]h field_list)}(hhh](hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(h"Mike Leach h]h paragraph)}(hhh](h Mike Leach <}(hhhhhNhNubh reference)}(hmike.leach@linaro.orgh]hmike.leach@linaro.org}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:mike.leach@linaro.orguh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubh)}(hhh](h)}(hDateh]hDate}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhKubh)}(hNovember 2019 h]h)}(h November 2019h]h November 2019}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj1ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubeh}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hHardware Descriptionh]hHardware Description}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hhhhhK ubh)}(hX.The CoreSight Cross Trigger Interface (CTI) is a hardware device that takes individual input and output hardware signals known as triggers to and from devices and interconnects them via the Cross Trigger Matrix (CTM) to other devices via numbered channels, in order to propagate events between devices.h]hX.The CoreSight Cross Trigger Interface (CTI) is a hardware device that takes individual input and output hardware signals known as triggers to and from devices and interconnects them via the Cross Trigger Matrix (CTM) to other devices via numbered channels, in order to propagate events between devices.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hj[hhubh)}(he.g.::h]he.g.:}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[hhubh literal_block)}(hX0000000 in_trigs ::::::: 0 C 0----------->: : +======>(other CTI channel IO) 0 P 0<-----------: : v 0 U 0 out_trigs : : Channels ***** ::::::: 0000000 : CTI :<=========>*CTM*<====>: CTI :---+ ####### in_trigs : : (id 0-3) ***** ::::::: v # ETM #----------->: : ^ ####### # #<-----------: : +---# ETR # ####### out_trigs ::::::: #######h]hX0000000 in_trigs ::::::: 0 C 0----------->: : +======>(other CTI channel IO) 0 P 0<-----------: : v 0 U 0 out_trigs : : Channels ***** ::::::: 0000000 : CTI :<=========>*CTM*<====>: CTI :---+ ####### in_trigs : : (id 0-3) ***** ::::::: v # ETM #----------->: : ^ ####### # #<-----------: : +---# ETR # ####### out_trigs ::::::: #######}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhj[hhubh)}(hXvThe CTI driver enables the programming of the CTI to attach triggers to channels. When an input trigger becomes active, the attached channel will become active. Any output trigger attached to that channel will also become active. The active channel is propagated to other CTIs via the CTM, activating connected output triggers there, unless filtered by the CTI channel gate.h]hXvThe CTI driver enables the programming of the CTI to attach triggers to channels. When an input trigger becomes active, the attached channel will become active. Any output trigger attached to that channel will also become active. The active channel is propagated to other CTIs via the CTM, activating connected output triggers there, unless filtered by the CTI channel gate.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[hhubh)}(hjIt is also possible to activate a channel using system software directly programming registers in the CTI.h]hjIt is also possible to activate a channel using system software directly programming registers in the CTI.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hj[hhubh)}(hXIThe CTIs are registered by the system to be associated with CPUs and/or other CoreSight devices on the trace data path. When these devices are enabled the attached CTIs will also be enabled. By default/on power up the CTIs have no programmed trigger/channel attachments, so will not affect the system until explicitly programmed.h]hXIThe CTIs are registered by the system to be associated with CPUs and/or other CoreSight devices on the trace data path. When these devices are enabled the attached CTIs will also be enabled. By default/on power up the CTIs have no programmed trigger/channel attachments, so will not affect the system until explicitly programmed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hj[hhubh)}(hThe hardware trigger connections between CTIs and devices is implementation defined, unless the CPU/ETM combination is a v8 architecture, in which case the connections have an architecturally defined standard layout.h]hThe hardware trigger connections between CTIs and devices is implementation defined, unless the CPU/ETM combination is a v8 architecture, in which case the connections have an architecturally defined standard layout.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hj[hhubh)}(hThe hardware trigger signals can also be connected to non-CoreSight devices (e.g. UART), or be propagated off chip as hardware IO lines.h]hThe hardware trigger signals can also be connected to non-CoreSight devices (e.g. UART), or be propagated off chip as hardware IO lines.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hj[hhubh)}(hXlAll the CTI devices are associated with a CTM. On many systems there will be a single effective CTM (one CTM, or multiple CTMs all interconnected), but it is possible that systems can have nets of CTIs+CTM that are not interconnected by a CTM to each other. On these systems a CTM index is declared to associate CTI devices that are interconnected via a given CTM.h]hXlAll the CTI devices are associated with a CTM. On many systems there will be a single effective CTM (one CTM, or multiple CTMs all interconnected), but it is possible that systems can have nets of CTIs+CTM that are not interconnected by a CTM to each other. On these systems a CTM index is declared to associate CTI devices that are interconnected via a given CTM.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hj[hhubeh}(h]hardware-descriptionah ]h"]hardware descriptionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSysfs files and directoriesh]hSysfs files and directories}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKhjhhubj)}(h>$ ls /sys/bus/coresight/devices cti_cpu0 cti_cpu2 cti_sys0 etm0 etm2 funnel0 replicator0 tmc_etr0 cti_cpu1 cti_cpu3 cti_sys1 etm1 etm3 funnel1 tmc_etf0 tpiu0h]h>$ ls /sys/bus/coresight/devices cti_cpu0 cti_cpu2 cti_sys0 etm0 etm2 funnel0 replicator0 tmc_etr0 cti_cpu1 cti_cpu3 cti_sys1 etm1 etm3 funnel1 tmc_etf0 tpiu0}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKAhjhhubh)}(hXThe ``cti_cpu`` named CTIs are associated with a CPU, and any ETM used by that core. The ``cti_sys`` CTIs are general system infrastructure CTIs that can be associated with other CoreSight devices, or other system hardware capable of generating or using trigger signals.::h](hThe }(hj!hhhNhNubhliteral)}(h``cti_cpu``h]h cti_cpu}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj!ubhJ named CTIs are associated with a CPU, and any ETM used by that core. The }(hj!hhhNhNubj*)}(h``cti_sys``h]h cti_sys}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj!ubh CTIs are general system infrastructure CTIs that can be associated with other CoreSight devices, or other system hardware capable of generating or using trigger signals.:}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKEhjhhubj)}(h>$ ls /sys/bus/coresight/devices/etm0/cti_cpu0 channels ctmid enable nr_trigger_cons mgmt power powered regs connections subsystem triggers0 triggers1 ueventh]h>$ ls /sys/bus/coresight/devices/etm0/cti_cpu0 channels ctmid enable nr_trigger_cons mgmt power powered regs connections subsystem triggers0 triggers1 uevent}hjUsbah}(h]h ]h"]h$]h&]hhuh1jhhhKJhjhhubhdefinition_list)}(hhh](hdefinition_list_item)}(hX*Key file items are:-* * ``enable``: enables/disables the CTI. Read to determine current state. If this shows as enabled (1), but ``powered`` shows unpowered (0), then the enable indicates a request to enabled when the device is powered. * ``ctmid`` : associated CTM - only relevant if system has multiple CTI+CTM clusters that are not interconnected. * ``nr_trigger_cons`` : total connections - triggers directories. * ``powered`` : Read to determine if the CTI is currently powered. h](hterm)}(h*Key file items are:-*h]hemphasis)}(hjrh]hKey file items are:-}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjpubah}(h]h ]h"]h$]h&]uh1jnhhhKUhjjubh definition)}(hhh]h bullet_list)}(hhh](h list_item)}(h``enable``: enables/disables the CTI. Read to determine current state. If this shows as enabled (1), but ``powered`` shows unpowered (0), then the enable indicates a request to enabled when the device is powered.h]h)}(h``enable``: enables/disables the CTI. Read to determine current state. If this shows as enabled (1), but ``powered`` shows unpowered (0), then the enable indicates a request to enabled when the device is powered.h](j*)}(h ``enable``h]henable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh_: enables/disables the CTI. Read to determine current state. If this shows as enabled (1), but }(hjhhhNhNubj*)}(h ``powered``h]hpowered}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh` shows unpowered (0), then the enable indicates a request to enabled when the device is powered.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(ho``ctmid`` : associated CTM - only relevant if system has multiple CTI+CTM clusters that are not interconnected.h]h)}(ho``ctmid`` : associated CTM - only relevant if system has multiple CTI+CTM clusters that are not interconnected.h](j*)}(h ``ctmid``h]hctmid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubhf : associated CTM - only relevant if system has multiple CTI+CTM clusters that are not interconnected.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hB``nr_trigger_cons`` : total connections - triggers directories.h]h)}(hjh](j*)}(h``nr_trigger_cons``h]hnr_trigger_cons}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh/ : total connections - triggers directories.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hA``powered`` : Read to determine if the CTI is currently powered. h]h)}(h@``powered`` : Read to determine if the CTI is currently powered.h](j*)}(h ``powered``h]hpowered}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh5 : Read to determine if the CTI is currently powered.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhKOhjubah}(h]h ]h"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]uh1jhhhhKUhjeubji)}(hX*Sub-directories:-* * ``triggers``: contains list of triggers for an individual connection. * ``channels``: Contains the channel API - CTI main programming interface. * ``regs``: Gives access to the raw programmable CTI regs. * ``mgmt``: the standard CoreSight management registers. * ``connections``: Links to connected *CoreSight* devices. The number of links can be 0 to ``nr_trigger_cons``. Actual number given by ``nr_links`` in this directory. h](jo)}(h*Sub-directories:-*h]ju)}(hjXh]hSub-directories:-}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjVubah}(h]h ]h"]h$]h&]uh1jnhhhK_hjRubj)}(hhh]j)}(hhh](j)}(hH``triggers``: contains list of triggers for an individual connection.h]h)}(hjuh](j*)}(h``triggers``h]h triggers}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjwubh9: contains list of triggers for an individual connection.}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKXhjsubah}(h]h ]h"]h$]h&]uh1jhjpubj)}(hH``channels``: Contains the channel API - CTI main programming interface.h]h)}(hjh](j*)}(h ``channels``h]hchannels}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh<: Contains the channel API - CTI main programming interface.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKYhjubah}(h]h ]h"]h$]h&]uh1jhjpubj)}(h8``regs``: Gives access to the raw programmable CTI regs.h]h)}(hjh](j*)}(h``regs``h]hregs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh0: Gives access to the raw programmable CTI regs.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKZhjubah}(h]h ]h"]h$]h&]uh1jhjpubj)}(h6``mgmt``: the standard CoreSight management registers.h]h)}(hjh](j*)}(h``mgmt``h]hmgmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh.: the standard CoreSight management registers.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK[hjubah}(h]h ]h"]h$]h&]uh1jhjpubj)}(h``connections``: Links to connected *CoreSight* devices. The number of links can be 0 to ``nr_trigger_cons``. Actual number given by ``nr_links`` in this directory. h]h)}(h``connections``: Links to connected *CoreSight* devices. The number of links can be 0 to ``nr_trigger_cons``. Actual number given by ``nr_links`` in this directory.h](j*)}(h``connections``h]h connections}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj ubh: Links to connected }(hj hhhNhNubju)}(h *CoreSight*h]h CoreSight}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj ubh* devices. The number of links can be 0 to }(hj hhhNhNubj*)}(h``nr_trigger_cons``h]hnr_trigger_cons}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj ubh. Actual number given by }(hj hhhNhNubj*)}(h ``nr_links``h]hnr_links}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj ubh in this directory.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK\hjubah}(h]h ]h"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]jDjEuh1jhhhKXhjmubah}(h]h ]h"]h$]h&]uh1jhjRubeh}(h]h ]h"]h$]h&]uh1jhhhhK_hjehhubeh}(h]h ]h"]h$]h&]uh1jchjhhhNhNubh)}(hhh](h)}(htriggers directoriesh]htriggers directories}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hhhhhKbubh)}(hvIndividual trigger connection information. This describes trigger signals for CoreSight and non-CoreSight connections.h]hvIndividual trigger connection information. This describes trigger signals for CoreSight and non-CoreSight connections.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhj{hhubh)}(h[Each triggers directory has a set of parameters describing the triggers for the connection.h]h[Each triggers directory has a set of parameters describing the triggers for the connection.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghj{hhubh)}(hX* ``name`` : name of connection * ``in_signals`` : input trigger signal indexes used in this connection. * ``in_types`` : functional types for in signals. * ``out_signals`` : output trigger signals for this connection. * ``out_types`` : functional types for out signals. h]j)}(hhh](j)}(h``name`` : name of connectionh]h)}(hjh](j*)}(h``name``h]hname}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh : name of connection}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKjhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hF``in_signals`` : input trigger signal indexes used in this connection.h]h)}(hjh](j*)}(h``in_signals``h]h in_signals}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh8 : input trigger signal indexes used in this connection.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h/``in_types`` : functional types for in signals.h]h)}(hjh](j*)}(h ``in_types``h]hin_types}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh# : functional types for in signals.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKlhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h=``out_signals`` : output trigger signals for this connection.h]h)}(hj h](j*)}(h``out_signals``h]h out_signals}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj"ubh. : output trigger signals for this connection.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h2``out_types`` : functional types for out signals. h]h)}(h1``out_types`` : functional types for out signals.h](j*)}(h ``out_types``h]h out_types}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjGubh$ : functional types for out signals.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKnhjCubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jDjEuh1jhhhKjhjubah}(h]h ]h"]h$]h&]uh1hhhhKjhj{hhubh)}(he.g::h]he.g:}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj{hhubj)}(hXQ>$ ls ./cti_cpu0/triggers0/ in_signals in_types name out_signals out_types >$ cat ./cti_cpu0/triggers0/name cpu0 >$ cat ./cti_cpu0/triggers0/out_signals 0-2 >$ cat ./cti_cpu0/triggers0/out_types pe_edbgreq pe_dbgrestart pe_ctiirq >$ cat ./cti_cpu0/triggers0/in_signals 0-1 >$ cat ./cti_cpu0/triggers0/in_types pe_dbgtrigger pe_pmuirqh]hXQ>$ ls ./cti_cpu0/triggers0/ in_signals in_types name out_signals out_types >$ cat ./cti_cpu0/triggers0/name cpu0 >$ cat ./cti_cpu0/triggers0/out_signals 0-2 >$ cat ./cti_cpu0/triggers0/out_types pe_edbgreq pe_dbgrestart pe_ctiirq >$ cat ./cti_cpu0/triggers0/in_signals 0-1 >$ cat ./cti_cpu0/triggers0/in_types pe_dbgtrigger pe_pmuirq}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKrhj{hhubh)}(hlIf a connection has zero signals in either the 'in' or 'out' triggers then those parameters will be omitted.h]htIf a connection has zero signals in either the ‘in’ or ‘out’ triggers then those parameters will be omitted.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubeh}(h]triggers-n-directoriesah ]h"]triggers directoriesah$]h&]uh1hhjhhhhhKbubh)}(hhh](h)}(hChannels API Directoryh]hChannels API Directory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThis provides an easy way to attach triggers to channels, without needing the multiple register operations that are required if manipulating the 'regs' sub-directory elements directly.h]hThis provides an easy way to attach triggers to channels, without needing the multiple register operations that are required if manipulating the ‘regs’ sub-directory elements directly.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h$A number of files provide this API::h]h#A number of files provide this API:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hXA>$ ls ./cti_sys0/channels/ chan_clear chan_inuse chan_xtrigs_out trigin_attach chan_free chan_pulse chan_xtrigs_reset trigin_detach chan_gate_disable chan_set chan_xtrigs_sel trigout_attach chan_gate_enable chan_xtrigs_in trig_filter_enable trigout_detach trigout_filteredh]hXA>$ ls ./cti_sys0/channels/ chan_clear chan_inuse chan_xtrigs_out trigin_attach chan_free chan_pulse chan_xtrigs_reset trigin_detach chan_gate_disable chan_set chan_xtrigs_sel trigout_attach chan_gate_enable chan_xtrigs_in trig_filter_enable trigout_detach trigout_filtered}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(h-Most access to these elements take the form::h]h,Most access to these elements take the form:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h4echo [] > //h]h4echo [] > //}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(hRwhere the optional is only needed for trigXX_attach | detach operations.h]hRwhere the optional is only needed for trigXX_attach | detach operations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(he.g.::h]he.g.:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hY>$ echo 0 1 > ./cti_sys0/channels/trigout_attach >$ echo 0 > ./cti_sys0/channels/chan_seth]hY>$ echo 0 1 > ./cti_sys0/channels/trigout_attach >$ echo 0 > ./cti_sys0/channels/chan_set}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(hjAttaches trigout(1) to channel(0), then activates channel(0) generating a set state on cti_sys0.trigout(1)h]hjAttaches trigout(1) to channel(0), then activates channel(0) generating a set state on cti_sys0.trigout(1)}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h*API operations*h]ju)}(hj8h]hAPI operations}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj6ubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX;* ``trigin_attach, trigout_attach``: Attach a channel to a trigger signal. * ``trigin_detach, trigout_detach``: Detach a channel from a trigger signal. * ``chan_set``: Set the channel - the set state will be propagated around the CTM to other connected devices. * ``chan_clear``: Clear the channel. * ``chan_pulse``: Set the channel for a single CoreSight clock cycle. * ``chan_gate_enable``: Write operation sets the CTI gate to propagate (enable) the channel to other devices. This operation takes a channel number. CTI gate is enabled for all channels by default at power up. Read to list the currently enabled channels on the gate. * ``chan_gate_disable``: Write channel number to disable gate for that channel. * ``chan_inuse``: Show the current channels attached to any signal * ``chan_free``: Show channels with no attached signals. * ``chan_xtrigs_sel``: write a channel number to select a channel to view, read to show the selected channel number. * ``chan_xtrigs_in``: Read to show the input triggers attached to the selected view channel. * ``chan_xtrigs_out``:Read to show the output triggers attached to the selected view channel. * ``trig_filter_enable``: Defaults to enabled, disable to allow potentially dangerous output signals to be set. * ``trigout_filtered``: Trigger out signals that are prevented from being set if filtering ``trig_filter_enable`` is enabled. One use is to prevent accidental ``EDBGREQ`` signals stopping a core. * ``chan_xtrigs_reset``: Write 1 to clear all channel / trigger programming. Resets device hardware to default state. h]j)}(hhh](j)}(hH``trigin_attach, trigout_attach``: Attach a channel to a trigger signal.h]h)}(hjVh](j*)}(h!``trigin_attach, trigout_attach``h]htrigin_attach, trigout_attach}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjXubh': Attach a channel to a trigger signal.}(hjXhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjTubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hJ``trigin_detach, trigout_detach``: Detach a channel from a trigger signal.h]h)}(hj{h](j*)}(h!``trigin_detach, trigout_detach``h]htrigin_detach, trigout_detach}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj}ubh): Detach a channel from a trigger signal.}(hj}hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjyubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hk``chan_set``: Set the channel - the set state will be propagated around the CTM to other connected devices.h]h)}(hk``chan_set``: Set the channel - the set state will be propagated around the CTM to other connected devices.h](j*)}(h ``chan_set``h]hchan_set}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh_: Set the channel - the set state will be propagated around the CTM to other connected devices.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(h"``chan_clear``: Clear the channel.h]h)}(hjh](j*)}(h``chan_clear``h]h chan_clear}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh: Clear the channel.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hC``chan_pulse``: Set the channel for a single CoreSight clock cycle.h]h)}(hjh](j*)}(h``chan_pulse``h]h chan_pulse}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh5: Set the channel for a single CoreSight clock cycle.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hX``chan_gate_enable``: Write operation sets the CTI gate to propagate (enable) the channel to other devices. This operation takes a channel number. CTI gate is enabled for all channels by default at power up. Read to list the currently enabled channels on the gate.h]h)}(hX``chan_gate_enable``: Write operation sets the CTI gate to propagate (enable) the channel to other devices. This operation takes a channel number. CTI gate is enabled for all channels by default at power up. Read to list the currently enabled channels on the gate.h](j*)}(h``chan_gate_enable``h]hchan_gate_enable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh: Write operation sets the CTI gate to propagate (enable) the channel to other devices. This operation takes a channel number. CTI gate is enabled for all channels by default at power up. Read to list the currently enabled channels on the gate.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hM``chan_gate_disable``: Write channel number to disable gate for that channel.h]h)}(hM``chan_gate_disable``: Write channel number to disable gate for that channel.h](j*)}(h``chan_gate_disable``h]hchan_gate_disable}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj8ubh8: Write channel number to disable gate for that channel.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj4ubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(h@``chan_inuse``: Show the current channels attached to any signalh]h)}(hj\h](j*)}(h``chan_inuse``h]h chan_inuse}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj^ubh2: Show the current channels attached to any signal}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjZubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(h6``chan_free``: Show channels with no attached signals.h]h)}(hjh](j*)}(h ``chan_free``h]h chan_free}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh): Show channels with no attached signals.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hr``chan_xtrigs_sel``: write a channel number to select a channel to view, read to show the selected channel number.h]h)}(hr``chan_xtrigs_sel``: write a channel number to select a channel to view, read to show the selected channel number.h](j*)}(h``chan_xtrigs_sel``h]hchan_xtrigs_sel}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh_: write a channel number to select a channel to view, read to show the selected channel number.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hZ``chan_xtrigs_in``: Read to show the input triggers attached to the selected view channel.h]h)}(hZ``chan_xtrigs_in``: Read to show the input triggers attached to the selected view channel.h](j*)}(h``chan_xtrigs_in``h]hchan_xtrigs_in}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubhH: Read to show the input triggers attached to the selected view channel.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(h[``chan_xtrigs_out``:Read to show the output triggers attached to the selected view channel.h]h)}(h[``chan_xtrigs_out``:Read to show the output triggers attached to the selected view channel.h](j*)}(h``chan_xtrigs_out``h]hchan_xtrigs_out}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubhH:Read to show the output triggers attached to the selected view channel.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hm``trig_filter_enable``: Defaults to enabled, disable to allow potentially dangerous output signals to be set.h]h)}(hm``trig_filter_enable``: Defaults to enabled, disable to allow potentially dangerous output signals to be set.h](j*)}(h``trig_filter_enable``h]htrig_filter_enable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubhW: Defaults to enabled, disable to allow potentially dangerous output signals to be set.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(h``trigout_filtered``: Trigger out signals that are prevented from being set if filtering ``trig_filter_enable`` is enabled. One use is to prevent accidental ``EDBGREQ`` signals stopping a core.h]h)}(h``trigout_filtered``: Trigger out signals that are prevented from being set if filtering ``trig_filter_enable`` is enabled. One use is to prevent accidental ``EDBGREQ`` signals stopping a core.h](j*)}(h``trigout_filtered``h]htrigout_filtered}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj@ubhE: Trigger out signals that are prevented from being set if filtering }(hj@hhhNhNubj*)}(h``trig_filter_enable``h]htrig_filter_enable}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj@ubh. is enabled. One use is to prevent accidental }(hj@hhhNhNubj*)}(h ``EDBGREQ``h]hEDBGREQ}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj@ubh signals stopping a core.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj<ubah}(h]h ]h"]h$]h&]uh1jhjQubj)}(hu``chan_xtrigs_reset``: Write 1 to clear all channel / trigger programming. Resets device hardware to default state. h]h)}(hs``chan_xtrigs_reset``: Write 1 to clear all channel / trigger programming. Resets device hardware to default state.h](j*)}(h``chan_xtrigs_reset``h]hchan_xtrigs_reset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh^: Write 1 to clear all channel / trigger programming. Resets device hardware to default state.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]jDjEuh1jhhhKhjMubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe example below attaches input trigger index 1 to channel 2, and output trigger index 6 to the same channel. It then examines the state of the channel / trigger connections using the appropriate sysfs attributes.h]hThe example below attaches input trigger index 1 to channel 2, and output trigger index 6 to the same channel. It then examines the state of the channel / trigger connections using the appropriate sysfs attributes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX]The settings mean that if either input trigger 1, or channel 2 go active then trigger out 6 will go active. We then enable the CTI, and use the software channel control to activate channel 2. We see the active channel on the ``choutstatus`` register and the active signal on the ``trigoutstatus`` register. Finally clearing the channel removes this.h](hThe settings mean that if either input trigger 1, or channel 2 go active then trigger out 6 will go active. We then enable the CTI, and use the software channel control to activate channel 2. We see the active channel on the }(hjhhhNhNubj*)}(h``choutstatus``h]h choutstatus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh' register and the active signal on the }(hjhhhNhNubj*)}(h``trigoutstatus``h]h trigoutstatus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubh5 register. Finally clearing the channel removes this.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(he.g.::h]he.g.:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hX.../cti_sys0/channels# echo 2 1 > trigin_attach .../cti_sys0/channels# echo 2 6 > trigout_attach .../cti_sys0/channels# cat chan_free 0-1,3 .../cti_sys0/channels# cat chan_inuse 2 .../cti_sys0/channels# echo 2 > chan_xtrigs_sel .../cti_sys0/channels# cat chan_xtrigs_trigin 1 .../cti_sys0/channels# cat chan_xtrigs_trigout 6 .../cti_sys0/# echo 1 > enable .../cti_sys0/channels# echo 2 > chan_set .../cti_sys0/channels# cat ../regs/choutstatus 0x4 .../cti_sys0/channels# cat ../regs/trigoutstatus 0x40 .../cti_sys0/channels# echo 2 > chan_clear .../cti_sys0/channels# cat ../regs/trigoutstatus 0x0 .../cti_sys0/channels# cat ../regs/choutstatus 0x0h]hX.../cti_sys0/channels# echo 2 1 > trigin_attach .../cti_sys0/channels# echo 2 6 > trigout_attach .../cti_sys0/channels# cat chan_free 0-1,3 .../cti_sys0/channels# cat chan_inuse 2 .../cti_sys0/channels# echo 2 > chan_xtrigs_sel .../cti_sys0/channels# cat chan_xtrigs_trigin 1 .../cti_sys0/channels# cat chan_xtrigs_trigout 6 .../cti_sys0/# echo 1 > enable .../cti_sys0/channels# echo 2 > chan_set .../cti_sys0/channels# cat ../regs/choutstatus 0x4 .../cti_sys0/channels# cat ../regs/trigoutstatus 0x40 .../cti_sys0/channels# echo 2 > chan_clear .../cti_sys0/channels# cat ../regs/trigoutstatus 0x0 .../cti_sys0/channels# cat ../regs/choutstatus 0x0}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubeh}(h]channels-api-directoryah ]h"]channels api directoryah$]h&]uh1hhjhhhhhKubeh}(h]sysfs-files-and-directoriesah ]h"]sysfs files and directoriesah$]h&]uh1hhhhhhhhK