RapidSmith: Do-It-Yourself CAD Tools for Xilinx FPGAs
Christopher Lavin, Marc Padilla, Jaren Lamprecht, Philip Lundrigan Brent Nelson and Brad Hutchings FPL September 5-7, 2011
Christopher Lavin, Marc Padilla, Jaren Lamprecht, Philip Lundrigan - - PowerPoint PPT Presentation
RapidSmith: Do-It-Yourself CAD Tools for Xilinx FPGAs Christopher Lavin, Marc Padilla, Jaren Lamprecht, Philip Lundrigan Brent Nelson and Brad Hutchings FPL September 5-7, 2011 Why Build Your Own Tools Anyway? Proof of concept in their own
Christopher Lavin, Marc Padilla, Jaren Lamprecht, Philip Lundrigan Brent Nelson and Brad Hutchings FPL September 5-7, 2011
2
3
tool runtime quality of result (QOR)
hours minutes seconds
tool runtime quality of result (QOR)
hours minutes seconds
Commercial tools focus here…
tool runtime quality of result (QOR)
hours minutes seconds
Commercial tools focus here… For rapid prototyping and implementation we would like tools which focus here…
7
8
Xilinx
map
Xilinx
par –p
(route only)
Xilinx
par –r
(place only)
.NCD .NCD .NCD
Xilinx
xdl
Xilinx
xdl
Xilinx
xdl
.XDL .XDL .XDL
BYU
RapidSmith Tools
Xilinx
bitgen
.BIT
Custom CAD Tools
9
Xilinx
map
Xilinx
par –p
(route only)
Xilinx
par –r
(place only)
.NCD .NCD .NCD
Xilinx
xdl
Xilinx
xdl
Xilinx
xdl
.XDL .XDL .XDL
BYU
RapidSmith Tools
Xilinx
bitgen
.BIT
Custom CAD Tools
10
11
12
13
14
15
L_TERM INT L_TERM INT L_TERM INT INT_SO INT_SO INT_SO INT INT INT INT INT INT INT INT INT CLB CLB CLB CLB CLB CLB IOIS IOIS IOIS
16
17
HCLK_X1Y39 INT_X2Y37 CLB_X2Y37 DSP_X10Y32 BRAM_X5Y32
18
INT_X2Y37
Contains: TIEOFF_X2Y37
CLB_X2Y37
Contains: SLICE_X3Y75 SLICE_X3Y74 SLICE_X2Y75 SLICE_X2Y74
BRAM_X5Y32
Contains: RAMB16_X0Y8 FIFO16_X0Y8
DSP_X10Y32
Contains: DSP48_X0Y17 DSP48_X0Y16
19
20
inst "inst23" "SLICEL",placed CLB_X13Y45 SLICE_X18Y91 , cfg " BXINV::BX BYINV::#OFF ... F:inst23lut0:#LUT:D=((~A1*A3)+(A1*A2)) G:inst23lut1:#LUT:D=((~A1*A3)+(A1*A4)) ... YUSED::#OFF "; ... net "shiftResult4" , cfg " ", inpin "inst4" G3 ,
;
21
inst "inst23" "SLICEL",placed CLB_X13Y45 SLICE_X18Y91 , cfg " BXINV::BX BYINV::#OFF ... F:inst23lut0:#LUT:D=((~A1*A3)+(A1*A2)) G:inst23lut1:#LUT:D=((~A1*A3)+(A1*A4)) ... YUSED::#OFF "; ... net "shiftResult4" , cfg " ", inpin "inst4" G3 ,
pip CLB_X31Y53 IMUX_B18_INT -> G3_PINWIRE2 , pip CLB_X31Y54 YQ_PINWIRE2 -> SECONDARY_LOGIC_OUTS6_INT , pip INT_X31Y53 OMUX_S3 -> IMUX_B18 , pip INT_X31Y54 SECONDARY_LOGIC_OUTS6 -> OMUX3 , ;
22
module "mux" "inst23" , cfg " _SYSTEM_MACRO::FALSE "; port "mux5i_0_inport" "inst31" "F4"; port "mux5i_1_inport" "inst33" "F2"; ... inst "inst23" "SLICEL",placed CLB_X13Y45 SLICE_X18Y91 , cfg " BXINV::BX BYINV::#OFF ... YUSED::#OFF "; ... net "shiftResult4" , cfg " ", inpin "inst4" G3 ,
pip CLB_X31Y53 IMUX_B18_INT -> G3_PINWIRE2 , pip CLB_X31Y54 YQ_PINWIRE2 -> SECONDARY_LOGIC_OUTS6_INT , pip INT_X31Y53 OMUX_S3 -> IMUX_B18 , pip INT_X31Y54 SECONDARY_LOGIC_OUTS6 -> OMUX3 , ; endmodule "mux";
23
24
25
26
28
Design Instance PrimitiveType Attribute (List) PrimitiveSite Net NetType Pin (List) PIP (List) Module Port (List) Instance (List) Net (List) ModuleInstance Instance (List) Net (List Device Tile (2D Array) TileType PrimitiveSite (Array) PrimitiveType Tile Wire
29
30
31
32
public class RandomPlacer{ public static void main(String[] args){ // Create and load a design Design design = new Design(args[0]); Random rng = new Random(0); // Create random number generator // Place all unplaced instances for(Instance i : design.getInstances()){ if(i.isPlaced()) continue; PrimitiveSite[] sites = design.getDevice().getAllCompatibleSites(i.getType()); int idx = rng.nextInt(sites.length); int watchDog = 0; // Find a free primitive site while(design.isPrimitiveSiteUsed(sites[idx])){ if(++idx > sites.length) idx = 0; if(++watchDog > sites.length) System.out.println("Placement failed."); } i.place(sites[idx]); } // Save the placed design design.saveXDLFile(args[1]); } }
33
// Load XDL file (parses XDL, populated design object) Design design = new Design("moduleContainingDesign.xdl"); // Get the 1024-FFT module definition by name Module fft = design.getModule("fft1024"); // Create an instance of the FFT module called "f0" ModuleInstance mi = design.createModuleInstance("f0", fft); //Find all compatible sites with the anchor PrimitiveType type = mi.getAnchor().getType(); PrimitiveSite[] sites = design.getDevice().getAllCompatibleSites(type); int i = 0; while(!mi.place(sites[i++], design.getDevice())){ if(i >= sites.length) error(mi.getName()+ " has no valid placement!"); }
34
35
.mdl
HM Cache Generic HMG
Design Parser & Mapper Design Stitcher XDL Hard Macro Placer XDL Router
.xdl
INPUT DESIGNS HARD MACRO SOURCES PLACED & ROUTED XDL
Part of CHREC research project Demonstrated > 50X reduction in tool flow time
36
37
38
– Provides XDL-based infrastructure – Designed to aid in the construction of custom CAD tools
– Custom CAD flow
– Custom individual steps in the flow
– Post Xilinx flow circuit modifications
– Post Xilinx flow circuit analysis
– http://rapidsmith.sourceforge.net
40