# ofs/ofs-d5005 architecture

> Architecture diagram of the GitHub repository ofs/ofs-d5005, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ofs/ofs-d5005
- Repository: https://github.com/ofs/ofs-d5005

## Overview

##### Main Components

a) FPGA Interface Manager (FIM) Core:
- Following subsystems as connected blocks:
- PCIe Subsystem (from ipss/pcie)
- Memory Subsystem (from ipss/mem)
- HSSI Subsystem (from ipss/hssi)
- PMCI Subsystem (from ipss/pmci)
- SPI Subsystem (from ipss/spi)

b) External Interfaces:
- PCIe Interface (connecting to host)
- DDR Memory Interface
- HSSI Network Interface
- Management Interface (PMCI)
- SPI Interface

c) Verification Environment:
- UVM Testbench Layer
- Bus Functional Models (BFM)
- Test Sequences
- RAL (Register Abstraction Layer)

##### Hierarchical Organization

Top Level:
**[Host System] <-> [PCIe] <-> [FIM Core] <-> [Accelerator Function Unit (AFU)]**

- v
- [IP Subsystems Layer]
- (HSSI/MEM/PMCI/SPI)

##### Detailed Component Representation

For each IP subsystem, show:
- Control/Status Registers (CSR)
- Interface bridges
- Clock domains
- Reset structures

##### Implementation Notes

- Use standard UML/SysML notation where applicable
- Maintain consistent scaling for subsystems of similar importance
- Related components visually
- Use clear, readable fonts and consistent naming conventions

##### Technical Details to Capture

- PCIe Gen3 x16 interface
- DDR4 memory interfaces
- 10G Ethernet interfaces
- Management interface specifications
- Register map hierarchies
- Interrupt structures (MSIX)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Host
        HS[Host System]
    end

    subgraph FIM["FPGA Interface Manager (FIM)"]
        direction TB
        
        subgraph IPSS["IP Subsystems"]
            direction TB
            PCIE["PCIe Subsystem"]:::subsystem
            MEM["Memory Subsystem"]:::subsystem
            HSSI["HSSI Subsystem"]:::subsystem
            PMCI["PMCI Subsystem"]:::subsystem
            SPI["SPI Subsystem"]:::subsystem
        end

        subgraph Interfaces
            direction TB
            PCIE_IF["PCIe Interface"]:::interface
            DDR_IF["DDR Memory Interface"]:::interface
            HSSI_IF["HSSI Network Interface"]:::interface
            PMCI_IF["Management Interface"]:::interface
            SPI_IF["SPI Interface"]:::interface
        end
    end

    subgraph Verification
        direction TB
        UVM["UVM Testbench"]:::test
        BFM["Bus Functional Models"]:::test
        SEQ["Test Sequences"]:::test
        RAL["Register Abstraction Layer"]:::test
    end

    %% Connections
    HS <--> PCIE_IF
    PCIE_IF <--> PCIE
    DDR_IF <--> MEM
    HSSI_IF <--> HSSI
    PMCI_IF <--> PMCI
    SPI_IF <--> SPI

    %% Verification Connections
    UVM --> BFM
    UVM --> SEQ
    UVM --> RAL
    BFM -.-> PCIE
    BFM -.-> MEM
    BFM -.-> HSSI
    RAL -.-> IPSS

    %% Click Events
    click PCIE "https://github.com/OFS/ofs-d5005/blob/release/ofs-2024.1//ipss/pcie/rtl/pcie_top.sv"
    click MEM "https://github.com/OFS/ofs-d5005/blob/release/ofs-2024.1//ipss/mem/emif_top.sv"
    click HSSI "https://github.com/OFS/ofs-d5005/blob/release/ofs-2024.1//ipss/hssi/s10/eth_top.sv"
    click PMCI "https://github.com/OFS/ofs-d5005/blob/release/ofs-2024.1//ipss/pmci/pmci_top.sv"
    click SPI "https://github.com/OFS/ofs-d5005/blob/release/ofs-2024.1//ipss/spi/spi_bridge_top.sv"
    click PCIE_IF "https://github.com/OFS/ofs-d5005/blob/release/ofs-2024.1//ipss/pcie/rtl/pcie_wrapper.sv"
    click DDR_IF "https://github.com/OFS/ofs-d5005/blob/release/ofs-2024.1//ipss/mem/mem_intf.sv"
    click HSSI_IF "https://github.com/OFS/ofs-d5005/blob/release/ofs-2024.1//ipss/hssi/inc/ofs_fim_eth_if.sv"
    click BFM "https://github.com/OFS/ofs-d5005/tree/release/ofs-2024.1//sim/bfm/ofs_axis_bfm/"
    click SEQ "https://github.com/OFS/ofs-d5005/tree/release/ofs-2024.1//verification/tests/sequences/"
    click RAL "https://github.com/OFS/ofs-d5005/tree/release/ofs-2024.1//verification/testbench/ral/"
    click UVM "https://github.com/OFS/ofs-d5005/blob/release/ofs-2024.1//verification/testbench/tb_top.sv"

    %% Styling
    classDef subsystem fill:#f9f,stroke:#333,stroke-width:2px
    classDef interface fill:#bbf,stroke:#333,stroke-width:2px
    classDef test fill:#bfb,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[Subsystem]:::subsystem
        L2[Interface]:::interface
        L3[Verification Component]:::test
    end
```
