[core] add a new option 'disable_unused_trees' to route clock rr graph
This commit is contained in:
parent
3fb891094b
commit
7892c2340c
|
@ -91,13 +91,14 @@ static int route_clock_tree_rr_graph(
|
|||
const vtr::vector<RRNodeId, ClusterNetId>& rr_node_gnets,
|
||||
const std::map<ClockTreePinId, ClusterNetId>& tree2clk_pin_map,
|
||||
const ClockNetwork& clk_ntwk, const ClockTreeId& clk_tree,
|
||||
const bool& disable_unused_trees,
|
||||
const bool& verbose) {
|
||||
for (auto ispine : clk_ntwk.spines(clk_tree)) {
|
||||
VTR_LOGV(verbose, "Routing spine '%s'...\n",
|
||||
clk_ntwk.spine_name(ispine).c_str());
|
||||
for (auto ipin : clk_ntwk.pins(clk_tree)) {
|
||||
/* Do not route unused clock spines */
|
||||
if (tree2clk_pin_map.find(ipin) == tree2clk_pin_map.end()) {
|
||||
if (disable_unused_trees && tree2clk_pin_map.find(ipin) == tree2clk_pin_map.end()) {
|
||||
VTR_LOGV(verbose, "Skip routing backbone of unused spine '%s'...\n",
|
||||
clk_ntwk.spine_name(ispine).c_str());
|
||||
continue;
|
||||
|
@ -172,6 +173,8 @@ static int route_clock_tree_rr_graph(
|
|||
vpr_routing_annotation.set_rr_node_net(des_node,
|
||||
tree2clk_pin_map.at(ipin));
|
||||
use_int_driver++;
|
||||
VTR_LOGV(verbose, "Routing switch points of spine '%s' at the switching point (%lu, %lu) using internal driver\n",
|
||||
clk_ntwk.spine_name(ispine).c_str(), src_coord.x(), src_coord.y());
|
||||
}
|
||||
}
|
||||
if (use_int_driver > 1) {
|
||||
|
@ -266,7 +269,10 @@ int route_clock_rr_graph(
|
|||
const ClusteredNetlist& cluster_nlist, const PlacementContext& vpr_place_ctx,
|
||||
const VprNetlistAnnotation& netlist_annotation,
|
||||
const RRClockSpatialLookup& clk_rr_lookup, const ClockNetwork& clk_ntwk,
|
||||
const PinConstraints& pin_constraints, const bool& verbose) {
|
||||
const PinConstraints& pin_constraints,
|
||||
const bool& disable_unused_trees,
|
||||
const bool& disable_unused_spines,
|
||||
const bool& verbose) {
|
||||
vtr::ScopedStartFinishTimer timer(
|
||||
"Route programmable clock network based on routing resource graph");
|
||||
|
||||
|
@ -318,7 +324,7 @@ int route_clock_rr_graph(
|
|||
clk_ntwk.tree_name(itree).c_str());
|
||||
status = route_clock_tree_rr_graph(
|
||||
vpr_routing_annotation, vpr_device_ctx.rr_graph, clk_rr_lookup,
|
||||
rr_node_gnets, tree2clk_pin_map, clk_ntwk, itree, verbose);
|
||||
rr_node_gnets, tree2clk_pin_map, clk_ntwk, itree, disable_unused_trees, verbose);
|
||||
if (status == CMD_EXEC_FATAL_ERROR) {
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,10 @@ int route_clock_rr_graph(
|
|||
const ClusteredNetlist& cluster_nlist, const PlacementContext& vpr_place_ctx,
|
||||
const VprNetlistAnnotation& netlist_annotation,
|
||||
const RRClockSpatialLookup& clk_rr_lookup, const ClockNetwork& clk_ntwk,
|
||||
const PinConstraints& pin_constraints, const bool& verbose);
|
||||
const PinConstraints& pin_constraints,
|
||||
const bool& disable_unused_trees,
|
||||
const bool& disable_unused_spines,
|
||||
const bool& verbose);
|
||||
|
||||
} /* end namespace openfpga */
|
||||
|
||||
|
|
|
@ -219,6 +219,8 @@ int route_clock_rr_graph_template(T& openfpga_ctx, const Command& cmd,
|
|||
|
||||
/* add an option '--pin_constraints_file in short '-pcf' */
|
||||
CommandOptionId opt_pcf = cmd.option("pin_constraints_file");
|
||||
CommandOptionId opt_disable_unused_trees = cmd.option("disable_unused_trees");
|
||||
CommandOptionId opt_disable_unused_spines = cmd.option("disable_unused_spines");
|
||||
CommandOptionId opt_verbose = cmd.option("verbose");
|
||||
|
||||
/* If pin constraints are enabled by command options, read the file */
|
||||
|
@ -233,6 +235,8 @@ int route_clock_rr_graph_template(T& openfpga_ctx, const Command& cmd,
|
|||
g_vpr_ctx.atom(), g_vpr_ctx.clustering().clb_nlist, g_vpr_ctx.placement(),
|
||||
openfpga_ctx.vpr_netlist_annotation(), openfpga_ctx.clock_rr_lookup(),
|
||||
openfpga_ctx.clock_arch(), pin_constraints,
|
||||
cmd_context.option_enable(cmd, opt_disable_unused_trees),
|
||||
cmd_context.option_enable(cmd, opt_disable_unused_spines),
|
||||
cmd_context.option_enable(cmd, opt_verbose));
|
||||
}
|
||||
|
||||
|
|
|
@ -710,6 +710,8 @@ ShellCommandId add_route_clock_rr_graph_command_template(
|
|||
shell_cmd.set_option_short_name(opt_file, "pcf");
|
||||
shell_cmd.set_option_require_value(opt_file, openfpga::OPT_STRING);
|
||||
|
||||
shell_cmd.add_option("disable_unused_trees", false, "Disable entire clock trees when they are not used by any clock nets. Useful to reduce clock power");
|
||||
shell_cmd.add_option("disable_unused_spines", false, "Disable part of the clock tree which are used by clock nets. Useful to reduce clock power");
|
||||
/* Add an option '--verbose' */
|
||||
shell_cmd.add_option("verbose", false, "Show verbose outputs");
|
||||
|
||||
|
|
Loading…
Reference in New Issue