作ろう!CPU
2020
MacでFPGAを扱うのは、かなり厄介です。 何らかの方法でMac上にLinuxの環境を作って、その上でVivadoを動かすことになります。
Windowsでやろ〜
FPGA評価ボードの用意
Xilinx社のFPGAコア「Spartan-7」搭載のArty-S7-50がリファレンスとしておすすめされている
Quartusのインストール方法と使用方法のページは未作成です。 動作確認は取れているので、そのうち説明ページを作ります。 2023-04-18 まだ
会員登録をする
DE0-CV_v.1.2.1_SystemCD.zip をダウンロード
もうわからないので、マニュアルを読みくらべていく
DE0-CVにはCDには3つのツールがはいっている
Control Panel
The DE0-CV board comes with a Control Panel program that allows users to access various
components on the board from a host computer. The host computer communicates with the board
through a USB connection. The program can be used to verify the functionality of components on
the board or be used as a debug tool while developing any RTL code.
プロジェクトを作りたいので、これではなさそうだ
FPGAをPCにに接続しないで起動するとエラーが出る
Starter Kit
p.18
The DE0-CV board contains a serial configuration device that stores configuration data for the
Cyclone V FPGA. This configuration data is automatically loaded from the configuration device into the FPGA when powered on. Using the Quartus II software, it is possible to reconfigure the
FPGA at any time, and it is also possible to change the non-volatile data that is stored in the serial
configuration device. Both types of programming methods are described below
自動的に実行されそうだし、プロジェクト作成には関係なさそうだ
System Builder
The DE0-CV System Builder is a Windows-based utility. It is designed to help users create a
Quartus II project for DE0-CV within minutes. The generated Quartus II project files include:
Quartus II project file (.qpf)
Quartus II setting file (.qsf)
Top-level design file (.v)
Synopsis design constraints file (.sdc)
Pin assignment document (.htm)
The above files generated by the DE0-CV System Builder can also prevent occurrence of situations
that are prone to compilation error when users manually edit the top-level design file or place pin
assignment. The common mistakes that users encounter are:
Board is damaged due to incorrect bank voltage setting or pin assignment.
Board is malfunctioned because of wrong device chosen, declaration of pin location or direction is incorrect or forgotten.
Performance degradation due to improper pin assignment.
これっぽい
何をやるのか整理
https://gyazo.com/88714fc28b77da5b24a4ade8c5c6708b
DE-0CVのSystem BuilderでQuartusのプロジェクトを作成できるので、1, 2は無視でいいだろう。
3を読むとVivadoに何やら設定をしている
要するに Arty-S7-50 に搭載されている Spartan-7 の中に、 Vivado を使って回路を書き込みたいのです。 重要なポイントは、 Arty-S7-50 と Vivado は別会社の製品ということです。 そのため Arty-S7-50 に固有の設定を Vivado に追加する必要があります。 今回はこの追加作業を行いました
おそらくこの固有の設定はSystem Bilderではやってくれるだろう
DE-0CVのCyclone V FPGAとQuartusは両方intel製
4プロジェクトの作成
GitHubからソースを落とす
中身はVerilogのコードとtclというコードが有る
board .tcl
mainとFPGA評価ボードをつなぐ設定
main
program
ROMに乗せる機械語が入っているコード
この階層にプロジェクトを作っていく
RTL Project (RTLはResister Transfer Levelの略称で、要するにハードウェア記述言語で書かれたプロジェクトということです。) を作る
Target Languageはverilogでmain
いくつかのファイルを追加
mainとtestとrom_data.mem
Constraintsを追加
これがFPGA評価ボードにちょって違う
シミュレーションを動かしていく...
kadoyau.icon著者の記述を待ったほうが良さそうな空気が出てくる
System Builderを立ち上げる
Tools\SystemBuilderにあるので起動する
https://gyazo.com/5311b0d5261e9b8560305534d8c49270
RTLとか選ぶ場所なにもない
ハードウェアは全部使わないのでチェックボックスを外す
kadoyau.icon PS2、時代を感じる
Quartusのプロジェクトを作成したが、Quartus本体自体はインストールされないことに気づく
version 20.1をインストールした
SystemBuilderで作成したqpfファイル(プロジェクトファイルっぽい)をQuartus Primeで開く
試しにコンパイルするとなんか通っている。40秒ぐらいかかる
これが何をしているのかわかってない
https://gyazo.com/032e4f8995dd5917de03f6c502642803
次回
プロジェクトファイルが移植できるのかを試す