Skip to content
Simple, hackable ARM instruction set simulator
C Assembly
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
decode
hardware
include
tests
.gitignore
COPYING
Makefile
README
cpu.c
device.c
gdbstub.c
io.c
main.c
utils.c

README

Chalk - an ARM simulator
========================

Chalk, from 'chalk farm' - Cockney rhyming slang for 'arm'.

TODO
----

	- Support the rest of the instructions.
	- Add system configuration.
	- Add MMU support.
	- Support the other processor operating modes.
	- TrustZone support.
	- Thumb support.
	- GUI

GUI
---

	- One thread for running the GUI, one per CPU.
	- Simulator core can either be in the running or stopped state.
	- GUI starts and stops the simulator by sending a signal to the thread
	that is running the simulator core.  Each core plus the GUI thread
	waits on a barrier until they are all synchronized.  The core threads
	can wait on the barrier again for the GUI interaction to finish.
	- For timers, an I/O thread will run that does a poll on any fds.
	When it becomes readable, set an atomic flag in the struct cpu and
	wait on a condition variable.  The CPU thread takes the mutex,
	processes the I/O then acks through the condition variable.

Peripherals
-----------

	- A simple emulated timer, use a timerfd with conversion from
	nanoseconds to some form of clock cycles, resolution configurable.
	Support oneshot and freerunning, 32-bits.  Interrupt generated when it
	reaches a certain count.
	- A simple interrupt controller - 32 sources, enable, ack, disable
	registers, no FIQ support initially.
	- An output-only UART for debug - writing to anywhere in the address
	space outputs to the console.
	- virtio with rings for block, console and network, use a PTY for
	console to support resizing, tun for networking.

Configuration
-------------

	- Start off with structure configuration.
	- Have board descriptions as JSON and driven by Python bindings?
Something went wrong with that request. Please try again.