代码拉取完成,页面将自动刷新
// See LICENSE.txt for license details.
package examples
import chisel3.iotesters.{PeekPokeTester, Driver, ChiselFlatSpec}
class sub32Tests(c: sub32) extends PeekPokeTester(c) {
for (t <- 0 until 16) {
val rnd0 = rnd.nextInt(16)
val rnd1 = rnd.nextInt(16)
poke(c.io.in1, rnd0)
poke(c.io.in2, rnd1)
step(1)
val rsub = rnd0+(~rnd1)+1
expect(c.io.out, rsub)
}
}
class sub32Tester extends ChiselFlatSpec {
behavior of "sub32"
backends foreach {backend =>
it should s"correctly add randomly generated numbers $backend" in {
Driver(() => new sub32, backend)(c => new sub32Tests(c)) should be (true)
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。