1.7.1. User Commands
The steps in Setting up the Software Command Line Environment section show how you can compile and execute the software to bring up the App Console window in the SoC EDS tool. After executing the software, the App Console window displays a command prompt where you can enter commands to the ARM® HPS control unit to perform various tasks. The table below describes the commands that you can issue at the command prompt.
Type |
Command |
Description |
---|---|---|
Help |
h |
Display menu of available commands. |
Reset |
r [link select #] [p | x | c | l | f | h | r] |
Selective/global soft system reset. The [link select #] option selects the link that the command will take effect on. If no [link select #] option is indicated, the command will take effect on all links identically. The [p | x | c | l | f ] options indicate the specific submodule that the reset command will take effect on: [p] – Core PLL [x] – TX/RX Transceivers (JESD204B IP core PHY) [c] – TX/RX JESD204B IP core CSR [l] – TX/RX link reset [f] – TX/RX frame reset If none of the options above are indicated, all submodules are reset. You can indicate multiple options simultaneously to perform simultaneous submodule resets. The [h | r] options indicate if the reset is asserted and held or released from a hold: [h] – Assert and hold reset [r] – Release reset If none of the options above are indicated, the resets are pulsed (asserted and released automatically). When the [r] option is indicated, the reset is released immediately without checking for any qualifying conditions (for example, the PLL locked or transceiver ready signals). You are responsible to qualify the signals before holding or releasing the resets. |
Reset |
r [link select #] [p | x | c | l | f | h | r] |
(continued) Depending on the DATAPATH setting in the main.h file, the command takes effect on either the TX only datapath (if DATAPATH is set to TX only), the RX only datapath (if DATAPATH is set to RX only) or both TX and RX datapaths (if DATAPATH is set to duplex). Command examples:
|
Load SPI |
ls [slave select #] <offset> <value> |
Loads 8-bit value <value> (in C-style “0x” hexadecimal notation) into the register of external converter module connected to the SPI interface at offset <offset> (in C-style “0x” hexadecimal notation) indicated by [slave select #]. The maximum bit width of <offset> is 16 bits. |
Get SPI |
gs [slave select #] <offset> |
Gets the 8-bit value (in C-style “0x” hexadecimal notation) at the register of external converter module connected to SPI interface at offset <offset> (in C-style “0x” hexadecimal notation) indicated by [slave select #]. The maximum bit width of <offset> is 16 bits. |
Config SPI |
cs |
Configure external converter modules via SPI interface. |
Initialize |
i [link select #] [n] |
Initialize link indicated by [link select #]. The [link select #] option selects the link that the command will take effect on. If no [link select #] option is indicated, the command takes effect on all links identically. By default, the link is initialized to test mode (see ‘Test’ command). The optional [n] option initializes the link to user mode (see ‘Test’ command).
Note: When setting to user mode, ensure that the user input data valid signal (avst_usr_din_valid) is properly connected in the top level HDL file (jesd204b_ed.sv). Failing to do so will result in continuous error interrupts and may cause the system to hang.
The full sequence of steps executed by this command:
|
Status |
s [link select #] [t | r] |
Reports TX and/or RX link status of link indicated by [link select #]. Reads back tx_status0 and/or rx_status0 status registers from the JESD204B CSR identified by [link select #] and reports link status based on the values in those registers. For example, the command can report that the indicated link is not in sync or not in User Data Mode. In addition, the command reports the status of the pattern checker error signal. The [link select #] option selects the link that the command will take effect on. If no [link select #] option is indicated, the command takes effect on all links identically. The optional [t | r] options indicates the datapath to be reported: [t] – Report TX path status only [r] – Report RX path status only [no option] – Report default path status according to DATAPATH setting Depending on the DATAPATH setting in the main.h file, the command will take effect on either the TX only datapath (if DATAPATH is set to TX only), the RX only datapath (if DATAPATH is set to RX only) or both TX and RX datapaths (if DATAPATH is set to duplex). |
Loopback |
lb [link select #] [n] |
Puts the JESD204B IP core PHY indicated by [link select #] into transceiver serial loopback mode. This command is only applicable for links where the JESD204B IP core is configured in duplex mode (TX and RX datapaths present). The [link select #] option selects the link that the command will take effect on. If no [link select #] option is indicated, the command takes effect on all links identically. The optional [n] option sets the JESD204B IP core PHY indicated by [link select #] into non-serial loopback mode. |
Source/ Destination |
sd [link select #] [s | d] [u | a | r | p] |
Selects the source and destination datapath for the Avalon-ST interface of the link indicated by [link select #]. The [link select #] option selects the link that the command will take effect on. If no [link select #] option is indicated, the command takes effect on all links identically. The optional [s | d] option indicates whether the source (TX) or destination (RX) datapath is being selected: [s] – Source datapath (TX) [d] – Destination datapath (RX) [no option] – Default datapath according to DATAPATH setting Depending on the DATAPATH setting in the main.h file, the command will take effect on either the TX only datapath (if DATAPATH is set to TX only), the RX only datapath (if DATAPATH is set to RX only) or both TX and RX datapaths (if DATAPATH is set to duplex). The optional [u | a | r | p] option indicates the type of datapath to set to:
Note: When setting to user mode, ensure that the user input data valid signal (avst_usr_din_valid) is properly connected in the top level HDL file (jesd204b_ed.sv). Failing to do so will result in continuous error interrupts and may cause the system to hang.
[u] – User datapath (no test pattern generator and checker) [a] – Test pattern generator and checker set to alternate pattern [r] – Test pattern generator and checker set to ramp pattern [p] – Test pattern generator and checker set to PRBS pattern [no option] – Default to test pattern generator and checker set to PRBS pattern The test pattern generator and checker module has other configurable parameters that you can set. In particular, the pattern generator and checker derives its M and S values from the JESD204B IP core CSR. Also, there are other parameters such as POLYNOMIAL_LENGTH and FEEDBACK_TAP that are set during compile time. Refer to Chapter 5 of the JESD204B IP Core User Guide for more details. |
Test |
t [link select #] [n] |
Sets the link indicated by [link select #] to test mode. The [link select #] option selects the link that the command will take effect on. If no [link select #] option is indicated, the command takes effect on all links identically. The test mode is defined by:
The optional [n] option negates the test mode (set to user mode). User mode is defined as:
Note: When setting to user mode, ensure that the user input data valid signal (avst_usr_din_valid) is properly connected in the top level HDL file (jesd204b_ed.sv). Failing to do so will result in continuous error interrupts and may cause the system to hang.
|
Reinitialization |
ri [link select #] [t | r] |
Trigger a link reinitialization on links indicated by [link select #]. The optional [link select #] option selects the link that the command will take effect on. If no [link select #] option is indicated, the command takes effect on all links identically. The optional [t | r] option indicates the type of reinitialization operation: [t] – TX link reinitialization; TX link transmits K28.5 packets continuously until link is out of CGS (Code Group Synchronization) phase
[r] – RX link reinitialization; SYNC_N signal is driven low until link is out of CGS (Code Group Synchronization)
Note: Forcing RX link reinitialization will trigger a TX SYNCN error interrupt to the processor. The interrupt is automatically cleared by the software.
[no option] – For DATAPATH setting set to TX only or duplex, default to TX link reinitialization. For DATAPATH setting set to RX only, default to RX link reinitialization For more details on the reinitialization operation, refer to the JESD204B IP Core User Guide. |
Sysref |
sy |
Pulse SYSREF signal one time (“one-shot”) |
Reconfiguration |
rc [link select #] [l <value>] [m <value>] [f <value>] [s <value>] [n <value>] [np <value>] [cs <value>] [k <value>] [hd <value>] [scr <value>] [sub <value>] |
Dynamically reconfigure link indicated by [link select #] according to parameter-value pair option indicated. The optional [link select #] option selects the link that the command will take effect on. If no [link select #] option is indicated, the command takes effect on all links identically. The parameters that are dynamically configurable are as follows: [l] – Lanes per converter device [m] – Converters per device [f] – Octets per frame
Note: The Altera test pattern generator and checker do not support dynamic reconfiguration of F.
[s] – Samples per converter per frame [n] – Converter resolution [np] – Transmitted bits per sample [cs] – Control bits [k] – Frames per multi-frame [hd] – High density user data format [scr] – Enable scrambler [sub] – Subclass select The valid value ranges that can be entered for each parameter are governed by rules enforced by software. Refer to the Dynamic Reconfiguration section for more details. Command examples:
|