# venkateshwara01/team-thanthrashakthi architecture

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

- Interactive diagram: https://gitdiagram.com/venkateshwara01/team-thanthrashakthi
- Repository: https://github.com/venkateshwara01/team-thanthrashakthi

## Overview

This is a Java educational STC89C52 simulator. The main workflow is loading assembly in the Swing UI, sending commands to the core process, executing instructions against CPU state and memory, and returning snapshots to the UI; the core also sends logs to a separate logging process. The graph includes the instruction, register, flag, and storage layers used by execution. Scheduling, process management, and peripheral simulation appear in the README scope, but their implementation is not present in the sampled source, so those branches are marked as documented scope rather than verified runtime flow.

Main entry points: [`src/CPU/CPU.java`](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/CPU.java) (CPU execution), [`src/CPU/CoreProcess.java`](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/CoreProcess.java) (Core process), [`src/ui/SimulatorUI.java`](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/ui/SimulatorUI.java) (Simulator UI), [`src/shared`](https://github.com/venkateshwara01/team-thanthrashakthi/tree/main/src/shared) (IPC messages and state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface and IPC"]
  node_ui["Simulator UI<br/>[SimulatorUI.java]"]
  node_messages["IPC messages and state"]
end

subgraph group_execution["CPU and instructions"]
  node_core["Core process<br/>[CoreProcess.java]"]
  node_cpu["CPU execution<br/>[CPU.java]"]
  node_instruction["Instruction parser<br/>[Instruction.java]"]
  node_instructionset["Instruction set"]
  node_registers["Registers<br/>[Registers.java]"]
  node_flags["CPU flags<br/>[Flags.java]"]
end

subgraph group_storage["Memory and data structures"]
  node_programmemory[("Program memory<br/>[ProgramMemory.java]")]
  node_datamemory[("Data memory<br/>[DataMemory.java]")]
  node_stack["Stack<br/>[Stack.java]"]
  node_fifo["FIFO queue<br/>[FifoQueue.java]"]
end

subgraph group_services["Process services and scope"]
  node_logging["Logging process"]
  node_scheduling["Process scheduling"]
  node_peripherals["GPIO, timer, interrupts"]
end

node_user(("Simulator user"))

node_user -->|"operates"| node_ui
node_ui -->|"sends commands"| node_core
node_core -->|"returns snapshots"| node_ui
node_ui -->|"uses messages"| node_messages
node_core -->|"uses messages"| node_messages
node_core -->|"dispatches commands"| node_cpu
node_cpu -->|"decodes instructions"| node_instruction
node_cpu -->|"loads and fetches"| node_programmemory
node_programmemory -->|"creates instructions"| node_instruction
node_cpu -->|"updates state"| node_registers
node_cpu -->|"updates flags"| node_flags
node_cpu -->|"reads and writes"| node_datamemory
node_cpu -->|"pushes and pops"| node_stack
node_cpu -->|"enqueues and dequeues"| node_fifo
node_stack -->|"reads and writes"| node_datamemory
node_core -->|"sends logs"| node_logging
node_core -->|"builds snapshots"| node_messages
node_scheduling -.->|"coordinates processes"| node_cpu
node_peripherals -.->|"models hardware"| node_cpu

click node_ui "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/ui/SimulatorUI.java"
click node_messages "https://github.com/venkateshwara01/team-thanthrashakthi/tree/main/src/shared"
click node_core "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/CoreProcess.java"
click node_cpu "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/CPU.java"
click node_instruction "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/instruction/Instruction.java"
click node_instructionset "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/instruction/InstructionSet.java"
click node_registers "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/Registers.java"
click node_flags "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/Flags.java"
click node_programmemory "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/memory/ProgramMemory.java"
click node_datamemory "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/memory/DataMemory.java"
click node_stack "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/memory/Stack.java"
click node_fifo "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/memory/FifoQueue.java"
click node_logging "https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/logging/LoggingProcess.java"
click node_scheduling "https://github.com/venkateshwara01/team-thanthrashakthi/tree/main/src"
click node_peripherals "https://github.com/venkateshwara01/team-thanthrashakthi/tree/main/src"

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_ui,node_messages,node_user toneBlue
class node_core,node_cpu,node_instruction,node_instructionset,node_registers,node_flags toneAmber
class node_programmemory,node_datamemory,node_stack,node_fifo toneMint
class node_logging,node_scheduling,node_peripherals toneRose
```

## Components

### User interface and IPC

- [Simulator UI](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/ui/SimulatorUI.java): `src/ui/SimulatorUI.java`
- [IPC messages and state](https://github.com/venkateshwara01/team-thanthrashakthi/tree/main/src/shared): `src/shared`

### CPU and instructions

- [Core process](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/CoreProcess.java): `src/CPU/CoreProcess.java`
- [CPU execution](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/CPU.java): `src/CPU/CPU.java`
- [Instruction parser](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/instruction/Instruction.java): `src/instruction/Instruction.java`
- [Instruction set](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/instruction/InstructionSet.java): `src/instruction/InstructionSet.java`
- [Registers](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/Registers.java): `src/CPU/Registers.java`
- [CPU flags](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/CPU/Flags.java): `src/CPU/Flags.java`

### Memory and data structures

- [Program memory](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/memory/ProgramMemory.java): `src/memory/ProgramMemory.java`
- [Data memory](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/memory/DataMemory.java): `src/memory/DataMemory.java`
- [Stack](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/memory/Stack.java): `src/memory/Stack.java`
- [FIFO queue](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/memory/FifoQueue.java): `src/memory/FifoQueue.java`

### Process services and scope

- [Logging process](https://github.com/venkateshwara01/team-thanthrashakthi/blob/main/src/logging/LoggingProcess.java): `src/logging/LoggingProcess.java`
- [Process scheduling](https://github.com/venkateshwara01/team-thanthrashakthi/tree/main/src): `src`
- [GPIO, timer, interrupts](https://github.com/venkateshwara01/team-thanthrashakthi/tree/main/src): `src`

### Other components

- **Simulator user**

## Connections

- Simulator user → Simulator UI: operates (evidence: `README.md`)
- Simulator UI → Core process: sends commands (evidence: `src/ui/SimulatorUI.java`)
- Core process → Simulator UI: returns snapshots (evidence: `src/CPU/CoreProcess.java`)
- Simulator UI → IPC messages and state: uses messages (evidence: `src/ui/SimulatorUI.java`)
- Core process → IPC messages and state: uses messages (evidence: `src/CPU/CoreProcess.java`)
- Core process → CPU execution: dispatches commands (evidence: `src/CPU/CoreProcess.java`)
- CPU execution → Instruction parser: decodes instructions (evidence: `src/CPU/CPU.java`)
- CPU execution → Program memory: loads and fetches (evidence: `src/CPU/CPU.java`)
- Program memory → Instruction parser: creates instructions (evidence: `src/memory/ProgramMemory.java`)
- CPU execution → Registers: updates state (evidence: `src/CPU/CPU.java`)
- CPU execution → CPU flags: updates flags (evidence: `src/CPU/CPU.java`)
- CPU execution → Data memory: reads and writes (evidence: `src/CPU/CPU.java`)
- CPU execution → Stack: pushes and pops (evidence: `src/CPU/CPU.java`)
- CPU execution → FIFO queue: enqueues and dequeues (evidence: `src/CPU/CPU.java`)
- Stack → Data memory: reads and writes (evidence: `src/memory/Stack.java`)
- Core process → Logging process: sends logs (evidence: `src/CPU/CoreProcess.java`)
- Core process → IPC messages and state: builds snapshots (evidence: `src/CPU/CoreProcess.java`)
- Process scheduling → CPU execution: coordinates processes (evidence: `README.md`)
- GPIO, timer, interrupts → CPU execution: models hardware (evidence: `README.md`)
