Skip to content

Commit 2f579f5

Browse files
committed
Whoops, should also generate "output" clocks in docs
1 parent f3e7faa commit 2f579f5

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/dev_aid/gen_docs.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,18 @@ fn build_interface_block(md: &Module, ft: &FileText) -> String {
171171
for (dom_id, dom_info) in &md.latency_domains {
172172
if prev_clock != Some(dom_info.clock) {
173173
let clock = &md.clocks[dom_info.clock];
174-
if clock.name_span.is_some() {
175-
out.push_str(&format!(" clock {}\n", clock.name));
174+
match clock.visibility {
175+
ClockVisibility::Input => {
176+
if clock.name_span.is_some() {
177+
out.push_str(&format!(" clock {}\n", clock.name));
178+
}
179+
}
180+
ClockVisibility::Output => {
181+
out.push_str(&format!(" output clock {}\n", clock.name));
182+
}
183+
ClockVisibility::Local => {
184+
unreachable!("Local clocks cannot be visible on the interface")
185+
}
176186
}
177187
prev_clock = Some(dom_info.clock);
178188
}

0 commit comments

Comments
 (0)