仿真平台内核初版 -tlib库 包含<sparc arm riscv powerPC>

This commit is contained in:
liuwb
2026-02-07 20:43:43 +08:00
parent de61f9e2b0
commit b3117648be
9748 changed files with 4309137 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
:name: Quark C1000 with CC2520 - 2 nodes
######################################################################
#
# Sample script creating 1 server node and 1 client node using a
# range-based radio medium function - transmission is possible if
# the nodes are in range of each other. The nodes are positioned in 3D space (x,y,z),
# at a distance of 10 units on the x-axis.
#
# Differences in SyncUnit values for machines represent differences
# in their relative speed. This prevents the machines from
# synchronizing in full.
#
######################################################################
# Create a new wireless transmission medium. This command adds the `wireless` object to the emulation.
emulation CreateIEEE802_15_4Medium "wireless"
# The radio is using a range-based medium (with the `Range` set to `11`).
# If not set, the default SimpleMediumFunction will be used (where range is not relevant).
wireless SetRangeWirelessFunction 11
######################### UDP SERVER - begin #########################
# This creates a server node, connects it to the wireless medium and sets the node's position.
#
# The `$bin` variable contains the path to the server ELF file. The `$name` variable will indicate
# the name of the created machine. Both variables are used in quark_c1000.resc.
$bin=@https://dl.antmicro.com/projects/renode/zephyr-echo-server.elf-s_1003060-56eb87aafc8c00f73ebe154dafee627a3a4f23f6
$name="server"
# Load the script for a single generic node:
i @scripts/multi-node/quark-c1000-zephyr/quark_c1000.resc
# Each radio device has to be connected to a wireless medium. Two devices can communicate
# if they are connected to the same medium.
# In this situation the radio is accessible via an SPI bus.
connector Connect spi1.radio wireless
# Each radio in a machine can have its position set independently.
wireless SetPosition spi1.radio 0 0 0
########################## UDP SERVER - end ##########################
# The Monitor works in the context of the current machine. It allows the user to access the machine's peripherals
# and to set variables local to this machine. The selection must be cleared before creating a new machine
# so that the $bin and $name variables are global and accessible from the new context.
mach clear
######################### UDP CLIENT - begin #########################
# This creates a client node.
$bin=@https://dl.antmicro.com/projects/renode/zephyr-echo-client.elf-s_1016316-bfb6584d9d63950e8106c6820efccdaf0b7738a5
$name="client"
i @scripts/multi-node/quark-c1000-zephyr/quark_c1000.resc
connector Connect spi1.radio wireless
# The node is placed 10 units from the server. With the maximum range set to 11, all packets will be delivered.
wireless SetPosition spi1.radio 10 0 0
########################## UDP CLIENT - end ##########################
# This clears the Monitor's context. To select a machine, use the `mach set` command (try `help mach`).
mach clear

View File

@@ -0,0 +1,47 @@
# The following lines are not interpreted.
:name: Quark C1000
:description: This script runs Zephyr shell example on Quark C1000 (32-bit x86).
# The `using` command allows the user to omit a prefix when referring to a peripheral.
# E.g. `using sysbus` allows to refer to the CPU device with `cpu` instead of `sysbus.cpu`.
using sysbus
# The ?= notation indicates a default value if the variable is not set.
$name?="Quark-C1000"
# Create a new machine and set the Monitor's context accordingly.
mach create $name
# Load the hardware description from the REPL file.
machine LoadPlatformDescription @platforms/boards/quark_c1000-cc2520.repl
# This is a sample shell binary:
$bin ?= @https://dl.antmicro.com/projects/renode/zephyr_shell.elf-s_398140-ed6b1a68e94b1cb8ac3cc7d80fb4d36e36a22766
# This is a default bootloader:
$boot ?= @https://dl.antmicro.com/projects/renode/quark_se_rom.bin-s_8192-b688c8b9380014d7deb2bd42dc218fc5ee8d1abf
# Open a window for the `sysbus.uartB` device - which, in this case, is a default UART for user interaction.
showAnalyzer uartB
# The following series of commands is executed everytime the machine is reset.
macro reset
"""
# Set the WAIT_FOR_JTAG GPIO pin. The bootloader stalls if it's set to low.
gpio OnGPIO 15 true
# Load the bootloader. The address has to be specified as the binary files do not contain
# any addressing information.
sysbus LoadBinary $boot 0xffffe000
# The ELF files already contain information on where to load each part. They also provide symbols, which
# can be used for execution tracing.
sysbus LoadELF $bin
# By default, the initial PC is set to the ELF entry point. Since the bootloader has to be started before the target application,
# the PC needs to be set manually to the correct value.
sysbus.cpu PC 0xfffffff0
"""
# Run this macro once to load the binaries.
runMacro $reset