commit | f54937e812e37068bc2c4f1dee6f8637fb677bdc | [log] [tgz] |
---|---|---|
author | Philipp Wagner <phw@lowrisc.org> | Fri Sep 18 12:29:40 2020 +0100 |
committer | Philipp Wagner <mail@philipp-wagner.com> | Fri Sep 18 18:47:22 2020 +0100 |
tree | 7cb4bf64f612697f6fe873834dcee7d0581b6e81 | |
parent | f32d0b2dd27e782d68eb4f25d67216d67bbb9d6d [diff] |
[uartdpi] Accept log file name through plusarg The UARTDPI module simulates an UART device by creating a pseudo-terminal (e.g. /dev/pts/N). Additionally, each written character is also written to a log file, in our case always `uart0.log` in the current directory. This patch adds the ability to specify the path of the log file through a plus argument (plusarg). The defaults remain unchanged: calling the simulation without special arguents writes an `uart0.log` file. As a new feature, the log file can now also be given as "-", which writes UART logs directly to STDOUT. In this case, the running simulation directly shows all output printed from device software, e.g. from `LOG()` macros, making the life of software developers much easier. To write all logs of uart0 (the one and only UART in an Earl Grey system), use a command like the following: ``` build/lowrisc_systems_top_earlgrey_verilator_0.1/sim-verilator/Vtop_earlgrey_verilator \ --meminit=rom,build-bin/sw/device/boot_rom/boot_rom_sim_verilator.elf \ --meminit=flash,build-bin/sw/device/tests/dif_hmac_sanitytest_sim_verilator.elf \ +UARTDPI_LOG_uart0=- ``` To implement this functionality, the log writing was refactored from SystemVerilog to C (DPI) code. Signed-off-by: Philipp Wagner <phw@lowrisc.org>
OpenTitan is an open source silicon Root of Trust (RoT) project. OpenTitan will make the silicon RoT design and implementation more transparent, trustworthy, and secure for enterprises, platform providers, and chip manufacturers. OpenTitan is administered by lowRISC CIC as a collaborative project to produce high quality, open IP for instantiation as a full-featured product. See the OpenTitan site and OpenTitan docs for more information about the project.
This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository. It exists to enable collaboration across partners participating in the OpenTitan project.
The project contains comprehensive documentation of all IPs and tools. You can access it online at docs.opentitan.org.
Have a look at CONTRIBUTING for guidelines on how to contribute code to this repository.
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).