ChiselUtil类中有一个队列,在手册中描述为:
// Generic hardware queue. Required
// parameter entries controls the
// depth of the queues. The width of
// the queue is determined from the
// inputs.
// Example usage:
// val q = new Queue(UInt(), 16)
// q.io.enq <> producer.io.out
// consumer.io.in <> q.io.deq
class Queue[T <: Data]
(type: T, entries: Int,
pipe: Boolean = false,
flow: Boolean = false
flushable: Boolean = false)
extends Module 但是在scala代码中,接口参数是不同的:https://github.com/ucb-bar/chisel/blob/master/src/main/scala/ChiselUtil.scala#L426
在代码中没有“可忽略”的布尔输入。我找不到“管道”和“流量”参数的含义。
有人知道如何使用队列来刷新队列吗?
发布于 2015-09-21 20:36:51
flushable参数不存在。不知道这是什么意思。但是,有一种方法可以通过点击`_reset的参数清除队列,如下所示:
val my_queue = Module(new Queue(gen = new MyBundle,
entries = queue_sz,
pipe = false,
flow = true,
_reset = (kill_queue || reset.toBool)))flow参数指定是否可以在同一周期使用输入(输入“流”立即通过队列)。“有效”信号是耦合的。
pipe参数指定“就绪”信号是否以组合方式耦合。这允许一个入口队列以完全吞吐量运行(如管道)。
https://stackoverflow.com/questions/32647523
复制相似问题