[core] reworked i/o for clock network files
This commit is contained in:
parent
079e6f2fca
commit
b2fc47a12a
|
@ -2,10 +2,10 @@
|
||||||
<clock_network name="example_network" global_port="clk[0:7]">
|
<clock_network name="example_network" global_port="clk[0:7]">
|
||||||
<spine name="spine_lvl3" start_x="0" start_y="2" end_x="2" end_y="2">
|
<spine name="spine_lvl3" start_x="0" start_y="2" end_x="2" end_y="2">
|
||||||
<switch_point tap="spine_lvl2_upper" x="2" y="2">
|
<switch_point tap="spine_lvl2_upper" x="2" y="2">
|
||||||
<internal_driver tile_pin="clb.O[0:3]"/>
|
<internal_driver from_pin="clb.O[0:3]" to_pin="clk[1:1]"/>
|
||||||
</switch_point>
|
</switch_point>
|
||||||
<switch_point tap="spine_lvl2_lower" x="2" y="2">
|
<switch_point tap="spine_lvl2_lower" x="2" y="2">
|
||||||
<internal_driver tile_pin="clb.O[0:3]"/>
|
<internal_driver from_pin="clb.O[0:3]" to_pin="clk[0:0]"/>
|
||||||
</switch_point>
|
</switch_point>
|
||||||
</spine>
|
</spine>
|
||||||
<spine name="spine_lvl2_upper" start_x="2" start_y="2" end_x="2" end_y="3">
|
<spine name="spine_lvl2_upper" start_x="2" start_y="2" end_x="2" end_y="3">
|
||||||
|
|
|
@ -25,7 +25,9 @@ constexpr const char* XML_CLOCK_SPINE_SWITCH_POINT_NODE_NAME = "switch_point";
|
||||||
constexpr const char* XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_NODE_NAME =
|
constexpr const char* XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_NODE_NAME =
|
||||||
"internal_driver";
|
"internal_driver";
|
||||||
constexpr const char*
|
constexpr const char*
|
||||||
XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_ATTRIBUTE_TILE_PIN = "tile_pin";
|
XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_ATTRIBUTE_FROM_PIN = "from_pin";
|
||||||
|
constexpr const char*
|
||||||
|
XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_ATTRIBUTE_TO_PIN = "to_pin";
|
||||||
constexpr const char* XML_CLOCK_SPINE_SWITCH_POINT_ATTRIBUTE_TAP = "tap";
|
constexpr const char* XML_CLOCK_SPINE_SWITCH_POINT_ATTRIBUTE_TAP = "tap";
|
||||||
constexpr const char* XML_CLOCK_SPINE_SWITCH_POINT_ATTRIBUTE_X = "x";
|
constexpr const char* XML_CLOCK_SPINE_SWITCH_POINT_ATTRIBUTE_X = "x";
|
||||||
constexpr const char* XML_CLOCK_SPINE_SWITCH_POINT_ATTRIBUTE_Y = "y";
|
constexpr const char* XML_CLOCK_SPINE_SWITCH_POINT_ATTRIBUTE_Y = "y";
|
||||||
|
|
|
@ -163,13 +163,19 @@ static void read_xml_clock_spine_switch_point_internal_driver(
|
||||||
"Invalid id of a clock spine!\n");
|
"Invalid id of a clock spine!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string int_driver_port_name =
|
std::string int_driver_from_port_name =
|
||||||
get_attribute(
|
get_attribute(
|
||||||
xml_int_driver,
|
xml_int_driver,
|
||||||
XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_ATTRIBUTE_TILE_PIN, loc_data)
|
XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_ATTRIBUTE_FROM_PIN, loc_data)
|
||||||
|
.as_string();
|
||||||
|
std::string int_driver_to_port_name =
|
||||||
|
get_attribute(
|
||||||
|
xml_int_driver,
|
||||||
|
XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_ATTRIBUTE_TO_PIN, loc_data)
|
||||||
.as_string();
|
.as_string();
|
||||||
clk_ntwk.add_spine_switch_point_internal_driver(spine_id, switch_point_id,
|
clk_ntwk.add_spine_switch_point_internal_driver(spine_id, switch_point_id,
|
||||||
int_driver_port_name);
|
int_driver_from_port_name,
|
||||||
|
int_driver_to_port_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
|
|
|
@ -126,8 +126,11 @@ static int write_xml_clock_spine_switch_point(
|
||||||
openfpga::write_tab_to_file(fp, 4);
|
openfpga::write_tab_to_file(fp, 4);
|
||||||
fp << "<" << XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_NODE_NAME;
|
fp << "<" << XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_NODE_NAME;
|
||||||
write_xml_attribute(
|
write_xml_attribute(
|
||||||
fp, XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_ATTRIBUTE_TILE_PIN,
|
fp, XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_ATTRIBUTE_FROM_PIN,
|
||||||
clk_ntwk.internal_driver_port(int_driver_id).c_str());
|
clk_ntwk.internal_driver_from_pin(int_driver_id).c_str());
|
||||||
|
write_xml_attribute(
|
||||||
|
fp, XML_CLOCK_SPINE_SWITCH_POINT_INTERNAL_DRIVER_ATTRIBUTE_TO_PIN,
|
||||||
|
clk_ntwk.internal_driver_to_pin(int_driver_id).c_str());
|
||||||
fp << "/>"
|
fp << "/>"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue