# marcotartaglione/dlx-riscv-simulator architecture

> Architecture diagram of the GitHub repository marcotartaglione/dlx-riscv-simulator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/marcotartaglione/dlx-riscv-simulator
- Repository: https://github.com/marcotartaglione/dlx-riscv-simulator

## Overview

This Angular app is a teaching simulator for DLX and RISC-V processors. The principal workflow is to choose an architecture, edit or load a program, step through instructions, and inspect register state; DLX additionally supports configurable memory and memory-mapped I/O devices. The graph preserves those documented capabilities and the diagram view. Relationships use the supplied excerpts, SOURCE INDEX references, and README; several UI and runtime details were not sampled, so uncertain links are omitted.

Main entry points: [`src/app/main-page/main-page.component.ts`](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/main-page/main-page.component.ts) (Simulator Page), [`src/app/editor/editor.component.ts`](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/editor/editor.component.ts) (Code Editor), [`src/app/interpreters/interpreter.ts`](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/interpreters/interpreter.ts) (Interpreter Base), [`src/app/registers/registers.ts`](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/registers/registers.ts) (Register State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application UI"]
  node_routes["Architecture Routes"]
  node_main["Simulator Page"]
  node_editor["Code Editor"]
  node_diagram["Processor Diagram"]
  node_diagramservice["Diagram Service<br/>[diagram.service.ts]"]
end

subgraph group_execution["Instruction Execution"]
  node_code["Code Service<br/>[code.service.ts]"]
  node_baseinterp["Interpreter Base<br/>[interpreter.ts]"]
  node_dlx["DLX Interpreter<br/>[dlx.interpreter.ts]"]
  node_rv32["RISC-V Interpreter"]
end

subgraph group_state["Processor State"]
  node_regsui["Register View"]
  node_registers["Register State<br/>[registers.ts]"]
end

subgraph group_io["Memory and I/O"]
  node_memoryui["Memory Editor"]
  node_memoryservice["Memory Service<br/>[memory.service.ts]"]
  node_memory[("Address Space<br/>[memory.ts]")]
  node_device["Mapped Devices<br/>[device.ts]"]
  node_network["Logical Networks<br/>[logical-network.ts]"]
end

node_user(("Learner"))

node_user -->|"uses"| node_main
node_routes -->|"routes to"| node_main
node_routes -->|"configures"| node_dlx
node_routes -->|"configures"| node_rv32
node_main -->|"hosts"| node_editor
node_main -->|"hosts"| node_memoryui
node_main -->|"hosts"| node_diagram
node_main -->|"hosts"| node_regsui
node_editor -->|"loads code"| node_code
node_editor -->|"steps instructions"| node_baseinterp
node_dlx -->|"extends"| node_baseinterp
node_rv32 -->|"extends"| node_baseinterp
node_baseinterp -->|"uses state"| node_registers
node_dlx -->|"updates state"| node_registers
node_rv32 -->|"updates state"| node_registers
node_regsui -->|"displays"| node_registers
node_editor -->|"requests diagrams"| node_diagramservice
node_diagramservice -->|"supplies diagrams"| node_diagram
node_memoryui -->|"edits configuration"| node_memoryservice
node_memoryservice -->|"manages"| node_memory
node_memory -->|"contains devices"| node_device
node_network -->|"extends"| node_device
node_baseinterp -->|"accesses memory"| node_memory
node_editor -->|"signals interrupts"| node_memoryservice

click node_routes "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/app-routing.module.ts"
click node_main "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/main-page/main-page.component.ts"
click node_editor "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/editor/editor.component.ts"
click node_diagram "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/diagram/diagram.component.ts"
click node_diagramservice "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/services/diagram.service.ts"
click node_code "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/services/code.service.ts"
click node_baseinterp "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/interpreters/interpreter.ts"
click node_dlx "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/interpreters/dlx/dlx.interpreter.ts"
click node_rv32 "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/interpreters/rv32i/rv32i.interpreter.ts"
click node_regsui "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/registers/registers.component.ts"
click node_registers "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/registers/registers.ts"
click node_memoryui "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/memory/memory.component.ts"
click node_memoryservice "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/services/memory.service.ts"
click node_memory "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/memory/model/memory.ts"
click node_device "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/memory/model/device.ts"
click node_network "https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/memory/model/logical-network.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_routes,node_main,node_editor,node_diagram,node_diagramservice toneBlue
class node_code,node_baseinterp,node_dlx,node_rv32 toneAmber
class node_regsui,node_registers toneMint
class node_memoryui,node_memoryservice,node_memory,node_device,node_network toneRose
class node_user toneIndigo
```

## Components

### Application UI

- [Architecture Routes](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/app-routing.module.ts): `src/app/app-routing.module.ts`
- [Simulator Page](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/main-page/main-page.component.ts): `src/app/main-page/main-page.component.ts`
- [Code Editor](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/editor/editor.component.ts): `src/app/editor/editor.component.ts`
- [Processor Diagram](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/diagram/diagram.component.ts): `src/app/diagram/diagram.component.ts`
- [Diagram Service](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/services/diagram.service.ts): `src/app/services/diagram.service.ts`

### Instruction Execution

- [Code Service](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/services/code.service.ts): `src/app/services/code.service.ts`
- [Interpreter Base](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/interpreters/interpreter.ts): `src/app/interpreters/interpreter.ts`
- [DLX Interpreter](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/interpreters/dlx/dlx.interpreter.ts): `src/app/interpreters/dlx/dlx.interpreter.ts`
- [RISC-V Interpreter](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/interpreters/rv32i/rv32i.interpreter.ts): `src/app/interpreters/rv32i/rv32i.interpreter.ts`

### Processor State

- [Register View](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/registers/registers.component.ts): `src/app/registers/registers.component.ts`
- [Register State](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/registers/registers.ts): `src/app/registers/registers.ts`

### Memory and I/O

- [Memory Editor](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/memory/memory.component.ts): `src/app/memory/memory.component.ts`
- [Memory Service](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/services/memory.service.ts): `src/app/services/memory.service.ts`
- [Address Space](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/memory/model/memory.ts): `src/app/memory/model/memory.ts`
- [Mapped Devices](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/memory/model/device.ts): `src/app/memory/model/device.ts`
- [Logical Networks](https://github.com/marcotartaglione/dlx-riscv-simulator/blob/master/src/app/memory/model/logical-network.ts): `src/app/memory/model/logical-network.ts`

### Other components

- **Learner**

## Connections

- Learner → Simulator Page: uses
- Architecture Routes → Simulator Page: routes to (evidence: `src/app/app-routing.module.ts`)
- Architecture Routes → DLX Interpreter: configures (evidence: `src/app/app-routing.module.ts`)
- Architecture Routes → RISC-V Interpreter: configures (evidence: `src/app/app-routing.module.ts`)
- Simulator Page → Code Editor: hosts (evidence: `src/app/main-page/main-page.component.ts`)
- Simulator Page → Memory Editor: hosts (evidence: `src/app/main-page/main-page.component.ts`)
- Simulator Page → Processor Diagram: hosts (evidence: `src/app/main-page/main-page.component.ts`)
- Simulator Page → Register View: hosts (evidence: `src/app/main-page/main-page.component.ts`)
- Code Editor → Code Service: loads code (evidence: `src/app/editor/editor.component.ts`)
- Code Editor → Interpreter Base: steps instructions (evidence: `src/app/editor/editor.component.ts`)
- DLX Interpreter → Interpreter Base: extends (evidence: `src/app/interpreters/dlx/dlx.interpreter.ts`)
- RISC-V Interpreter → Interpreter Base: extends (evidence: `src/app/interpreters/rv32i/rv32i.interpreter.ts`)
- Interpreter Base → Register State: uses state (evidence: `src/app/interpreters/interpreter.ts`)
- DLX Interpreter → Register State: updates state (evidence: `src/app/interpreters/dlx/dlx.interpreter.ts`)
- RISC-V Interpreter → Register State: updates state (evidence: `src/app/interpreters/rv32i/rv32i.interpreter.ts`)
- Register View → Register State: displays
- Code Editor → Diagram Service: requests diagrams (evidence: `src/app/editor/editor.component.ts`)
- Diagram Service → Processor Diagram: supplies diagrams (evidence: `src/app/services/diagram.service.ts`)
- Memory Editor → Memory Service: edits configuration (evidence: `src/app/memory/memory.component.ts`)
- Memory Service → Address Space: manages (evidence: `src/app/services/memory.service.ts`)
- Address Space → Mapped Devices: contains devices (evidence: `src/app/memory/model/memory.ts`)
- Logical Networks → Mapped Devices: extends (evidence: `src/app/memory/model/logical-network.ts`)
- Interpreter Base → Address Space: accesses memory (evidence: `src/app/interpreters/interpreter.ts`)
- Code Editor → Memory Service: signals interrupts (evidence: `src/app/editor/editor.component.ts`)
