Skip to content

Commit 6555071

Browse files
committed
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-verilog-to-routing into remove_node
2 parents 851a2cd + 3a6bccc commit 6555071

40 files changed

+247
-328
lines changed

libs/EXTERNAL/libblifparse/src/blif_parser.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ subckt: DOT_SUBCKT STRING { $$ = SubCkt(); $$.model = $2; }
193193
latch: DOT_LATCH STRING STRING {
194194
//Input and output only
195195
callback.lineno(lexer.lineno());
196-
callback.latch($2, $3, LatchType::UNSPECIFIED, "", LogicValue::UNKOWN);
196+
callback.latch($2, $3, LatchType::UNSPECIFIED, "", LogicValue::UNKNOWN);
197197
}
198198
| DOT_LATCH STRING STRING latch_type latch_control {
199199
//Input, output, type and control
200200
callback.lineno(lexer.lineno());
201-
callback.latch($2, $3, $4, $5, LogicValue::UNKOWN);
201+
callback.latch($2, $3, $4, $5, LogicValue::UNKNOWN);
202202
}
203203
| DOT_LATCH STRING STRING latch_type latch_control latch_init {
204204
//Input, output, type, control and init-value
@@ -215,7 +215,7 @@ latch: DOT_LATCH STRING STRING {
215215
latch_init: LOGIC_TRUE { $$ = LogicValue::TRUE; }
216216
| LOGIC_FALSE { $$ = LogicValue::FALSE; }
217217
| LATCH_INIT_2 { $$ = LogicValue::DONT_CARE; }
218-
| LATCH_INIT_3 { $$ = LogicValue::UNKOWN; }
218+
| LATCH_INIT_3 { $$ = LogicValue::UNKNOWN; }
219219
;
220220

221221
latch_control: STRING { $$ = $1;}

libs/EXTERNAL/libblifparse/src/blif_pretty_print.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void BlifPrettyPrinter::latch(std::string input, std::string output, LatchType t
112112
case LogicValue::FALSE: printf("%s0", indent().c_str()); break;
113113
case LogicValue::TRUE: printf("%s1", indent().c_str()); break;
114114
case LogicValue::DONT_CARE: printf("%s2", indent().c_str()); break;
115-
case LogicValue::UNKOWN: printf("%s3", indent().c_str()); break;
115+
case LogicValue::UNKNOWN: printf("%s3", indent().c_str()); break;
116116
default: assert(false);
117117
}
118118
--indent_level_;

libs/EXTERNAL/libblifparse/src/blifparse.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ enum class LogicValue {
108108
FALSE = 0, //Logic zero
109109
TRUE = 1, //Logic one
110110
DONT_CARE, //Don't care
111-
UNKOWN //Unkown (e.g. latch initial state)
111+
UNKNOWN //Unkown (e.g. latch initial state)
112112
};
113113

114114
enum class LatchType {

libs/EXTERNAL/libtatum/libtatum/tatum/base/TimingType.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace tatum {
77
enum class TimingType {
88
SETUP,
99
HOLD,
10-
UNKOWN
10+
UNKNOWN
1111
};
1212

1313
} //namespace

libs/EXTERNAL/libtatum/libtatum/tatum/report/TimingPath.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class TimingPathInfo {
3939
DomainId capture_domain() const { return capture_domain_; }
4040

4141
private:
42-
TimingType path_type_ = TimingType::UNKOWN;
42+
TimingType path_type_ = TimingType::UNKNOWN;
4343

4444
Time delay_;
4545
Time slack_;

libs/EXTERNAL/libtatum/libtatum/tatum/report/graphviz_dot_writer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void GraphvizDotWriter::write_dot_file(std::ostream& os) {
3838
for(NodeId node : nodes_to_dump_) {
3939
node_slacks[node] = std::vector<TimingTag>(); //No slacks
4040
}
41-
TimingType timing_type = TimingType::UNKOWN;
41+
TimingType timing_type = TimingType::UNKNOWN;
4242

4343
write_dot_format(os, node_tags, node_slacks, timing_type);
4444
}
@@ -175,7 +175,7 @@ void GraphvizDotWriter::write_dot_edge(std::ostream& os, const EdgeId edge, cons
175175
} else if (timing_type == TimingType::HOLD) {
176176
os << "\\n"<< delay_calc_.hold_time(tg_, edge) << " (thld)";
177177
} else {
178-
TATUM_ASSERT(timing_type == TimingType::UNKOWN);
178+
TATUM_ASSERT(timing_type == TimingType::UNKNOWN);
179179
//Create both setup and hold edges if type is unknown
180180
os << "\\n"<< -delay_calc_.setup_time(tg_, edge) << " (-tsu)";
181181
os << "\\n"<< delay_calc_.hold_time(tg_, edge) << " (thld)";
@@ -190,7 +190,7 @@ void GraphvizDotWriter::write_dot_edge(std::ostream& os, const EdgeId edge, cons
190190
} else if (timing_type == TimingType::HOLD) {
191191
os << "\\n" << delay_calc_.min_edge_delay(tg_, edge);
192192
} else {
193-
TATUM_ASSERT(timing_type == TimingType::UNKOWN);
193+
TATUM_ASSERT(timing_type == TimingType::UNKNOWN);
194194
os << "\\n" << delay_calc_.max_edge_delay(tg_, edge) << " (tmax)";
195195
os << "\\n" << delay_calc_.min_edge_delay(tg_, edge) << " (tmin)";
196196
}

libs/librrgraph/src/io/rr_graph_reader.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ void load_rr_file(RRGraphBuilder* rr_graph_builder,
6666
const t_arch* arch,
6767
t_chan_width* chan_width,
6868
const e_base_cost_type base_cost_type,
69-
RRSwitchId* wire_to_rr_ipin_switch,
70-
int* wire_to_rr_ipin_switch_between_dice,
7169
const char* read_rr_graph_name,
7270
std::string* loaded_rr_graph_filename,
7371
bool read_edge_metadata,
@@ -90,8 +88,6 @@ void load_rr_file(RRGraphBuilder* rr_graph_builder,
9088
RrGraphSerializer reader(
9189
graph_type,
9290
base_cost_type,
93-
wire_to_rr_ipin_switch,
94-
wire_to_rr_ipin_switch_between_dice,
9591
do_check_rr_graph,
9692
read_rr_graph_name,
9793
loaded_rr_graph_filename,

libs/librrgraph/src/io/rr_graph_reader.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ void load_rr_file(RRGraphBuilder* rr_graph_builder,
2323
const t_arch* arch,
2424
t_chan_width* chan_width,
2525
const e_base_cost_type base_cost_type,
26-
RRSwitchId* wire_to_rr_ipin_switch,
27-
int* wire_to_rr_ipin_switch_between_dice,
2826
const char* read_rr_graph_name,
2927
std::string* loaded_rr_graph_filename,
3028
bool read_edge_metadata,

libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,6 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
274274
RrGraphSerializer(
275275
const e_graph_type graph_type,
276276
const enum e_base_cost_type base_cost_type,
277-
RRSwitchId* wire_to_rr_ipin_switch,
278-
int* wire_to_rr_ipin_switch_between_dice,
279277
bool do_check_rr_graph,
280278
const char* read_rr_graph_name,
281279
std::string* loaded_rr_graph_filename,
@@ -297,9 +295,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
297295
MetadataStorage<std::tuple<int, int, short>>* rr_edge_metadata,
298296
vtr::string_internment* strings,
299297
bool is_flat)
300-
: wire_to_rr_ipin_switch_(wire_to_rr_ipin_switch)
301-
, wire_to_rr_ipin_switch_between_dice_(wire_to_rr_ipin_switch_between_dice)
302-
, chan_width_(chan_width)
298+
: chan_width_(chan_width)
303299
, rr_nodes_(rr_nodes)
304300
, rr_graph_builder_(rr_graph_builder)
305301
, rr_graph_(rr_graph)
@@ -1147,20 +1143,6 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
11471143
return nullptr;
11481144
}
11491145
inline void finish_rr_graph_rr_edges(void*& /*ctx*/) final {
1150-
/*initialize a vector that keeps track of the number of wire to ipin switches
1151-
* There should be only one wire to ipin switch. In case there are more, make sure to
1152-
* store the most frequent switch */
1153-
const auto& rr_graph = (*rr_graph_);
1154-
std::vector<int> count_for_wire_to_ipin_switches;
1155-
count_for_wire_to_ipin_switches.resize(rr_switch_inf_->size(), 0);
1156-
//switch for same layer Track to IPIN connection
1157-
//first is index, second is count
1158-
std::pair<int, int> most_frequent_switch(-1, 0);
1159-
//switch for different layer Track to IPIN connection
1160-
std::vector<int> count_for_wire_to_ipin_switches_between_dice;
1161-
count_for_wire_to_ipin_switches_between_dice.resize(rr_switch_inf_->size(), 0);
1162-
std::pair<int,int> most_frequent_switch_between_dice(-1,0);
1163-
11641146
// Partition the rr graph edges for efficient access to
11651147
// configurable/non-configurable edge subsets. Must be done after RR
11661148
// switches have been allocated.
@@ -1183,36 +1165,8 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
11831165
"switch_id %zu is larger than num_rr_switches %zu",
11841166
switch_id, rr_switch_inf_->size());
11851167
}
1186-
auto node = (*rr_nodes_)[source_node];
1187-
1188-
/*Keeps track of the number of the specific type of switch that connects a wire to an ipin
1189-
* use the pair data structure to keep the maximum*/
1190-
if (rr_graph.node_type(node.id()) == e_rr_type::CHANX || rr_graph.node_type(node.id()) == e_rr_type::CHANY) {
1191-
if(rr_graph.node_type(RRNodeId(sink_node)) == e_rr_type::IPIN){
1192-
if (rr_graph.node_layer_low(RRNodeId(sink_node)) == rr_graph.node_layer_low(RRNodeId(source_node))) {
1193-
count_for_wire_to_ipin_switches[switch_id]++;
1194-
if (count_for_wire_to_ipin_switches[switch_id] > most_frequent_switch.second) {
1195-
most_frequent_switch.first = switch_id;
1196-
most_frequent_switch.second = count_for_wire_to_ipin_switches[switch_id];
1197-
}
1198-
} else {
1199-
VTR_ASSERT(rr_graph.node_layer_low(RRNodeId(sink_node)) != rr_graph.node_layer_low(RRNodeId(source_node)));
1200-
count_for_wire_to_ipin_switches_between_dice[switch_id]++;
1201-
if(count_for_wire_to_ipin_switches_between_dice[switch_id] > most_frequent_switch_between_dice.second){
1202-
most_frequent_switch_between_dice.first = switch_id;
1203-
most_frequent_switch_between_dice.second = count_for_wire_to_ipin_switches_between_dice[switch_id];
1204-
}
1205-
}
1206-
}
1207-
}
12081168
}
12091169
}
1210-
1211-
VTR_ASSERT(wire_to_rr_ipin_switch_ != nullptr);
1212-
*wire_to_rr_ipin_switch_ = (RRSwitchId)most_frequent_switch.first;
1213-
1214-
VTR_ASSERT(wire_to_rr_ipin_switch_between_dice_ != nullptr);
1215-
*wire_to_rr_ipin_switch_between_dice_ = most_frequent_switch_between_dice.first;
12161170
}
12171171

12181172
inline EdgeWalker get_rr_graph_rr_edges(void*& /*ctx*/) final {
@@ -1844,7 +1798,6 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
18441798
segment_inf_y_,
18451799
segment_inf_z_,
18461800
*rr_indexed_data_,
1847-
*wire_to_rr_ipin_switch_,
18481801
base_cost_type_,
18491802
echo_enabled_,
18501803
echo_file_name_);
@@ -2194,8 +2147,6 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
21942147
std::array<uxsd::enum_loc_side, 16> side_map_;
21952148

21962149
// Output for loads, and constant data for writes.
2197-
RRSwitchId* wire_to_rr_ipin_switch_;
2198-
int* wire_to_rr_ipin_switch_between_dice_;
21992150
t_chan_width* chan_width_;
22002151
t_rr_graph_storage* rr_nodes_;
22012152
RRGraphBuilder* rr_graph_builder_;

libs/librrgraph/src/io/rr_graph_writer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ void write_rr_graph(RRGraphBuilder* rr_graph_builder,
4242
RrGraphSerializer reader(
4343
/*graph_type=*/e_graph_type(),
4444
/*base_cost_type=*/e_base_cost_type(),
45-
/*wire_to_rr_ipin_switch=*/nullptr,
46-
/*wire_to_rr_ipin_switch_between_dice=*/nullptr,
4745
/*do_check_rr_graph=*/false,
4846
/*read_rr_graph_name=*/nullptr,
4947
/*read_rr_graph_filename=*/nullptr,

0 commit comments

Comments
 (0)