tilelink icon indicating copy to clipboard operation
tilelink copied to clipboard

fix OH1.scala compile

Open yuchangyuan opened this issue 1 year ago • 4 comments

OH1.scala fail to compile with command mill tilelink.compile, below is last some lines of log:

[info] compiling 12 Scala sources to /home/ycy/proj/hw/tilelink/out/tilelink/compile.dest/classes ...
[error] /home/ycy/proj/hw/tilelink/tilelink/src/utils/OH1.scala:20:33: not found: value Cat
[error]     ((x << 1).asUInt | 1.U) & (~Cat(0.U(1.W), x)).asUInt
[error]                                 ^
[error] one error found
1 targets failed
tilelink.compile Compilation failed             

yuchangyuan avatar Jan 25 '24 03:01 yuchangyuan

Bumping to chisel 6 will fix this issue.

sequencer avatar Jan 25 '24 04:01 sequencer

I think all dependency should managed by mill or by git itself, including chisel. So if chisel version >= 6 is a hard requirement, then I think either build.sc or git submodule dependencies/chisel3 should be fixed.

Bumping to chisel 6 will fix this issue.

yuchangyuan avatar Jan 25 '24 05:01 yuchangyuan

I don't know if I understand 'bumping to chisel 6' correctly, I try to manually checkout v6.0.0 in dependencies/chisel3 directory, and mill tilelink.compile fail with below error message:

Compiling /home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:35: trait Firrtl is abstract; cannot be instantiated
object firrtl extends Cross[Firrtl](v.scalaCrossVersions)
                      ^
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:55: trait Svsim is abstract; cannot be instantiated
object svsim extends Cross[Svsim](v.scalaCrossVersions)
                     ^
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:65: trait FirrtlUnitTest is abstract; cannot be instantiated
object firrtlut extends Cross[FirrtlUnitTest](v.scalaCrossVersions)
                        ^
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:85: trait Macros is abstract; cannot be instantiated
object macros extends Cross[Macros](v.scalaCrossVersions)
                      ^
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:97: trait Core is abstract; cannot be instantiated
object core extends Cross[Core](v.scalaCrossVersions)
                    ^
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:151: trait Plugin is abstract; cannot be instantiated
object plugin extends Cross[Plugin](v.pluginScalaCrossVersions)
                      ^
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:167: trait Chisel is abstract; cannot be instantiated
object chisel extends Cross[Chisel](v.scalaCrossVersions)
                      ^
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:185: trait ChiselUnitTest is abstract; cannot be instantiated
object chiselut extends Cross[ChiselUnitTest](v.scalaCrossVersions)                                                                       
                        ^                                                                                                                 
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:207: trait Stdlib is abstract; cannot be instantiated
object stdlib extends Cross[Stdlib](v.scalaCrossVersions)                                                                                 
                      ^                                                                                                                   
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:234: trait CIRCTPanamaBinder is abstract; cannot be instantiated
object circtpanamabinder extends Cross[CIRCTPanamaBinder](v.scalaCrossVersions)                                                           
                                 ^                                                                                                        
/home/ycy/proj/hw/tilelink/dependencies/chisel3/build.sc:256: trait CIRCTPanamaBinderModuleTest is abstract; cannot be instantiated
object bindertest extends Cross[CIRCTPanamaBinderModuleTest](v.scalaCrossVersions)                                                        
                          ^                                                                                                               
Compilation Failed

yuchangyuan avatar Jan 25 '24 05:01 yuchangyuan

Bumping to chisel 6 will fix this issue.

I think Cat now resides under chisel3.util.Cat after some back and forth: https://github.com/chipsalliance/chisel/commits/main/src/main/scala/chisel3/util/Cat.scala. Bumping versions won't help as far as I can tell.

hovind avatar Jun 13 '24 13:06 hovind

This import is needed for the code to compile

RexYuan avatar Dec 07 '24 19:12 RexYuan