- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
尝试像那样用 SteppedHWIOTester 测试用凿子编写的 asyncFifo
class AsyncFifo(width: Int, depth: Int, syncStages: Int) extends Module {
val length = log2Ceil(depth)
val io = IO(new Bundle {
val clk_write = Input(Clock())
val clk_read = Input(Clock())
val rstn_write = Input(Bool())
val rstn_read = Input(Bool())
val deq = Decoupled(UInt(width.W))
val enq = Flipped(Decoupled(UInt(width.W)))
})
val memory = Mem(depth, UInt(width.W))
val reader: reader = withClock(io.clk_read)( Module(new reader(width, depth, syncStages)) )
val writer: writer = withClock(io.clk_write)( Module(new writer(width, depth, syncStages)) )
//some connections here...
}
class AsyncFifoHardWareTester extends SteppedHWIOTester {
val device_under_test = Module(new AsyncFifo(32, 32, 2))
val c = device_under_test
enable_all_debug = true
step(2)
poke(c.io.enq.bits, 0x11L)
poke(c.io.enq.valid, 0x1L)
step(2)
poke(c.io.enq.bits, 0x11L)
poke(c.io.enq.valid, 0x0L)
step(2)
expect(c.io.deq.valid, 0x11L)
expect(c.io.deq.bits, 0x0L)
}
Tester 生成vcd,其中clk_write 和clk_read 由零驱动。有什么方法可以在 HW 或 PeekPoke 测试仪中声明异步时钟及其比率?
最佳答案
不幸的是,目前的答案是否定的,chisel-testers repo 没有测试多个时钟的设施。凿子团队正在努力清理和改进凿子测试仪,请参阅:Chisel3 Issues: Testers Unification看到一些激励性的讨论。同样正在进行的是对 firrtl 解释器的重写,它将明确支持多个时钟,但这可能还需要几个月的时间。
人们自己做到了这一点。您也可以在 Chisel Users Group 上尝试这个问题
关于scala - 具有多时钟域的凿子测试仪 SteppedHWIOTester,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47033706/
时钟门控对于降低功耗很重要。我们如何在 Chisel 中指定时钟门控? 时钟门控是逻辑信号确定特定寄存器的时钟是否被触发的地方。当逻辑信号无效时,时钟保持稳定不变。只有当使能有效时,时钟信号才会切换,
我最近将我的一个大项目的 Chisel 版本从 3.1.1 更新到 3.4.0;但是,我得到了一堆 firrtl.passes.CheckHighFormLike$DefnameDifferentPo
是否有可能在 Chisel“switch”语句中使用类似于 Verilog“默认”情况的 Chisel“is”条件?这是为了防止从 FSM 推断出组合输出的锁存器。 Verilog 示例: mod
我是一名优秀的程序员,十分优秀!