■
バージョンが異なるのでツールの微妙な差異があります。
書籍:Vivado 2016.2 環境:Vivado 2017.3
p.186
Add IPのアイコンが変わっている。
p.247
メニューから[Tools]->[Create and Package IP...]を実行
Package New IPに代わっていました。
p.261
そこで「Customization Parameters」を選択し、ペイン上部の「Merge changes from ~」をクリックします。これによりすべての項目が緑のチェックマークになり解決しました。
すべてではありませんでした。File Groups
が緑のチェックマークになりませんでした。これもペイン上部の「Merge changes from ~」をクリックすると、解決できるようです。
FPGAボードに電源を入れてみる
FPGA
はここで購入しました。通販ではなく、実際に店舗に行って購入しました。店舗の雰囲気は初心者お断りの雰囲気があるのですが、店員さんは親切です。店の中をキョロキョロしていたところ、店員さんに声をかけられ、買いたい商品の型番を知らせると、すぐに在庫の確認をしてくれて、商品が置いてある場所を教えてくれました。
ZYBO Zynq−7000 評価ボード: 目的別 秋月電子通商 電子部品 ネット通販
電源の入れ方はマニュアルに書いてあります。
ライセンス付きを買ったので、パッケージの中にライセンスのバウチャーが入っています。
開封の儀
USBは別途購入が必要。
右中央にある、赤と緑のLEDがつけば起動完了です。
デフォルトで入っているアプリをディスプレイに表示させました。
情報源はここです。 yuki-sato.com
開封してから気づいたのですが、いわゆる筐体がないので、ケースを用意する必要があります。
3Dプリンタがあれば、ケース作れると思ったのですが、すでにやっている人いますね。
clashのインストール (Mac成功 / Windows失敗)
clash
のインストールをしています。
Mac
ではインストールができましたが、Windows
ではできませんでした。
インストール方法は、clash
のgithub
のwiki
のgetting started
通りです。
$ git clone https://github.com/clash-lang/clash-compiler.git $ cd clash-compiler $ git submodule update --init $ stack build
Macの場合
(root)blender:clash-compiler ogawanaoto$ stack build Preparing to install GHC to an isolated location. This will not interfere with any system-level installation. Downloaded ghc-8.2.1. Installed GHC. ... clash-prelude-0.99: copy/register clash-lib-0.99: configure (lib) clash-lib-0.99: build (lib) clash-lib-0.99: copy/register Building all executables for `clash-ghc' once. After a successful build of all of them, only specified executables will be rebuilt. clash-ghc-0.99: configure (lib + exe) clash-ghc-0.99: build (lib + exe) clash-ghc-0.99: copy/register Completed 90 action(s). Log files have been written to: /Users/foo/work11/fpga01/clash-compiler/.stack-work/logs/
問題なく終了しました。
Windowsの場合
$ stack build ... fgl-5.5.4.0: configure fgl-5.5.4.0: build optparse-applicative-0.14.0.0: configure optparse-applicative-0.14.0.0: build ghc-tcplugins-extra-0.2.1: configure ghc-tcplugins-extra-0.2.1: build aeson-1.2.1.0: configure aeson-1.2.1.0: build ghc-tcplugins-extra-0.2.1: copy/register -- While building custom Setup.hs for package aeson-1.2.1.0 using: C:\Users\User\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.0.0.2_ghc-8.2.1.exe --builddir=.stack-work\dist\e53504d9 build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 3 Logs have been written to: C:\Program Files\Haskell Platform\8.2.2\msys\home\User\work02\work03\clash-compiler\.stack-work\logs\aeson-1.2.1.0.log Configuring aeson-1.2.1.0... Preprocessing library for aeson-1.2.1.0.. Building library for aeson-1.2.1.0.. [ 1 of 23] Compiling Data.Aeson.Internal.Functions ( Data\Aeson\Internal\Functions.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Internal\Functions.o ) [ 2 of 23] Compiling Data.Aeson.Parser.UnescapePure ( pure\Data\Aeson\Parser\UnescapePure.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Parser\UnescapePure.o ) [ 3 of 23] Compiling Data.Aeson.Parser.Unescape ( Data\Aeson\Parser\Unescape.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Parser\Unescape.o ) [ 4 of 23] Compiling Data.Aeson.Types.Generic ( Data\Aeson\Types\Generic.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Types\Generic.o ) [ 5 of 23] Compiling Data.Aeson.Types.Internal ( Data\Aeson\Types\Internal.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Types\Internal.o ) [ 6 of 23] Compiling Data.Aeson.Parser.Internal ( Data\Aeson\Parser\Internal.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Parser\Internal.o ) ghc.EXE: internal error: mkPath failed converting char* to wchar_t* (GHC version 8.2.1 for x86_64_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. -- While building custom Setup.hs for package optparse-applicative-0.14.0.0 using: C:\Users\User\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.0.0.2_ghc-8.2.1.exe --builddir=.stack-work\dist\e53504d9 build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 3 Logs have been written to: C:\Program Files\Haskell Platform\8.2.2\msys\home\User\work02\work03\clash-compiler\.stack-work\logs\optparse-applicative-0.14.0.0.log Configuring optparse-applicative-0.14.0.0... Preprocessing library for optparse-applicative-0.14.0.0.. Building library for optparse-applicative-0.14.0.0.. [ 1 of 16] Compiling Options.Applicative.Help.Levenshtein ( Options\Applicative\Help\Levenshtein.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Levenshtein.o ) [ 2 of 16] Compiling Options.Applicative.Help.Pretty ( Options\Applicative\Help\Pretty.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Pretty.o ) [ 3 of 16] Compiling Options.Applicative.Help.Chunk ( Options\Applicative\Help\Chunk.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Chunk.o ) [ 4 of 16] Compiling Options.Applicative.Help.Types ( Options\Applicative\Help\Types.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Types.o ) [ 5 of 16] Compiling Options.Applicative.Types ( Options\Applicative\Types.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Types.o ) [ 6 of 16] Compiling Options.Applicative.Internal ( Options\Applicative\Internal.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Internal.o ) [ 7 of 16] Compiling Options.Applicative.Common ( Options\Applicative\Common.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Common.o ) [ 8 of 16] Compiling Options.Applicative.Help.Core ( Options\Applicative\Help\Core.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Core.o ) ghc.EXE: internal error: mkPath failed converting char* to wchar_t* (GHC version 8.2.1 for x86_64_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. -- While building custom Setup.hs for package fgl-5.5.4.0 using: C:\Users\User\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.0.0.2_ghc-8.2.1.exe --builddir=.stack-work\dist\e53504d9 build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 3 Logs have been written to: C:\Program Files\Haskell Platform\8.2.2\msys\home\User\work02\work03\clash-compiler\.stack-work\logs\fgl-5.5.4.0.log Configuring fgl-5.5.4.0... Preprocessing library for fgl-5.5.4.0.. Building library for fgl-5.5.4.0.. [ 1 of 29] Compiling Data.Graph.Inductive.Graph ( Data\Graph\Inductive\Graph.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Graph.o ) [ 2 of 29] Compiling Data.Graph.Inductive.Internal.Heap ( Data\Graph\Inductive\Internal\Heap.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Internal\Heap.o ) [ 3 of 29] Compiling Data.Graph.Inductive.Internal.Queue ( Data\Graph\Inductive\Internal\Queue.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Internal\Queue.o ) [ 4 of 29] Compiling Data.Graph.Inductive.Internal.RootPath ( Data\Graph\Inductive\Internal\RootPath.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Internal\RootPath.o ) [ 5 of 29] Compiling Data.Graph.Inductive.Internal.Thread ( Data\Graph\Inductive\Internal\Thread.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Internal\Thread.o ) [ 6 of 29] Compiling Data.Graph.Inductive.Basic ( Data\Graph\Inductive\Basic.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Basic.o ) [ 7 of 29] Compiling Data.Graph.Inductive.Monad ( Data\Graph\Inductive\Monad.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Monad.o ) ghc.EXE: internal error: mkPath failed converting char* to wchar_t* (GHC version 8.2.1 for x86_64_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. MSYS ~/work02/work03/clash-compiler $
このようなエラーがでてしまいます。コマンドプロンプトからstack build
しても同様でした。
ghc.EXE: internal error: mkPath failed converting char to wchar_t
次の情報がありました。
#14398 (Fail to install haskell platform on Windows) – GHC
ghc
のコードの該当箇所は下記のようです。
ghc/PathUtils.c at master · ghc/ghc · GitHub
mkPath
とあるのでパスにスペースがある部分がよくないのかもしれないと思い、スペースがないフォルダにて試しましたが、同じエラーが出ました。(ただしエラー対象になるパッケージは別)
せっかくWindowsマシンを買ったのにHaskell
が使えないのはちょっと残念です。
stack自体のupdateの作業ログ (2018年01月)
stack build
をすると、cabal
のバージョン不整合のエラーがでました。
$ stack build Unable to parse cabal file: FromString "This package requires at least Cabal version 2.0" Nothing
確認すると不整合はなさそうです。
$ cabal --version
cabal-install version 2.0.0.1
compiled using version 2.0.1.1 of the Cabal library
stackoverflow
に情報がありました。stack
自体のバージョンが1.5以上である必要があるとのこと。
バージョンを確認すると、1.1.2でした。
$ stack --version Version 1.1.2, Git revision cebe10e845fed4420b6224d97dcabf20477bbd4b (3646 commits) x86_64 hpack-0.14.0
本家サイトでアップデート方法を確認します。
Install/upgrade - The Haskell Tool Stack
それに従ってコマンドを入力するとエラーとなります。
$ curl -sSL https://get.haskellstack.org/ | sh Stack Version 1.1.2 already appears to be installed at: /usr/local/bin/stack Use 'stack upgrade' or your OS's package manager to upgrade, or pass '-f' to this script to over-write the existing binary, e.g.: curl -sSL https://get.haskellstack.org/ | sh -s - -f
エラーメッセージに従って、コマンドを入力すると最新版のダウンロードとインストールが始まりました。
$ stack upgrade remote: Counting objects: 13480, done. remote: Compressing objects: 100% (11071/11071), done. remote: Total 13480 (delta 3490), reused 10929 (delta 2132), pack-reused 0 Receiving objects: 100% (13480/13480), 3.87 MiB | 655.00 KiB/s, done. Resolving deltas: 100% (3490/3490), completed with 1189 local objects. From https://github.com/commercialhaskell/all-cabal-hashes + 89bc508...936cc04 hackage -> origin/hackage (forced update) - [tag update] current-hackage -> current-hackage Fetched package index. Populated index cache. stack-1.6.3: download Downloaded lts-9.14 build plan.
途中でワーニングが出ました。
Right Nothing Did not find .cabal file for Agda-2.5.3 with Git SHA of 82d11286c281716649dc25e0820b3e25214af971 Right Nothing WARNING: Ignoring unknown field "custom-setup" in package description WARNING: Ignoring unknown field "custom-setup" in package description No packages found in snapshot which provide a "hsc2hs" executable, which is a build-tool dependency of "stack" No packages found in snapshot which provide a "hsc2hs" executable, which is a build-tool dependency of "stack" Missing build-tools may be caused by dependencies of the build-tool being overridden by extra-deps. This should be fixed soon - see this issue https://github.com/commercialhaskell/stack/issues/595
stack
自体のコンパイルが実行されます。ここが時間がかかりました。
Configuring stack-1.6.3... stack-1.6.3: build Preprocessing library stack-1.6.3... [ 1 of 126] Compiling System.Terminal ( .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/System/Terminal.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/System/Terminal.o ) [ 2 of 126] Compiling Stack.Prelude ( src/Stack/Prelude.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Stack/Prelude.o ) [ 3 of 126] Compiling Stack.StaticBytes ( src/Stack/StaticBytes.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Stack/StaticBytes.o )
最後にパスの問題でワーニングが出てしまいました。
[1 of 2] Compiling Paths_stack ( .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_stack.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/stack/stack-tmp/Paths_stack.o ) [2 of 2] Compiling Main ( src/main/Main.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/stack/stack-tmp/Main.o ) Linking .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/stack/stack ... stack-1.6.3: copy/register Installing library in /private/var/folders/hw/p4bp49hd7v9_1j60sjvmhqnr0000gn/T/stack-upgrade57634/stack-1.6.3/.stack-work/install/x86_64-osx/lts-9.14/8.0.2/lib/x86_64-osx-ghc-8.0.2/stack-1.6.3-6ncwAxsY27uGm82EJKrhWo Installing executable(s) in /private/var/folders/hw/p4bp49hd7v9_1j60sjvmhqnr0000gn/T/stack-upgrade57634/stack-1.6.3/.stack-work/install/x86_64-osx/lts-9.14/8.0.2/bin Registering stack-1.6.3... Completed 179 action(s). Copying from /private/var/folders/hw/p4bp49hd7v9_1j60sjvmhqnr0000gn/T/stack-upgrade57634/stack-1.6.3/.stack-work/install/x86_64-osx/lts-9.14/8.0.2/bin/stack to /Users/foo/.local/bin/stack Copied executables to /Users/foo/.local/bin: - stack WARNING: Installation path /Users/foo/.local/bin not found on the PATH environment variable
絶対パスで確認するとインストールされています。
$ /Users/foo/.local/bin/stack --version
Version 1.6.3 x86_64 hpack-0.20.0
$
リンクを付け替えます。
$ ls -al /usr/local/bin | grep stack lrwxr-xr-x 1 foo admin 45 11 12 2016 resolve_stack_dump -> ../Cellar/mysql/5.7.16/bin/resolve_stack_dump lrwxr-xr-x 1 root admin 43 10 30 2016 stack -> /Library/Haskell/ghc-8.0.1-x86_64/bin/stack $ ln -s /Users/ogawanaoto/.local/bin/stack /usr/local/bin/stack ln: /usr/local/bin/stack: File exists $ ln -sf /Users/ogawanaoto/.local/bin/stack /usr/local/bin/stack $ stack --version Version 1.6.3 x86_64 hpack-0.20.0
cabal自身のバージョンアップの作業ログ (2018年01月時点)
cabal
は2017年8月からバージョンが2になっています。アップデートをサボっていたので更新作業をしまし。
バージョンの確認とパッケージ情報の更新をします。
$ cabal --version
cabal-install version 1.24.0.0
compiled using version 1.24.0.0 of the Cabal library
$ cabal update
Downloading the latest package list from hackage.haskell.org
cabal
とupdate
で検索するとcabal
がインストールするパッケージのアップデートの方法の情報がたくさんヒットします。cabal
自体のアップデートの情報はヒットしません。そこで、本家のサイトを確認します。
cabal install cabal cabal-install
と記載がされています。そのコマンドを実行します。
$ cabal install cabal cabal-install Resolving dependencies... cabal: Could not resolve dependencies: trying: cabal-0.0.0.0 (user goal) next goal: youProbablyWantCapitalCabal (dependency of cabal-0.0.0.0) Dependency tree exhaustively searched.
エラーが出てしまいます。解決方法はこちらに出ていました。cabal
がなくても大丈夫なようです。
$ cabal install cabal cabal-install errors · Issue #4178 · haskell/cabal · GitHub
$ cabal install cabal-install Resolving dependencies... Downloading Cabal-2.0.1.1... Downloading HTTP-4000.3.9... Configuring HTTP-4000.3.9... Downloading cryptohash-sha256-0.11.101.0... Configuring cryptohash-sha256-0.11.101.0... Downloading echo-0.1.3... Configuring echo-0.1.3... Downloading ed25519-0.0.5.0... Downloading edit-distance-0.2.2.1... Configuring Cabal-2.0.1.1... Downloading tar-0.5.0.3... Building HTTP-4000.3.9... Building cryptohash-sha256-0.11.101.0... Building echo-0.1.3... Building Cabal-2.0.1.1... Installed echo-0.1.3 Configuring edit-distance-0.2.2.1... Configuring ed25519-0.0.5.0... Installed cryptohash-sha256-0.11.101.0 Building edit-distance-0.2.2.1... Building ed25519-0.0.5.0... Configuring tar-0.5.0.3... Installed ed25519-0.0.5.0 Building tar-0.5.0.3... Installed edit-distance-0.2.2.1 Installed HTTP-4000.3.9 Installed tar-0.5.0.3 Installed Cabal-2.0.1.1 Downloading hackage-security-0.5.2.2... Configuring hackage-security-0.5.2.2... Building hackage-security-0.5.2.2... Installed hackage-security-0.5.2.2 Downloading cabal-install-2.0.0.1... Configuring cabal-install-2.0.0.1... Building cabal-install-2.0.0.1... Installed cabal-install-2.0.0.1 Updating documentation index /Users/foo/Library/Haskell/share/doc/x86_64-osx-ghc-8.0.1/index.html
バージョンの確認をしてみると、変わっていません。
$ cabal --version
cabal-install version 1.24.0.0
compiled using version 1.24.0.0 of the Cabal library
絶対パスで指定すると期待したバージョンになっています。
$ which cabal
/Users/ogawanaoto/Library/Haskell/bin/cabal
$ /Users/ogawanaoto/Library/Haskell/bin/cabal --version
cabal-install version 2.0.0.1
compiled using version 2.0.1.1 of the Cabal library
$
なので、設定の再読込をしました。
$ source ~/.bash_profile $ cabal --version cabal-install version 2.0.0.1 compiled using version 2.0.1.1 of the Cabal library $
2017年度末に中古のWindowsマシンを買った
事情があってWindowsPC
が必要になりました。購入の条件は以下を考えていました。
秋葉原の中古PCショップを周りました。中古市場に出ているPCは、メモリは4Gが中心でした。ディスクはHDDが中心です。希望する条件が厳しいようでした。どれかの条件を緩くすれば、秋葉原の中古PCショップで、お手頃な価格帯の中古PCはたくさんあると感じました。
新品のPCも、秋葉原の家電量販店を見て回ったのですが、希望するスペックに近いPCだと最低でも12〜13万円程度はする感じでした。
いろいろ店舗を巡って、やっぱり新品のPCを買ったほうが良いかとも悩みました。Surface
の一番低いスペックのもので15万円代もありました。これは、完全に大幅な予算オーバーなのですが、店舗で実機を触ってみると、欲しくもなりました。
いろいろ迷いましたが、結局Amazon
で中古PCを購入しました。ノートPCのページに行くと左側で条件を選択できるようになっていて、そこで絞り込みをして、条件に合う中古ショップから購入しました。
中古を買うということで少し心配していたのですが、アマゾンでのショップの評価も良かったことと、秋葉原の中古PCショップを巡って感じた相場の価格帯より安かったので、アマゾン経由で買うこととしました。年末ということで、配送遅延も心配したのですが、遅延なく配送されました(むしろ早すぎたくらい)。ドライバやWindwosのアップデートで時間を取られましたが、とくに大きな問題もなく使えそうで、お買い得だったと思っています。
DVDのリーダーライターもついていました。
プチプチに包まれていました。
レッツノートです。
サクッと起動します。(SSDだから?)
↑↓希望するスペックでした。
Windows環境のVivadoが起動しなくなった
Vivado
が起動しなくなりかなり焦りました。Windows
マシンにいろいろアプリケーションをインストールしているので、それらが影響したのかと思い、PATH
設定を見直しましたが、関係ありませんでした。どうやら、Windowsアップデートの影響(?)で起動しなくなったようです。解決方法は下のリンク先に書いてあります。なんでこんな野暮ったいやりかたで解決するのか不思議です。