# fischermoseley/manta architecture

> Architecture diagram of the GitHub repository fischermoseley/manta, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fischermoseley/manta
- Repository: https://github.com/fischermoseley/manta

## Overview

##### Main Components

a) Host-Side Components:
- Python API Layer (src/manta/)
- Configuration Management (YAML/JSON parsing)
- Interface Handlers (UART and Ethernet)

b) FPGA-Side Components:
- Core Infrastructure
- IO Core
- Logic Analyzer Core
- Memory Core
- Interface Bridges
- UART Bridge (Transmitter/Receiver)
- Ethernet Bridge (Source/Sink)

**Python API (src/manta/) --> Configuration Management --> Interface Handlers**

**UART Interface <---> UART Bridges**
**Ethernet Interface <---> Ethernet Bridges**

**Core Infrastructure (IO/Logic Analyzer/Memory Cores)**

##### Key Elements to Highlight

a) Data Flow Directions:
- Internal data flow between cores
- Configuration flow from YAML/JSON to cores

- Rectangles for main processing blocks
- Hexagons for interface bridges
- Diamonds for configuration points

##### Implementation Details

**[Host Computer]**

- Python API
- Configuration Management
- Interface Handlers

**[Communication Layer]**

- UART Interface/Bridges
- Ethernet Interface/Bridges

**[FPGA]**

- IO Core
- Logic Analyzer Core
- Memory Core

##### Additional Elements

- Version/configuration management indicators
- Test points and debugging interfaces
- Example integration points (from examples directory)

##### Technical Details

- Bridge implementations (UART/Ethernet)
- Core interfaces and protocols
- Configuration flow
- Test and verification points

Remember to include references to the key source directories:
- src/manta/uart
- src/manta/ethernet
- src/manta/logic_analyzer
- src/manta/memory_core

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef host fill:#b3d1ff,stroke:#333
    classDef interface fill:#98fb98,stroke:#333
    classDef fpga fill:#ffe680,stroke:#333
    classDef config fill:#d3d3d3,stroke:#333
    classDef bridge fill:#ffa07a,stroke:#333

    %% Host Layer
    subgraph Host
        API[Python API]
        Config[Configuration Management]
        InterfaceHandlers[Interface Handlers]
        
        API --> Config
        Config --> InterfaceHandlers
    end
    
    %% Communication Layer
    subgraph Communication
        UART[UART Interface]
        Ethernet[Ethernet Interface]
        
        UARTTx[UART Transmitter Bridge]
        UARTRx[UART Receiver Bridge]
        EtherSrc[Ethernet Source Bridge]
        EtherSink[Ethernet Sink Bridge]
        
        UART --- UARTTx & UARTRx
        Ethernet --- EtherSrc & EtherSink
    end
    
    %% FPGA Layer
    subgraph FPGA
        IOCore[IO Core]
        LogicCore[Logic Analyzer Core]
        MemCore[Memory Core]
        
        IOCore --- LogicCore
        LogicCore --- MemCore
    end
    
    %% Inter-layer connections
    InterfaceHandlers --> UART & Ethernet
    UARTTx & UARTRx --> IOCore
    EtherSrc & EtherSink --> IOCore
    
    %% Click events for component mapping
    click API "https://github.com/fischermoseley/manta/tree/main/src/manta/"
    click IOCore "https://github.com/fischermoseley/manta/blob/main/src/manta/io_core.py"
    click LogicCore "https://github.com/fischermoseley/manta/tree/main/src/manta/logic_analyzer/"
    click MemCore "https://github.com/fischermoseley/manta/blob/main/src/manta/memory_core.py"
    click UARTTx "https://github.com/fischermoseley/manta/blob/main/src/manta/uart/transmit_bridge.py"
    click UARTRx "https://github.com/fischermoseley/manta/blob/main/src/manta/uart/receive_bridge.py"
    click EtherSrc "https://github.com/fischermoseley/manta/blob/main/src/manta/ethernet/source_bridge.py"
    click EtherSink "https://github.com/fischermoseley/manta/blob/main/src/manta/ethernet/sink_bridge.py"
    
    %% Apply classes
    class API,Config,InterfaceHandlers host
    class UART,Ethernet interface
    class UARTTx,UARTRx,EtherSrc,EtherSink bridge
    class IOCore,LogicCore,MemCore fpga
```
