blob: bf46c984edd57ed77ffa5fc21b9bb319a60fcc07 [file] [log] [blame]
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Renode script for testing just the Cheriot SMC core using the external CPU library
mach create "cheriot"
include @sim/config/shodan_infrastructure/MpactCheriotCPU.cs
EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.MpactCPU.MpactCheriotCPU"
EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.MpactCPU.MpactCheriotPeripheral"
$platformfile?=@sim/config/platforms/sail.repl
machine LoadPlatformDescription $platformfile
$term_port?=3456
emulation CreateServerSocketTerminal $term_port "term" false
connector Connect sysbus.uart5 term
showAnalyzer "uart5-analyzer" sysbus.uart5 Antmicro.Renode.Analyzers.LoggingUartAnalyzer
uart5-analyzer TimestampFormat None
$cheriotLibrary ?= @out/cheriot/sim/librenode_mpact_cheriot.so
sysbus.cpu1 IsHalted true
sysbus.cpu1 CpuLibraryPath $cheriotLibrary
# Override cli_port to enable the command line interface on the specified port.
$cli_port ?= 0
$wait_for_cli ?= false
sysbus.cpu1 CLIPort $cli_port
sysbus.cpu1 WaitForCLI $wait_for_cli
logLevel 0 sysbus.cpu1
$bin?=@out/cheriot/sencha/release/cheriot/cheriot/release/test-suite
# Load the ELF file (useVirtualAddress = false, allowLoadsOnlyToMemory = false)
sysbus LoadELF $bin false false
sysbus.cpu1 SymbolFile $bin
sysbus.cpu1 IsHalted false