You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[doc] Various misc doc updates for the new FPGA loading flow
Remove references to splicing bitstreams and update docs where relevant.
Also address some smaller areas of documentation that have fallen out of
date with the current practices. Where necessary, apply relevant OpenTitan
Markdown styling for consistencfy (one sentence per line).
Additionally, add a small note for a needed FIXUP with old CW310
references, which should be replaced with CW340 references (but is
deferred to a separate commit).
Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
Copy file name to clipboardExpand all lines: doc/contributing/bazel_notes.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,9 +245,9 @@ bazel run //quality:license_check --test_output=streamed
245
245
Note, to run (software) tests on these OpenTitan hardware platforms **does not** require these Bazel commands be invoked before the test commands above.
246
246
Bazel is aware of all dependency relationships, and knows what prerequisites to build to run a test.
247
247
248
-
- Build FPGA bitstream with (test) ROM, see [here](../getting_started/setup_fpga.md#build-an-fpga-bitstream).
249
-
- Build FPGA bitstream with (production) ROM, see [here](../getting_started/setup_fpga.md#build-an-fpga-bitstream).
250
-
- Build Verilator simulation binary:
248
+
- Build a base FPGA bitstream with a (test) ROM, see [here](../getting_started/setup_fpga.md#build-an-fpga-bitstream).
249
+
- Build a production ROM and OTP image for the FPGA, see [here](../getting_started/setup_fpga.md#programming-the-fpga-with-rom--otp-images).
Copy file name to clipboardExpand all lines: doc/contributing/fpga/debugging_with_ila.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,10 +234,10 @@ In practice, we have not seen problems (e.g., due to missing constraints) yet, a
234
234
So you can ignore this warning, but it's worth keeping in mind *if* you should see any problems (e.g., due to timing violations).
235
235
236
236
237
-
## Building and splicing bitstreams that include an ILA
237
+
## Building bitstreams that include an ILA
238
238
239
239
With the steps above complete, building a first bitstream that includes the defined ILAs is as simple as following the [corresponding guide](../../getting_started/setup_fpga.md#build-an-fpga-bitstream).
240
-
The generated and spliced bitstream will include the defined ILAs.
240
+
The generated bitstream will include the defined ILAs.
241
241
242
242
243
243
## Programming the FPGA, controlling the ILA, and running a test
Copy file name to clipboardExpand all lines: doc/getting_started/build_sw.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,11 +119,12 @@ We maintain or use the following tags to support this:
119
119
*`broken` is used to tag tests that are committed but should not be expected by CI or others to pass.
120
120
*`cw340`, `cw340_test_rom`, and `cw340_rom_with_fake_keys` are used to tag tests that depend on a correctly setup cw340 "Luna Board" to emulate OpenTitan.
121
121
The `cw340` tag may be used in `--test_tag_filters` to enable concise filtering to select tests that run on this board and include or exclude them.
122
-
Loading the bitstream is the slowest part of the test, so these tags can group tests with common bitstreams to accelerate the tests tagged `cw340_test_rom`.
122
+
Historically these tests were grouped by execution environment, because this corresponded to a new "spliced" bitstream in the old FPGA testing flow.
123
+
Loading the bitstream is the slowest part of the test, but this should only need to be done once for the FPGA.
124
+
These tags are currently retained as a convenient mechanism for grouping tests, but are somewhat arbitrary.
123
125
*`verilator` is used to tag tests that depend on a verilated model of OpenTitan that can take a significant time to build.
124
126
Verilated tests can still be built with `--define DISABLE_VERILATOR_BUILD`, but they will skip the invocation of Verilator and cannot be run.
125
127
*`vivado` is used to tag tests that critically depend on Vivado.
126
-
*`jtag` is used to tag tests that rely on a USB JTAG adapter connected like we have in CI.
127
128
*`manual` is a Bazel builtin that prevents targets from matching wildcards.
128
129
Test suites are typically tagged manual so their contents match, but test suites don't get built or run unless they're intentionally invoked.
129
130
Intermediate build artifacts may also be tagged with manual to prevent them from being unintentionally built if they cause other problems.
See [Download and Installation](https://docs.xilinx.com/r/{{#tool-version vivado }}-English/ug973-vivado-release-notes-install-license/Download-and-Installation) for installation instructions.
22
18
23
19
When asked what edition to install, choose "Vivado HL Design Edition".
24
-
_Note: If you are only developing software, you may select the "Lab Edition" instead._
25
20
On the feature selection screen, select at least the following features:
26
21
27
22

28
23
29
-
After installing Vivado, you will need to add Vivado's paths to your shell
30
-
environment. See [Launching the Vivado IDE from the Command Line on Windows or
After installing Vivado, you will need to add Vivado's paths to your shell environment.
25
+
See [Launching the Vivado IDE from the Command Line on Windows or Linux](https://docs.xilinx.com/r/{{#tool-version vivado }}-English/ug892-vivado-design-flows-overview/Launching-the-Vivado-IDE-from-the-Command-Line-on-Windows-or-Linux) for instructions.
Copy file name to clipboardExpand all lines: sw/device/silicon_creator/rom/doc/e2e_tests.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,22 +5,24 @@ This guide will help you to setup an environment to run the ROM E2E tests in an
5
5
The [ROM](../README.md) is the first boot stage of secure boot flow and by nature, it cannot be updated after manufacturing.
6
6
The ROM E2E (End-to-End) tests validates the ROM features and can be used for regression tests.
7
7
Each test is divided into components:
8
-
-**ROM Image**, a C program built by `bazel` and spliced with the bitstream. The ROM is the DUT (Device Under Test) of the ROM E2E tests.
8
+
-**ROM Image**, a C program built by `bazel` and loaded onto the FPGA. The ROM is the DUT (Device Under Test) of the ROM E2E tests.
9
9
-**OTP image**, contains HW and SW configurations, some of which control execution paths in the ROM, such as the lifecycle stage.
10
10
As a result, we run some tests with several different OTP images to increase coverage of ROM execution paths.
11
11
There is more information in the documentation for the OTP layout.
12
12
That documentation is specialised for the different tops.
13
13
For an example, see earlgrey's [OTP memory map](../../../../../hw/top_earlgrey/ip_autogen/otp_ctrl/README.md#direct-access-memory-map).
14
14
-**FPGA bitstream**, Opentitan Hardware implementation synthesized for the FPGA built by `bazel` and `vivado`.
15
15
-**Device test firmware**, a C program (built by bazel to run on an OpenTitan device) that is loaded into flash, and booted by the ROM stage. It checks the HW registers and/or memory configurations performed by the ROM and relays information to the Host test software.
16
-
-**opentitantool**, a Rust program that provides a common interface to interact with an OpenTitan device. `opentitantool` uses `opentitanlib` which provides the abstractions to communicate with an OpenTitan device.
16
+
-**opentitantool**, a Rust program that provides a common interface to interact with an OpenTitan device.
17
+
`opentitantool` uses `opentitanlib` which provides the abstractions to communicate with an OpenTitan device.
17
18
-**Host test software**, any Rust program (built by `bazel` to run on the host platform , e.g. a x86 binary, and linked with `opentitanlib`) that actively interacts with an OpenTitan device over any hardware interface (e.x., UART, SPI or JTAG) to perform the test functions and check their results.
18
19
19
20

20
21
21
22
All the existing tests are documented in the [ROM E2E Testplan](https://github.com/lowRISC/OpenTitan/blob/master/sw/device/silicon_creator/rom/data/rom_e2e_testplan.hjson).
22
23
## Hardware setup
23
24
### FPGA
25
+
<!--FIXME: The below docs should be updated to reference the CW340, since the CW310 is no longer supported.-->
24
26
The E2E ROM tests run on the CW310 FPGA board with the following configuration:
25
27
- The power supply connected to the J11 connector.
26
28
- A USB cable connecting the Host PC to the USB-C Data (J8) connector which is connected to the SAM3U microcontroller on the CW310 FPGA board.
@@ -37,7 +39,6 @@ Some tests will use the JTAG interface to interact with OpenTitan, as the CW310
37
39
The software dependencies are covered by other guides in this book and are linked below.
38
40
- Clone the OpenTitan repository and install the software dependencies: [Get started](../../../../../doc/getting_started/README.md).
39
41
- Setup the FPGA: [FPGA guide](../../../../../doc/getting_started/setup_fpga.md).
40
-
- Install Vivado to be able to splice bitstreams: [Installing Vivado](../../../../../doc/getting_started/install_vivado).
41
42
42
43
**Note**: Make sure that you added the udev rules for the [FPGA](../../../../../doc/getting_started/install_vivado#device-permissions-udev-rules) board and the [JTAG](../../../../../doc/getting_started/setup_fpga.md#device-permissions-udev-rules) adapter.
43
44
@@ -51,6 +52,7 @@ Once the hardware setup is done and the FPGA is connected to the USB, the full s
51
52
cd${REPO_TOP}
52
53
bazel test --define DISABLE_VERILATOR_BUILD=true --define bitstream=gcp --test_tag_filters=-verilator,-dv,-broken --build_tests_only //sw/device/silicon_creator/rom/e2e/...
53
54
```
54
-
This bazel command will download a bitstream associated with the HEAD commit of the repository, splice it with the different OTP configurations (RMA, DEV, PROD*, TEST*), load the FPGA and run all the tests suites under `sw/device/silicon_creator/rom/e2e`.
55
+
This bazel command will download a bitstream associated with the HEAD commit of the repository, load the FPGA with the bitstream and program it with various different OTP configurations (RMA, DEV, PROD*, TEST*), and run all the tests suites under `sw/device/silicon_creator/rom/e2e`.
55
56
56
-
**Note**: If you have hardware changes then you can build the bitstream locally by changing the tag `bitstream=` from `gcp` to `vivado`. Although this will take much longer.
57
+
**Note**: If you have hardware changes then you can build the bitstream locally by changing the tag `bitstream=` from `gcp` to `vivado`.
0 commit comments