Q1:
Q1:
Q1:
Q1:
[ ] BitPat length bugs
BitPat.pare("b1100_0000") = (192,255,9)
实际8bit,返回9bit
BitPat.pare("b11000000") = (192,255,8)
1 | 35: (bits, mask, x.length - 1) |
[ ] bug2
There are several reasons why a name may be disappearing.
Constant Propagation
For many reasons, including interoperability with existing CAD tools, performance, and Verilog debug-ability, Chisel (actually the FIRRTL compiler underneath Chisel) will propagate constants and direct wire connections. For example:
1 | 实例1 |
同样的一份代码
src/main/scala/GCD.scala
src/test/scala/GCDTester.scala
其中生成vcd波形的代码1
2
3
4
5object GCDTester extends App {
iotesters.Driver.execute(Array("--target-dir", "generated", "--fint-write-vcd"), () => new GCD){
c => new GCDTests(c)
}
}
1 | 方法1 |
方法2是不是带优先级? 实际上是不带优先级
逻辑上if取的条件都是addr1的值,一定是互斥的,综合工具也能自动识别出这种if else
它有别于以下这种情况,这种情况下是真实带有优先级的电路,其中another_cond_A,another_cond_B
是独立的两个输入条件,和addr1的取值可能同时发生,所以不能被综合器当做查找表来对待。