Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error with dana emulator #48

Open
kevinyuan opened this issue Dec 10, 2017 · 9 comments
Open

Compilation error with dana emulator #48

kevinyuan opened this issue Dec 10, 2017 · 9 comments

Comments

@kevinyuan
Copy link

Dear DANA team,

I encountered a compilation error with dana, and can't find any clue from google.

Can you help me out?

The following are my environment information, cmd to compile dana emulator, and the screen ouput.

Let me know if any other information is required.

Thanks and regards.


OS X 10.12.3
java version "1.8.0_152"

------ cmd --------

make CONFIG=DanaEmulatorConfig ROCKETCHIP_ADDONS=dana

-------- screen log -----

[info] Compiling 266 Scala sources to /Users/kevinyuan/works/dana/rocket-chip/target/scala-2.11/classes...
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:8: not found: object cde
[error] import cde._
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/Dana.scala:10: not found: object cde
[error] import cde._
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:9: not found: object cde
[error] import cde._
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:11: object util is not a member of package
[error] import root.util.ParameterizedBundle
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:83: not found: type ParameterizedBundle
[error] extends ParameterizedBundle()(p) with HasCoreParameters
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:8: not found: object rocket
[error] import rocket.{RoCC, HasCoreParameters, CoreModule, CoreBundle}
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:83: not found: type HasCoreParameters
[error] extends ParameterizedBundle()(p) with HasCoreParameters
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:12: not found: type Parameters
[error] class ActivationFunctionReq(implicit p: Parameters) extends DanaBundle()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/Dana.scala:220: not found: type Parameters
[error] abstract class DanaBundle(implicit p: Parameters) extends XFilesBundle()(p)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/Dana.scala:32: not found: type Parameters
[error] implicit val p: Parameters
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:82: not found: type Parameters
[error] abstract class XFilesBundle(implicit val p: Parameters)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:49: not found: type Parameters
[error] implicit val p: Parameters
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:21: not found: type Parameters
[error] class ActivationFunctionReqLearn(implicit p: Parameters)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/abi/Encodings.scala:6: not found: object cde
[error] import cde.{Parameters, Field}
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/abi/Encodings.scala:11: not found: type Field
[error] case object GlobalInfo extends Field[GlobalInfo_t]
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:24: overloaded method value p with alternatives:
[error]
[error] =>
[error] cannot be applied to (dana.abi.GlobalInfo.type)
[error] val errorFunction = UInt(p(GlobalInfo).error_function.W)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:27: not found: type Parameters
[error] class ActivationFunctionResp(implicit p: Parameters) extends DanaBundle()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:31: not found: type Parameters
[error] class ActivationFunctionInterface(implicit p: Parameters) extends DanaBundle()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:36: not found: type Parameters
[error] class ActivationFunctionInterfaceLearn(implicit p: Parameters)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:124: not found: type CoreModule
[error] abstract class XFilesModule(implicit p: Parameters) extends CoreModule()(p)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:41: not found: type Parameters
[error] class DSP(implicit p: Parameters) extends DanaModule()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/Dana.scala:115: not found: type Parameters
[error] abstract class DanaModule(implicit p: Parameters) extends XFilesModule()(p)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:42: not found: value IO
[error] val io = IO(new Bundle {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:51: not found: type Parameters
[error] class ActivationFunction(id: Int = 0)(implicit p: Parameters) extends DanaModule()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/ActivationFunction.scala:243: not found: type Parameters
[error] class ActivationFunctionLearn(id: Int = 0)(implicit p: Parameters)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:8: not found: object rocket
[error] import rocket.{HellaCacheReq, MT_D}
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:9: not found: object uncore
[error] import uncore.tilelink.{HasTileLinkParameters, ClientUncachedTileLinkIO, Get,
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:11: not found: object uncore
[error] import uncore.util._
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:12: not found: object uncore
[error] import uncore.agents.{CacheBlockBytes}
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:13: not found: object cde
[error] import cde._
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:34: not found: type Parameters
[error] class ANTWXFilesInterface(implicit p: Parameters) extends DanaBundle()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:35: not found: type ClientUncachedTileLinkIO
[error] val autl = new ClientUncachedTileLinkIO()(p)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:38: not found: type Parameters
[error] class AsidNnidTableWalkerInterface(implicit p: Parameters) extends DanaStatusIO()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/Dana.scala:287: not found: type Parameters
[error] class DanaStatusIO(implicit p: Parameters) extends DanaBundle()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/Cache.scala:8: not found: object cde
[error] import cde._
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/Cache.scala:63: not found: type Parameters
[error] class CacheAntwInterface(implicit p: Parameters) extends DanaBundle()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:43: not found: type Parameters
[error] class HellaCacheReqWithCore(implicit p: Parameters) extends DanaBundle()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:44: not found: type HellaCacheReq
[error] val req = new HellaCacheReq()(p)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:48: not found: type HasTileLinkParameters
[error] with HasTileLinkParameters {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:47: not found: type Parameters
[error] class ConfigRobEntry(implicit p: Parameters) extends DanaBundle()(p)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:50: not found: value tlDataBits
[error] val data = Vec(bitsPerBlock / tlDataBits, UInt(tlDataBits.W))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:54: not found: type HasTileLinkParameters
[error] with XFilesSupervisorRequests with HasTileLinkParameters
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:53: not found: type Parameters
[error] class AsidNnidTableWalker(implicit p: Parameters) extends DanaModule()(p)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:57: not found: value IO
[error] val io = IO(new AsidNnidTableWalkerInterface)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/Dana.scala:19: not found: type Field
[error] case object CacheSizeBytes extends Field[Int]
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:66: overloaded method value p with alternatives:
[error]
[error] =>
[error] cannot be applied to (dana.CacheSizeBytes.type)
[error] val configReqCount = Reg(UInt((log2Up(p(CacheSizeBytes) * 8 / xLen)).W))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:66: not found: value xLen
[error] val configReqCount = Reg(UInt((log2Up(p(CacheSizeBytes) * 8 / xLen)).W))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/Cache.scala:38: not found: type Parameters
[error] class CacheAntwReq(implicit p: Parameters) extends DanaBundle()(p) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:93: not found: value xLen
[error] val interruptCode = Reg(init = 0.U(xLen.W))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:98: not found: value tlBeatAddrBits
[error] val autlBlockOffset = tlBeatAddrBits + tlByteAddrBits
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:98: not found: value tlByteAddrBits
[error] val autlBlockOffset = tlBeatAddrBits + tlByteAddrBits
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:99: not found: value xLen
[error] val autlAddr = Wire(UInt(xLen.W))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:103: not found: value Get
[error] val get = Get(client_xact_id = 0.U,
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:103: not found: value client_xact_id
[error] val get = Get(client_xact_id = 0.U,
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:107: not found: value operand_size
[error] operand_size = MT_D,
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:108: not found: value alloc
[error] alloc = false.B)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:109: not found: value GetBlock
[error] val getBlock = GetBlock(addr_block = addr_block, alloc = false.B)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:109: not found: value alloc
[error] val getBlock = GetBlock(addr_block = addr_block, alloc = false.B)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:110: not found: value tlDataBits
[error] val putData = Wire(UInt(tlDataBits.W))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:111: not found: value PutBlock
[error] val putBlock = PutBlock(client_xact_id = 0.U,
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:111: not found: value client_xact_id
[error] val putBlock = PutBlock(client_xact_id = 0.U,
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:114: not found: value data
[error] data = putData)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:119: not found: value xLen
[error] val autlAddr_d = Reg(UInt(xLen.W))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:120: not found: value tlDataBits
[error] val autlAddrWord_d = tlDataBits compare xLen match {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:120: not found: value xLen
[error] val autlAddrWord_d = tlDataBits compare xLen match {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:125: not found: value tlDataBits
[error] val autlDataGetVec = Wire(Vec(tlDataBits / xLen, UInt(xLen.W)))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:125: not found: value xLen
[error] val autlDataGetVec = Wire(Vec(tlDataBits / xLen, UInt(xLen.W)))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:125: not found: value xLen
[error] val autlDataGetVec = Wire(Vec(tlDataBits / xLen, UInt(xLen.W)))
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:167: value valid is not a member of Any
[error] loadRob.valid map (x => x := false.B)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:217: not found: value CacheBlockBytes
[error] addr(log2Up(p(CacheBlockBytes)) - 1, 0) === 0.U }
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:246: not found: value tlByteAddrBits
[error] case 1 => addr(tlByteAddrBits + log2Up(bitsPerBlock/tlDataBits) - 1,
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:247: not found: value tlByteAddrBits
[error] tlByteAddrBits)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:256: value data is not a member of Any
[error] loadRob.data(beatOffset) := gnt.bits.data
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:257: value valid is not a member of Any
[error] loadRob.valid(beatOffset) := true.B
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:18: not found: type Field
[error] case object EnablePrintfs extends Field[Boolean]
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:259: overloaded method value p with alternatives:
[error]
[error] =>
[error] cannot be applied to (xfiles.EnablePrintfs.type)
[error] if (p(EnablePrintfs)) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:263: not found: value tlByteAddrBits
[error] (tlByteAddrBits + log2Up(beatsPerResp) - 1).U, tlByteAddrBits.U,
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:263: not found: value tlByteAddrBits
[error] (tlByteAddrBits + log2Up(beatsPerResp) - 1).U, tlByteAddrBits.U,
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/xfiles/XFiles.scala:19: not found: type Field
[error] case object EnableAsserts extends Field[Boolean]
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:265: overloaded method value p with alternatives:
[error]
[error] =>
[error] cannot be applied to (xfiles.EnableAsserts.type)
[error] if (p(EnableAsserts)) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:266: value valid is not a member of Any
[error] assert(!(loadRob.valid(beatOffset) & !io.cache.load.valid),
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:278: value valid is not a member of Any
[error] when (loadRob.valid.asUInt.andR) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:284: value valid is not a member of Any
[error] loadRob.valid.map(_ := false.B)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:310: value data is not a member of Any
[error] storeRob.data.size)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:312: not found: value tlDataBeats
[error] tlDataBeats)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:320: value valid is not a member of Any
[error] val dataReady = storeRob.valid.asUInt.orR
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:330: value valid is not a member of Any
[error] storeRob.valid map (_ := true.B)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:331: value data is not a member of Any
[error] storeRob.data := (storeRob.data.cloneType).fromBits(io.cache.store.resp.bits)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:331: value data is not a member of Any
[error] storeRob.data := (storeRob.data.cloneType).fromBits(io.cache.store.resp.bits)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:339: type mismatch;
[error] found : Any
[error] required: chisel3.core.Bool
[error] when (put_sent) { gntWait := true.B }
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:349: value valid is not a member of Any
[error] when (acq.fire()) { storeRob.valid(rob_index) := false.B
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:351: not found: value tlByteAddrBits
[error] configPointer := configPointer + (1.U << tlByteAddrBits)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:378: not found: value reset
[error] when (reset) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:379: value valid is not a member of Any
[error] loadRob.valid map (_ := false.B)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:380: value valid is not a member of Any
[error] storeRob.valid map (_ := false.B) }
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:406: value valid is not a member of Any
[error] when (loadRob.valid.asUInt.andR) {
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:408: value data is not a member of Any
[error] cacheIdx, done, cacheAddr, loadRob.data.asUInt)
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/AsidNnidTableWalker.scala:439: not found: type Parameters
[error] def apply()(implicit p: Parameters): AsidNnidTableWalker =
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/CSRs.scala:7: not found: object cde
[error] import cde._
[error] ^
[error] /Users/kevinyuan/works/dana/rocket-chip/dana/src/main/scala/dana/CSRs.scala:37: not found: type Parameters
[error] class FenceCSR(implicit p: Parameters) extends DanaBundle()(p) {
[error] ^
[error] 562 errors found
[error] (rocketchip/compile:compileIncremental) Compilation failed
[error] Total time: 113 s, completed 2017-12-11 2:40:37
make: *** [/Users/kevinyuan/works/dana/rocket-chip/emulator/generated-src/freechips.rocketchip.system.DanaEmulatorConfig.fir] Error 1

@seldridge
Copy link
Collaborator

This isn't finding cde (an old submodule that rocket used called context dependent environments which was eventually replaced by the Config package).

Did the submodules of rocket properly initialize (git submodule update --init --recursive)?

@kevinyuan
Copy link
Author

Hi seldridge,

Thanks for your tips.

I just updated the context-dependent-environments submodule under rocket-chip .

However the compile still fails due to the same reason.

I am not familiar with the scala language, may I ask you how to make sure the compiler can find the "cde" module in rocket-chip/context-dependent-environments ? Is there a name mapping option in any configuration file ?

Very appreciate :)

Kevin

@seldridge
Copy link
Collaborator

To most directly answer your question about the "name mapping" of cde -> context-dependent-environments, that occurs in that older version of rocket-chip's build.scala.

Can you verify that you're on a supported version of rocket-chip? Due to a tape-out I haven't been tracking rocket-chip and have stayed on one of the last versions of fpga-zynq. That corresponds to chipsalliance/rocket-chip@f3299ae. Anything that is not that may not work. I expect that this may be your issue as the build process isn't finding package cde or uncore. The latter existed in older rocket-chip's but not newer ones.

Can you verify that you're on the correct version of rocket-chip? I quickly tested the short version of the setup here and this looks okay on my end, but I may be missing something...

@kevinyuan
Copy link
Author

Hi seldridge,

I noticed there are two "setup" sections.

What I am following is:
https://github.com/bu-icsg/dana#setup

Is it obsoleted or for different purpose ?

Best regards :)

Kevin

@seldridge
Copy link
Collaborator

Both should theoretically (or at least experimentally on my end...) work. The first set is just less verbose in terms of explanation and clones everything one level deeper inside of the (obsolete for newer rocket-chip versions) fpga-zynq repo.

@kevinyuan
Copy link
Author

Hi seldrige,

Now I restart the flow by following https://github.com/bu-icsg/dana#tldr-setup, but another compile error occurs.

Would you kindly help to to check how to resolve it ?

---- cmd ---
cd $fpga_zynq_dir/rocket-chip/emulator
make ROCKETCHIP_ADDONS=dana CONFIG=DanaEmulatorConfig

---- log ---
mkdir -p /Users/kevinyuan/works/risc-v/zynq/rocket-chip/emulator/generated-src/
cd /Users/kevinyuan/works/risc-v/zynq/rocket-chip && java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar /Users/kevinyuan/works/risc-v/zynq/rocket-chip/sbt-launch.jar "run-
main rocketchip.Generator /Users/kevinyuan/works/risc-v/zynq/rocket-chip/emulator/generated-src rocketchip TestHarness rocketchip DanaEmulatorConfig"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Loading project definition from /Users/kevinyuan/works/risc-v/zynq/rocket-chip/project
Using addons: dana
[info] Set current project to rocketchip (in build file:/Users/kevinyuan/works/risc-v/zynq/rocket-chip/)
[info] Updating {file:/Users/kevinyuan/works/risc-v/zynq/rocket-chip/}coreMacros...
[info] Resolving edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT ...
[warn] module not found: edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT
[warn] ==== local: tried
[warn] /Users/kevinyuan/.ivy2/local/edu.berkeley.cs/firrtl_2.11/1.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/edu/berkeley/cs/firrtl_2.11/1.1-SNAPSHOT/firrtl_2.11-1.1-SNAPSHOT.pom
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn][warn] Note: Unresolved dependencies path:[warn] edu.berkeley.cs:firrtl_2.11:1.1-SNAPSHOT[warn] +- edu.berkeley.cs:coremacros_2.11:3.1-SNAPSHOT
sbt.ResolveException: unresolved dependency: edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
[error] (coreMacros/*:update) sbt.ResolveException: unresolved dependency: edu.berkeley.cs#firrtl_2.11;1.1-SNAPSHOT: not found
[error] Total time: 3 s, completed 2017-12-12 1:34:42
make: ***
[/Users/kevinyuan/works/risc-v/zynq/rocket-chip/emulator/generated-src/rocketchip.DanaEmulatorConfig.prm] Error 1

@seldridge
Copy link
Collaborator

I believe that's due to FIRRTL needing to be made available locally.

Try:

cd rocket-chip/firrtl
sbt publish-local

If you don't have sbt installed, then use:

cd rocket-chip/firrtl
java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar ../sbt-launch.jar publish-local

Then try rebuilding the emulator.

Note: this is effectively "installing" FIRRTL locally (putting jars in ~/.ivy2/local/edu.berkeley.cs/firrtl_2.11/) and other sbt projects (rocket/Chisel) may default to using to this. This may result in incompatibilities with later versions of rocket/Chisel. However, you can always republish the version for that repo. This is an annoyance that should be sorted out soon (see: chipsalliance/chisel#499).

@kevinyuan
Copy link
Author

Hi seldridge,

Another error :)

-- cmd --
cd $fpga_zynq_dir/rocket-chip/dana
make

-- error msg --
clang: error: unsupported option '-fopenmp'
make[1]: *** [/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tools/bin/fann-random] Error 1

-- full log --
cd /Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/build/fann/host &&
cmake -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/build/fann/host -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/build/fann/host -DCMAKE_C_FLAGS="-DFANN_NO_SEED" -DCMAKE_CXX_FLAGS="-DFANN_NO_SEED" /Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/fann &&
/Applications/Xcode.app/Contents/Developer/usr/bin/make
-- FANN is used as APPLICATION_NAME
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- The compiler /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ has C++14 support.
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

MACOSX_RPATH is not specified for the following targets:

doublefann
fann
fixedfann
floatfann
gtest
gtest_main

This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/build/fann/host
[ 8%] Built target fann_static
[ 16%] Built target fann
[ 24%] Built target fixedfann_static
[ 32%] Built target fixedfann
[ 40%] Built target floatfann
[ 48%] Built target doublefann_static
[ 56%] Built target floatfann_static
[ 64%] Built target doublefann
[ 72%] Built target gtest
[ 80%] Built target gtest_main
[100%] Built target fann_tests
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tools /Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tools/bin/fann-random
gcc -DNO_VM=1 -Wall -Werror --std=gnu11 -I/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana -I/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tests/libs -I/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/build/nets src/fann-random.c -c -o /Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tools/bin/fann-random.o
readlink: illegal option -- f
usage: readlink [-n] [file ...]
readlink: illegal option -- f
usage: readlink [-n] [file ...]
readlink: illegal option -- f
usage: readlink [-n] [file ...]
gcc -DNO_VM=1 -Wall -Werror --std=gnu11 -I/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana -I/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tests/libs -I/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/build/nets /Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tools/bin/fann-random.o -L/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/build/host -L/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/build/fann/host -L/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tests/libs/build/host -lm -lfann -fopenmp -o /Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tools/bin/fann-random
clang: error: unsupported option '-fopenmp'
make[1]: *** [/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tools/bin/fann-random] Error 1
rm /Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tools/bin/fann-random.o
make: *** [/Users/kevinyuan/works/risc-v/zynq/rocket-chip/dana/tools/bin/fann-random] Error 2

@seldridge
Copy link
Collaborator

This is trying to build FANN (fast artificial neural network library), but it either looks like you don't have openmp installed or your version of clang doesn't support it. You may try installing openmp and/or updating clang using homebrew. I'm on Linux here, so this is pushing somewhat outside of what I can sanely comment on.

There's also an error here where OSX's readlink doesn't support the option -f. I think you can get around this by installing coreutils via homebrew.

Thanks for dealing with and reporting all the errors you've hit so far!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants