# zexinliang/xipi_pomelo architecture

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

- Interactive diagram: https://gitdiagram.com/zexinliang/xipi_pomelo
- Repository: https://github.com/zexinliang/xipi_pomelo

## Overview

XipiPomelo is a custom RISC-V processor and SoC, supported by bare-metal software and Verilator verification. The principal workflow is to execute a program on a documented core/SoC variant, observe peripheral results, and verify behavior through differential or full-run simulation. The hardware RTL paths and several simulation scripts are described in the README but are not present in the supplied tree; those links cite the README. The graph does not infer internal RTL call structure from that documentation.

Main entry points: [`hardware/cpu_rv32im`](https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im) (RV32IM Core Family), [`software/common/drivers`](https://github.com/zexinliang/xipi_pomelo/tree/master/software/common/drivers) (Peripheral Drivers), [`hardware/cpu_rv32im/core6/rtl/jyd_soc`](https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im/core6/rtl/jyd_soc) (SoC Integration), [`hardware_sim/dual/tb_diff_dual.cpp`](https://github.com/zexinliang/xipi_pomelo/blob/master/hardware_sim/dual/tb_diff_dual.cpp) (Differential Simulation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processor["Processor and SoC"]
  node_core_family["RV32IM Core Family"]
  node_isa_variants["ISA Variants"]
  node_soc["SoC Integration"]
  node_memories[("IROM and DRAM")]
  node_peripherals["MMIO Peripherals"]
  node_fpga["FPGA Platform"]
end

subgraph group_verification["RTL Verification"]
  node_diff_sim["Differential Simulation<br/>[tb_diff_dual.cpp]"]
  node_long_sim["Full-Run Simulation"]
  node_sim_harness["Simulation Harness<br/>[sim_main.cpp]"]
end

subgraph group_software["Bare-Metal Software"]
  node_coremark["CoreMark Application<br/>[main.c]"]
  node_port_config["CoreMark Port<br/>[core_portme.h]"]
  node_drivers["Peripheral Drivers"]
  node_memory_map["Memory Map<br/>[memmap.h]"]
  node_mini_libc["Mini libc<br/>[mini_libc.c]"]
  node_image_tools["Image Converters"]
end

subgraph group_reference["Reference and Analysis"]
  node_ref_model["RV32IM Reference<br/>[rv32imzicsr_ref.py]"]
  node_trace_tools["Trace Analysis"]
end

node_engineer(("Engineer"))

node_engineer -->|"runs diff tests"| node_diff_sim
node_engineer -->|"runs full program"| node_long_sim
node_diff_sim -->|"simulates core"| node_core_family
node_long_sim -->|"simulates core"| node_core_family
node_sim_harness -.->|"runs RTL"| node_core_family
node_diff_sim -->|"checks against"| node_ref_model
node_long_sim -->|"captures outputs"| node_peripherals
node_core_family -->|"integrates with"| node_soc
node_soc -->|"integrates"| node_memories
node_soc -->|"integrates"| node_peripherals
node_engineer -->|"chooses variant"| node_isa_variants
node_engineer -->|"targets hardware"| node_fpga
node_coremark -->|"writes results"| node_drivers
node_coremark -->|"uses port"| node_port_config
node_port_config -->|"includes map"| node_memory_map
node_port_config -->|"uses timer"| node_drivers
node_drivers -->|"uses addresses"| node_memory_map
node_mini_libc -.->|"supports software"| node_drivers
node_engineer -->|"converts programs"| node_image_tools
node_trace_tools -.->|"analyzes traces"| node_ref_model

click node_core_family "https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im"
click node_isa_variants "https://github.com/zexinliang/xipi_pomelo/tree/master/hardware"
click node_soc "https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im/core6/rtl/jyd_soc"
click node_memories "https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im/core6/rtl/jyd_soc"
click node_peripherals "https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im/core6/rtl/jyd_soc"
click node_fpga "https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/fpga"
click node_diff_sim "https://github.com/zexinliang/xipi_pomelo/blob/master/hardware_sim/dual/tb_diff_dual.cpp"
click node_long_sim "https://github.com/zexinliang/xipi_pomelo/blob/master/hardware_sim/testbench/__sim_seg_until.cpp"
click node_sim_harness "https://github.com/zexinliang/xipi_pomelo/blob/master/hardware_sim/testbench/sim_main.cpp"
click node_ref_model "https://github.com/zexinliang/xipi_pomelo/blob/master/hardware_sim/tools/rv32imzicsr_ref.py"
click node_trace_tools "https://github.com/zexinliang/xipi_pomelo/tree/master/hardware_sim/tools"
click node_coremark "https://github.com/zexinliang/xipi_pomelo/blob/master/software/app/coremark_bare/main.c"
click node_port_config "https://github.com/zexinliang/xipi_pomelo/blob/master/software/app/coremark_bare/core_portme.h"
click node_drivers "https://github.com/zexinliang/xipi_pomelo/tree/master/software/common/drivers"
click node_memory_map "https://github.com/zexinliang/xipi_pomelo/blob/master/software/common/memmap.h"
click node_mini_libc "https://github.com/zexinliang/xipi_pomelo/blob/master/software/common/mini_libc.c"
click node_image_tools "https://github.com/zexinliang/xipi_pomelo/tree/master/software"

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_core_family,node_isa_variants,node_soc,node_memories,node_peripherals,node_fpga toneBlue
class node_diff_sim,node_long_sim,node_sim_harness toneAmber
class node_coremark,node_port_config,node_drivers,node_memory_map,node_mini_libc,node_image_tools toneMint
class node_ref_model,node_trace_tools toneRose
class node_engineer toneIndigo
```

## Components

### Processor and SoC

- [RV32IM Core Family](https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im): `hardware/cpu_rv32im`
- [ISA Variants](https://github.com/zexinliang/xipi_pomelo/tree/master/hardware): `hardware`
- [SoC Integration](https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im/core6/rtl/jyd_soc): `hardware/cpu_rv32im/core6/rtl/jyd_soc`
- [IROM and DRAM](https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im/core6/rtl/jyd_soc): `hardware/cpu_rv32im/core6/rtl/jyd_soc`
- [MMIO Peripherals](https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/cpu_rv32im/core6/rtl/jyd_soc): `hardware/cpu_rv32im/core6/rtl/jyd_soc`
- [FPGA Platform](https://github.com/zexinliang/xipi_pomelo/tree/master/hardware/fpga): `hardware/fpga`

### RTL Verification

- [Differential Simulation](https://github.com/zexinliang/xipi_pomelo/blob/master/hardware_sim/dual/tb_diff_dual.cpp): `hardware_sim/dual/tb_diff_dual.cpp`
- [Full-Run Simulation](https://github.com/zexinliang/xipi_pomelo/blob/master/hardware_sim/testbench/__sim_seg_until.cpp): `hardware_sim/testbench/__sim_seg_until.cpp`
- [Simulation Harness](https://github.com/zexinliang/xipi_pomelo/blob/master/hardware_sim/testbench/sim_main.cpp): `hardware_sim/testbench/sim_main.cpp`

### Bare-Metal Software

- [CoreMark Application](https://github.com/zexinliang/xipi_pomelo/blob/master/software/app/coremark_bare/main.c): `software/app/coremark_bare/main.c`
- [CoreMark Port](https://github.com/zexinliang/xipi_pomelo/blob/master/software/app/coremark_bare/core_portme.h): `software/app/coremark_bare/core_portme.h`
- [Peripheral Drivers](https://github.com/zexinliang/xipi_pomelo/tree/master/software/common/drivers): `software/common/drivers`
- [Memory Map](https://github.com/zexinliang/xipi_pomelo/blob/master/software/common/memmap.h): `software/common/memmap.h`
- [Mini libc](https://github.com/zexinliang/xipi_pomelo/blob/master/software/common/mini_libc.c): `software/common/mini_libc.c`
- [Image Converters](https://github.com/zexinliang/xipi_pomelo/tree/master/software): `software`

### Reference and Analysis

- [RV32IM Reference](https://github.com/zexinliang/xipi_pomelo/blob/master/hardware_sim/tools/rv32imzicsr_ref.py): `hardware_sim/tools/rv32imzicsr_ref.py`
- [Trace Analysis](https://github.com/zexinliang/xipi_pomelo/tree/master/hardware_sim/tools): `hardware_sim/tools`

### Other components

- **Engineer**

## Connections

- Engineer → Differential Simulation: runs diff tests
- Engineer → Full-Run Simulation: runs full program
- Differential Simulation → RV32IM Core Family: simulates core
- Full-Run Simulation → RV32IM Core Family: simulates core
- Simulation Harness → RV32IM Core Family: runs RTL
- Differential Simulation → RV32IM Reference: checks against
- Full-Run Simulation → MMIO Peripherals: captures outputs
- RV32IM Core Family → SoC Integration: integrates with
- SoC Integration → IROM and DRAM: integrates
- SoC Integration → MMIO Peripherals: integrates
- Engineer → ISA Variants: chooses variant
- Engineer → FPGA Platform: targets hardware
- CoreMark Application → Peripheral Drivers: writes results (evidence: `software/app/coremark_bare/main.c`)
- CoreMark Application → CoreMark Port: uses port (evidence: `software/app/coremark_bare/main.c`)
- CoreMark Port → Memory Map: includes map (evidence: `software/app/coremark_bare/core_portme.h`)
- CoreMark Port → Peripheral Drivers: uses timer (evidence: `software/app/coremark_bare/core_portme.h`)
- Peripheral Drivers → Memory Map: uses addresses (evidence: `software/common/drivers/timer.h`)
- Mini libc → Peripheral Drivers: supports software
- Engineer → Image Converters: converts programs
- Trace Analysis → RV32IM Reference: analyzes traces (evidence: `hardware_sim/tools/_issue_model.py`)
