Add setup instructions for robot-test-scripts with the secure core. Created `RunningOpenTitanVectorSimulation.md` providing step-by-step instructions for setting up Henry's example for renode simulation of OpenTitan. Change-Id: I7d9ac77d6677d688394c68120a169d12eddc9182
diff --git a/RunningOpenTitanVectorSimulation.md b/RunningOpenTitanVectorSimulation.md new file mode 100644 index 0000000..126857c --- /dev/null +++ b/RunningOpenTitanVectorSimulation.md
@@ -0,0 +1,82 @@ +# OpenTitan RISCV Vector Simulation in Renode + +Follow setups in this document to build and run the following examples: + +1. [OpenTitan Hello World Basic Example](#opentitan-hello-world-basic-example) +2. [OpenTitan Hello World Vector Sim Example, WIP](#opentitan-hello-world-vector-sim-example-wip) + +Keep an eye on the file below for new build targets as they become available: + +``` +$ROOTDIR/build/opentitan_sw.mk +``` + +``` +Note: Renode runs in multiple x-windows. +Renode does not presently have a terminal only mode. +Run within a graphical session or set up X-Forwarding to run these examples. +``` + +## OpenTitan Hello World Basic Example + +These instructions guide through setting up and running a test of OpenTitan with a bare-bones Renode +robot-test-script. + +### Sync and set up environment + +``` +repo sync +source ./build/setup.sh +``` + +### Build tools + +``` +m tools +``` + +### Build OpenTitan helloworld Demo + +``` +m opentitan_sw_bootrom +``` + +``` +m opentitan_sw_helloworld +``` + +### Start OpenTitan Renode Script + +``` +renode -e "i @sim/config/shodan_secure.resc; start" +``` + +### Run `shodan_bootrom.robot` Robot-Test-Script + +``` +cd "${ROOTDIR}/sim/tests" +./test.sh shodan_bootrom.robot +``` + +Note: since we build Renode from source, we are to use Renode's provided `test.sh` instead of +`renode-test` for running robot test scripts. + +[More details in Renode's documentation](https://renode.readthedocs.io/en/latest/introduction/testing.html#running-the-robot-test-script) + + +### View Results of the Tests + +Results of the robot-test-script will be found in the following files: + +``` +$ROOTDIR/out/host/renode/tests/report.html +$ROOTDIR/out/host/renode/tests/robot_output.xml +$ROOTDIR/out/host/renode/tests/log.html +``` + +The `report.html` will share the results of each test. + +One can utilize `robot_output.xml` for scripts/programs which may want to parse +and act on results. + +## OpenTitan Hello World Vector Sim Example, WIP