From 8aa801967ba3c7e3b9645584c162b67a171c5945 Mon Sep 17 00:00:00 2001 From: Shupei Fan Date: Tue, 10 Dec 2024 09:55:21 +0000 Subject: [PATCH] [HACK] revert after circt PRINTF_FD lands --- nix/t1/conversion/mlirbc-to-sv.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nix/t1/conversion/mlirbc-to-sv.nix b/nix/t1/conversion/mlirbc-to-sv.nix index dcb166ef9..eb02690dc 100644 --- a/nix/t1/conversion/mlirbc-to-sv.nix +++ b/nix/t1/conversion/mlirbc-to-sv.nix @@ -21,6 +21,12 @@ stdenvNoCC.mkDerivation { echo "[nix] converting mlirbc to system verilog with args: $firtoolArgs" $builder -c "$firtoolArgs" + # TODO: remove it after circt PRINTF_FD lands + if [ -f "$out/TestBench.sv" ]; then + # replace "$fwrite(32'h80000002" -> "fwrite(`PRINTF_FD" + sed -i -e "s/\\\$fwrite[(]32'h80000002/\\\$fwrite(\`PRINTF_FD/g" "$out/TestBench.sv" + fi + # https://github.com/llvm/circt/pull/7543 echo "[nix] fixing generated filelist.f" pushd $out >/dev/null