How jinxy17/rl-fpga-macro-placement works
This repository is a research prototype for FPGA macro placement with reinforcement learning. Its principal workflow extracts clustered netlist features, feeds graph data to a GNN and placement-policy network, selects a candidate location, expands a placement region, and evaluates it through Vivado placement and routing to produce a reward for training. The graph includes the documented model and placement stages, but Process and Sites implementations were not sampled; their detailed internals and any Tcl-to-data relationships are therefore omitted.
Main entry points: train_small.py RL training loop · Features.py Feature extraction · Process.py Placement and routing · x.npy Graph tensors
Components 12
Netlist features
- Feature extraction
Features.py
Policy learning
- RL training loop
train_small.py - Graph encoder
Model_small.py - Policy decoder
Model_small.py - Wirelength reward
train_small.py
Placement evaluation
- Site and pblock expansion
Sites.py - Placement and routing
Process.py
Design data
- Design netlist
data/design.nodes - Net connections
data/design.nets - Graph tensors
data/x.npy
Other components
- Experimenter
- Xilinx Vivado
Connections 12
- Experimenter → RL training loop: starts experiment
train_small.py - Feature extraction → Design netlist: reads nodes
Features.py - Feature extraction → Net connections: reads nets
Features.py - Feature extraction → Graph tensors: writes tensors
Features.py - RL training loop → Graph tensors: loads tensors
train_small.py - RL training loop → Graph encoder: runs encoder
train_small.py - RL training loop → Policy decoder: runs policy
train_small.py - RL training loop → Site and pblock expansion: expands region
train_small.py - RL training loop → Placement and routing: evaluates placement
train_small.py - Placement and routing → Xilinx Vivado: invokes
README.md - Placement and routing → Wirelength reward: returns wirelength
train_small.py - Wirelength reward → RL training loop: updates policy
train_small.py