summaryrefslogtreecommitdiff
path: root/gnu/packages/fpga.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/fpga.scm')
-rw-r--r--gnu/packages/fpga.scm362
1 files changed, 194 insertions, 168 deletions
diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 0ff3025187..4cf534e815 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -144,6 +144,29 @@ formal verification.")
formal verification. This is the Yosyshq fork of ABC.")
(license (license:non-copyleft "file:///copyright.txt"))))
+(define-public apycula
+ (package
+ (name "apycula")
+ (version "0.23")
+ ;; The pypi tar.gz file includes the necessary .pickle files, not available
+ ;; in the home-page repository.
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "apycula" version))
+ (sha256
+ (base32 "1kk9hi8zhdp1am5vj716lwlmrs31lxrwhdbbc4qsad470dcjqs57"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ;requires Gowin EDA tools
+ (inputs (list python-crc))
+ (native-inputs (list python-setuptools python-wheel))
+ (home-page "https://github.com/YosysHQ/apicula/")
+ (synopsis "Gowin FPGA bitstream format")
+ (description
+ "The project Apycula provides tools to support development and
+generating bitstreams with Gowin FPGAs.")
+ (license license:expat)))
+
(define-public iverilog
(package
(name "iverilog")
@@ -396,115 +419,114 @@ files.")
license:bsd-2))))) ;for lz4-derived sources
(define-public nextpnr
- (package
- (name "nextpnr")
- (version "0.8")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/YosysHQ/nextpnr/")
- (commit (string-append "nextpnr-" version))
- ;; XXX: Fetch some bundled libraries such as QtPropertyBrowser,
- ;; json11 and python-console, which have custom modifications or
- ;; no longer have their original upstream.
- (recursive? #t)))
- (file-name (git-file-name name version))
- (modules '((guix build utils)
- (ice-9 ftw)
- (srfi srfi-26)))
- (snippet
- '(begin
- ;; XXX: 'delete-all-but' is copied from the turbovnc package.
- (define (delete-all-but directory . preserve)
- (define (directory? x)
- (and=> (stat x #f)
- (compose (cut eq? 'directory <>) stat:type)))
- (with-directory-excursion directory
- (let* ((pred
- (negate (cut member <> (append '("." "..") preserve))))
- (items (scandir "." pred)))
- (for-each (lambda (item)
- (if (directory? item)
- (delete-file-recursively item)
- (delete-file item)))
- items))))
- (delete-all-but "3rdparty"
- ;; The following sources have all been patched, so
- ;; cannot easily be unbundled.
- "QtPropertyBrowser"
- "json11"
- "python-console"
- "oourafft")))
- (patches (search-patches "nextpnr-gtest.patch"
- "nextpnr-imgui.patch"))
- (sha256
- (base32 "0p53a2gl89hf3hfwdxs6pykxyrk82j4lqpwd1fqia2y0c9r2gjlm"))))
- (build-system qt-build-system)
- (arguments
- (list
- #:cmake cmake ;CMake 3.25 or higher is required.
- #:configure-flags
- ;; TODO: enable more architectures?
- #~(list "-DARCH=generic;ice40;ecp5;himbaechel"
- "-DBUILD_GUI=ON"
- "-DUSE_OPENMP=ON"
- "-DBUILD_TESTS=ON"
- "-DHIMBAECHEL_UARCH=ng-ultra"
- "-DHIMBAECHEL_NGULTRA_DEVICES=ng-ultra"
- "-DHIMBAECHEL_PRJBEYOND_DB=/tmp/prjbeyond-db"
- (string-append "-DCURRENT_GIT_VERSION=nextpnr-" #$version)
- (string-append "-DICESTORM_INSTALL_PREFIX="
- #$(this-package-input "icestorm"))
- (string-append "-DTRELLIS_INSTALL_PREFIX="
- #$(this-package-input "prjtrellis"))
- "-DUSE_IPO=OFF")
- #:phases
- #~(modify-phases %standard-phases
- ;; Required by himbaechel architecture, ng-ultra support.
- (add-after 'unpack 'get-prjbeyond-db
- (lambda _
- (copy-recursively
- #$(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/yosyshq-GmbH/prjbeyond-db/")
- ;; We take latest commit, as indicated in nextpnr’s
- ;; README.md file
- (commit "06d3b424dd0e52d678087c891c022544238fb9e3")))
- (sha256
- (base32
- "17dd3cgms2fy6xvz7magdmvv92km4cqh2kz9dyjrvz5y8caqav4y")))
- "/tmp/prjbeyond-db")))
- (add-after 'unpack 'unbundle-sanitizers-cmake
- (lambda _
- (substitute* "CMakeLists.txt"
- ;; Use the system sanitizers-cmake module. This is made
- ;; necessary 'sanitizers-cmake' installing a FindPackage
- ;; module but no CMake config file.
- (("\\$\\{CMAKE_SOURCE_DIR}/3rdparty/sanitizers-cmake/cmake")
- (string-append
- #$(this-package-native-input "sanitizers-cmake")
- "/share/sanitizers-cmake/cmake"))))))))
- (native-inputs
- (list googletest
- sanitizers-cmake))
- (inputs
- (list boost
- corrosion
- eigen
- icestorm
- prjtrellis
- pybind11
- python
- qtbase-5
- qtwayland-5
- qtimgui
- yosys))
- (synopsis "Place-and-Route tool for FPGAs")
- (description "Nextpnr is a portable FPGA place and route tool.")
- (home-page "https://github.com/YosysHQ/nextpnr/")
- (license license:isc)))
+ ;; Necessary for compatibility with latest apycula.
+ ;; TODO: Remove with release 0.9.
+ (let ((commit "d796cc720b60ccc18580c686d93c8751fe461532")
+ (revision "0"))
+ (package
+ (name "nextpnr")
+ (version (git-version "0.8" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/YosysHQ/nextpnr/")
+ (commit commit)
+ ;; XXX: Fetch some bundled libraries such as QtPropertyBrowser,
+ ;; json11 and python-console, which have custom modifications or
+ ;; no longer have their original upstream.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)
+ (ice-9 ftw)
+ (srfi srfi-26)))
+ (snippet
+ '(begin
+ ;; XXX: 'delete-all-but' is copied from the turbovnc package.
+ (define (delete-all-but directory . preserve)
+ (with-directory-excursion directory
+ (let* ((pred (negate (cut member <>
+ (cons* "." ".." preserve))))
+ (items (scandir "." pred)))
+ (for-each (cut delete-file-recursively <>) items))))
+ (delete-all-but "3rdparty"
+ ;; The following sources have all been patched, so
+ ;; cannot easily be unbundled.
+ "QtPropertyBrowser"
+ "json11"
+ "python-console"
+ "oourafft")))
+ (patches (search-patches "nextpnr-gtest.patch"
+ "nextpnr-imgui.patch"))
+ (sha256
+ (base32 "1arj25vad76wg6b5yaaky4cby5zp9v92pdd4y3l0kxi7wvxhmmya"))))
+ (build-system qt-build-system)
+ (arguments
+ (list
+ #:cmake cmake ;CMake 3.25 or higher is required.
+ #:configure-flags
+ ;; TODO: enable more architectures?
+ #~(list "-DARCH=generic;ice40;ecp5;himbaechel"
+ "-DBUILD_GUI=ON"
+ "-DUSE_OPENMP=ON"
+ "-DBUILD_TESTS=ON"
+ "-DHIMBAECHEL_UARCH=ng-ultra;gowin"
+ "-DHIMBAECHEL_NGULTRA_DEVICES=ng-ultra"
+ "-DHIMBAECHEL_SPLIT=ON"
+ "-DHIMBAECHEL_PRJBEYOND_DB=/tmp/prjbeyond-db"
+ (string-append "-DCURRENT_GIT_VERSION=nextpnr-" #$version)
+ (string-append "-DICESTORM_INSTALL_PREFIX="
+ #$(this-package-input "icestorm"))
+ (string-append "-DTRELLIS_INSTALL_PREFIX="
+ #$(this-package-input "prjtrellis"))
+ "-DUSE_IPO=OFF")
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Required by himbaechel architecture, ng-ultra support.
+ (add-after 'unpack 'get-prjbeyond-db
+ (lambda _
+ (copy-recursively
+ #$(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/yosyshq-GmbH/prjbeyond-db/")
+ ;; We take latest commit, as indicated in nextpnr’s
+ ;; README.md file
+ (commit "06d3b424dd0e52d678087c891c022544238fb9e3")))
+ (sha256
+ (base32
+ "17dd3cgms2fy6xvz7magdmvv92km4cqh2kz9dyjrvz5y8caqav4y")))
+ "/tmp/prjbeyond-db")))
+ (add-after 'unpack 'unbundle-sanitizers-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ ;; Use the system sanitizers-cmake module. This is made
+ ;; necessary 'sanitizers-cmake' installing a FindPackage
+ ;; module but no CMake config file.
+ (("\\$\\{CMAKE_SOURCE_DIR}/3rdparty/sanitizers-cmake/cmake")
+ (string-append
+ #$(this-package-native-input "sanitizers-cmake")
+ "/share/sanitizers-cmake/cmake"))))))))
+ (native-inputs
+ (list googletest
+ sanitizers-cmake))
+ (inputs
+ (list apycula
+ boost
+ corrosion
+ eigen
+ icestorm
+ prjtrellis
+ pybind11
+ python
+ qtbase-5
+ qtwayland-5
+ qtimgui
+ yosys))
+ (synopsis "Place-and-Route tool for FPGAs")
+ (description "Nextpnr is a portable FPGA place and route tool.")
+ (home-page "https://github.com/YosysHQ/nextpnr/")
+ (license license:isc))))
(define-public nextpnr-ice40
(deprecated-package "nextpnr-ice40" nextpnr))
@@ -549,8 +571,8 @@ Simulator Trace} files.")
;; XXX: The latest version tag (0.9.2) was placed in 2019, there are latest
;; changes supporting Python 3.11 on master branch, see
;; <https://github.com/m-labs/migen/issues/259>.
- (let ((commit "2828df54594673653a641ab551caf6c6b1bfeee5")
- (revision "0"))
+ (let ((commit "6e3a9e150fb006dabc4b55043d3af18dbfecd7e8")
+ (revision "1"))
(package
(name "python-migen")
(version (git-version "0.9.2" revision commit))
@@ -563,12 +585,11 @@ Simulator Trace} files.")
(commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "0my2jwrb64n39dfcipiw9s2cbg1r4s6zh4ybf4dwid9hk86fi6hs"))))
+ (base32 "1hibhjnj5b3ka5y4nnqx9zp5w730gfqfa3r5injpa14i4cz6bj1n"))))
(build-system pyproject-build-system)
(native-inputs
(list python-pytest
- python-setuptools
- python-wheel))
+ python-setuptools-next))
(propagated-inputs
(list python-colorama))
(home-page "https://m-labs.hk/gateware/migen/")
@@ -584,16 +605,16 @@ Python program.")
(define-public python-myhdl
(package
(name "python-myhdl")
- (version "0.11")
+ (version "0.11.51")
(source
(origin
(method url-fetch)
(uri (pypi-uri "myhdl" version))
(sha256
(base32
- "04fi59cyn5dsci0ai7djg74ybkqfcjzhj1jfmac2xanbcrw9j3yk"))))
+ "0b360smk2m60vhxdi837hz75m0pnms477wkn9gh6m4v3nih1v4cx"))))
(build-system python-build-system)
- (home-page "https://www.myhdl.org/")
+ (home-page "http://www.myhdl.org/")
(synopsis "Python as a Hardware Description Language")
(description "This package provides a library to turn Python into
a hardware description and verification language.")
@@ -656,7 +677,7 @@ automated testing of HDL code.")
(define-public nvc
(package
(name "nvc")
- (version "1.17.1")
+ (version "1.17.2")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -665,7 +686,7 @@ automated testing of HDL code.")
(file-name (git-file-name name version))
(sha256
(base32
- "0k5l5z5x4k7rfcrnxskbqk0icpr13ax6r2f0dkpscadavbmv0qz6"))))
+ "0hr5y9ys5kf096x18mh10wwqa0hbzlmdj7pyayc6szsjla1d3mk0"))))
(build-system gnu-build-system)
(arguments
(list #:out-of-source? #t
@@ -709,7 +730,7 @@ automated testing of HDL code.")
(define-public systemc
(package
(name "systemc")
- (version "3.0.0")
+ (version "3.0.1")
(source
(origin
(method git-fetch)
@@ -718,7 +739,7 @@ automated testing of HDL code.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "1v5fg3h9ffdzq9f6zplvr9all00ssc1gpdvbg129xahkrbl53kvw"))))
+ (base32 "1c8brlv3702p2ivifai9929bg20y30jb301ap0gdmz305q8mcb33"))))
(native-inputs (list perl))
(build-system cmake-build-system)
(arguments
@@ -729,7 +750,7 @@ automated testing of HDL code.")
#:phases
#~(modify-phases %standard-phases
(replace 'check (assoc-ref gnu:%standard-phases 'check)))))
- (home-page "https://accellera.org/community/systemc")
+ (home-page "https://systemc.org/")
(synopsis "Library for event-driven simulation")
(description
"SystemC is a C++ library for modeling concurrent systems, and the
@@ -773,61 +794,66 @@ using different abstraction levels.")
(list perl python systemc))
(build-system gnu-build-system)
(arguments
- '(#:phases
- (modify-phases %standard-phases
- (replace 'bootstrap
- (lambda _ (invoke "autoconf")))
- (add-after 'unpack 'adjust-source
- (lambda _
- (substitute* "bin/verilator"
- (("/bin/echo") "echo"))))
- (add-before 'check 'disable-gdb-safe-path
- (lambda _
- (setenv "HOME" (getcwd))
- (mkdir-p (string-append (getcwd) "/.config/gdb"))
- (with-output-to-file (string-append (getcwd) "/.config/gdb/gdbinit")
- (lambda ()
- (display "set auto-load safe-path /"))))))
- #:test-target "test"))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'bootstrap
+ (lambda _ (invoke "autoconf")))
+ (add-after 'unpack 'adjust-source
+ (lambda _
+ (substitute* "bin/verilator"
+ (("/bin/echo") "echo"))))
+ (add-before 'check 'disable-gdb-safe-path
+ (lambda _
+ (setenv "HOME" (getcwd))
+ (mkdir-p (string-append (getcwd) "/.config/gdb"))
+ (with-output-to-file
+ (string-append (getcwd) "/.config/gdb/gdbinit")
+ (lambda ()
+ (display "set auto-load safe-path /"))))))
+ #:test-target "test"))
(home-page "https://www.veripool.org/verilator/")
(synopsis "Verilog/SystemVerilog simulator")
(description
- "Verilator transforms the specified Verilog or SystemVerilog code by reading it,
-performing lint checks, and optionally inserting assertion checks and
-coverage-analysis points. It outputs single- or multi-threaded @file{.cpp}
-and @file{.h} files.")
+ "Verilator transforms the specified Verilog or SystemVerilog code by
+reading it, performing lint checks, and optionally inserting assertion checks
+and coverage-analysis points. It outputs single- or multi-threaded
+@file{.cpp} and @file{.h} files.")
(license license:lgpl3)))
(define-public fftgen
- (let ((commit "1d75a992efd0528edea128a903aafdabe133cb08") ;no releases
- (revision "0"))
+ (let ((commit "3378b77d83a98b06184656a5cb9b54e50dfe4485") ;no releases
+ (revision "1"))
(package
(name "fftgen")
(version (git-version "0" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ZipCPU/dblclockfft")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0qq874yalzpjdwnxhc5df8a0ifywv29wcncb09945x56xplvkcmd"))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ZipCPU/dblclockfft")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1rvln871wjkbbqnv88jnx328xlhn5sgbr8fglk3ajnd9rwgiq3jg"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ;no tests
- #:make-flags '("CFLAGS=-g -O2") ;default flags lack -O2
- #:phases (modify-phases %standard-phases
- (delete 'configure)
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((bin (string-append (assoc-ref outputs "out")
- "/bin")))
- (install-file "sw/fftgen" bin)))))))
+ (list
+ #:test-target "bench-test"
+ #:make-flags #~(list "CFLAGS=-g -O2") ;default flags lack -O2
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda _
+ (install-file "sw/fftgen"
+ (string-append #$output "/bin")))))))
+ (native-inputs (list bc fftw python-minimal verilator which))
(synopsis "Generic pipelined FFT core generator")
(description "fftgen produces @acronym{FFT, fast-Fourier transforms}
hardware designs in Verilog.")
- (home-page "https://zipcpu.com/")
+ (home-page "https://github.com/ZipCPU/zipcpu/")
(license license:lgpl3+))))
(define-public openfpgaloader
@@ -877,8 +903,8 @@ to @samp{info \"(guix) Base Services\"} for examples.")
(license license:asl2.0)))
(define-public python-hdlmake
- (let ((commit "48260fb0d7ace3ff2ee124121a5780a226513077")
- (revision "2"))
+ (let ((commit "c56cb8efa2000d06cec698f0149bc4ca4ef4e5bc")
+ (revision "3"))
(package
(name "python-hdlmake")
(version (git-version "3.3" revision commit))
@@ -890,16 +916,16 @@ to @samp{info \"(guix) Base Services\"} for examples.")
(commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "1s36gc5g3v20x2v26d45hfw2x9r7k54lj7sggz94qi7ydbi1ng41"))))
+ (base32 "1w4b0g015rzfypr8sjyr8xqij6s2p5qxhxraswrhjvg1w86b6s36"))))
(build-system pyproject-build-system)
(arguments (list #:phases #~(modify-phases %standard-phases
(add-before 'check 'chdir
(lambda _
(chdir "testsuite"))))
#:test-flags #~(list "test_all.py")))
- (native-inputs (list python-pytest python-setuptools python-wheel))
+ (native-inputs (list python-pytest python-setuptools-next))
(propagated-inputs (list python-networkx python-six))
- (home-page "https://gitlab.com/ohwr/project/hdl-make/")
+ (home-page "https://ohwr.gitlab.io/project/hdl-make/")
(synopsis "Generate multi-purpose makefiles for HDL projects")
(description
"Hdlmake helps manage and share @acronym{HDL, hardware description