Skip to content

Commit 22a5948

Browse files
timsherwoodclaude
andcommitted
Update documentation to reflect current architecture
- Simplify quick-start.md installation (remove non-existent build steps) - Fix GitHub URL to UCSBarchlab/MapacheSPIM - Remove CMake/C++ prerequisites (not needed for pip install) - Update Sail references to Unicorn Engine throughout - Fix command name from ./mapachespim_console to mapachespim - Update Makefile run targets to use mapachespim Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1f05661 commit 22a5948

3 files changed

Lines changed: 23 additions & 89 deletions

File tree

docs/user/console-guide.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# MapacheSPIM Interactive Console Guide
22

3-
SPIM-like interactive console for RISC-V programs using the Sail formal specification.
3+
SPIM-like interactive console for RISC-V programs using the Unicorn Engine.
44

55
## Quick Start
66

77
```bash
88
# Launch interactive console
9-
./mapachespim_console
9+
mapachespim
1010

1111
# Or load a program on startup
12-
./mapachespim_console examples/riscv/fibonacci/fibonacci
12+
mapachespim examples/riscv/fibonacci/fibonacci
1313
```
1414

1515
## Basic Commands
@@ -144,8 +144,7 @@ SPIM-like interactive console for RISC-V programs using the Sail formal specific
144144
## Example Session
145145

146146
```
147-
$ ./mapachespim_console
148-
Sail RISC-V simulator initialized.
147+
$ mapachespim
149148
Welcome to MapacheSPIM. Type help or ? to list commands.
150149
151150
(mapachespim) load examples/riscv/fibonacci/fibonacci
@@ -203,13 +202,13 @@ The console shows both numeric (x0-x31) and ABI names:
203202

204203
```bash
205204
# Launch console
206-
./mapachespim_console
205+
mapachespim
207206

208207
# Load file on startup
209-
./mapachespim_console examples/riscv/fibonacci/fibonacci
208+
mapachespim examples/riscv/fibonacci/fibonacci
210209

211210
# Quiet mode (less verbose)
212-
./mapachespim_console -q examples/riscv/fibonacci/fibonacci
211+
mapachespim -q examples/riscv/fibonacci/fibonacci
213212
```
214213

215214
## Keyboard Shortcuts
@@ -275,16 +274,15 @@ The `-g` flag adds DWARF debug information that maps machine addresses to source
275274

276275
MapacheSPIM is similar to SPIM but has key differences:
277276

278-
1. **RISC-V instead of MIPS**: Uses RISC-V ISA with Sail formal spec
277+
1. **RISC-V instead of MIPS**: Uses RISC-V ISA via Unicorn Engine
279278
2. **ELF files**: Loads compiled ELF binaries (not assembly source)
280-
3. **Formal specification**: Uses Sail RISC-V model (not custom simulator)
281-
4. **64-bit**: Full RV64I support by default
282-
5. **Source display**: Optional via `list` command (requires `-g` flag)
279+
3. **64-bit**: Full RV64I support by default
280+
4. **Source display**: Optional via `list` command (requires `-g` flag)
283281

284282
## Troubleshooting
285283

286284
**Console won't start:**
287-
- Make sure the C library is built: `cd lib/build && cmake .. && make`
285+
- Make sure you've installed the package: `pip install -e .`
288286
- Check Python path includes mapachespim package
289287

290288
**Can't load ELF file:**

docs/user/quick-start.md

Lines changed: 6 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Get started with MapacheSPIM in 5 minutes. This guide will help you install the
77
You'll need:
88
- macOS or Linux (Windows via WSL)
99
- Python 3.8+
10-
- CMake 3.10+
11-
- C++ compiler (GCC or Clang)
1210

1311
Check your Python version:
1412
```bash
@@ -17,36 +15,11 @@ python3 --version # Should be 3.8 or higher
1715

1816
## Installation
1917

20-
### Option 1: Quick Install (Recommended)
21-
2218
```bash
2319
# Clone the repository
24-
git clone --recursive https://github.com/your-org/MapacheSPIM.git
25-
cd MapacheSPIM
26-
27-
# One-command setup (if available)
28-
./scripts/setup.sh
29-
```
30-
31-
### Option 2: Manual Install
32-
33-
```bash
34-
# Clone with submodules
35-
git clone --recursive https://github.com/your-org/MapacheSPIM.git
20+
git clone https://github.com/UCSBarchlab/MapacheSPIM.git
3621
cd MapacheSPIM
3722

38-
# Build Sail RISC-V backend
39-
cd backends/riscv/sail-riscv
40-
./build_simulators.sh
41-
cd ../../..
42-
43-
# Build C library
44-
cd lib
45-
mkdir -p build && cd build
46-
cmake ..
47-
make
48-
cd ../..
49-
5023
# Create virtual environment (recommended)
5124
python3 -m venv venv
5225
source venv/bin/activate
@@ -267,11 +240,11 @@ Now that you've run your first program:
267240

268241
If the console doesn't start, try:
269242
```bash
270-
# Run from Python package
271-
python3 -m mapachespim.console
243+
# Make sure your virtual environment is activated
244+
source venv/bin/activate
272245

273-
# Or use the script directly
274-
./mapachespim_console
246+
# Or run from Python package
247+
python3 -m mapachespim.console
275248
```
276249

277250
### Import Error
@@ -281,30 +254,11 @@ Make sure you installed the Python package:
281254
pip3 install -e .
282255
```
283256

284-
### Build Errors
285-
286-
Check you have all prerequisites:
287-
```bash
288-
python3 --version # 3.8+
289-
cmake --version # 3.10+
290-
gcc --version # Any recent version
291-
```
292-
293-
### Library Not Found
294-
295-
Build the C library first:
296-
```bash
297-
cd lib/build
298-
cmake ..
299-
make
300-
cd ../..
301-
```
302-
303257
### Still Stuck?
304258

305259
- Check the [full console guide](console-guide.md)
306260
- Look at [example programs](../../examples/README.md)
307-
- Open an issue on GitHub
261+
- Open an issue on [GitHub](https://github.com/UCSBarchlab/MapacheSPIM/issues)
308262

309263
## What's Next?
310264

examples/riscv/Makefile

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
# Makefile for RISC-V Assembly Examples
33
# ============================================================================
44
#
5-
# This Makefile builds RISC-V assembly programs for execution on the Sail
6-
# RISC-V emulator.
5+
# This Makefile builds RISC-V assembly programs for execution with MapacheSPIM.
76
#
87
# Prerequisites:
98
# - RISC-V GNU toolchain (riscv64-unknown-elf-*)
10-
# - Sail RISC-V emulator
9+
# - MapacheSPIM (pip install -e . from repo root)
1110
#
1211
# Usage:
1312
# make # Build all examples
@@ -36,10 +35,6 @@ ASFLAGS = -march=rv64g -mabi=lp64
3635
# Linker flags
3736
LDFLAGS = -T linker.ld
3837

39-
# Sail emulator path
40-
# Adjust this path to your Sail RISC-V simulator location
41-
SAIL_SIM = ../sail-riscv/build/c_emulator/sail_riscv_sim
42-
4338
# ============================================================================
4439
# Targets
4540
# ============================================================================
@@ -109,29 +104,20 @@ guess_game/guess_game.o: guess_game/guess_game.s
109104
$(AS) $(ASFLAGS) -o $@ $<
110105

111106
# ============================================================================
112-
# Run targets - execute programs with trace enabled
107+
# Run targets - execute programs with MapacheSPIM
113108
# ============================================================================
114109

115110
run-matrix: matrix_multiply/matrix_mult
116111
@echo "=========================================="
117112
@echo "Running Matrix Multiplication"
118113
@echo "=========================================="
119-
$(SAIL_SIM) --trace-instr $<
114+
mapachespim -x $<
120115

121116
run-fibonacci: fibonacci/fibonacci
122117
@echo "=========================================="
123118
@echo "Running Fibonacci Calculator"
124119
@echo "=========================================="
125-
$(SAIL_SIM) --trace-instr $<
126-
127-
# Run with memory trace to see data accesses
128-
run-matrix-mem: matrix_multiply/matrix_mult
129-
@echo "Running Matrix Multiplication with memory trace..."
130-
$(SAIL_SIM) --trace-instr --trace-mem $<
131-
132-
run-fibonacci-mem: fibonacci/fibonacci
133-
@echo "Running Fibonacci with memory trace..."
134-
$(SAIL_SIM) --trace-instr --trace-mem $<
120+
mapachespim -x $<
135121

136122
# ============================================================================
137123
# Utility targets
@@ -165,10 +151,6 @@ check-tools:
165151
@which $(AS) > /dev/null || (echo "ERROR: $(AS) not found. Please install RISC-V toolchain."; exit 1)
166152
@which $(LD) > /dev/null || (echo "ERROR: $(LD) not found. Please install RISC-V toolchain."; exit 1)
167153
@echo "RISC-V toolchain found: $(shell $(AS) --version | head -1)"
168-
@echo "Checking for Sail emulator..."
169-
@test -f $(SAIL_SIM) || (echo "ERROR: Sail emulator not found at $(SAIL_SIM)"; exit 1)
170-
@echo "Sail emulator found: $(SAIL_SIM)"
171154
@echo "All tools ready!"
172155

173-
.PHONY: all clean run-matrix run-fibonacci run-matrix-mem run-fibonacci-mem \
174-
dis-matrix dis-fibonacci check-tools
156+
.PHONY: all clean run-matrix run-fibonacci dis-matrix dis-fibonacci check-tools

0 commit comments

Comments
 (0)