Add more information in SB XML outputter
This commit is contained in:
parent
ca402f87e5
commit
e7e18eb4c1
|
@ -1067,7 +1067,6 @@ RRSwitchBlock rotate_rr_switch_block_for_mirror(DeviceCoordinator& device_range,
|
||||||
return rotated_rr_switch_block;
|
return rotated_rr_switch_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 3. TOP-RIGHT corner:
|
/* 3. TOP-RIGHT corner:
|
||||||
* swap the opin_node between TOP and BOTTOM,
|
* swap the opin_node between TOP and BOTTOM,
|
||||||
* swap the chan_node between TOP and BOTTOM,
|
* swap the chan_node between TOP and BOTTOM,
|
||||||
|
@ -1225,6 +1224,16 @@ DeviceRRSwitchBlock build_device_rr_switch_blocks(boolean output_sb_xml, char* s
|
||||||
"Backannotated %d switch blocks.\n",
|
"Backannotated %d switch blocks.\n",
|
||||||
(nx + 1) * (ny + 1) );
|
(nx + 1) * (ny + 1) );
|
||||||
|
|
||||||
|
if (TRUE == output_sb_xml) {
|
||||||
|
write_device_rr_switch_block_to_xml(sb_xml_dir, LL_device_rr_switch_block);
|
||||||
|
|
||||||
|
/* Skip rotating mirror searching */
|
||||||
|
vpr_printf(TIO_MESSAGE_INFO,
|
||||||
|
"Output XML description of Switch Blocks to %s.\n",
|
||||||
|
sb_xml_dir);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
LL_device_rr_switch_block.build_unique_mirror();
|
LL_device_rr_switch_block.build_unique_mirror();
|
||||||
|
|
||||||
/* Report number of unique mirrors */
|
/* Report number of unique mirrors */
|
||||||
|
@ -1261,17 +1270,6 @@ DeviceRRSwitchBlock build_device_rr_switch_blocks(boolean output_sb_xml, char* s
|
||||||
"Detect %d rotatable unique switch blocks from %d switch blocks.\n",
|
"Detect %d rotatable unique switch blocks from %d switch blocks.\n",
|
||||||
LL_device_rr_switch_block.get_num_rotatable_mirror(), (nx + 1) * (ny + 1) );
|
LL_device_rr_switch_block.get_num_rotatable_mirror(), (nx + 1) * (ny + 1) );
|
||||||
|
|
||||||
if (TRUE == output_sb_xml) {
|
|
||||||
write_device_rr_switch_block_to_xml(sb_xml_dir, LL_device_rr_switch_block);
|
|
||||||
|
|
||||||
/* Skip rotating mirror searching */
|
|
||||||
vpr_printf(TIO_MESSAGE_INFO,
|
|
||||||
"Output XML description of Switch Blocks to %s.\n",
|
|
||||||
sb_xml_dir);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return LL_device_rr_switch_block;
|
return LL_device_rr_switch_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
void write_rr_switch_block_to_xml(std::string fname_prefix, RRSwitchBlock& rr_sb) {
|
void write_rr_switch_block_to_xml(std::string fname_prefix, RRSwitchBlock& rr_sb) {
|
||||||
/* Prepare file name */
|
/* Prepare file name */
|
||||||
std::string fname(fname_prefix);
|
std::string fname(fname_prefix);
|
||||||
fname += rr_sb.gen_verilog_instance_name();
|
fname += rr_sb.gen_verilog_module_name();
|
||||||
fname += ".xml";
|
fname += ".xml";
|
||||||
|
|
||||||
vpr_printf(TIO_MESSAGE_INFO, "Output SB XML: %s\n", fname.c_str());
|
vpr_printf(TIO_MESSAGE_INFO, "Output SB XML: %s\n", fname.c_str());
|
||||||
|
@ -44,7 +44,8 @@ void write_rr_switch_block_to_xml(std::string fname_prefix, RRSwitchBlock& rr_sb
|
||||||
/* Output node information: location, index, side */
|
/* Output node information: location, index, side */
|
||||||
fp << "\t<" << convert_chan_type_to_string(cur_rr_node->type)
|
fp << "\t<" << convert_chan_type_to_string(cur_rr_node->type)
|
||||||
<< " side=\"" << side_manager.to_string()
|
<< " side=\"" << side_manager.to_string()
|
||||||
<< "\" index=\"" << inode << "\">"
|
<< "\" index=\"" << inode
|
||||||
|
<< "\">"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
/* Check if this node is directly connected to the node on the opposite side */
|
/* Check if this node is directly connected to the node on the opposite side */
|
||||||
|
@ -60,9 +61,10 @@ void write_rr_switch_block_to_xml(std::string fname_prefix, RRSwitchBlock& rr_sb
|
||||||
/* Direct connection: output the node on the opposite side */
|
/* Direct connection: output the node on the opposite side */
|
||||||
if (0 == num_drive_rr_nodes) {
|
if (0 == num_drive_rr_nodes) {
|
||||||
Side oppo_side = side_manager.get_opposite();
|
Side oppo_side = side_manager.get_opposite();
|
||||||
fp << "\t\t<drive_node type=\"" << convert_chan_type_to_string(cur_rr_node->type)
|
fp << "\t\t<driver_node type=\"" << convert_chan_type_to_string(cur_rr_node->type)
|
||||||
<< "\" side=\"" << oppo_side.to_string()
|
<< "\" side=\"" << oppo_side.to_string()
|
||||||
<< "\" index=\"" << rr_sb.get_node_index(cur_rr_node, oppo_side.get_side(), IN_PORT) << "\"/>"
|
<< "\" index=\"" << rr_sb.get_node_index(cur_rr_node, oppo_side.get_side(), IN_PORT)
|
||||||
|
<< "\"/>"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
} else {
|
} else {
|
||||||
for (size_t jnode = 0; jnode < num_drive_rr_nodes; ++jnode) {
|
for (size_t jnode = 0; jnode < num_drive_rr_nodes; ++jnode) {
|
||||||
|
@ -73,20 +75,33 @@ void write_rr_switch_block_to_xml(std::string fname_prefix, RRSwitchBlock& rr_sb
|
||||||
std::string node_type_str;
|
std::string node_type_str;
|
||||||
if (OPIN == drive_rr_nodes[jnode]->type) {
|
if (OPIN == drive_rr_nodes[jnode]->type) {
|
||||||
node_type_str = "opin";
|
node_type_str = "opin";
|
||||||
|
Side grid_side(rr_sb.get_opin_node_grid_side(drive_node_side, drive_node_index));
|
||||||
|
fp << "\t\t<driver_node type=\"" << node_type_str
|
||||||
|
<< "\" side=\"" << drive_side.to_string()
|
||||||
|
<< "\" index=\"" << drive_node_index
|
||||||
|
<< "\" grid_side=\"" << grid_side.to_string()
|
||||||
|
<<"\"/>"
|
||||||
|
<< std::endl;
|
||||||
} else {
|
} else {
|
||||||
node_type_str = convert_chan_type_to_string(drive_rr_nodes[jnode]->type);
|
node_type_str = convert_chan_type_to_string(drive_rr_nodes[jnode]->type);
|
||||||
|
size_t segment_id = rr_sb.get_chan_node_segment(drive_node_side, drive_node_index);
|
||||||
|
fp << "\t\t<driver_node type=\"" << node_type_str
|
||||||
|
<< "\" side=\"" << drive_side.to_string()
|
||||||
|
<< "\" index=\"" << drive_node_index
|
||||||
|
<< "\" segment_id=\"" << segment_id
|
||||||
|
<< "\"/>"
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
fp << "\t\t<drive_node type=\"" << node_type_str
|
|
||||||
<< "\" side=\"" << drive_side.to_string()
|
|
||||||
<< "\" index=\"" << drive_node_index << "\"/>"
|
|
||||||
<< std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fp << "\t</" << convert_chan_type_to_string(cur_rr_node->type) << ">" << std::endl;
|
fp << "\t</" << convert_chan_type_to_string(cur_rr_node->type)
|
||||||
|
<< ">"
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fp << "</rr_sb>" << std::endl;
|
fp << "</rr_sb>"
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
/* close a file */
|
/* close a file */
|
||||||
fp.close();
|
fp.close();
|
||||||
|
|
Loading…
Reference in New Issue