Skip to content

Commit c768992

Browse files
committed
[libs][ligraph] raise error if segment length doesn't match the one in architectureile
1 parent ec8fee7 commit c768992

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,13 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
13571357
segment->name.c_str(), name);
13581358
}
13591359
}
1360-
inline void set_segment_length(int /*length*/, const t_segment_inf*& /*segment*/) final {}
1360+
inline void set_segment_length(int length, const t_segment_inf*& segment) final {
1361+
if (segment->length != length) {
1362+
report_error(
1363+
"Architecture file does not match RR graph's length: arch uses %d, RR graph uses %d",
1364+
segment->length, length);
1365+
}
1366+
}
13611367
inline uxsd::enum_segment_res_type get_segment_res_type(const t_segment_inf*& segment) final {
13621368
return to_uxsd_segment_res_type(segment->res_type);
13631369
}

0 commit comments

Comments
 (0)