Search code examples
riscvrocket-chip

Work with fpga-zynq repository (deprecated) with the most recent repository of Rocket chip generator


The fpga-zynq repo (https://github.com/ucb-bar/fpga-zynq) has some git submodules. One of them is the Rocket-chip submodule, but that repo of Rocket-chip is out of date, so I tried compiling the rocket with the most recent repo. When I did that, I got a problem, as we can see in the following image:

[error] (run-main-0) java.lang.NoClassDefFoundError: firrtl/util/BackendCompilationUtilities$class

Image with the error situation.

Does someone have a solution for it?


Solution

  • follow these instructions:

    sudo apt install default-jdk (if you are using ubuntu)
    

    or

    apt install openjdk-8-jre-headless
    

    both worked for me

    check what JDK version your system is running:

    javac -version
    

    if it is different then JDK 8 you should set it manually:

    sudo update-alternatives --config java
    There are 3 choices for the alternative java (providing /usr/bin/java).
    
    Selection      Path                                             Priority   Status
    ------------------------------------------------------------
    * 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
      1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
      2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
    
      Press <enter> to keep the current choice[*], or type selection number:
    

    it worked for me. Good Luck