在凿子中编译 switch case 语句时出现问题

problem compiling a switch case statement in chisel

我正在为我的状态机编写一个简单的开关盒。但是,在调用 sbt test 之后,我收到以下错误:

在提问时包括 Chisel 的版本和你的代码是非常重要的,但幸运的是,这个作为 https://github.com/chipsalliance/chisel3/pull/1595.

敲响了警钟

您可以通过导入 chisel3.util._ 解决此问题。更好的解决方案是更新您的 Chisel 版本,此错误已在 v3.2.8、v3.3.3 和 v3.4.0(及更新版本)版本中修复。