Skip to content

[top,dv] Log the console UART from the base vseq - #830

Open
martin-velay wants to merge 1 commit into
lowRISC:mainfrom
martin-velay:uart-tx-log
Open

martin-velay wants to merge 1 commit into
lowRISC:mainfrom
martin-velay:uart-tx-log

Conversation

@martin-velay

Copy link
Copy Markdown
Contributor

Tests whose SW reports a mismatch with uprintf ran top_chip_dv_uart_base_vseq only to get that message into the simulation log, which was confusing in the #820 review. This moves the UART TX logging into top_chip_dv_base_vseq behind a do_uart_tx_log knob, read from +do_uart_tx_log in the base new().

  • uart_smoke and rom_ctrl_smoke, vanilla and CHERI, run top_chip_dv_base_vseq with +do_uart_tx_log=1.
  • uart_tx_rx extends top_chip_dv_base_vseq and sets the knob in its new(), because its echo reads the bytes SW sends. axi_driver_smoke clears it, because no SW runs there to enter the test.
  • top_chip_dv_uart_base_vseq is removed.
  • The post_body() flush of a last line without a newline is dropped. body() returns as soon as it forks the collector, so the flush ran before the first byte arrived and never printed anything.

+do_uart_tx_log=1 also works from --run-opts on other SW tests whose vseq calls super.body().

Xcelium, two seeds each: uart_smoke, uart_tx_rx and rom_ctrl_smoke (vanilla and CHERI), gpio_smoke and axi_driver_smoke pass. A rom_ctrl_smoke run with a forced mismatch shows the SW message under UART_TRACE.

Tests whose SW reports a mismatch with uprintf, such as rom_ctrl_smoke,
ran top_chip_dv_uart_base_vseq only to get that message into the
simulation log. The UART TX logging now lives in top_chip_dv_base_vseq
behind the do_uart_tx_log knob. Those tests set it with
+do_uart_tx_log=1.

The base new() reads the plusarg, so a vseq that needs a given value
sets it in its own new(). uart_tx_rx sets it because its echo reads the
bytes SW sends, and axi_driver_smoke clears it because no SW runs there
to enter the test.

The post_body() flush of a last line without a newline is dropped.
body() returns as soon as it forks the collector, so the flush ran
before the first byte arrived and never printed anything.

Signed-off-by: Martin Velay <mvelay@lowrisc.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant