Skip to content

Commit 5c0bde0

Browse files
committed
Clock Modeling: Made repeatx and repeaty optional for clock networks arch
1 parent a16d529 commit 5c0bde0

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3403,8 +3403,21 @@ static void ProcessClockNetworks(
34033403
std::string starty (get_attribute(curr_type, "starty", loc_data).value());
34043404
std::string endy (get_attribute(curr_type, "endy", loc_data).value());
34053405
std::string x (get_attribute(curr_type, "x", loc_data).value());
3406-
std::string repeatx (get_attribute(curr_type, "repeatx", loc_data).value());
3407-
std::string repeaty (get_attribute(curr_type, "repeaty", loc_data).value());
3406+
3407+
std::string repeatx;
3408+
auto repeatx_attr = get_attribute(curr_type, "repeatx", loc_data, ReqOpt::OPTIONAL);
3409+
if (repeatx_attr) {
3410+
repeatx = repeatx_attr.value();
3411+
} else {
3412+
repeatx = "W";
3413+
}
3414+
std::string repeaty;
3415+
auto repeaty_attr = get_attribute(curr_type, "repeaty", loc_data, ReqOpt::OPTIONAL);
3416+
if (repeaty_attr) {
3417+
repeaty = repeaty_attr.value();
3418+
} else {
3419+
repeaty = "H";
3420+
}
34083421

34093422
clock_network.metal_layer = metal_layer;
34103423
clock_network.wire.start = starty;
@@ -3429,8 +3442,21 @@ static void ProcessClockNetworks(
34293442
std::string startx (get_attribute(curr_type, "startx", loc_data).value());
34303443
std::string endx (get_attribute(curr_type, "endx", loc_data).value());
34313444
std::string y (get_attribute(curr_type, "y", loc_data).value());
3432-
std::string repeatx (get_attribute(curr_type, "repeatx", loc_data).value());
3433-
std::string repeaty (get_attribute(curr_type, "repeaty", loc_data).value());
3445+
3446+
std::string repeatx;
3447+
auto repeatx_attr = get_attribute(curr_type, "repeatx", loc_data, ReqOpt::OPTIONAL);
3448+
if (repeatx_attr) {
3449+
repeatx = repeatx_attr.value();
3450+
} else {
3451+
repeatx = "W";
3452+
}
3453+
std::string repeaty;
3454+
auto repeaty_attr = get_attribute(curr_type, "repeaty", loc_data, ReqOpt::OPTIONAL);
3455+
if (repeaty_attr) {
3456+
repeaty = repeaty_attr.value();
3457+
} else {
3458+
repeaty = "H";
3459+
}
34343460

34353461
clock_network.metal_layer = metal_layer;
34363462
clock_network.wire.start = startx;

vtr_flow/arch/timing/k6_frac_N10_frac_chain_mem32K_htree0_40nm.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,15 +1519,15 @@
15191519

15201520
<clock_network name="spine1" num_inst="2">
15211521
<!-- Full Device: Center Spine -->
1522-
<spine metal_layer="global_spine" x="W/2" starty="0" endy="H" repeatx="W" repeaty="H">
1522+
<spine metal_layer="global_spine" x="W/2" starty="0" endy="H">
15231523
<switch_point type="drive" name="drive" yoffset="H/2" switch_name="drive_buff"/>
15241524
<switch_point type="tap" name="tap" yoffset="0" yincr="1"/>
15251525
</spine>
15261526
</clock_network>
15271527

15281528
<clock_network name="rib1" num_inst="2">
15291529
<!-- Full Device: Each Grid Row -->
1530-
<rib metal_layer="global_rib" y="0" startx="0" endx="W" repeatx="W" repeaty="1">
1530+
<rib metal_layer="global_rib" y="0" startx="0" endx="W" repeaty="1">
15311531
<switch_point type="drive" name="drive" xoffset="W/2" switch_name="drive_buff"/>
15321532
<switch_point type="tap" name="tap" xoffset="0" xincr="1"/>
15331533
</rib>

vtr_flow/arch/timing/k6_frac_N10_frac_chain_mem32K_htree0_routedCLK_40nm.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,15 +1511,15 @@
15111511

15121512
<clock_network name="spine1" num_inst="2">
15131513
<!-- Full Device: Center Spine -->
1514-
<spine metal_layer="global_spine" x="W/2" starty="0" endy="H" repeatx="W" repeaty="H">
1514+
<spine metal_layer="global_spine" x="W/2" starty="0" endy="H">
15151515
<switch_point type="drive" name="drive" yoffset="H/2" switch_name="drive_buff"/>
15161516
<switch_point type="tap" name="tap" yoffset="0" yincr="1"/>
15171517
</spine>
15181518
</clock_network>
15191519

15201520
<clock_network name="rib1" num_inst="2">
15211521
<!-- Full Device: Each Grid Row -->
1522-
<rib metal_layer="global_rib" y="0" startx="0" endx="W" repeatx="W" repeaty="1">
1522+
<rib metal_layer="global_rib" y="0" startx="0" endx="W" repeaty="1">
15231523
<switch_point type="drive" name="drive" xoffset="W/2" switch_name="drive_buff"/>
15241524
<switch_point type="tap" name="tap" xoffset="0" xincr="1"/>
15251525
</rib>

0 commit comments

Comments
 (0)