GNU bug report logs - #78390
[PATCH electronics-team] gnu: nextpnr: Add ecp5 and himbaechel architectures.

Previous Next

Package: guix-patches;

Reported by: Cayetano Santos <csantosb <at> inventati.org>

Date: Mon, 12 May 2025 12:17:02 UTC

Severity: normal

Tags: moreinfo, patch

To reply to this bug, email your comments to 78390 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#78390; Package guix-patches. (Mon, 12 May 2025 12:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cayetano Santos <csantosb <at> inventati.org>:
New bug report received and forwarded. Copy sent to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org. (Mon, 12 May 2025 12:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: guix-patches <at> gnu.org
Cc: Cayetano Santos <csantosb <at> inventati.org>
Subject: [PATCH electronics-team] gnu: nextpnr: Add ecp5 and himbaechel
 architectures.
Date: Mon, 12 May 2025 14:10:33 +0200
* gnu/packages/fpga.scm (nextpnr): Add ecp5 and himbaechel architectures.

Change-Id: Ia4b92f6cd1693b844b35949fdc23369e958e73c1

---

[arguments] <#:configure-flags>: Add Add ecp5 and himbaechel.
<#:phases> {get-prjbeyond-db}: New phase.
{unbundle-sanitizers-cmake}: Simplify lambda.
[native-inputs]: Add prjtrellis.

 gnu/packages/fpga.scm | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 2019700d72..4d767340cb 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -54,6 +54,7 @@ (define-module (gnu packages fpga)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpp)
+  #:use-module (gnu packages electronics)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gawk)
@@ -408,18 +409,36 @@ (define-public nextpnr
      (list
       #:cmake cmake                     ;CMake 3.25 or higher is required.
       #:configure-flags
-      #~(list "-DARCH=generic;ice40"    ;TODO: enable more architectures?
+      ;;TODO: enable more architectures?
+      #~(list "-DARCH=generic;ice40;ecp5;himbaechel"
               "-DBUILD_GUI=ON"
               "-DUSE_OPENMP=ON"
               "-DBUILD_TESTS=ON"
+              "-DHIMBAECHEL_UARCH=ng-ultra" ;gowin requires python-apycula.
+              "-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
+          (add-after 'unpack 'get-prjbeyond-db
+            (lambda _
+              (copy-recursively
+               #$(origin
+                   (method git-fetch)
+                   (uri (git-reference
+                         (url "https://github.com/yosyshq-GmbH/prjbeyond-db/")
+                         (commit "06d3b424dd0e52d678087c891c022544238fb9e3")))
+                   (sha256
+                    (base32
+                     "17dd3cgms2fy6xvz7magdmvv92km4cqh2kz9dyjrvz5y8caqav4y")))
+               "/tmp/prjbeyond-db")))
           (add-after 'unpack 'unbundle-sanitizers-cmake
-            (lambda* (#:key inputs #:allow-other-keys)
+            (lambda _
               (substitute* "CMakeLists.txt"
                 ;; Use the system sanitizers-cmake module.  This is made
                 ;; necessary 'sanitizers-cmake' installing a FindPackage
@@ -436,6 +455,7 @@ (define-public nextpnr
            corrosion
            eigen
            icestorm
+           prjtrellis
            pybind11
            python
            qtbase-5

base-commit: e4e43cebbacbbb7982d08f691636f3234fd60184
--
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78390; Package guix-patches. (Thu, 15 May 2025 01:50:02 GMT) Full text and rfc822 format available.

Message #8 received at 78390 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 78390 <at> debbugs.gnu.org, GNU Debbugs <control <at> debbugs.gnu.org>,
 Gabriel Wicki <gabriel <at> erlikon.ch>, Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: [bug#78390] [PATCH electronics-team] gnu: nextpnr: Add ecp5 and
 himbaechel architectures.
Date: Thu, 15 May 2025 10:49:04 +0900
tags 78390 + moreinfo
thanks

Hello!

Cayetano Santos <csantosb <at> inventati.org> writes:

> * gnu/packages/fpga.scm (nextpnr): Add ecp5 and himbaechel architectures.
>
> Change-Id: Ia4b92f6cd1693b844b35949fdc23369e958e73c1
>
> ---
>
> [arguments] <#:configure-flags>: Add Add ecp5 and himbaechel.
> <#:phases> {get-prjbeyond-db}: New phase.
> {unbundle-sanitizers-cmake}: Simplify lambda.
> [native-inputs]: Add prjtrellis.
>
>  gnu/packages/fpga.scm | 24 ++++++++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
> index 2019700d72..4d767340cb 100644
> --- a/gnu/packages/fpga.scm
> +++ b/gnu/packages/fpga.scm
> @@ -54,6 +54,7 @@ (define-module (gnu packages fpga)
>    #:use-module (gnu packages cmake)
>    #:use-module (gnu packages compression)
>    #:use-module (gnu packages cpp)
> +  #:use-module (gnu packages electronics)
>    #:use-module (gnu packages elf)
>    #:use-module (gnu packages flex)
>    #:use-module (gnu packages gawk)
> @@ -408,18 +409,36 @@ (define-public nextpnr
>       (list
>        #:cmake cmake                     ;CMake 3.25 or higher is required.
>        #:configure-flags
> -      #~(list "-DARCH=generic;ice40"    ;TODO: enable more architectures?
> +      ;;TODO: enable more architectures?

punctuation nitpick: should be ';; TODO: Enable more architectures?'

> +      #~(list "-DARCH=generic;ice40;ecp5;himbaechel"
>                "-DBUILD_GUI=ON"
>                "-DUSE_OPENMP=ON"
>                "-DBUILD_TESTS=ON"
> +              "-DHIMBAECHEL_UARCH=ng-ultra" ;gowin requires python-apycula.

Feel free to drop punctuation for margin commits, such as the trailing
dot here.

> +              "-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
> +          (add-after 'unpack 'get-prjbeyond-db
> +            (lambda _

It'd be nice to add a comment explaining why this is useful here, and
perhaps mentioning which commit should be used when updating (the latest
one?) nextpnr.

Otherwise, LGTM!

-- 
Thanks,
Maxim




Added tag(s) moreinfo. Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 15 May 2025 01:50:03 GMT) Full text and rfc822 format available.

Information forwarded to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#78390; Package guix-patches. (Mon, 19 May 2025 09:13:02 GMT) Full text and rfc822 format available.

Message #13 received at 78390 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: 78390 <at> debbugs.gnu.org
Cc: Cayetano Santos <csantosb <at> inventati.org>
Subject: [PATCH electronics-team v2] gnu: nextpnr: Add ecp5 and himbaechel
 architectures.
Date: Mon, 19 May 2025 11:11:18 +0200
* gnu/packages/fpga.scm (nextpnr): Add ecp5 and himbaechel architectures.

Change-Id: Ia4b92f6cd1693b844b35949fdc23369e958e73c1
---
 gnu/packages/fpga.scm | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index c46631c6cd..ec166c9c4e 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -55,6 +55,7 @@ (define-module (gnu packages fpga)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpp)
+  #:use-module (gnu packages electronics)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages freedesktop)
@@ -437,18 +438,38 @@ (define-public nextpnr
      (list
       #:cmake cmake                     ;CMake 3.25 or higher is required.
       #:configure-flags
-      #~(list "-DARCH=generic;ice40"    ;TODO: enable more architectures?
+      ;; 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 for README.md.
+                         (commit "06d3b424dd0e52d678087c891c022544238fb9e3")))
+                   (sha256
+                    (base32
+                     "17dd3cgms2fy6xvz7magdmvv92km4cqh2kz9dyjrvz5y8caqav4y")))
+               "/tmp/prjbeyond-db")))
           (add-after 'unpack 'unbundle-sanitizers-cmake
-            (lambda* (#:key inputs #:allow-other-keys)
+            (lambda _
               (substitute* "CMakeLists.txt"
                 ;; Use the system sanitizers-cmake module.  This is made
                 ;; necessary 'sanitizers-cmake' installing a FindPackage
@@ -465,6 +486,7 @@ (define-public nextpnr
            corrosion
            eigen
            icestorm
+           prjtrellis
            pybind11
            python
            qtbase-5

base-commit: 450a361532573a02389530a6a80b7821683ed41b
--
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78390; Package guix-patches. (Mon, 19 May 2025 09:16:02 GMT) Full text and rfc822 format available.

Message #16 received at 78390 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 78390 <at> debbugs.gnu.org, GNU Debbugs <control <at> debbugs.gnu.org>,
 Gabriel Wicki <gabriel <at> erlikon.ch>, Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: [bug#78390] [PATCH electronics-team] gnu: nextpnr: Add ecp5 and
 himbaechel architectures.
Date: Mon, 19 May 2025 11:14:56 +0200
[Message part 1 (text/plain, inline)]
>jeu. 15 mai 2025 at 10:49, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:

>> +      #~(list "-DARCH=generic;ice40;ecp5;himbaechel"
>>                "-DBUILD_GUI=ON"
>>                "-DUSE_OPENMP=ON"
>>                "-DBUILD_TESTS=ON"
>> +              "-DHIMBAECHEL_UARCH=ng-ultra" ;gowin requires python-apycula.
>
> Feel free to drop punctuation for margin commits, such as the trailing
> dot here.

No need to specify what do we don’t yet provide, after all, I drop the
whole comment.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#78390; Package guix-patches. (Wed, 21 May 2025 09:20:02 GMT) Full text and rfc822 format available.

Message #19 received at 78390 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 78390 <at> debbugs.gnu.org, Gabriel Wicki <gabriel <at> erlikon.ch>,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: bug#78390: [PATCH electronics-team] gnu: nextpnr: Add ecp5 and
 himbaechel architectures.
Date: Wed, 21 May 2025 18:18:53 +0900
Hi!

Cayetano Santos <csantosb <at> inventati.org> writes:

> * gnu/packages/fpga.scm (nextpnr): Add ecp5 and himbaechel architectures.
>
> Change-Id: Ia4b92f6cd1693b844b35949fdc23369e958e73c1
> ---
>  gnu/packages/fpga.scm | 26 ++++++++++++++++++++++++--
>  1 file changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
> index c46631c6cd..ec166c9c4e 100644
> --- a/gnu/packages/fpga.scm
> +++ b/gnu/packages/fpga.scm
> @@ -55,6 +55,7 @@ (define-module (gnu packages fpga)
>    #:use-module (gnu packages cmake)
>    #:use-module (gnu packages compression)
>    #:use-module (gnu packages cpp)
> +  #:use-module (gnu packages electronics)
>    #:use-module (gnu packages elf)
>    #:use-module (gnu packages flex)
>    #:use-module (gnu packages freedesktop)
> @@ -437,18 +438,38 @@ (define-public nextpnr
>       (list
>        #:cmake cmake                     ;CMake 3.25 or higher is required.
>        #:configure-flags
> -      #~(list "-DARCH=generic;ice40"    ;TODO: enable more architectures?
> +      ;; 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 for README.md.

Which README.md is the comment supposed to refer to?  I'm guessing the
README.md file of nextpnr?  The comment should be reworded for better
clarity.

> +                         (commit "06d3b424dd0e52d678087c891c022544238fb9e3")))
> +                   (sha256
> +                    (base32
> +                     "17dd3cgms2fy6xvz7magdmvv92km4cqh2kz9dyjrvz5y8caqav4y")))
> +               "/tmp/prjbeyond-db")))

I didn't see any distribution terms for the above files, so I asked [0].
I think we should wait for an answer before merging this change, to be
on the safe side.

Otherwise, LGTM.

[0]  https://github.com/YosysHQ-GmbH/prjbeyond-db/issues/2

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#78390; Package guix-patches. (Wed, 21 May 2025 09:53:02 GMT) Full text and rfc822 format available.

Message #22 received at 78390 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 78390 <at> debbugs.gnu.org, Gabriel Wicki <gabriel <at> erlikon.ch>,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: bug#78390: [PATCH electronics-team] gnu: nextpnr: Add ecp5 and
 himbaechel architectures.
Date: Wed, 21 May 2025 11:52:40 +0200
[Message part 1 (text/plain, inline)]
>mer. 21 mai 2025 at 18:18, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:

>> + (commit "06d3b424dd0e52d678087c891c022544238fb9e3")))
>> +                   (sha256
>> +                    (base32
>> + "17dd3cgms2fy6xvz7magdmvv92km4cqh2kz9dyjrvz5y8caqav4y")))
>> +               "/tmp/prjbeyond-db")))
>
> I didn't see any distribution terms for the above files, so I asked [0].
> I think we should wait for an answer before merging this change, to be
> on the safe side.
>
> Otherwise, LGTM.
>
> [0]  https://github.com/YosysHQ-GmbH/prjbeyond-db/issues/2

Good catch ! I absolutely missed this point.

Some device backends follow the same pattern, as it seems: using the
proprietary tools to produce a db, which is then used by the p&r tool. I
guess this is the price to pay for having a completely open design
toolchain.

C.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#78390; Package guix-patches. (Tue, 10 Jun 2025 10:02:05 GMT) Full text and rfc822 format available.

Message #25 received at 78390 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: 78390 <at> debbugs.gnu.org
Cc: Cayetano Santos <csantosb <at> inventati.org>
Subject: [PATCH electronics-team v3] gnu: nextpnr: Add ecp5 architecture.
Date: Tue, 10 Jun 2025 12:00:46 +0200
Change-Id: Ia4b92f6cd1693b844b35949fdc23369e958e73c1
---

Let's concentrate in ecp5 architecture, as himbaechel support files licensing is not clear at this point.

 gnu/packages/fpga.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index c46631c6cd..6bff45c782 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -55,6 +55,7 @@ (define-module (gnu packages fpga)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpp)
+  #:use-module (gnu packages electronics)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages freedesktop)
@@ -437,18 +438,20 @@ (define-public nextpnr
      (list
       #:cmake cmake                     ;CMake 3.25 or higher is required.
       #:configure-flags
-      #~(list "-DARCH=generic;ice40"    ;TODO: enable more architectures?
+      #~(list "-DARCH=generic;ice40;ecp5" ;TODO: enable more architectures?
               "-DBUILD_GUI=ON"
               "-DUSE_OPENMP=ON"
               "-DBUILD_TESTS=ON"
               (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
           (add-after 'unpack 'unbundle-sanitizers-cmake
-            (lambda* (#:key inputs #:allow-other-keys)
+            (lambda _
               (substitute* "CMakeLists.txt"
                 ;; Use the system sanitizers-cmake module.  This is made
                 ;; necessary 'sanitizers-cmake' installing a FindPackage
@@ -465,6 +468,7 @@ (define-public nextpnr
            corrosion
            eigen
            icestorm
+           prjtrellis
            pybind11
            python
            qtbase-5

base-commit: 5fd4df347e04b6cd3ce3fc91900f773a2e4824e3
--
2.49.0





Information forwarded to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#78390; Package guix-patches. (Thu, 12 Jun 2025 10:27:03 GMT) Full text and rfc822 format available.

Message #28 received at 78390 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: 78390 <at> debbugs.gnu.org
Cc: Cayetano Santos via Guix-patches via <guix-patches <at> gnu.org>
Subject: [PATCH electronics-team v4] gnu: nextpnr: Add ecp5 and himbaechel
 architectures.
Date: Thu, 12 Jun 2025 12:23:40 +0200
From: Cayetano Santos via Guix-patches via <guix-patches <at> gnu.org>

Change-Id: Ia4b92f6cd1693b844b35949fdc23369e958e73c1

---

As prjbeyond-db now includes a free license [0], we way produce an executable for himbaechel architecture, in addition to ecp5.

[0] https://github.com/YosysHQ-GmbH/prjbeyond-db/issues/2#issuecomment-2963375264

 gnu/packages/fpga.scm | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index c46631c6cd..3240cca92f 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -55,6 +55,7 @@ (define-module (gnu packages fpga)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cpp)
+  #:use-module (gnu packages electronics)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages freedesktop)
@@ -437,18 +438,39 @@ (define-public nextpnr
      (list
       #:cmake cmake                     ;CMake 3.25 or higher is required.
       #:configure-flags
-      #~(list "-DARCH=generic;ice40"    ;TODO: enable more architectures?
+      ;; 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* (#:key inputs #:allow-other-keys)
+            (lambda _
               (substitute* "CMakeLists.txt"
                 ;; Use the system sanitizers-cmake module.  This is made
                 ;; necessary 'sanitizers-cmake' installing a FindPackage
@@ -465,6 +487,7 @@ (define-public nextpnr
            corrosion
            eigen
            icestorm
+           prjtrellis
            pybind11
            python
            qtbase-5

base-commit: 8730c8f3a86ef41d5b88df573fce9b6d73c23b0c
--
2.49.0





This bug report was last modified 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.