flowchart LR A["Logic\n Optimization"] --> B["Technology\n Mapping"] B --> C[Placement] C --> D[Routing] D --> E[Bitstream] style A fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px style B fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style C fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px style D fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px style E fill:#f3e5f5,stroke:#7b1fa2,color:#2e3440,stroke-width:3px
graph TD subgraph "FPGA Tile" CLB["Configurable\n Logic Block"] CB[Connection Box] SB[Switch Box] CH[Routing Channel] end CLB --> CB CB --> CH CH --> SB SB --> CH style CLB fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px style CB fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px style SB fill:#f3e5f5,stroke:#7b1fa2,color:#2e3440,stroke-width:3px style CH fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px
flowchart LR subgraph "Global Routing" GR["Coarse Path\n Assignment"] --> CB["Balance Channel\n Densities"] end subgraph "Detailed Routing" CB --> DR["Exact Wire\n Assignment"] DR --> DG["Resource Graph\n Construction"] DG --> SP["Shortest Path\n Search"] end SP --> RC{Routable?} RC -->|Yes| DONE[Done] RC -->|No| RIP["Rip-up &\n Re-route"] RIP --> CB style GR fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px style DR fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style RC fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px style DONE fill:#f3e5f5,stroke:#7b1fa2,color:#2e3440,stroke-width:3px style RIP fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px
flowchart LR START["Route All Nets\n Allow Overuse"] --> RIP[Rip-up All Nets] RIP --> COST["Update Cost\n Penalize Overuse"] COST --> RE[Re-route All Nets] RE --> CHECK{"Overuse\n = 0?"} CHECK -->|No| RIP CHECK -->|Yes| DONE[Done] style START fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px style RIP fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px style COST fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px style RE fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style CHECK fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px style DONE fill:#f3e5f5,stroke:#7b1fa2,color:#2e3440,stroke-width:3px