public class CodeGenerator
extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
TEST_SITE_INST_CLASS_NAME |
static String |
TEST_SITE_INST_METHOD_NAME |
| Constructor and Description |
|---|
CodeGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addPIPs(Net net,
String[] pips) |
static void |
addSitePIPs(SiteInst si,
String... sitePIPs)
Shorthand method for turning on site PIPs in a site instance.
|
static Net |
createTestNet(Design design,
String netName,
String[] pips) |
static Cell |
genCell(SiteInst si,
String name,
boolean isRoutethru,
String type,
String bel,
String... pinMaps)
Shorthand method for creating a placed cell inside a site instance.
|
static void |
genCodeForTestSite(SiteInst inst,
PrintStream ps,
boolean includeRouting)
Creates boilerplate code for a test by re-creating a SiteInst's configuration
from scratch in RapidWright APIs.
|
static void |
routeSiteNet(SiteInst si,
Net n,
String... siteWires)
Shorthand method to route site wires with a particular net in a site
instance.
|
static String |
testNetGenerator(Design design,
Collection<String> nets,
Collection<String> siteInsts)
Generates RapidWright test code from a provided checkpoint that instantiates the provided nets and siteInsts,
and adds the associated PIPs to each of the nets.
|
static String |
testNetGenerator(Net net)
Convenience method to take a net and return a String the generates the routed
net for an example test case in RapidWright code
|
static String |
testNetGenerator(String dcp,
Collection<String> nets,
Collection<String> siteInsts)
Generates RapidWright test code from a provided checkpoint that instantiates the provided nets and siteInsts,
and adds the associated PIPs to each of the nets.
|
static String |
testNetGenerator(String dcp,
String edif,
Collection<String> nets,
Collection<String> siteInsts)
Generates RapidWright test code from a provided checkpoint that instantiates the provided nets and siteInsts,
and adds the associated PIPs to each of the nets.
|
public static String TEST_SITE_INST_CLASS_NAME
public static String TEST_SITE_INST_METHOD_NAME
public static String testNetGenerator(Net net)
net - The net to extract routing and SiteInst frompublic static String testNetGenerator(String dcp,
Collection<String> nets,
Collection<String> siteInsts)
dcp - The path to the desired DCP to generate code from.nets - A collection of nets to generate code for.siteInsts - A collection of site instances to generate code for.public static String testNetGenerator(String dcp,
String edif,
Collection<String> nets,
Collection<String> siteInsts)
dcp - The path to the desired DCP to generate code from.edif - The path to the external EDIF file to load (in case of an encrypted DCP file).nets - A collection of nets to generate code for.siteInsts - A collection of site instances to generate code for.public static String testNetGenerator(Design design, Collection<String> nets, Collection<String> siteInsts)
design - The design to generate code from.nets - A collection of nets to generate code for.siteInsts - A collection of site instances to generate code for.public static void addPIPs(Net net, String[] pips)
public static void routeSiteNet(SiteInst si, Net n, String... siteWires)
si - The site instance to targetn - The net to be site routedsiteWires - The list of site wire names to routepublic static void addSitePIPs(SiteInst si, String... sitePIPs)
si - The target site instance.sitePIPs - The list of site PIPs (of the format public static Cell genCell(SiteInst si, String name, boolean isRoutethru, String type, String bel, String... pinMaps)
si - The target site instancename - Name of the cell to createisRoutethru - Flag indicating if the cell should be a routethrutype - The type of the cell (Unisim or special field)bel - The name of the BEL where the cell should be placedpinMaps - A variable number of pin mappings for the cell where each
string is of the format public static void genCodeForTestSite(SiteInst inst, PrintStream ps, boolean includeRouting)
inst - The instance to replicate in the testps - The PrintStream (System.out, or a file-based
PrintStream, for example).includeRouting - Flag indicating that the code example should include
inter-site routing (PIPs).