# iltshade/mnsim_noc architecture

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

- Interactive diagram: https://gitdiagram.com/iltshade/mnsim_noc
- Repository: https://github.com/iltshade/mnsim_noc

## Overview

##### Main Components Identification
First, let's identify the key architectural components based on the directory structure:

a. Core Components:
- Array System
- Buffer System (Input/Output)
- Communication System
- Wire System
- Tile System
- Strategy System (Mapping/Scheduling)

##### Flow Representation

Following interactions:

a. Data Flow:
- Input → Input Buffer → Tile Array → Output Buffer → Output
- Control signals from Strategy components to Tiles
- Communication paths between Tiles through Wire Network

b. Control Flow:
- Configuration loading path
- Mapping strategy influence
- Scheduling strategy execution

##### Key Architectural Details to Highlight

a. Buffer System:
- Both single and multi-input/output buffer configurations
- Buffer sizes (configurable through yaml)

b. Tile Array:
- M×n grid structure
- Interconnections between tiles

c. Strategy Layer:
- Demonstrate how mapping and scheduling strategies interact with the hardware layer
- Transparent mode option

##### Configuration Aspects

A small section showing:
- Configuration parameters (from yaml)
- Task configuration input
- Bandwidth specifications
- Buffer size settings

##### Implementation Notes

- Maintain consistent spacing and alignment
- Use clear, readable fonts
- Version information
- Notes for critical parameters

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Utility_Layer
        Config["Configuration Management"]:::utility
        Registry["Component Registry"]:::utility
        Logging["Logging System"]:::utility
    end

    subgraph Control_Layer
        Mapping["Mapping Strategy"]:::strategy
        Scheduling["Scheduling Strategy"]:::strategy
        Communication["Communication Management"]:::control
    end

    subgraph Hardware_Layer
        subgraph Buffer_System
            IBuffer[("Input Buffer")]:::buffer
            MIBuffer[("Multi-Input Buffer")]:::buffer
            OBuffer[("Output Buffer")]:::buffer
            MOBuffer[("Multi-Output Buffer")]:::buffer
        end

        subgraph Array_System
            TileArray["Tile Array (m×n)"]:::hardware
            Wire["Wire Network"]:::hardware
        end
    end

    %% Connections
    Config --> Registry
    Registry --> |Component Registration| TileArray
    Registry --> |Component Registration| Communication
    Logging --> |System Logs| Communication

    Mapping --> |Strategy Control| Communication
    Scheduling --> |Execution Control| Communication
    Communication --> |Data Flow Control| TileArray

    IBuffer --> |Data Input| TileArray
    MIBuffer --> |Multiple Inputs| TileArray
    TileArray --> |Data Output| OBuffer
    TileArray --> |Multiple Outputs| MOBuffer

    Wire --> |Inter-Tile Communication| TileArray

    %% Click Events
    click Config "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/utils/yaml_io.py"
    click Registry "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/utils/registry.py"
    click Logging "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/utils/log.py"
    click Mapping "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/Strategy/mapping.py"
    click Scheduling "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/Strategy/schedule.py"
    click Communication "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/Communication/base_communication.py"
    click IBuffer "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/Buffer/input_buffer.py"
    click OBuffer "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/Buffer/output_buffer.py"
    click MIBuffer "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/Buffer/multi_input_buffer.py"
    click MOBuffer "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/Buffer/multi_output_buffer.py"
    click TileArray "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/Array/base_array.py"
    click Wire "https://github.com/ILTShade/MNSIM_NoC/blob/master/mnsim_noc/Wire/wire_net.py"

    %% Styles
    classDef utility fill:#gray,stroke:#333,stroke-width:2px
    classDef strategy fill:#yellow,stroke:#333,stroke-width:2px
    classDef control fill:#orange,stroke:#333,stroke-width:2px
    classDef buffer fill:#green,stroke:#333,stroke-width:2px
    classDef hardware fill:#blue,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[Utility Component]:::utility
        L2[Strategy Component]:::strategy
        L3[Control Component]:::control
        L4[Buffer Component]:::buffer
        L5[Hardware Component]:::hardware
    end
```
