1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

bash
$ docker run -it chisel /bin/bash
Unable to find image 'chisel:latest' locally
docker: Error response from daemon: pull access denied for chisei, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

あ、chiselは無いのね。javaから初めてみる。

java

bash
$ docker run -it java /bin/bash
Unable to find image 'java:latest' locally
latest: Pulling from library/java
5040bd298390: Pull complete 
fce5728aad85: Pull complete 
76610ec20bf5: Pull complete 
60170fec2151: Pull complete 
e98f73de8f0d: Pull complete 
11f7af24ed9c: Pull complete 
49e2d6393f32: Pull complete 
bb9cdec9c7f3: Pull complete 
Digest: sha256:c1ff613e8ba25833d2e1940da0940c3824f03f802c449f3d1815a66b7f8c0e9d
Status: Downloaded newer image for java:latest
root@80a72383aa40:/# apt update; apt -y upgrade

...

Get:7 http://deb.debian.org jessie/main amd64 Packages [9098 kB]                                                                                                         
Err http://deb.debian.org jessie-backports/main amd64 Packages                                                                                                           
  
Err http://deb.debian.org jessie-backports/main amd64 Packages                                                                                                           
  
Err http://deb.debian.org jessie-backports/main amd64 Packages                                                                                                           
  404  Not Found
Fetched 10.2 MB in 10s (972 kB/s)                                                                                                                                        
W: There is no public key available for the following key IDs:
AA8E81B4331F7F50
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

...

Fetched 81.0 MB in 8s (9528 kB/s)                                                                                                                                        
debconf: delaying package configuration, since apt-utils is not installed

...

# apt install chisel
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package chisel

Build Your Own Chisel Projects
See the setup instructions for how to set up your environment to build Chisel locally.

g++入れるのなら、docker runでgccを指定した方がよかったかも。2回目はubuntuから始めて見た。

bash
# apt install -y git make autoconf g++ flex bison	
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version.
The following extra packages will be installed:
  automake autotools-dev binutils cpp cpp-4.9 g++-4.9 gcc gcc-4.9 libasan1 libatomic1 libbison-dev libc-dev-bin libc6-dev libcilkrts5 libcloog-isl4 libfl-dev
  libgcc-4.9-dev libgomp1 libisl10 libitm1 liblsan0 libmpc3 libmpfr4 libquadmath0 libsigsegv2 libstdc++-4.9-dev libtsan0 libubsan0 linux-libc-dev m4 manpages
  manpages-dev
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc libtool gettext binutils-doc bison-doc cpp-doc gcc-4.9-locales build-essential g++-multilib g++-4.9-multilib gcc-4.9-doc
  libstdc++6-4.9-dbg gcc-multilib gdb gcc-doc gcc-4.9-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan1-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg
  libcilkrts5-dbg libquadmath0-dbg glibc-doc libstdc++-4.9-doc make-doc man-browser
The following NEW packages will be installed:

# git clone http://git.veripool.org/git/verilator	
Cloning into 'verilator'...
remote: Enumerating objects: 59981, done.
remote: Counting objects: 100% (2473/2473), done.
remote: Compressing objects: 100% (1279/1279), done.
remote: Total 59981 (delta 1639), reused 1760 (delta 1192), pack-reused 57508
Receiving objects: 100% (59981/59981), 26.27 MiB | 6.54 MiB/s, done.
Resolving deltas: 100% (50993/50993), done.
Checking connectivity... done.
# cd verilator
# git pull
Already up-to-date.
# git checkout v4.016
Note: checking out 'v4.016'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at c53ea10... Version bump


docker hubに保存してみた。

bash
$ docker push  kaizenjapan/chisel
The push refers to repository [docker.io/kaizenjapan/chisel]
a1f484c2108f: Pushed 
35c20f26d188: Mounted from library/java 
c3fe59dd9556: Mounted from library/java 
6ed1a81ba5b6: Mounted from library/java 
a3483ce177ce: Mounted from library/java 
ce6c8756685b: Mounted from library/java 
30339f20ced0: Mounted from library/java 
0eb22bfb707d: Mounted from library/java 
a2ae92ffcd29: Mounted from library/java 
latest: digest: sha256:8050cbc6fcb10efc83e0b25d6ce9bb7595c05e087582a7ea3a8ec60c5fe8a198 size: 2213

OgawaKiyoshi-no-MacBook-Pro:~ ogawakiyoshi$ docker commit c884c5dc53e1 kaizenjapan/chisel2
sha256:fe3e562b0b491067dcfe64a640a52e34c0b92c8a2be0e7af02ddf5a9bc86e8cc
OgawaKiyoshi-no-MacBook-Pro:~ ogawakiyoshi$ docker push  kaizenjapan/chisel2
The push refers to repository [docker.io/kaizenjapan/chisel2]
050d2649e2aa: Pushed 
9f54eef41275: Mounted from kaizenjapan/wordcount 
latest: digest: sha256:9375c8065878c04e6c70addd0d99c4993b31dfba176b54ef75476d9ab1b415cf size: 742
OgawaKiyoshi-no-MacBook-Pro:~ ogawakiyoshi$ 


後者がubuntuから始めたもの。
docker をJAVAから作るより、ubuntuから作れば、小さいことがわかった。

課題として、JAVAの方は、いくつかのモジュールに分かれており、更新するモジュールが小さい。ubuntuから作った方は、モジュール数が2つで、一方はubuntu。もう一つの更新するモジュールが1.数Gになって更新時間がややかかるのが難点かも。

ubuntu

bash
$ docker run -it ubuntu /bin/bash

ubuntuから初めてみた。aptでsbtはだめだがverilatorはあるらしい。

``

apt update; apt -y upgrade

root@c884c5dc53e1:/# apt install sbt verilator
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package sbt
root@c884c5dc53e1:/# apt install verilator
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libsystemc libsystemc-dev
Suggested packages:
gtkwave
The following NEW packages will be installed:
libsystemc libsystemc-dev verilator
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.


たんたんと手順を踏むことにした。

```ubuntu:bash
# apt install default-jdk

...

debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Configuring tzdata
------------------

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.

  1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
  2. America     5. Arctic     8. Europe    11. SystemV
  3. Antarctica  6. Asia       9. Indian    12. US
Geographic area: 6

Please select the city or region corresponding to your time zone.

  1. Aden         24. Dubai         47. Kuching       70. Shanghai
  2. Almaty       25. Dushanbe      48. Kuwait        71. Singapore
  3. Amman        26. Famagusta     49. Macau         72. Srednekolymsk
  4. Anadyr       27. Gaza          50. Magadan       73. Taipei
  5. Aqtau        28. Harbin        51. Makassar      74. Tashkent
  6. Aqtobe       29. Hebron        52. Manila        75. Tbilisi
  7. Ashgabat     30. Ho_Chi_Minh   53. Muscat        76. Tehran
  8. Atyrau       31. Hong_Kong     54. Nicosia       77. Tel_Aviv
  9. Baghdad      32. Hovd          55. Novokuznetsk  78. Thimphu
  10. Bahrain     33. Irkutsk       56. Novosibirsk   79. Tokyo
  11. Baku        34. Istanbul      57. Omsk          80. Tomsk
  12. Bangkok     35. Jakarta       58. Oral          81. Ujung_Pandang
  13. Barnaul     36. Jayapura      59. Phnom_Penh    82. Ulaanbaatar
  14. Beirut      37. Jerusalem     60. Pontianak     83. Urumqi
  15. Bishkek     38. Kabul         61. Pyongyang     84. Ust-Nera
  16. Brunei      39. Kamchatka     62. Qatar         85. Vientiane
  17. Chita       40. Karachi       63. Qostanay      86. Vladivostok
  18. Choibalsan  41. Kashgar       64. Qyzylorda     87. Yakutsk
[More] 

  19. Chongqing   42. Kathmandu     65. Rangoon       88. Yangon
  20. Colombo     43. Khandyga      66. Riyadh        89. Yekaterinburg
  21. Damascus    44. Kolkata       67. Sakhalin      90. Yerevan
  22. Dhaka       45. Krasnoyarsk   68. Samarkand
  23. Dili        46. Kuala_Lumpur  69. Seoul
Time zone: 79

Current default time zone: 'Asia/Tokyo'
Local time is now:      Sun Dec 19 14:41:13 JST 2021.
Universal Time is now:  Sun Dec 19 05:41:13 UTC 2021.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

...

debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype

...

debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
128 added, 0 removed; done.

# apt install -y git make autoconf g++ flex bison
# git clone http://git.veripool.org/git/verilator
# cd verilator
# git pull
# git checkout v4.016
# unset VERILATOR_ROOT # For bash, unsetenv for csh
# autoconf # Create ./configure script
# ./configure
# make

%Warning: No git revision found, at ./config_rev.pl line 36.

RISC-VとChiselで学ぶCPU自作

docker fileがあった。

エラー

ディレクトリを移動しないでgit pullすると次のエラーがでる。

# git pull
fatal: Not a git repository (or any of the parent directories): .git

#参考資料

初めてのChisel - インストール編

初めてのChisel - コンパイル編

Chiselで始める爆速LSI設計

初めてのChisel - テスト、制約、エラー

ASIC開発におけるChiselの課題

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?