Skip to content

Commit

Permalink
Merge pull request #1423 from louiecaulfield/dev
Browse files Browse the repository at this point in the history
Correct frequency calculation in newSlowedClockDomain
  • Loading branch information
Dolu1990 committed May 24, 2024
2 parents cdba6ab + 494e1fb commit 776c0ee
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions core/src/main/scala/spinal/core/ClockDomain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def renamePulledWires(clock : String = null,
}

def newSlowedClockDomain(freq: HertzNumber): ClockDomain = {
val currentFreq = ClockDomain.current.frequency.getValue.toBigDecimal
val currentFreq = frequency.getValue.toBigDecimal
freq match {
case x if x.toBigDecimal > currentFreq => SpinalError("To high frequancy")
case x => newClockDomainSlowedBy((currentFreq/freq.toBigDecimal).toBigInt)
Expand Down Expand Up @@ -497,8 +497,3 @@ def renamePulledWires(clock : String = null,
}
}
}





0 comments on commit 776c0ee

Please sign in to comment.