Skip to content

Commit ac1cbab

Browse files
authored
add clock divider support
1 parent a913cfa commit ac1cbab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/shell/IOShell.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ class SDC(val name: String)
100100
addRawClock(s"set_input_jitter ${name} ${jitterNs}")
101101
}
102102

103-
def addDerivedClock(name: => String, source: => IOPin, sink: => IOPin) {
104-
addRawClock(s"create_generated_clock -name ${name} -divide_by 1 -source ${source.sdcPin} ${sink.sdcPin}")
103+
def addDerivedClock(name: => String, source: => IOPin, sink: => IOPin, div: => Int = 1) {
104+
addRawClock(s"create_generated_clock -name ${name} -divide_by ${div} -source ${source.sdcPin} ${sink.sdcPin}")
105105
}
106106

107107
def addGroup(clocks: => Seq[String] = Nil, pins: => Seq[IOPin] = Nil) {

0 commit comments

Comments
 (0)