1
0

tilelink2 Crossing: these asserts should be done by the AsyncQueue

This commit is contained in:
Wesley W. Terpstra 2016-10-14 16:54:09 -07:00
parent a82cfb8306
commit 8f3c2ddfc3

View File

@ -25,15 +25,10 @@ class TLAsyncCrossingSource(sync: Int = 3) extends LazyModule
out.a <> ToAsyncBundle(in.a, depth, sync)
in.d <> FromAsyncBundle(out.d, sync)
assert (!in.a.valid || sink_reset_n, "A channel request sent to a missing manager")
if (bce) {
in.b <> FromAsyncBundle(out.b, sync)
out.c <> ToAsyncBundle(in.c, depth, sync)
out.e <> ToAsyncBundle(in.e, depth, sync)
assert (!in.c.valid || sink_reset_n, "C channel response sent to a missing manager")
assert (!in.e.valid || sink_reset_n, "E channel response sent to a missing manager")
} else {
in.b.valid := Bool(false)
in.c.ready := Bool(true)
@ -63,14 +58,10 @@ class TLAsyncCrossingSink(depth: Int = 8, sync: Int = 3) extends LazyModule
out.a <> FromAsyncBundle(in.a, sync)
in.d <> ToAsyncBundle(out.d, depth, sync)
assert (!out.d.valid || source_reset_n, "D channel respose sent to missing client")
if (bce) {
in.b <> ToAsyncBundle(out.b, depth, sync)
out.c <> FromAsyncBundle(in.c, sync)
out.e <> FromAsyncBundle(in.e, sync)
assert (!out.b.valid || source_reset_n, "B channel request sent to missing client")
} else {
in.b.widx := UInt(0)
in.c.ridx := UInt(0)