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

[chore] Bump dependencies and fix some chores #43

Merged
merged 5 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions templates/chisel/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
.mill-jvm-opts
.metals/
.vscode/
.envrc
.direnv/

out/
result*
Expand Down
2 changes: 1 addition & 1 deletion templates/chisel/.scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ danglingParentheses.preset = true

align.tokens."+" = [
{
code = ":"
code = ":"
}
]

Expand Down
9 changes: 8 additions & 1 deletion templates/chisel/common.sc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ trait HasChisel extends ScalaModule {
def chiselPluginJar: T[Option[PathRef]]

override def scalacOptions = T(
super.scalacOptions() ++ chiselPluginJar().map(path => s"-Xplugin:${path.path}") ++ Seq("-Ymacro-annotations")
super.scalacOptions() ++ chiselPluginJar().map(path => s"-Xplugin:${path.path}") ++ Seq(
"-Ymacro-annotations",
"-deprecation",
"-feature",
"-language:reflectiveCalls",
"-language:existentials",
"-language:implicitConversions"
)
)

override def scalacPluginClasspath: T[Agg[PathRef]] = T(super.scalacPluginClasspath() ++ chiselPluginJar())
Expand Down
2 changes: 1 addition & 1 deletion templates/chisel/elaborator/src/GCD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ object GCDMain extends SerializableModuleElaborator {
os.write.over(targetDir / s"${topName}.anno.json", annos)
}

def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args)
def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args.toIndexedSeq)
}
2 changes: 1 addition & 1 deletion templates/chisel/elaborator/src/GCDFormal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ object GCDFormalMain extends SerializableModuleElaborator {
os.write.over(targetDir / s"${topName}.anno.json", annos)
}

def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args)
def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args.toIndexedSeq)
}
2 changes: 1 addition & 1 deletion templates/chisel/elaborator/src/GCDTestBench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ object GCDTestBenchMain extends SerializableModuleElaborator {
os.write.over(targetDir / s"${topName}.anno.json", annos)
}

def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args)
def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args.toIndexedSeq)
}
2 changes: 1 addition & 1 deletion templates/chisel/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
nativeBuildInputs = [ pkgs.cargo pkgs.rustfmt pkgs.rust-analyzer ];
RUST_SRC_PATH =
"${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
} // pkgs.gcd.tb-dpi-lib.env);
} // pkgs.gcd.tb-dpi-lib.env // pkgs.gcd.gcd-compiled.env);
});
}
1 change: 1 addition & 0 deletions templates/chisel/nix/gcd/gcd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ let
});

inherit target;
inherit env;
};

shellHook = ''
Expand Down
12 changes: 6 additions & 6 deletions templates/chisel/nix/gcd/scripts/vcs-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ cp -r "$_VCS_SIM_DAIDIR" "$_CURRENT/"

if [ -n "$_VCS_COV_DIR" ]; then
cp -vr "$_LIB/$_VCS_COV_DIR" "$_CURRENT/"
_CM_ARG="-cm assert -cm_dir $_CURRENT/$_VCS_COV_DIR"
_CM_ARG="-cm assert -cm_dir ./$_VCS_COV_DIR" # vcs runs in $_CURRENT
fi

chmod -R +w "$_CURRENT"
pushd "$_CURRENT" >/dev/null

_emu_name=$(basename "$_VCS_SIM_BIN")
_daidir=$(basename "$_VCS_SIM_DAIDIR")

export LD_LIBRARY_PATH="$_CURRENT/$_daidir:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$PWD/$_daidir:$LD_LIBRARY_PATH"

"$_VCS_FHS_ENV" -c "$_CURRENT/$_emu_name $_CM_ARG $_EXTRA_ARGS" &> >(tee $_CURRENT/vcs-emu-journal.log)
"$_VCS_FHS_ENV" -c "./$_emu_name $_CM_ARG $_EXTRA_ARGS" &> >(tee $./vcs-emu-journal.log)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $. might cause unexpected behavior here.


if [ -n "$_VCS_COV_DIR" ]; then
"$_VCS_FHS_ENV" -c "urg -dir "$_CURRENT/$_VCS_COV_DIR" -format text"
cp -vr ./urgReport "$_CURRENT/"
"$_VCS_FHS_ENV" -c "urg -dir "./$_VCS_COV_DIR" -format text"
fi

if ((${DATA_ONLY:-0})); then
rm -f "$_CURRENT/$_emu_name"
rm -f "./$_emu_name"
fi

set -e _emu_name _daidir
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"chisel": {
"cargoLocks": null,
"date": "2024-10-12",
"date": "2024-10-15",
"extract": null,
"name": "chisel",
"passthru": null,
Expand All @@ -13,10 +13,10 @@
"name": null,
"owner": "chipsalliance",
"repo": "chisel",
"rev": "dd2f57ede872afc2e2b9c00dcdbcd397400bcdfd",
"sha256": "sha256-InQ6Xm9ssQRFyM7AsvxDdw8N2HdyhRCvl4ckXaNXcG0=",
"rev": "e20cb96a0c5f50f3a27e2a727a3fa094a3dcc13f",
"sha256": "sha256-5DRUvVWl9id85Htw1oDZYoOrSjI+wYxSEV51qZB/qs0=",
"type": "github"
},
"version": "dd2f57ede872afc2e2b9c00dcdbcd397400bcdfd"
"version": "e20cb96a0c5f50f3a27e2a727a3fa094a3dcc13f"
}
}
8 changes: 4 additions & 4 deletions templates/chisel/nix/pkgs/dependencies/_sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
{
chisel = {
pname = "chisel";
version = "dd2f57ede872afc2e2b9c00dcdbcd397400bcdfd";
version = "e20cb96a0c5f50f3a27e2a727a3fa094a3dcc13f";
src = fetchFromGitHub {
owner = "chipsalliance";
repo = "chisel";
rev = "dd2f57ede872afc2e2b9c00dcdbcd397400bcdfd";
rev = "e20cb96a0c5f50f3a27e2a727a3fa094a3dcc13f";
fetchSubmodules = false;
sha256 = "sha256-InQ6Xm9ssQRFyM7AsvxDdw8N2HdyhRCvl4ckXaNXcG0=";
sha256 = "sha256-5DRUvVWl9id85Htw1oDZYoOrSjI+wYxSEV51qZB/qs0=";
};
date = "2024-10-12";
date = "2024-10-15";
};
}