1*** Keywords ***
2Create Murax
3    Execute Command            mach create
4    Execute Command            machine LoadPlatformDescription @platforms/cpus/murax_vexriscv.repl
5
6    Execute Command            sysbus LoadELF @https://dl.antmicro.com/projects/renode/murax--demo.elf-s_26952-7635fc30d0a3ed10c5b7cba622131b02d103f629
7    Execute Command            sysbus.cpu MTVEC 0x80000020
8
9    # this is a hack to allow handling interrupts at all; this should be fixed after #13326
10    Execute Command            sysbus.cpu SetMachineIrqMask 0xffffffff
11
12
13*** Test Cases ***
14Echo On Uart
15    Create Murax
16    Create Terminal Tester     sysbus.uart
17    Execute Command            showAnalyzer sysbus.uart
18
19    Start Emulation
20
21    # 'A' is written by the software at startup
22    Write Char On Uart         n
23    Write Char On Uart         t
24
25    Wait For Prompt On Uart    Ant
26
27Timer Blinking Led
28    [Tags]                     non_critical
29    Create Murax
30    Execute Command            machine LoadPlatformDescriptionFromString "gpioA: { 7 -> led@0 }; led: Miscellaneous.LED @ gpioA 7"
31    Create LED Tester          sysbus.gpioA.led  defaultTimeout=1
32
33    Assert LED State           false  0
34
35    Start Emulation
36
37    Assert LED State           true
38    ${ts}=  Execute Command    machine GetTimeSourceInfo
39    Should Contain             ${ts}      Elapsed Virtual Time: 00:00:01.
40
41    Assert LED State           false
42    ${ts}=  Execute Command    machine GetTimeSourceInfo
43    Should Contain             ${ts}      Elapsed Virtual Time: 00:00:02.
44
45