FPGAというより、コンピュータアーキテクチャかもね! カテゴリ別記事インデックス https://msyksphinz.github.io/github_pages

AWS上で動作するRISC-VチップFireSimのチュートリアルを試す 2. インスタンスの設定とAWSの起動







次にストレージを追加する。デフォルトでは75GBと設定されているが、これを300GBまで拡張する。 Vivadoでの合成を含めると、とても75GBでは足りないからだ。





ログインして、起動状態を確認する。ログインにはAWSで設定したpemファイルを指定する必要がある。これはAWS 上記で設定した起動スクリプトが正しく動作しているかを確認するためだ。

centos@ip-192-168-4-15.ec2.internal:~$ cat machine-launchstatus
machine launch script started
machine launch script completed

machine launch script completed と表示されていれば、起動処理が完了していることを示している。


Now that our manager instance is started, copy the private key that you downloaded from AWS earlier (firesim.pem) to ~/firesim.pem on your manager instance. This step is required to give the manager access to the instances it launches for you. また、パーミッションを変えておく。

$ chown 600 ~/firesim.pem



$ git clone https://github.com/firesim/firesim
$ cd firesim
$ ./build-setup.sh fast


$ source sourceme-f1-manager.sh
success: firesim.pem available in ssh-agent


$ firesim managerinit
FireSim Manager. Docs: http://docs.fires.im
Running: managerinit

Running aws configure. You must specify your AWS account info here to use the FireSim Manager.
[localhost] local: aws configure
AWS Access Key ID [None]: 【AWSアクセスキーを入力する】
AWS Secret Access Key [None]: 【AWSシークレットアクセスキーを入力する】
Default region name [None]: us-east-1
Default output format [None]: json
Backing up initial config files, if they exist.
Creating initial config files from examples.
If you are a new user, supply your email address [abc@xyz.abc] for email notifications (leave blank if you do not want email notifications): 【Notification用のメールアドレスを入力する】
You should receive a message at
asking to confirm your subscription to FireSim SNS Notifications. You will not
receive any notifications until you click the confirmation link.
FireSim Manager setup completed.
The full log of this run is:

付録: [高度な詳細]でテキストボックスに追加するコード

echo "machine launch script started" > /home/centos/machine-launchstatus
sudo yum install -y mosh
sudo yum groupinstall -y "Development tools"
sudo yum install -y gmp-devel mpfr-devel libmpc-devel zlib-devel vim git java java-devel
curl https://bintray.com/sbt/rpm/rpm | sudo tee /etc/yum.repos.d/bintray-sbt-rpm.repo
sudo yum install -y sbt texinfo gengetopt
sudo yum install -y expat-devel libusb1-devel ncurses-devel cmake "perl(ExtUtils::MakeMaker)"
# deps for poky
sudo yum install -y python34 patch diffstat texi2html texinfo subversion chrpath git wget
# install DTC. it's not available in repos in FPGA AMI
wget https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/$DTCversion.tar.gz
tar -xvf $DTCversion.tar.gz
cd $DTCversion
make -j16
make install
cd ..
rm -rf $DTCversion.tar.gz
rm -rf $DTCversion

# get a proper version of git
sudo yum -y remove git
sudo yum -y install epel-release
sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm
sudo yum -y install git2u

# bash completion for manager
sudo yum -y install bash-completion

# graphviz for manager
sudo yum -y install graphviz python-devel

# these need to match what's in deploy/requirements.txt
sudo pip install fabric==1.14.0
sudo pip install boto3==1.6.2
sudo pip install colorama==0.3.7
sudo pip install argcomplete==1.9.3
sudo pip install graphviz==0.8.3
# for some of our workload plotting scripts
sudo pip install matplotlib==2.2.2
sudo pip install pandas==0.22.0

sudo activate-global-python-argcomplete

# get a regular prompt
echo "PS1='\u@\H:\w\\$ '" >> /home/centos/.bashrc
echo "machine launch script completed" >> /home/centos/machine-launchstatus