0

我正在尝试从 Github设置Sodor 处理器集合(RISC-V)。我的主要目标是在我自己的凿子项目中设置 1-Stage 处理器,以便对其进行修改并可能编写一个 scala 测试平台。

目前我正在做以下事情:

  1. 将凿子模板项目克隆到我的本地机器

  2. 在根文件夹中执行“sbt eclipse”(使用此工具)。为了能够在 Eclipse 中导入它

  3. 在 Eclipse Luna 中导入项目模板

  4. 从我的 project-templates src/ 文件夹中的 Sodor Projects src/ 文件夹中复制common/rv32_1stage/文件夹。

然后看起来像这样:

在此处输入图像描述

但是,Eclipse 显示 72 个错误:

    not found: object Node  configurations.scala    /riscv-sodor-own/src/main/scala/common  line 4  Scala Problem
    not found: object Node  consts.scala    /riscv-sodor-own/src/main/scala/rv32_1stage line 13 Scala Problem
    not found: object Node  core.scala  /riscv-sodor-own/src/main/scala/rv32_1stage line 21 Scala Problem
    not found: object Node  cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 11 Scala Problem
    not found: object Node  csr.scala   /riscv-sodor-own/src/main/scala/common  line 13 Scala Problem
    not found: object Node  decode.scala    /riscv-sodor-own/src/main/scala/common  line 4  Scala Problem
    not found: object Node  dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 12 Scala Problem
    not found: object Node  htif.scala  /riscv-sodor-own/src/main/scala/common  line 4  Scala Problem
    not found: object Node  instructions.scala  /riscv-sodor-own/src/main/scala/common  line 6  Scala Problem
    not found: object Node  memory.scala    /riscv-sodor-own/src/main/scala/common  line 21 Scala Problem
    not found: object Node  tile.scala  /riscv-sodor-own/src/main/scala/rv32_1stage line 10 Scala Problem
    not found: object Node  top.scala   /riscv-sodor-own/src/main/scala/rv32_1stage line 4  Scala Problem
    not found: object Node  util.scala  /riscv-sodor-own/src/main/scala/common  line 9  Scala Problem
    not found: value Lit    decode.scala    /riscv-sodor-own/src/main/scala/common  line 20 Scala Problem
    not found: value Lit    decode.scala    /riscv-sodor-own/src/main/scala/common  line 20 Scala Problem
    not found: value Lit    util.scala  /riscv-sodor-own/src/main/scala/common  line 131    Scala Problem
    not found: value Literal    decode.scala    /riscv-sodor-own/src/main/scala/common  line 11 Scala Problem
    overloaded method value apply with alternatives:   (x: String,radix: Int)scala.math.BigInt <and>   (numbits: Int,rnd: scala.util.Random)scala.math.BigInt <and>   (signum: Int,magnitude: Array[Byte])scala.math.BigInt  cannot be applied to (Any, Int)    decode.scala    /riscv-sodor-own/src/main/scala/common  line 12 Scala Problem
    overloaded method value apply with alternatives:   (x: String,radix: Int)scala.math.BigInt <and>   (numbits: Int,rnd: scala.util.Random)scala.math.BigInt <and>   (signum: Int,magnitude: Array[Byte])scala.math.BigInt  cannot be applied to (Any, Int)    decode.scala    /riscv-sodor-own/src/main/scala/common  line 12 Scala Problem
    overloaded method value apply with alternatives:   [T <: chisel3.core.Data](size: Int, t: T)chisel3.core.Mem[T] <and>   [T <: chisel3.core.Data](t: T, size: Int)chisel3.core.Mem[T]  cannot be applied to (chisel3.core.UInt, Int, seqRead: Boolean)   memory.scala    /riscv-sodor-own/src/main/scala/common  line 86 Scala Problem
    overloaded method value apply with alternatives:   [T <: chisel3.core.Data](size: Int, t: T)chisel3.core.Mem[T] <and>   [T <: chisel3.core.Data](t: T, size: Int)chisel3.core.Mem[T]  cannot be applied to (chisel3.core.UInt, Int, seqRead: Boolean)   memory.scala    /riscv-sodor-own/src/main/scala/common  line 87 Scala Problem
    type mismatch;  found   : Any  required: chisel3.core.Data  cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 139    Scala Problem
    type mismatch;  found   : Any  required: chisel3.core.Data  cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 140    Scala Problem
    type mismatch;  found   : Any  required: chisel3.core.Data  cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 141    Scala Problem
    type mismatch;  found   : Any  required: chisel3.core.Data  cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 142    Scala Problem
    type mismatch;  found   : Any  required: chisel3.core.Data  cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 158    Scala Problem
    type mismatch;  found   : Any  required: chisel3.core.Data  cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 159    Scala Problem
    type mismatch;  found   : Any  required: chisel3.core.Data  cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 181    Scala Problem
    type mismatch;  found   : Array[(chisel3.core.UInt, List[chisel3.core.UInt])]  required: Array[(chisel3.util.BitPat, List[?])]  cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 52 Scala Problem
    type mismatch;  found   : chisel3.core.Bool  required: Int  dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 104    Scala Problem
    type mismatch;  found   : chisel3.core.Bool  required: Int  dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 105    Scala Problem
    type mismatch;  found   : chisel3.core.Bool  required: Int  dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 106    Scala Problem
    type mismatch;  found   : chisel3.core.Bool  required: Int  dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 108    Scala Problem
    type mismatch;  found   : chisel3.core.Bool  required: Int  dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 227    Scala Problem
    type mismatch;  found   : chisel3.core.SInt  required: chisel3.core.UInt    csr.scala   /riscv-sodor-own/src/main/scala/common  line 240    Scala Problem
    type mismatch;  found   : chisel3.core.UInt  required: Int  dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 101    Scala Problem
    type mismatch;  found   : chisel3.core.UInt  required: Int  dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 107    Scala Problem
    type mismatch;  found   : Int(11)  required: chisel3.UInt     (which expands to)  chisel3.core.UInt dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 108    Scala Problem
    type mismatch;  found   : Int(12)  required: chisel3.UInt     (which expands to)  chisel3.core.UInt dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 107    Scala Problem
    type mismatch;  found   : Int(19)  required: chisel3.UInt     (which expands to)  chisel3.core.UInt dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 106    Scala Problem
    type mismatch;  found   : Int(20)  required: chisel3.UInt     (which expands to)  chisel3.core.UInt dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 104    Scala Problem
    type mismatch;  found   : Int(20)  required: chisel3.UInt     (which expands to)  chisel3.core.UInt dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 105    Scala Problem
    type mismatch;  found   : Int(27)  required: chisel3.UInt     (which expands to)  chisel3.core.UInt dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 101    Scala Problem
    type mismatch;  found   : Int(32)  required: chisel3.UInt     (which expands to)  chisel3.core.UInt dpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 227    Scala Problem
    value & is not a member of Chisel.Bits  decode.scala    /riscv-sodor-own/src/main/scala/common  line 20 Scala Problem
    value & is not a member of Chisel.Bits  util.scala  /riscv-sodor-own/src/main/scala/common  line 31 Scala Problem
    value & is not a member of Chisel.Bits  util.scala  /riscv-sodor-own/src/main/scala/common  line 41 Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 123    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 124    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 125    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 126    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 127    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 128    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 129    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 130    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 131    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 147    Scala Problem
    value === is not a member of Any    cpath.scala /riscv-sodor-own/src/main/scala/rv32_1stage line 147    Scala Problem
    value === is not a member of Chisel.Bits    decode.scala    /riscv-sodor-own/src/main/scala/common  line 20 Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 182    Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 182    Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 183    Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 183    Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 184    Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 184    Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 211    Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 212    Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 213    Scala Problem
    value === is not a member of Chisel.Bits    memory.scala    /riscv-sodor-own/src/main/scala/common  line 214    Scala Problem
    value litOf is not a member of Chisel.Bits  decode.scala    /riscv-sodor-own/src/main/scala/common  line 9  Scala Problem
    value litOf is not a member of Chisel.Bits  decode.scala    /riscv-sodor-own/src/main/scala/common  line 38 Scala Problem
    value litOf is not a member of Chisel.Bits  decode.scala    /riscv-sodor-own/src/main/scala/common  line 38 Scala Problem

如果我直接将克隆的 Sodor Processor Collection 项目从 github 导入到 eclipse 中,它不会显示任何错误。但据我了解,我无法在那里编写 scala 测试平台。

我非常想知道是否可以创建一个 src/main/scala/test/ 文件夹并为 Sodor 处理器集合编写一个scala 测试平台,就像在凿子教程中总是这样做的一样(例如这里

我最好的猜测是,我必须正确配置 build.sbt 文件,但我不知道如何。(如果我对这个设置完全错误或错过了什么,请告诉我。)

简而言之

- Eclipse 中的 Sodor 处理器集合?

- Sodor 处理器集合的 Scala 测试平台?

- 如果以上是肯定的,如何解决错误?

编辑

经过一些研究,我认为主要问题在于凿子版本的兼容性。我找到了 Chisel3 vs. Chisel 2并看到了这个:

the Node class and object no longer exist (the class should have been private in Chisel2)

通过删除所有不必要的导入 Node._行,我消除了 13 个错误。但是还有59个..

4

0 回答 0