Skip to content

Commit

Permalink
[nix] fix generated filelist
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer committed Aug 22, 2024
1 parent 40d390b commit 6476690
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 4 additions & 6 deletions nix/t1/rtl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ stdenvNoCC.mkDerivation {
firtool ${mlirbc}/${mlirbc.elaborateTarget}-${mlirbc.elaborateConfig}-lowered.mlirbc \
-o $out ${mfcArgs}
'' + lib.optionalString fixupFilelist ''
# For ipemu, there are also some manually generated system verilog file for test bench.
# Those files are now recorded in a individual file list.
# However, verilator still expect on "filelist.f" file to record all the system verilog file.
# Below is a fix that concat them into one file to make verilator happy.
# FIXME: https://github.com/llvm/circt/pull/7543
echo "Fixing generated filelist.f"
cp $out/filelist.f original.f
cat $out/firrtl_black_box_resource_files.f original.f > $out/filelist.f
pushd $out
find . -mindepth 1 -name '*.sv' -type f > $out/filelist.f
popd
'';

meta.description = "All the elaborated system verilog files for ${mlirbc.elaborateTarget} with ${mlirbc.elaborateConfig} config.";
Expand Down
4 changes: 3 additions & 1 deletion nix/t1/verilated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ stdenv.mkDerivation {
echo "[nix] running verilator"
verilator \
${lib.optionalString enable-trace "--trace-fst"} \
--cc \
--timing \
--threads 8 \
-O1 \
--cc TestBench
-F filelist.f \
--top TestBench
echo "[nix] building verilated C lib"
Expand Down

0 comments on commit 6476690

Please sign in to comment.