Skip to content

ysyxsoc代码在新版本的操作系统的开发环境下无法使用 #29

Description

@123Onetwothree123

详细讲解我写在CLI输出之下
[abc@DESKTOP-PAP9J8T ysyxSoC]$ make dev-init
git submodule update --init --recursive
Submodule 'rocket-chip' (git@github.com:chipsalliance/rocket-chip.git) registered for path 'rocket-chip'
Cloning into '/home/abc/ysyx-workbench/ysyxSoC/rocket-chip'...
Submodule path 'rocket-chip': checked out 'd0c6b50fdefcdbe121e9788433ea51f7efaf1d32'
Submodule 'dependencies/cde' (https://github.com/chipsalliance/cde.git) registered for path 'rocket-chip/dependencies/cde'
Submodule 'dependencies/chisel' (https://github.com/chipsalliance/chisel.git) registered for path 'rocket-chip/dependencies/chisel'
Submodule 'dependencies/diplomacy' (https://github.com/chipsalliance/diplomacy.git) registered for path 'rocket-chip/dependencies/diplomacy'
Submodule 'dependencies/hardfloat' (https://github.com/ucb-bar/berkeley-hardfloat.git) registered for path 'rocket-chip/dependencies/hardfloat'
Cloning into '/home/abc/ysyx-workbench/ysyxSoC/rocket-chip/dependencies/cde'...
Cloning into '/home/abc/ysyx-workbench/ysyxSoC/rocket-chip/dependencies/chisel'...
Cloning into '/home/abc/ysyx-workbench/ysyxSoC/rocket-chip/dependencies/diplomacy'...
Cloning into '/home/abc/ysyx-workbench/ysyxSoC/rocket-chip/dependencies/hardfloat'...
Submodule path 'rocket-chip/dependencies/cde': checked out '52768c97a27b254c0cc0ac9401feb55b29e18c28'
Submodule path 'rocket-chip/dependencies/chisel': checked out 'e3bcc90db37f1aec9f8048813f4f0666098d9bee'
Submodule path 'rocket-chip/dependencies/diplomacy': checked out 'edf375300d99a4c260a214d7c1553de0040771d7'
Submodule path 'rocket-chip/dependencies/hardfloat': checked out 'd93aa570806013dea479a92ba9bb33d1f2d4f69f'
Submodule 'berkeley-softfloat-3' (https://github.com/ucb-bar/berkeley-softfloat-3.git) registered for path 'rocket-chip/dependencies/hardfloat/berkeley-softfloat-3'
Submodule 'berkeley-testfloat-3' (https://github.com/ucb-bar/berkeley-testfloat-3.git) registered for path 'rocket-chip/dependencies/hardfloat/berkeley-testfloat-3'
Cloning into '/home/abc/ysyx-workbench/ysyxSoC/rocket-chip/dependencies/hardfloat/berkeley-softfloat-3'...
Cloning into '/home/abc/ysyx-workbench/ysyxSoC/rocket-chip/dependencies/hardfloat/berkeley-testfloat-3'...
Submodule path 'rocket-chip/dependencies/hardfloat/berkeley-softfloat-3': checked out '5c06db33fc1e2130f67c045327b0ec949032df1d'
Submodule path 'rocket-chip/dependencies/hardfloat/berkeley-testfloat-3': checked out '06b20075dd3c1a5d0dd007a93643282832221612'
cd rocket-chip && git apply ../patch/rocket-chip.patch
[abc@DESKTOP-PAP9J8T ysyxSoC]$ make verilog
Downloading firtool version 1.105.0 from https://github.com/llvm/circt/releases/download/firtool-1.105.0/firrtl-bin-linux-x64.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 00:02 0
100 9.71M 100 9.71M 0 0 1.80M 0 00:05 00:05 654.7k
Downloading SHA256 checksum from https://github.com/llvm/circt/releases/download/firtool-1.105.0/firrtl-bin-linux-x64.tar.gz.sha256...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 00:02 0
100 65 100 65 0 0 15 0 00:04 00:04 0
Checking SHA256 checksum...
/tmp/tmp.xzL5juoJD3/firtool.tar.gz: OK
CHISEL_FIRTOOL_PATH=/home/abc/ysyx-workbench/ysyxSoC/patch/firtool/firtool-1.105.0/bin
mill -i ysyxsoc.runMain ysyx.Elaborate --target-dir build
Downloading mill 0.12.4 from https://repo1.maven.org/maven2/com/lihaoyi/mill-dist/0.12.4/mill-dist-0.12.4.jar ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 62.70M 100 62.70M 0 0 9.81M 0 00:06 00:06 12.24M
Preparing Java 26.0.1 runtime; this may take a minute or two ...
WARNING: A terminally deprecated method in sun.misc.Unsafe has been calledet-dir build ============================ 13s
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by net.openhft.hashing.UnsafeAccess (file:/home/abc/.cache/coursier/v1/https/repo1.maven.org/maven2/net/openhft/zero-allocation-hashing/0.16/zero-allocation-hashing-0.16.jar)
WARNING: Please consider reporting this to the maintainers of class net.openhft.hashing.UnsafeAccess
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
[build.sc-64/68] compile
[build.sc-64] [info] compiling 5 Scala sources to /home/abc/ysyx-workbench/ysyxSoC/out/mill-build/compile.dest/classes ...
[build.sc-64] [info] done compiling
WARNING: A restricted method in java.lang.System has been calledate --target-dir build ============================ 16s
WARNING: java.lang.System::loadLibrary has been called by com.swoval.runtime.NativeLoader in an unnamed module (file:/home/abc/.cache/coursier/v1/https/repo1.maven.org/maven2/com/swoval/file-tree-views/2.1.12/file-tree-views-2.1.12.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

[68/68] ============================ ysyxsoc.runMain ysyx.Elaborate --target-dir build ============================ 16s
1 tasks failed
methodCodeHashSignatures java.lang.IllegalArgumentException: Unsupported class file major version 70
org.objectweb.asm.ClassReader.(ClassReader.java:200)
org.objectweb.asm.ClassReader.(ClassReader.java:180)
org.objectweb.asm.ClassReader.(ClassReader.java:166)
org.objectweb.asm.ClassReader.(ClassReader.java:288)
mill.codesig.ExternalSummary$.load0$1(ExternalSummary.scala:55)
mill.codesig.ExternalSummary$.$anonfun$apply$6(ExternalSummary.scala:48)
scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
scala.collection.mutable.HashMap.getOrElse(HashMap.scala:451)
mill.codesig.ExternalSummary$.load$1(ExternalSummary.scala:48)
mill.codesig.ExternalSummary$.$anonfun$apply$7(ExternalSummary.scala:63)
mill.codesig.ExternalSummary$.$anonfun$apply$7$adapted(ExternalSummary.scala:63)
scala.collection.immutable.Set$Set1.foreach(Set.scala:177)
mill.codesig.ExternalSummary$.load0$1(ExternalSummary.scala:63)
mill.codesig.ExternalSummary$.$anonfun$apply$6(ExternalSummary.scala:48)
scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
scala.collection.mutable.HashMap.getOrElse(HashMap.scala:451)
mill.codesig.ExternalSummary$.load$1(ExternalSummary.scala:48)
mill.codesig.ExternalSummary$.$anonfun$apply$9(ExternalSummary.scala:69)
mill.codesig.ExternalSummary$.$anonfun$apply$9$adapted(ExternalSummary.scala:69)
scala.collection.immutable.HashSet.foreach(HashSet.scala:951)
mill.codesig.ExternalSummary$.apply(ExternalSummary.scala:69)
mill.codesig.CodeSig$.compute(CodeSig.scala:17)
mill.runner.MillBuildRootModule.$anonfun$methodCodeHashSignatures$2(MillBuildRootModule.scala:184)
mill.define.Task$TraverseCtx.evaluate(Task.scala:219)
make: *** [Makefile:13: build/ysyxSoCFull.v] Error 1
[abc@DESKTOP-PAP9J8T ysyxSoC]$ java -version
java version "26.0.1" 2026-04-21
Java(TM) SE Runtime Environment (build 26.0.1+8-34)
Java HotSpot(TM) 64-Bit Server VM (build 26.0.1+8-34, mixed mode, sharing)
[abc@DESKTOP-PAP9J8T ysyxSoC]$ mill -version
[68/68] ============================== -version ==============================
Cannot resolve -version. Did you mean version?
[abc@DESKTOP-PAP9J8T ysyxSoC]$ mill version
[1/1] version
0.12.4
[1/1] ============================== version ==============================
[abc@DESKTOP-PAP9J8T ysyxSoC]$ yay -S mill
AUR Explicit (1): mill-1.1.2-3
:: PKGBUILD up to date, skipping download: mill
1 mill (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
1 mill (Installed) (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
==> Making package: mill 1.1.2-3 (Thu Jun 11 15:07:26 2026)
==> Retrieving sources...
-> Found mill-binary
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha512sums...
mill-binary ... Passed
:: (1/1) Parsing SRCINFO: mill
==> Making package: mill 1.1.2-3 (Thu Jun 11 15:07:27 2026)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found mill-binary
==> Validating source files with sha512sums...
mill-binary ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
==> Starting prepare()...
==> Sources are ready.
==> Making package: mill 1.1.2-3 (Thu Jun 11 15:07:27 2026)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
-> Removing libtool files...
-> Removing static library files...
-> Purging unwanted files...
-> Stripping unneeded symbols from binaries and libraries...
-> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "mill"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: mill 1.1.2-3 (Thu Jun 11 15:07:28 2026)
==> Cleaning up...

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

For security reasons, the password you type will not be visible.

[sudo] password for abc:
sudo: /var/db/sudo/lectured is owned by uid 1000, should be 0
loading packages...
warning: mill-1.1.2-3 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1) Old Version New Version Net Change

mill 1.1.2-3 1.1.2-3 0.00 MiB

Total Installed Size: 0.01 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
reinstalling mill...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[abc@DESKTOP-PAP9J8T ysyxSoC]$ mill version
[1/1] version
0.12.4
[1/1] ============================== version ==============================
[abc@DESKTOP-PAP9J8T ysyxSoC]$
[abc@DESKTOP-PAP9J8T ysyxSoC]$ sudo pacman -S --needed jdk17-openjdk

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

For security reasons, the password you type will not be visible.

[sudo] password for abc:
sudo: /var/db/sudo/lectured is owned by uid 1000, should be 0
resolving dependencies...
looking for conflicting packages...

Package (2) New Version Net Change Download Size

extra/libnet 2:1.3-2 1.47 MiB 0.28 MiB
extra/jdk17-openjdk 17.0.19.u10-1 421.30 MiB 273.49 MiB

Total Download Size: 273.77 MiB
Total Installed Size: 422.77 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
jdk17-openjdk-17.0.19.u10-1-x86_64 downloading...
libnet-2:1.3-2-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing libnet...
installing jdk17-openjdk...
Default Java environment is already set to 'java-26-jdk'
See 'archlinux-java help' to change it
Optional dependencies for jdk17-openjdk
java-rhino: for some JavaScript support
alsa-lib: for basic sound support [installed]
gtk3: for the Gtk+ 3 look and feel - desktop usage [installed]
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating icon theme caches...
(3/3) Updating the desktop file MIME type cache...
[abc@DESKTOP-PAP9J8T ysyxSoC]$ export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
[abc@DESKTOP-PAP9J8T ysyxSoC]$ export PATH="$JAVA_HOME/bin:$PATH"
[abc@DESKTOP-PAP9J8T ysyxSoC]$ java -version
openjdk version "17.0.19" 2026-04-21
OpenJDK Runtime Environment (build 17.0.19+10)
OpenJDK 64-Bit Server VM (build 17.0.19+10, mixed mode, sharing)
[abc@DESKTOP-PAP9J8T ysyxSoC]$ make verilog
Found existing firtool directory in /home/abc/ysyx-workbench/ysyxSoC/patch/firtool
If you want to update firtool, please remove the existing firtool directory
CHISEL_FIRTOOL_PATH=/home/abc/ysyx-workbench/ysyxSoC/patch/firtool/firtool-1.105.0/bin
mill -i ysyxsoc.runMain ysyx.Elaborate --target-dir build
Preparing Java 17.0.19 runtime; this may take a minute or two ...
[289/321] rocketchip.cde.compile
[288/321] rocketchip.macros.compile
[291/321] rocketchip.hardfloat.compile
[289] [info] compiling 1 Scala source to /home/abc/ysyx-workbench/ysyxSoC/out/rocketchip/cde/compile.dest/classes ...
[288] [info] compiling 1 Scala source to /home/abc/ysyx-workbench/ysyxSoC/out/rocketchip/macros/compile.dest/classes ..
[291] [info] compiling 20 Scala sources to /home/abc/ysyx-workbench/ysyxSoC/out/rocketchip/hardfloat/compile.dest/classes ...
[289] [info] done compiling
[288] [info] done compiling
[299/321] rocketchip.diplomacy.compile
[299] [info] compiling 36 Scala sources to /home/abc/ysyx-workbench/ysyxSoC/out/rocketchip/diplomacy/compile.dest/classes ...
[299] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/dependencies/diplomacy/diplomacy/src/diplomacy/nodes/NodeImp.scala:62:20: parameter node in method mixI is never used
[299] [warn] def mixI(pu: UI, node: InwardNode[DI, UI, BI]): UI = pu
[299] [warn] ^
[299] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/dependencies/diplomacy/diplomacy/src/diplomacy/nodes/NodeImp.scala:137:20: parameter node in method mixO is never used
[299] [warn] def mixO(pd: DO, node: OutwardNode[DO, UO, BO]): DO = pd
[299] [warn] ^
[299] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/dependencies/diplomacy/diplomacy/src/diplomacy/lazymodule/LazyModuleImp.scala:5:8: Importing from firrtl is deprecated as of Chisel's 3.6.0 release.
[299] [warn] import firrtl.passes.InlineAnnotation
[299] [warn] ^
[299] [warn] three warnings found
[299] [info] done compiling
[291] [info] done compiling
[307/321] rocketchip.compile
[307] [info] compiling 317 Scala sources to /home/abc/ysyx-workbench/ysyxSoC/out/rocketchip/compile.dest/classes ...
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/diplomacy/Parameters.scala:122:16: Implicit definition should have explicit type (inferred Boolean) [quickfixable]
[307] [warn] implicit def asBool(x: TransferSizes) = !x.none
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/diplomacy/package.scala:62:16: Implicit definition should have explicit type (inferred org.chipsalliance.diplomacy.SourcecodeNameExt) [quickfixable]
[307] [warn] implicit def SourcecodeNameExt(x: sourcecode.Name) = root.org.chipsalliance.diplomacy.SourcecodeNameExt(x)
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/jtag/JtagStateMachine.scala:18:18: Implicit definition should have explicit type (inferred Int) [quickfixable]
[307] [warn] implicit def toInt(x: State) = x.id
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/jtag/package.scala:14:16: Implicit definition should have explicit type (inferred (scala.math.BigInt, V)) [quickfixable]
[307] [warn] implicit def instructionIntKeyToBigIntV <: Chain = (BigInt(x.1), x.2)
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/regmapper/RegField.scala:21:16: Implicit definition should have explicit type (inferred freechips.rocketchip.regmapper.RegReadFn) [quickfixable]
[307] [warn] implicit def apply(x: (Bool, Bool) => (Bool, Bool, UInt)) =
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/regmapper/RegField.scala:32:16: Implicit definition should have explicit type (inferred freechips.rocketchip.regmapper.RegReadFn) [quickfixable]
[307] [warn] implicit def apply(x: Bool => (Bool, UInt)) =
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/regmapper/RegField.scala:53:16: Implicit definition should have explicit type (inferred freechips.rocketchip.regmapper.RegWriteFn) [quickfixable]
[307] [warn] implicit def apply(x: (Bool, Bool, UInt) => (Bool, Bool)) =
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/regmapper/RegField.scala:65:16: Implicit definition should have explicit type (inferred freechips.rocketchip.regmapper.RegWriteFn) [quickfixable]
[307] [warn] implicit def apply(x: (Bool, UInt) => Bool) =
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/util/PlusArg.scala:35:16: Implicit definition should have explicit type (inferred freechips.rocketchip.util.Doctypeable[Int]) [quickfixable]
[307] [warn] implicit val intToDoctype = new Doctypeable[Int] { def toDoctype(a: Option[Int]) = "INT" }
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/util/PlusArg.scala:38:16: Implicit definition should have explicit type (inferred freechips.rocketchip.util.Doctypeable[BigInt]) [quickfixable]
[307] [warn] implicit val bigIntToDoctype = new Doctypeable[BigInt] { def toDoctype(a: Option[BigInt]) = "INT" }
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/util/PlusArg.scala:41:16: Implicit definition should have explicit type (inferred freechips.rocketchip.util.Doctypeable[String]) [quickfixable]
[307] [warn] implicit val stringToDoctype = new Doctypeable[String] { def toDoctype(a: Option[String]) = "STRING" }
[307] [warn] ^
[307] [warn] /home/abc/ysyx-workbench/ysyxSoC/rocket-chip/src/main/scala/util/ShiftQueue.scala:18:28: reference to entries is ambiguous;
[307] [warn] it is both defined in the enclosing class ShiftQueue and inherited in the enclosing anonymous class as value entries (defined in class QueueIO)
[307] [warn] In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope.
[307] [warn] Such references are ambiguous in Scala 3. To continue using the inherited symbol, write this.entries.
[307] [warn] Or use -Wconf:msg=legacy-binding:s to silence this warning. [quickfixable]
[307] [warn] val mask = Output(UInt(entries.W))
[307] [warn] ^
[307] [warn] 7 deprecations
[307] [warn] 78 deprecations (since 2.13.0)
[307] [warn] 1 deprecation (since 2.13.7)
[307] [warn] 1 deprecation (since 9)
[307] [warn] 27 deprecations (since CDE 0.1)
[307] [warn] 10 deprecations (since diplomacy 1.0.0)
[307] [warn] 1 deprecation (since rocket-chip 1.2)
[307] [warn] 36 deprecations (since rocketchip 2.0.0)
[307] [warn] 161 deprecations in total; re-run with -deprecation for details
[307] [warn] 20 feature warnings; re-run with -feature for details
[307] [warn] 22 warnings found
[307] [info] done compiling
[314/321] ysyxsoc.compile
[314] [info] compiling 35 Scala sources to /home/abc/ysyx-workbench/ysyxSoC/out/ysyxsoc/compile.dest/classes ...
[314] [warn] 1 deprecation (since 2.13.0)
[314] [warn] 1 deprecation (since 2.13.3)
[314] [warn] 90 deprecations (since rocketchip 2.0.0)
[314] [warn] 92 deprecations in total; re-run with -deprecation for details
[314] [warn] four warnings found
[314] [info] done compiling
[321/321] =========================== ysyxsoc.runMain ysyx.Elaborate --target-dir build =========================== 45s
mv build/ysyxSoCTop.sv build/ysyxSoCFull.v
sed -i -e 's/
(aw|ar|w|r|b)
(|bits_)/_\1/g' build/ysyxSoCFull.v
sed -i '/firrtl_black_box_resource_files.f/, $d' build/ysyxSoCFull.v
[abc@DESKTOP-PAP9J8T ysyxSoC]$ java -verilog
Unrecognized option: -verilog
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
[abc@DESKTOP-PAP9J8T ysyxSoC]$ java -version
openjdk version "17.0.19" 2026-04-21
OpenJDK Runtime Environment (build 17.0.19+10)
OpenJDK 64-Bit Server VM (build 17.0.19+10, mixed mode, sharing)
[abc@DESKTOP-PAP9J8T ysyxSoC]$
[abc@DESKTOP-PAP9J8T ysyx-workbench]$ cd npc
[abc@DESKTOP-PAP9J8T npc]$ mill version
1.1.0
1/1, SUCCESS] mill version
[abc@DESKTOP-PAP9J8T npc]$
[abc@DESKTOP-PAP9J8T alstt]$ neofetch
- abc@DESKTOP-PAP9J8T .o+ -------------------
ooo/ OS: Arch Linux on Windows 10 x86_64 +oooo: Kernel: 6.6.87.2-microsoft-standard-WSL2
+oooooo: Uptime: 1 hour, 35 mins -+oooooo+: Packages: 687 (pacman) /:-:++oooo+: Shell: bash 5.3.15
/++++/+++++++: Theme: Adwaita [GTK3] /++++++++++++++: Icons: Adwaita [GTK3]
/+++ooooooooooooo/ Terminal: Windows Terminal
./ooosssso++osssssso+ CPU: Intel Ultra 9 275HX (24) @ 3.071GHz .oossssso-````/ossssss+ GPU: c7a1:00:00.0 Microsoft Corporation Basic Render Driver
-osssssso. :ssssssso. Memory: 4587MiB / 15718MiB
:osssssss/ osssso+++.
/ossssssss/ +ssssooo/-
/ossssso+/:- -:/+osssso+- +sso+:- .-/+oso:
++:. -/+/
. /

[abc@DESKTOP-PAP9J8T alstt]$
Windows PowerShell
版权所有(C) Microsoft Corporation。保留所有权利。

安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows

PS C:\Users\alstt> wsl --version
WSL 版本: 2.6.3.0
内核版本: 6.6.87.2-1
WSLg 版本: 1.0.71
MSRDC 版本: 1.2.6353
Direct3D 版本: 1.611.1-81528511
DXCore 版本: 10.0.26100.1-240331-1435.ge-release
Windows: 10.0.26200.8457
PS C:\Users\alstt>
各位大师,额,本人第一次提issue,不知道标准写法应该是什么,而且洒家文化水平非常低下,当然,也不是有百分之一百零一的把握认为是mill的问题,目前洒家排查的问题应该可能大概也许或许好像貌似是因为mill的版本过低,我查询过mill的JVM依赖问题,1.0开始是不依赖具体JVM版本了,而且本人Scala版本是chisel3版本是2.13.18,chisel是7.7,目前这个mill和JDK能在NPC目录下正常使用,我传递参数MILL_VERSION手动传递参数1.1.2,好像爆了,应该是构建文件不支持最新的mill,只能用自带的0.12.4吧,chisel7.X版本是完全支持JDK26的,而这个问题换到老版本的JDK17是可以直接一行make verilog就可以跑起来的,说明应该核心问题就是新版本Java改了环境的某些环境更改或者新的特性导致无法运行,所以得退老版本环境才可以
目前看来mill至少得拉到1.0版本,这样才不会有版本依赖的问题
现在是因为可能脚本有基于别的东西,结果所以直接传参数的话Mill 1.1.2可以启动,但无法解析原任务
反正就是从0.12.4升级到1.1.2后,26下的Unsupported class file major version 70问题就会直接消失
然后我跑了一下make verilog,然后是可以成功生成ysyxSoCFull.v
然后这之间我是大量询问了codex GPT5.5的
然后大概就是如果只改mill-version这个版本号是没卵用的,然后就是还需要迁移build.sc到build.mill,然后这个我确实看不太懂,所以我就去问了AI,makefile要修改我知道,但是目前要解决这个问题就得从ysyxsoc.runMain改成runMain,这个东西不会是因为他是绑定了0.12.4吧,我也不太懂,望各位大师见谅,毕竟我的scala chisel3是看知乎文章速成的,就是因为原本模块名是ysyxsoc,然后这里面有一个runMain,然后用了根模块的写法,object package extends ysyxSoC,所以Mill的这个任务路径是修改了的,就直接变成了runMain,然后这个build.sc就是直接仿照build.mill设计的(本人能力有限,不懂得代码也不敢让AI乱改,所以让AI写,但是一点点的核对过,完全是照着模板抄的,一点点改的,然后只是让AI把语法统一了一下,改到比较新了,逻辑都一样的)
我刚刚切换到1.1.2版本是可以进行直接跑的
就是要把.mill-version从0.12.4改成1.1.2
然后makefile从ysyxsoc.runMain改成runMain,就是不要跑ysyx的东西:
mill -i runMain ysyx.Elaborate --target-dir $(@d)
然后新增 ysyxSoC/build.mill,不过这个文件的代码是纯粹AI写的:
//| mill-version: 1.1.2

package build

import mill._
import mill.scalalib._

object Versions {
val chisel = "7.0.0-M2"
val scala = "2.13.14"
}

val workspaceRoot = os.Path(sys.env("MILL_WORKSPACE_ROOT"))

object Deps {
val chisel = mvn"org.chipsalliance::chisel:${Versions.chisel}"
val chiselPlugin = mvn"org.chipsalliance:::chisel-plugin:${Versions.chisel}"
val mainargs = mvn"com.lihaoyi::mainargs:0.5.4"
val json4sJackson = mvn"org.json4s::json4s-jackson:4.0.6"
val scalaReflect = mvn"org.scala-lang:scala-reflect:${Versions.scala}"
val sourcecode = mvn"com.lihaoyi::sourcecode:0.3.1"
}

trait HasChisel extends ScalaModule {
def chiselModule: Option[ScalaModule]
def chiselPluginJar: Option[PathRef]
def chiselMvn: Option[Dep]
def chiselPluginMvn: Option[Dep]

override def moduleDeps = super.moduleDeps ++ chiselModule.toSeq
override def scalacOptions =
super.scalacOptions() ++ chiselPluginJar.toSeq.map(path => s"-Xplugin:${path.path}")
override def scalacPluginClasspath =
super.scalacPluginClasspath() ++ chiselPluginJar.toSeq
override def mvnDeps = super.mvnDeps() ++ chiselMvn.toSeq
override def scalacPluginMvnDeps =
super.scalacPluginMvnDeps() ++ chiselPluginMvn.toSeq
}

trait HasThisChisel extends HasChisel {
override def scalaVersion = Versions.scala
def chiselModule: Option[ScalaModule] = None
def chiselPluginJar: Option[PathRef] = None
def chiselMvn: Option[Dep] = Some(Deps.chisel)
def chiselPluginMvn: Option[Dep] = Some(Deps.chiselPlugin)

override def scalacOptions = super.scalacOptions() ++
Seq("-language:reflectiveCalls", "-Ymacro-annotations", "-Ytasty-reader")
}

trait MacrosModule extends ScalaModule {
def scalaReflectMvn: Dep
override def mvnDeps = super.mvnDeps() ++ Seq(scalaReflectMvn)
}

trait RocketChipModule extends HasChisel {
override def mainClass = Some("freechips.rocketchip.diplomacy.Main")

def macrosModule: MacrosModule
def hardfloatModule: ScalaModule
def diplomacyModule: ScalaModule
def mainargsMvn: Dep
def json4sJacksonMvn: Dep

override def moduleDeps =
super.moduleDeps ++ Seq(macrosModule, hardfloatModule, diplomacyModule)
override def mvnDeps =
super.mvnDeps() ++ Seq(mainargsMvn, json4sJacksonMvn)
}

trait HardfloatModule extends HasChisel

trait CDEModule extends ScalaModule

trait DiplomacyModule extends HasChisel {
def cdeModule: ScalaModule
def sourcecodeMvn: Dep

override def moduleDeps = super.moduleDeps ++ Seq(cdeModule)
override def mvnDeps = super.mvnDeps() ++ Seq(sourcecodeMvn)
override def scalacOptions = super.scalacOptions() ++ Seq("-Wunused")
}

trait RocketChip extends RocketChipModule with HasThisChisel {
override def scalaVersion = Versions.scala
override def sources = Task.Sources(workspaceRoot / "rocket-chip" / "src" / "main" / "scala")

def dependencyPath = workspaceRoot / "rocket-chip" / "dependencies"
def macrosModule = macros
def hardfloatModule = hardfloat
def cdeModule = cde
def diplomacyModule = diplomacy
def diplomacyMvn = None
def mainargsMvn = Deps.mainargs
def json4sJacksonMvn = Deps.json4sJackson

object macros extends Macros
trait Macros extends MacrosModule with SbtModule {
override def scalaVersion = Versions.scala
override def sources = Task.Sources(workspaceRoot / "rocket-chip" / "macros" / "src" / "main" / "scala")
def scalaReflectMvn = Deps.scalaReflect
}

object hardfloat extends Hardfloat
trait Hardfloat extends HardfloatModule with HasThisChisel {
override def scalaVersion = Versions.scala
override def sources = Task.Sources(dependencyPath / "hardfloat" / "hardfloat" / "src" / "main" / "scala")
}

object cde extends CDE
trait CDE extends CDEModule {
override def scalaVersion = Versions.scala
override def sources = Task.Sources(dependencyPath / "cde" / "cde" / "src" / "main" / "scala")
}

object diplomacy extends Diplomacy
trait Diplomacy extends DiplomacyModule {
override def scalaVersion = Versions.scala
override def sources = Task.Sources(dependencyPath / "diplomacy" / "diplomacy" / "src" / "main" / "scala")

def chiselModule: Option[ScalaModule] = None
def chiselPluginJar: Option[PathRef] = None
def chiselMvn: Option[Dep] = Some(Deps.chisel)
def chiselPluginMvn: Option[Dep] = Some(Deps.chiselPlugin)

def cdeModule = cde
def sourcecodeMvn = Deps.sourcecode

}
}

trait ysyxSoCModule extends ScalaModule {
def rocketModule: ScalaModule
override def moduleDeps = super.moduleDeps ++ Seq(rocketModule)
}

object package extends ysyxSoC {
object rocketchip extends RocketChip
def rocketModule = rocketchip
}

trait ysyxSoC extends ysyxSoCModule with HasThisChisel {
override def scalaVersion = Versions.scala
override def sources = Task.Sources(workspaceRoot / "src")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions