From 5fd6515c46e9890480bdc1136216eed72884fcc3 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 3 May 2022 12:50:20 +0530 Subject: gn: cva6: Switch to upstream source instead of fork. * gn/packages/riscv.scm (cva6)[source]: Use upstream openhwgroup source instead of the cornell-brg fork. [arguments]: Add fix-stdout phase. Pass RISV=0 to make in build phase. --- gn/packages/riscv.scm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'gn/packages/riscv.scm') diff --git a/gn/packages/riscv.scm b/gn/packages/riscv.scm index aaa2818..8c7c76a 100644 --- a/gn/packages/riscv.scm +++ b/gn/packages/riscv.scm @@ -39,7 +39,7 @@ "1dh8x0ikfwk0by5avwfv9gvr9ay6jy13yr66rvgw9wwyxmklz848"))))))) (define-public cva6 - (let ((commit "5f802b0520d91ee4a8c988fd83c66b0b48e75447") + (let ((commit "b40bb3264bc0ca0b5b9e9a3eb351cbaaa9b50b62") (revision "1")) (package (name "cva6") @@ -47,26 +47,33 @@ (source (origin (method git-fetch) (uri (git-reference - ;; TODO: Use https://github.com/openhwgroup/cva6 - ;; instead of the cornell-brg fork. - (url "https://github.com/cornell-brg/cva6") + (url "https://github.com/openhwgroup/cva6") (commit commit) (recursive? #t))) (file-name (git-file-name name version)) (sha256 (base32 - "06rwzgvkf6cb6lgwbk6gb41afqv30h4m1sb2piyb1j499znvvgq6")))) + "16zyfqfycii25sirh3bm80dws2fn10a02ny8kzijr0p0a1azklmv")))) (build-system gnu-build-system) (arguments (list #:tests? #f #:phases #~(modify-phases %standard-phases + ;; Patch cva6 to print to stdout correctly. See + ;; https://github.com/openhwgroup/cva6/issues/748 + (add-after 'unpack 'fix-stdout + (lambda _ + (substitute* "corev_apu/tb/rvfi_tracer.sv" + (("rvfi_i\\[i\\].insn == 32'h00000073") + "0")))) (delete 'configure) (replace 'build (lambda _ (invoke "make" "verilate" - (string-append "-j" (number->string (parallel-job-count)))))) + (string-append "-j" (number->string (parallel-job-count))) + ;; Set dummy RISCV to suppress Makefile error. + "RISCV=foo"))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((bin (string-append (assoc-ref outputs "out") -- cgit v1.2.3