From patchwork Sun Jan 24 17:45:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Miloradovsky X-Patchwork-Id: 26603 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 279B027BC1B; Sun, 24 Jan 2021 17:47:48 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8FB1827BC1A for ; Sun, 24 Jan 2021 17:47:47 +0000 (GMT) Received: from localhost ([::1]:47832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3jUI-0004pf-Hh for patchwork@mira.cbaines.net; Sun, 24 Jan 2021 12:47:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3jTf-0004ok-Im for guix-patches@gnu.org; Sun, 24 Jan 2021 12:47:11 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53826) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3jTa-0003Yl-Kn for guix-patches@gnu.org; Sun, 24 Jan 2021 12:47:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l3jTa-00085U-HO for guix-patches@gnu.org; Sun, 24 Jan 2021 12:47:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46069] [PATCH] gnu: Add Verilator. References: <20210124080741.3965-1-andrew@interpretmath.pw> In-Reply-To: <20210124080741.3965-1-andrew@interpretmath.pw> Resent-From: Andrew Miloradovsky Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 Jan 2021 17:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46069 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46069@debbugs.gnu.org Received: via spool by 46069-submit@debbugs.gnu.org id=B46069.161151037628908 (code B ref 46069); Sun, 24 Jan 2021 17:47:02 +0000 Received: (at 46069) by debbugs.gnu.org; 24 Jan 2021 17:46:16 +0000 Received: from localhost ([127.0.0.1]:37139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3jSq-0007Vn-4W for submit@debbugs.gnu.org; Sun, 24 Jan 2021 12:46:16 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:47279) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3jSo-0007Oi-Aj for 46069@debbugs.gnu.org; Sun, 24 Jan 2021 12:46:14 -0500 X-Originating-IP: 91.193.176.159 Received: from localhost.localdomain (unknown [91.193.176.159]) (Authenticated sender: andrew@interpretmath.pw) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id E499D2000B; Sun, 24 Jan 2021 17:46:06 +0000 (UTC) From: Andrew Miloradovsky Date: Sun, 24 Jan 2021 17:45:47 +0000 Message-Id: <20210124174547.27907-1-andrew@interpretmath.pw> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Miloradovsky Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/fpga.scm (verilator): New variable. --- gnu/packages/fpga.scm | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index ff03b5270d..429e848c31 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -496,3 +496,50 @@ components interfaces. This, in turn, facilitates the integration of systems using different abstraction levels.") ;; homepages.cae.wisc.edu/~ece734/SystemC/Esperan_SystemC_tutorial.pdf (license license:asl2.0))) + +(define-public verilator + (package + (name "verilator") + (version "4.108") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/" name "/" + name "/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0mbwplrkmp06clm1y3p33n74qrr3rqsc803hzwjs7ralfz2islnf")))) + (native-inputs `(("autoconf" ,autoconf) + ("automake" ,automake) + ("gettext" ,gettext-minimal) + ("perl" ,perl) + ("python" ,python) + ("flex" ,flex) + ("bison" ,bison) + ("systemc" ,systemc))) + (build-system gnu-build-system) + (arguments '(#:configure-flags + (list (string-append "LDFLAGS=-L" + (assoc-ref %build-inputs "systemc") + "/lib-linux64")) + #:make-flags + (list (string-append "LDFLAGS=-L" + (assoc-ref %build-inputs "systemc") + "/lib-linux64")) + #:phases + (modify-phases %standard-phases + (replace 'bootstrap + (lambda _ (invoke "autoconf")))) + #:test-target "test")) + ;; #error "Something failed during ./configure as config_build.h is incomplete. + ;; Perhaps you used autoreconf, don't." -- so we won't. ^ + (home-page "https://www.veripool.org/projects/verilator/") + (synopsis "A fast Verilog/SystemVerilog simulator") + (description "It compiles SystemVerilog to C++ or SystemC. +The user writes a little C++/SystemC wrapper file, which instantiates the +'Verilated' model of the user’s top level module. These C++/SystemC files are +then compiled by a C++ compiler (GCC/Clang/etc.). The resulting executable +performs the design simulation. Verilator also supports linking its generated +libraries, optionally encrypted, into other simulators.") + (license license:lgpl3)))