Skip to content

Commit f3be532

Browse files
fix: use unshifted variable metadata for clock inference
1 parent 8c39365 commit f3be532

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ModelingToolkitTearing/src/clock_inference/clock_inference.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ function infer_clocks!(ci::ClockInference)
199199
unshifted = args[1]
200200
add_edge!(inference_graph, (
201201
ClockVertex.Variable(i), ClockVertex.Variable(var_to_idx[unshifted])))
202+
td = get_time_domain(unshifted)
203+
if td isa TimeDomain
204+
add_edge!(inference_graph, (ClockVertex.Variable(i), ClockVertex.Clock(td)))
205+
end
202206
end
203207
_ => nothing
204208
end

0 commit comments

Comments
 (0)