chisel - firrtl_interpreter.InterpreterException: error: ConcreteSInt(303, 9) bad width 9 需要 10
问题描述
我有一个生成以下 FIRRTL 的模块
module Deep_1 :
input clock : Clock
input reset : UInt<1>
output io : {in : {flip data : SInt<8>[4]}, constIn : {flip data : SInt<8>[4]}, ...}
...
... (elided)
...
wire inputData : SInt<8>[4] @[Deep.scala 32:23]
wire constInputData : SInt<8>[4] @[Deep.scala 33:28]
reg outputData : SInt<8>[4], clock @[Deep.scala 34:23]
inputData[2] <= io.in.data[2] @[Deep.scala 37:18]
constInputData[2] <= io.constIn.data[2] @[Deep.scala 38:23]
node _T_209 = add(inputData[2], constInputData[2]) @[package.scala 32:44]
node _T_210 = tail(_T_209, 1) @[package.scala 32:44]
node _T_211 = asSInt(_T_210) @[package.scala 32:44]
outputData[2] <= _T_211 @[Deep.scala 39:19]
...
... (elided)
...
但是当我尝试通过 firrtl 解释器运行测试时,我得到了
Exception during evaluation: error: ConcreteSInt(303, 9) bad width 9 needs 10 @[package.scala 32:44:@82.4]
Expression Evaluation stack
0 dut.outputData_2:Reg -> dut._T_211
1 dut._T_211:Node -> asSInt(dut._T_210)
2 dut._T_210:Node -> tail(dut._T_209, 1)
3 dut._T_209:Node -> add(dut.inputData_2, dut.constInputData_2)
如果我理解正确的话,就是说宽度outputData[2]
是 9 但需要 10。但是,据我所见,两者的宽度outputData[2]
应该_T_211
是 8,第一个是定义的,第二个是应用了add()
andtail()
操作的结果。
我错过了什么?
解决方案
你的软件有多流行?我无法重现当前版本的解释器的问题。我在 gist Attempt 中使用了以下 firrtl 测试来重现我未省略的 firrtl-interpreter 宽度错误。正如@Kamyar 所说,您可以尝试使用 Treadle 后端吗?在这一点上,它比解释器更现代,得到更好的支持。
推荐阅读
- sql - 如何使用 sqlite_bind_text 将文本正确绑定到 SQLite 准备语句
- linux - 如何使用 linux 命令或其他方式查找 MarkLogic v9 Data Hub 版本
- mysql - java.sql.SQLException:在 JBoss 中未使用 MySQL 数据源选择数据库
- javascript - 如何使用字符串名称访问数组 (Javascript)
- javascript - 了解 Vuejs 中属性的执行顺序
- sql - 使用 sequelize 计算 where 查询编码
- python - df。drop 导致 &: 'float' 和 'bool' 的操作数类型不受支持
- javascript - 在滚动时隐藏导航栏不会使导航栏在向上滚动后固定到位
- ios - UNUserNotificationCenterDelegate didReceive 响应没有被调用
- shopify - 如何在自定义 shopify 部分中添加 url 选项