Skip to content

Update Darjeeling implementation #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 65 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
f91697a
[ot] hw/opentitan: ot_dma: emit only one trace per error type.
rivos-eblot May 14, 2024
7672e76
[ot] scripts/opentitan: ot.util.log add an option to log function name
rivos-eblot May 13, 2024
b7e6aa7
[ot] scripts/opentitan: ot.util.misc: add EasyDict helper
rivos-eblot May 15, 2024
909eb59
[ot] scripts/opentitan: ot.devproxy: small improvements
rivos-eblot May 13, 2024
ae099f1
[ot] .gitlab-ci.d: rename pylint file
rivos-eblot May 15, 2024
a296dd9
[ot] scripts/opentitan: ot-{format.tidy}.sh: fix missing version
rivos-eblot May 18, 2024
d3af480
[ot] scripts/opentitan: ot-{format.tidy}.sh: update to LLVM v18
rivos-eblot May 18, 2024
12a5042
[ot] hw/opentitan, hw/riscv: update syntax with clang-format v18
rivos-eblot May 18, 2024
a2eb7de
[ot] scripts/opentitan: clang-tidy.yml: update definitions for v18
rivos-eblot May 18, 2024
5c59f17
[ot] hw/opentitan: disable clang-tidy warnings on broken QEMU APIs
rivos-eblot May 18, 2024
86c74a3
[ot] hw/riscv: dm: address clang-tidy warning
rivos-eblot May 18, 2024
5bb0434
[ot] .gitlab-ci.d: build with clang v18
rivos-eblot May 21, 2024
6374277
[ot] hw/opentitan: alerts: update alert test management in OT devices
rivos-eblot Apr 26, 2024
57d1403
[ot] hw/riscv: ot_earlgrey,ot_darjeeling: temporarily disable alert h…
loiclefort May 28, 2024
ee6f1f3
[ot] hw/opentitan: ot_alert: implement alert handler
rivos-eblot May 28, 2024
ea82cbe
[ot] hw/riscv: ot_darjeeling, ot_earlgrey: use updated ot_alert device
rivos-eblot May 28, 2024
fe046fe
[ot] hw/opentitan: ot_uart: add alert support
rivos-eblot Apr 26, 2024
53eebd5
[ot] hw/opentitan: ot_plic_ext: add OT PLIC extension implementation
rivos-eblot May 28, 2024
5c0cc47
[ot] hw/opentitan: Kconfig: add missing dependency for SRAM controller
rivos-eblot May 28, 2024
d816665
[ot] hw/riscv: ot_darjeeling, ot_earlgrey: add OT PLIC extension
rivos-eblot Apr 26, 2024
0ecea2b
[ot] hw/opentitan: ot_ibex_wrapper: add support for alert escalation
rivos-eblot Apr 26, 2024
e065746
[ot] hw/opentitan: ot_lc_ctrl: add support for alert escalation.
rivos-eblot Apr 29, 2024
aeb61e8
[ot] hw/opentitan: ot_pwrmgr: add support for alert escalation.
rivos-eblot Apr 29, 2024
87d3038
[ot] hw/opentitan: ot_i2c: add missing alert IRQ line initialization.
rivos-eblot May 16, 2024
f274e98
[ot] hw/opentitan: ot_dma: update trace messages
rivos-eblot May 16, 2024
1d03b73
[ot] hw/opentitan: ot_darjeeling: connect device alerts to alert handler
rivos-eblot May 16, 2024
75f6662
[ot] scripts/opentitan: pyot.py: add 'expect' option
rivos-eblot May 16, 2024
f4675fb
[ot] .gitlab-ci.d: update unit test for alert handler
rivos-eblot May 16, 2024
0cba3de
[ot] hw/jtag: move jtag from top-level directory to hw/jtag
rivos-eblot May 21, 2024
daa1343
[ot] hw/opentitan: move ot_common get_chardev_by_id utility to ibex_c…
rivos-eblot May 22, 2024
287c954
[ot] jtag: rework JTAG / TAP controller support.
rivos-eblot May 22, 2024
b4f5a0d
[ot] docs/opentitan: update JTAG/TAP controller related documentation
rivos-eblot May 22, 2024
55958b3
[ot] scripts/jtag: bitbang.py: rename logger
rivos-eblot May 22, 2024
60d635b
[ot] .gitlab-ci.d: update JTAG server configuration
rivos-eblot May 21, 2024
ea73c59
[ot] scripts/opentitan: pyot.py: replace deprecated Typing items
rivos-eblot May 29, 2024
2060a66
[ot] scripts/opentitan: pyot.py: add an option to list test to execute.
rivos-eblot May 23, 2024
25647e7
[ot] scripts/opentitan: pyot.py: add support for multiple ROMs
rivos-eblot May 23, 2024
c71d57a
[ot] scripts/opentitan: pyot.py: discard ANSI escape sequence from QE…
rivos-eblot May 23, 2024
2bd98fe
[ot] scripts/opentitan: pyot.py: add a text-based trigger matching fe…
rivos-eblot May 23, 2024
82ad7df
[ot] scripts/opentitan: log.py: enable fine grained log configuration
rivos-eblot May 23, 2024
b899c98
[ot] scripts/opentitan: pyot.py: improve logger configuration
rivos-eblot May 23, 2024
d4f5adc
[ot] scripts/opentitan: add fine-grained control on loggers
rivos-eblot May 23, 2024
b699a16
[ot] scripts/opentitan: fix handling of dirname(__file__)
rivos-eblot May 23, 2024
5cda896
[ot] scripts/opentitan: fix deprecated Python type hinting syntax
rivos-eblot May 23, 2024
fe4c96d
[ot] scripts/jtag: fix deprecated Python type hinting syntax
rivos-eblot May 23, 2024
cb6bfa6
[ot] scripts/opentitan: pyot.py: simplify argument management
rivos-eblot May 29, 2024
7512635
[ot] scripts/opentitan: pyot.py: fix the 'debug' option.
rivos-eblot May 29, 2024
66b2f33
[ot] scripts/opentitan: pyot.py: improve handling of expected failures
rivos-eblot May 29, 2024
9b66e1e
[ot] scripts/opentitan: .pylintrc: discard just another 'too-many-*` …
rivos-eblot May 29, 2024
4b41715
[ot] .gitlab-ci.d: update with latest test configuration
rivos-eblot May 29, 2024
f54adbc
[ot] docs/opentitan: add a dedicated doc file for Python modules
rivos-eblot May 24, 2024
b045525
[ot] hw/opentitan: ot_mbx: fix invalid IRQ count
rivos-eblot May 27, 2024
23e913b
[ot] hw/riscv: ot_darjeeling: fix board reset
rivos-eblot May 28, 2024
0b4a00b
[ot] hw/opentitan: ot_dev_proxy: rework device management
rivos-eblot May 24, 2024
1f91ec4
[ot] hw/opentitan: ot_dev_proxy: add traces for interrupt management
rivos-eblot May 27, 2024
021e07f
[ot] hw/opentitan: ot_dev_proxy: rework interrupt interception.
rivos-eblot May 27, 2024
435768e
[ot] scripts/opentitan: ot.util.log: add a color option for log message
rivos-eblot May 29, 2024
2358f85
[ot] scripts/opentitan: pyot.py: assign a color to QEMU VCP messages
rivos-eblot May 29, 2024
358fdb4
[ot] scripts/opentitan: pyot.py: add an option to show log message time
rivos-eblot May 30, 2024
5fc401c
[ot] .gitlab-ci.d: update baremetal tests
rivos-eblot May 27, 2024
35aca4e
[ot] scripts/opentitan: log.py: fix missing getLevelNamesMapping
rivos-eblot May 31, 2024
b218d84
[ot] hw/opentitan: ot_timer: fix bug when CFG0.STEP is 0
loiclefort May 30, 2024
41dab44
[ot] scripts/opentitan: pyot.py: accept 'auto' as `--icount` argument.
rivos-eblot May 31, 2024
7dc59dc
[ot] .gitlab-ci.d: update baremetal tests
rivos-eblot May 31, 2024
837ed5e
[ot] .github: update linter and format tools to LLVM v18.
rivos-eblot May 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key |
sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc &&
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" &&
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" &&
sudo apt-get update &&
sudo apt-get install -y git make pkg-config clang-17 cmake ninja-build python3 rust-all \
sudo apt-get install -y git make pkg-config clang-18 cmake ninja-build python3 rust-all \
libpixman-1-dev
- name: Check out QEMU
uses: actions/checkout@v4
Expand All @@ -28,7 +28,7 @@ jobs:
git clean -dffx subprojects
mkdir build-clang
(cd build-clang &&
../configure --cc=clang-17 --disable-werror --target-list=riscv32-softmmu,riscv64-softmmu)
../configure --cc=clang-18 --disable-werror --target-list=riscv32-softmmu,riscv64-softmmu)
- name: Build
run: |
ninja -C build-clang &&
Expand Down Expand Up @@ -69,9 +69,9 @@ jobs:
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key |
sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc &&
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" &&
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" &&
sudo apt-get update &&
sudo apt-get install -y clang-format-17
sudo apt-get install -y clang-format-18
- name: Check out QEMU
uses: actions/checkout@v4
- name: Check execution
Expand All @@ -86,9 +86,9 @@ jobs:
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key |
sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc &&
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" &&
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" &&
sudo apt-get update &&
sudo apt-get install -y clang-tidy-17
sudo apt-get install -y clang-tidy-18
- name: Check out QEMU
uses: actions/checkout@v4
- name: Download QEMU source artifacts
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key |
sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc &&
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" &&
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" &&
sudo apt-get update &&
sudo apt-get install -y git make pkg-config gcc cmake ninja-build python3 rust-all \
libpixman-1-dev
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.d/opentitan/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build-clang:
- git clean -dffx subprojects
- mkdir build
- cd build
- ../configure --cc=clang-17 --disable-werror $QEMU_BUILD_OPTS
- ../configure --cc=clang-18 --disable-werror $QEMU_BUILD_OPTS
--target-list=riscv32-softmmu,riscv64-softmmu,x86_64-linux-user
- ninja
- ninja qemu-img
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions .gitlab-ci.d/opentitan/qemu-ot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
variables:
BAREMETAL_REF: "240506-1"
BAREMETAL_REF: "240531-1"
QEMU_BUILD_OPTS: ""

include:
- local: '/.gitlab-ci.d/opentitan/build.yml'
- local: '/.gitlab-ci.d/opentitan/pylint.yml'
- local: '/.gitlab-ci.d/opentitan/pylint-ot.yml'
- local: '/.gitlab-ci.d/opentitan/ot-smoke.yml'
- local: '/.gitlab-ci.d/opentitan/ot-bmtests.yml'
209 changes: 112 additions & 97 deletions docs/opentitan/devproxy.md

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions docs/opentitan/dtm.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ Extras:
operation, `--file` argument is mandatory. The content of the binary file is copied into the
memory, starting at the `--address`. See also the `--elf` option for uploading applications.

* `-P` specify the TCP port of the JTAG server in the QEMU VM, should match the port part of `-jtag`
option for invoking QEMU.
* `-P` specify the TCP port of the JTAG server in the QEMU VM, should follow the TCP setting of the
`-chardev socket,id=taprbb,...` option for invoking QEMU.

* `-Q` do not send QEMU a request for termination when this script exits.

Expand All @@ -106,7 +106,8 @@ Extras:

### Examples

Running QEMU VM with the `-jtag tcp::3335` option:
Running QEMU VM with the `-chardev socket,id=taprbb,host=localhost,port=3335,server=on,wait=off`
option:

* Retrieve JTAG/DTM/DM information and `mtvec` CSR value
````sh
Expand Down
14 changes: 3 additions & 11 deletions docs/opentitan/jtag-dm.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ See also [JTAG mailbox](jtagmbx.md) and [Life Controller](lc_ctrl_dmi.md) for ot
The JTAG server supports the Remote Bitbang Protocol which is compatible with other tools such as
Spike and [OpenOCD](https://github.com/riscv/riscv-openocd).

QEMU should be started with an option such as `-jtag tcp::3335` so that the JTAG server is
QEMU should be started with an option such as:
`-chardev socket,id=taprbb,host=localhost,port=3335,server=on,wait=off` so that the JTAG server is
instantiated and listens for incoming connection on TCP port 3335.

#### Remote termination feature
Expand All @@ -58,16 +59,7 @@ example.
It is nevertheless possible to disable this feature and ignore the remote exit request so that
multiple JTAG sessions can be run without terminating the QEMU VM.

To disable this feature, use the `quit` option: `-jtag tcp::3335,quit=off`.

#### macOS

If you want to avoid the boring pop-up window from macOS
```
Do you want the application “qemu-system-riscv32” to accept incoming network connections?
```
restrict the listening interfaces to the localhost with `-jtag tcp:localhost:3335` as QEMU defaults
to listening on all interfaces, _i.e._ 0.0.0.0
To disable this feature, use the `quit` option: `-global tap-ctrl-rbb,quit=off`.

#### Implementation

Expand Down
14 changes: 3 additions & 11 deletions docs/opentitan/jtagmbx.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,9 @@ where:
`P` is the private OT bus
`D` is the debug bus

QEMU should be started with an option such as `-jtag tcp::3335` so that the JTAG server is
instantiated and listen for incoming connection on TCP port 3335.

#### macOS

If you want to avoid the boring pop-up window from macOS
```
Do you want the application “qemu-system-riscv32” to accept incoming network connections?
```
restrict the listening interfaces to the localhost with `-jtag tcp:localhost:3335` as QEMU defaults
to listening on all interfaces, _i.e._ 0.0.0.0
QEMU should be started with an option such as:
`-chardev socket,id=taprbb,host=localhost,port=3335,server=on,wait=off` so that the JTAG server is
instantiated and listens for incoming connection on TCP port 3335.

## Communicating with JTAG server and JTAG MailBox using Python

Expand Down
14 changes: 3 additions & 11 deletions docs/opentitan/lc_ctrl_dmi.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,9 @@ where:
`P` is the private OT bus
`D` is the debug bus

QEMU should be started with an option such as `-jtag tcp::3335` so that the JTAG server is
instantiated and listen for incoming connection on TCP port 3335.

#### macOS

If you want to avoid the boring pop-up window from macOS
```
Do you want the application “qemu-system-riscv32” to accept incoming network connections?
```
restrict the listening interfaces to the localhost with `-jtag tcp:localhost:3335` as QEMU defaults
to listening on all interfaces, _i.e._ 0.0.0.0
QEMU should be started with an option such as:
`-chardev socket,id=taprbb,host=localhost,port=3335,server=on,wait=off` so that the JTAG server is
instantiated and listens for incoming connection on TCP port 3335.

## Communicating with JTAG server and Life Cycle controller using Python

Expand Down
7 changes: 4 additions & 3 deletions docs/opentitan/otpdm.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Extras:

* `-l` specify the length of the TAP instruction register length.

* `-P` specify the TCP port of the JTAG server in the QEMU VM, should match the port part of `-jtag`
option for invoking QEMU.
* `-P` specify the TCP port of the JTAG server in the QEMU VM, should follow the TCP setting of the
`-chardev socket,id=taprbb,...` option for invoking QEMU.

* `-p` select a partition using its name. See option `-L` to get a list of valid partition names.
Requires option `-j`.
Expand All @@ -85,7 +85,8 @@ Extras:

### Examples

Running QEMU VM with the `-jtag tcp::3335` option:
Running QEMU VM with the `-chardev socket,id=taprbb,host=localhost,port=33355,server=on,wait=off`
option:

* List all supported partitions
````sh
Expand Down
20 changes: 20 additions & 0 deletions docs/opentitan/pymod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Python modules for OpenTitan machines

The communication ports of the OpenTitan machines exposed through CharDev devices can be used
to access the devices from the local host (or also from a remote host when the CharDev is created
using a TCP socket).

* `scripts/jtag`: JTAG / TAP controller client, using the _Remote BitBang Protocol_
* `scripts/opentitan/ot`: OpenTitan tools (common to OpenTitan and Rivos SCS machines)
* `dtm`: Debug Transport Module support,
* `dm`: RISC-V Debug Module support,
* `lc_ctrl`: [Life Cycle controller](lc_ctrl_dmi.md) over JTAG/DMI support,
* `mailbox`: support for accessing the responder and the requester sides of the DOE mailbox. Also
support the [JTAG mailbox](jtagmbx.md) for accessing the mailbox from a JTAG/DMI link.
* `otp`: support for parsing and verifing OTP VMEM images, as well as generating and decoding QEMU
RAW image files.
* `util`: miscellaneous utililies such as ELF format tools and logging utilities
* `devproxy`: implementation of the communication channel with the QEMU devproxy device.

Please check the [Python tools](tools,md) documentation for details and scripts that rely
on these APIs.
57 changes: 34 additions & 23 deletions docs/opentitan/pyot.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
## Usage

````text
usage: pyot.py [-h] [-D DELAY] [-i N] [-L LOG_FILE] [-M LOG] [-m MACHINE] [-Q OPTS] [-q QEMU]
[-p DEVICE] [-t TRACE] [-S FIRST_SOC] [-s] [-U] [-b file] [-c JSON] [-e] [-f RAW]
[-K] [-l file] [-O RAW] [-o VMEM] [-r ELF] [-w CSV] [-x file] [-X] [-F TEST]
[-k SECONDS] [-R] [-T FACTOR] [-Z] [-v] [-d]
usage: pyot.py [-h] [-D DELAY] [-i ICOUNT] [-L LOG_FILE] [-M LOG] [-m MACHINE]
[-Q OPTS] [-q QEMU] [-p DEVICE] [-t TRACE] [-S FIRST_SOC] [-s]
[-U] [-b file] [-c JSON] [-e] [-f RAW] [-K] [-l file] [-O RAW]
[-o VMEM] [-r ELF] [-w CSV] [-x file] [-X] [-F TEST]
[-k SECONDS] [-z] [-R] [-T FACTOR] [-Z] [-v] [-d] [--log-time]
[--debug LOGGER] [--info LOGGER] [--warn LOGGER]

OpenTitan QEMU unit test sequencer.

Expand All @@ -18,53 +20,64 @@ options:
Virtual machine:
-D DELAY, --start-delay DELAY
QEMU start up delay before initial comm
-i N, --icount N virtual instruction counter with 2^N clock ticks per inst.
-i ICOUNT, --icount ICOUNT
virtual instruction counter with 2^ICOUNT clock ticks
per inst. or 'auto'
-L LOG_FILE, --log_file LOG_FILE
log file for trace and log messages
-M LOG, --log LOG log message types
-m MACHINE, --machine MACHINE
virtual machine (default to ot-earlgrey)
-Q OPTS, --opts OPTS QEMU verbatim option (can be repeated)
-q QEMU, --qemu QEMU path to qemu application (default: build/qemu-system-riscv32)
-q QEMU, --qemu QEMU path to qemu application (default: build/qemu-system-
riscv32)
-p DEVICE, --device DEVICE
serial port device name (default to localhost:8000)
-t TRACE, --trace TRACE
trace event definition file
-S FIRST_SOC, --first-soc FIRST_SOC
Identifier of the first SoC, if any
-s, --singlestep enable "single stepping" QEMU execution mode
-U, --muxserial enable multiple virtual UARTs to be muxed into same host output channel
-U, --muxserial enable multiple virtual UARTs to be muxed into same
host output channel

Files:
-b file, --boot file bootloader 0 file
-c JSON, --config JSON
path to configuration file
-e, --embedded-flash generate an embedded flash image file
-f RAW, --flash RAW SPI flash image file
-K, --keep-tmp Do not automatically remove temporary files and dirs on exit
-K, --keep-tmp Do not automatically remove temporary files and dirs
on exit
-l file, --loader file
ROM trampoline to execute, if any
-O RAW, --otp-raw RAW
OTP image file
-o VMEM, --otp VMEM OTP VMEM file
-r ELF, --rom ELF ROM file
-r ELF, --rom ELF ROM file (can be repeated, in load order)
-w CSV, --result CSV path to output result file
-x file, --exec file application to load
-X, --rom-exec load application as ROM image (default: as kernel)

Execution:
-F TEST, --filter TEST
run tests with matching filter, prefix with "!" to exclude matching tests
run tests with matching filter, prefix with "!" to
exclude matching tests
-k SECONDS, --timeout SECONDS
exit after the specified seconds (default: 60 secs)
-z, --list show a list of tests to execute and exit
-R, --summary show a result summary
-T FACTOR, --timeout-factor FACTOR
timeout factor
-Z, --zero do not error if no test can be executed

Extras:
-v, --verbose increase verbosity
-d, --debug enable debug mode
-d enable debug mode
--log-time show local time in log messages
--debug LOGGER assign debug level to logger(s)
--info LOGGER assign info level to logger(s)
--warn LOGGER assign warning level to logger(s)
````

This tool may be used in two ways, which can be combined:
Expand All @@ -79,14 +92,8 @@ This tool may be used in two ways, which can be combined:
* `-D` / `--start-delay` VM start up delay. Grace period to wait for the VM to start up before
attempting to communicate with its char devices.
* `-i` / `--icount` to specify virtual instruction counter with 2^N clock ticks per instruction.
This option if often used with two specific values:
* `-i 0` can be used to improve time synchronisation between the virtual CPU and the virtual HW:
as many OpenTitan tests rely on specific CPU clock counts for the HW to complete some action,
running QEMU without this option tends to favor CPU execution speed over HW emulation. With
this option, the vCPU is better synchronized, trying to emulate a 1GHz-clock vCPU.
* `-i 6` can be used to slow down vCPU virtual clock to a ~10-15MHz clock pace, which better
matches the expected FPGA-based lowRISC CPU.
Note that this option slows down the execution of guest applications.
Use 'auto' to enable QEMU adaptive icount counter. Note that this option slows down the execution
of guest applications.
* `-L` / `--log_file` specify the log file for trace and log messages from QEMU.
* `-M` / `--log` specify which log message types should be logged; most useful types are:
* `in_asm` for guest instruction disassembly,
Expand Down Expand Up @@ -134,7 +141,7 @@ This tool may be used in two ways, which can be combined:
* `-r` / `--rom` specify a ROM ELF file. Without a ROM file, it is unlikely to start up any regular
application since the emulated lowRISC vCPU is preconfigured with a locked PMP, as the real HW.
When no ROM is specified, test applications are executed immediately, as a replacement of the ROM
executable.
executable. This option may be repeated, to load several ROMs, in the same order as specified
* `-w` / `--result` specify an output CSV report file where the result of all the QEMU sessions,
one per test, are reported.
* `-x` / ` --exec` specify a ROM extension, an application or a test to execute. This option is
Expand All @@ -154,12 +161,16 @@ This tool may be used in two ways, which can be combined:
* `-Z`, `--zero` do not report an error if no test can be executed with the specified filters and
detected test applications. Default behavior is to report an error should such a condition arise,
as it likely comes from a misconfiguration or build issue.
* `-z` / `--list` list all tests to be executed and exit

### File options
### Extras

* `-v` / `--verbose` can be repeated to increase verbosity of the script, mostly for debug purpose.
* `-d` / `--debug` only useful to debug the script, reports any Python traceback to the standard
error stream.
* `-d` only useful to debug the script, reports any Python traceback to the standard error stream.
* `--log-time` show local time before each logged message
* `--debug` enable the debug level for the selected logger, may be repeated
* `--info` enable the info level for the selected logger, may be repeated
* `--warn` enable the warning level for the selected logger, may be repeated

## Configuration file

Expand Down
4 changes: 1 addition & 3 deletions docs/opentitan/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ directory to help with these tasks.

## Python modules

* Available from `scripts/jtag` and `scripts/opentitan/ot`
* [JTAG mailbox](jtagmbx.md) provides an API to access the system side of the mailbox over JTAG/DMI
* [LC DMI](lc_ctrl_dmi.md) provides an API to control the Life Cycle controller over JTAG/DMI
See [Python modules](pymod.md) documentation.

## Configuration files

Expand Down
3 changes: 3 additions & 0 deletions hw/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ source xtensa/Kconfig
# Ibex Demo System devices
source ibexdemo/Kconfig

# JTAG devices
source jtag/Kconfig

# OpenTitan devices
source opentitan/Kconfig

Expand Down
8 changes: 8 additions & 0 deletions hw/jtag/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# JTAG devices

config TAP_CTRL
bool

config TAP_CTRL_RBB
select TAP_CTRL
bool
2 changes: 2 additions & 0 deletions hw/jtag/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
system_ss.add(when: 'CONFIG_TAP_CTRL', if_true: files('tap_ctrl.c'))
system_ss.add(when: 'CONFIG_TAP_CTRL_RBB', if_true: files('tap_ctrl_rbb.c'))
Loading
Loading