From: Danny Milosavljevic <dannym@scratchpost.org>
To: guix-devel@gnu.org
Subject: [PATCH v2 3/5] gnu: Add yosys.
Date: Thu, 18 Aug 2016 17:18:31 +0200 [thread overview]
Message-ID: <20160818151833.29540-4-dannym@scratchpost.org> (raw)
In-Reply-To: <20160818151833.29540-1-dannym@scratchpost.org>
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
gnu: Add yosys.
* gnu/packages/fpga.scm (yosys): New variable.
---
gnu/packages/fpga.scm | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-gnu-Add-yosys.patch --]
[-- Type: text/x-patch; name="0003-gnu-Add-yosys.patch", Size: 4450 bytes --]
diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 1d1c981..763d746 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -108,3 +108,84 @@ For synthesis, the compiler generates netlists in the desired format.")
;; Otherwise would be GPL2+.
;; You have to accept both GPL2 and LGPL2.1+.
(license (list license:gpl2 license:lgpl2.1+))))
+
+(define-public yosys
+ (package
+ (name "yosys")
+ (version "0.6")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://github.com/cliffordwolf/yosys/archive/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "02j0c0m9dfyjccynalf0aggj6gy20k7iphpkg5cn6sdirlkv8gmx"))
+ (file-name (string-append name "-" version "-checkout.tar.gz"))
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* "Makefile"
+ (("ABCREV = .*") "ABCREV = default\n")))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:test-target "test"
+ #:make-flags (list "CC=gcc"
+ "CXX=g++"
+ (string-append "PREFIX=" %output))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs (make-flags '()) #:allow-other-keys)
+ (zero? (apply system* "make" "config-gcc" make-flags))))
+ (add-after 'configure 'prepare-abc
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((sourceabc (assoc-ref inputs "abc"))
+ (sourcebin (string-append sourceabc "/bin"))
+ (source (string-append sourcebin "/abc")))
+ (mkdir-p "abc")
+ (call-with-output-file "abc/Makefile"
+ (lambda (port)
+ (format port ".PHONY: all\nall:\n\tcp -f abc abc-default\n")))
+ (copy-file source "abc/abc")
+ (zero? (system* "chmod" "+w" "abc/abc")))))
+ (add-before 'check 'fix-iverilog-references
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (let* ((xinputs (or native-inputs inputs))
+ (xdirname (assoc-ref xinputs "iverilog"))
+ (iverilog (string-append xdirname "/bin/iverilog")))
+ (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh"
+ "./manual/CHAPTER_StateOfTheArt/validate_tb.sh"
+ "./techlibs/ice40/tests/test_bram.sh"
+ "./techlibs/ice40/tests/test_ffs.sh"
+ "./techlibs/xilinx/tests/bram1.sh"
+ "./techlibs/xilinx/tests/bram2.sh"
+ "./tests/bram/run-single.sh"
+ "./tests/realmath/run-test.sh"
+ "./tests/simple/run-test.sh"
+ "./tests/techmap/mem_simple_4x1_runtest.sh"
+ "./tests/tools/autotest.sh"
+ "./tests/vloghtb/common.sh")
+ (("if ! which iverilog") "if ! true")
+ (("iverilog ") (string-append iverilog " "))
+ (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\""
+ iverilog
+ "\"")))))))))
+ ;; TODO add xdot [patch the path to it here] as soon as I find out where it is.
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("python" ,python)
+ ("bison" ,bison)
+ ("flex" ,flex)
+ ("gawk" , gawk) ; for the tests and "make" progress pretty-printing
+ ("tcl" ,tcl) ; tclsh for the tests
+ ("iverilog" ,iverilog) ; for the tests
+ ))
+ (inputs
+ `(("tcl" ,tcl)
+ ("readline" ,readline)
+ ("libffi" ,libffi)
+ ("abc" ,abc)))
+ (home-page "http://www.clifford.at/yosys/")
+ (synopsis "FPGA Verilog RTL synthesizer")
+ (description "Yosys synthesizes Verilog-2005.")
+ (license license:isc)))
next prev parent reply other threads:[~2016-08-18 15:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-18 15:18 [PATCH v2 0/5] Add FPGA Tools Danny Milosavljevic
2016-08-18 15:18 ` [PATCH v2 1/5] gnu: Add abc Danny Milosavljevic
2016-08-18 15:18 ` [PATCH v2 2/5] gnu: Add iverilog Danny Milosavljevic
2016-08-18 15:18 ` Danny Milosavljevic [this message]
2016-08-18 15:18 ` [PATCH v2 4/5] gnu: Add icestorm Danny Milosavljevic
2016-08-18 15:18 ` [PATCH v2 5/5] gnu: Add arachne-pnr Danny Milosavljevic
2016-09-07 20:21 ` [PATCH v2 0/5] Add FPGA Tools Danny Milosavljevic
2016-09-26 1:36 ` Theodoros Foradis
2016-09-26 7:37 ` Danny Milosavljevic
2016-09-26 10:53 ` Theodoros Foradis
2016-09-26 12:31 ` Danny Milosavljevic
2016-09-26 1:58 ` Theodoros Foradis
2016-09-26 7:38 ` Danny Milosavljevic
2016-10-04 8:48 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160818151833.29540-4-dannym@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.