Henry Herman | e262afe | 2020-12-11 12:26:17 -0800 | [diff] [blame] | 1 | |
| 2 | *** Settings *** |
| 3 | Suite Setup Setup |
| 4 | Suite Teardown Teardown |
| 5 | Test Setup Reset Emulation |
| 6 | Library DebugLibrary |
| 7 | Resource ${RENODEKEYWORDS} |
| 8 | |
| 9 | *** Variables *** |
| 10 | ${BOOTROM_ELF} @${PATH}/out/shodan/build-bin/sw/device/boot_rom/boot_rom_sim_verilator.elf |
| 11 | ${SHODAN_SECURE_REPL} @${PATH}/sim/config/shodan_secure.repl |
| 12 | ${PLIC_SANITY_TEST} @${PATH}/out/shodan/build-out/sw_shodan/device/tests/dif_plic_sanitytest_sim_verilator.elf |
| 13 | ${UART} sysbus.uart |
| 14 | |
| 15 | *** Keywords *** |
| 16 | Create Machine |
| 17 | [Arguments] ${elf} |
| 18 | |
| 19 | Execute Command mach create |
| 20 | Execute Command machine LoadPlatformDescription @${SHODAN_SECURE_REPL} |
| 21 | Execute Command sysbus LoadELF @${BOOTROM_ELF} |
| 22 | Execute Command sysbus LoadELF @${elf} |
| 23 | Execute Command sysbus.cpu_0 PC 0x8084 |
| 24 | |
| 25 | |
| 26 | *** Test Cases *** |
| 27 | |
| 28 | PLIC Sanity Test |
| 29 | Create Machine ${PLIC_SANITY_TEST} |
| 30 | |
| 31 | Create Terminal Tester ${UART} |
| 32 | |
| 33 | Start Emulation |
| 34 | Wait For Line On Uart Boot ROM initialisation has completed, jump into flash! timeout=1 |
| 35 | Wait For Line On Uart PASS! timeout=1 |