Skip to content

Commit

Permalink
Merge pull request #3372 from chipsalliance/mergify/bp/master/pr-3366
Browse files Browse the repository at this point in the history
Make AsyncQueue use Rawmodule (backport #3366)
  • Loading branch information
jerryz123 authored May 18, 2023
2 parents 78c43fe + 84dca8f commit 55c30bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/main/scala/util/AsyncQueue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,8 @@ object ToAsyncBundle

class AsyncQueue[T <: Data](gen: T, params: AsyncQueueParams = AsyncQueueParams()) extends Crossing[T] {
val io = IO(new CrossingIO(gen))
val source = Module(new AsyncQueueSource(gen, params))
val sink = Module(new AsyncQueueSink (gen, params))

source.clock := io.enq_clock
source.reset := io.enq_reset
sink.clock := io.deq_clock
sink.reset := io.deq_reset
val source = withClockAndReset(io.enq_clock, io.enq_reset) { Module(new AsyncQueueSource(gen, params)) }
val sink = withClockAndReset(io.deq_clock, io.deq_reset) { Module(new AsyncQueueSink (gen, params)) }

source.io.enq <> io.enq
io.deq <> sink.io.deq
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/util/Crossing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ class CrossingIO[T <: Data](gen: T) extends Bundle {
val deq = Decoupled(gen)
}

abstract class Crossing[T <: Data] extends Module {
abstract class Crossing[T <: Data] extends RawModule {
val io: CrossingIO[T]
}

0 comments on commit 55c30bb

Please sign in to comment.