[lib] fixed a few bugs

This commit is contained in:
tangxifan 2023-02-22 21:29:18 -08:00
parent 40f6b5a3fe
commit 65b27a3377
3 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,8 @@
<clock_networks>
<clock_network name="example_network" width="8">
<spine name="spine_lvl3" start_x="0" start_y="2" end_x="2" end_y="2">
<switch_point tap="spine_lvl2" x="2" y="2"/>
<switch_point tap="spine_lvl2_upper" x="2" y="2"/>
<switch_point tap="spine_lvl2_lower" x="2" y="2"/>
</spine>
<spine name="spine_lvl2_upper" start_x="2" start_y="2" end_x="2" end_y="3">
<switch_point tap="rib_lvl1_upper_left" x="2" y="3"/>

View File

@ -42,7 +42,7 @@ size_t ClockNetwork::tree_depth(const ClockTreeId& tree_id) const {
VTR_LOG_ERROR("Unable to identify tree depth when data is still dirty!\n");
exit(1);
}
return tree_depths_[tree_id];
return tree_depths_[tree_id] + 1;
}
std::vector<ClockSpineId> ClockNetwork::spines(

View File

@ -27,7 +27,7 @@ int main(int argc, const char** argv) {
}
VTR_ASSERT(clk_ntwk.is_valid());
for (auto tree_id : clk_ntwk.trees()) {
VTR_LOG("Max. depth of the clock tree '%lu' is %d", size_t(tree_id),
VTR_LOG("Max. depth of the clock tree '%lu' is %d\n", size_t(tree_id),
clk_ntwk.tree_depth(tree_id));
}