Article #1016

既に発行済みのブログであっても適宜修正・追加することがあります。
We may make changes and additions to blogs already published.
posted by sakurai on September 5, 2025 #1016

Bsimシミュレーション

bsimシミュレーションを実行します。

$ make bsim
bsc -sim -bdir bsim -u -g mkTopDirect TopDirect.bsv
checking package dependencies
All packages are up to date.
cd bsim && \
    bsc -sim -bdir . -e mkTopDirect -o ../mkTopDirect.exe
/home/sakurai/src/bsv/testFSM_preemptive/bsim
Warning: Command line: (S0073)
  Duplicate directories were found in the path specified with the -p flag.
  Only the first occurrence will be used. The duplicates are:
    /home/sakurai/src/bsv/testFSM_preemptive/bsim
  Note that when the -bdir flag is used, that directory is automatically added
  to the head of the path.
Bluesim object reused: mkTopDirect.{h,o}
Bluesim object created: model_mkTopDirect.{h,o}
Simulation shared library created: ../mkTopDirect.exe.so
Simulation executable created: ../mkTopDirect.exe
./mkTopDirect.exe -V bsim.vcd
10: consume = 1
10: produce = 1
110: consume = 9
110: produce = 9
210: consume = d
210: produce = d
310: consume = f
310: produce = f
410: consume = e
410: produce = e
510: consume = 7
510: produce = 7
610: consume = a
610: produce = a
710: consume = 5
710: produce = 5
810: consume = b
810: produce = b
910: consume = c
910: produce = c
=== simulation finished ===

シミュレーション波形を確認します。

$ gtkwave -A bsim.vcd

図%%.1
図1016.1 bsimシミュレーション波形

左矢前のブログ 次のブログ右矢

Leave a Comment

Your email address will not be published.

You may use Markdown syntax. If you include an ad such as http://, it will be invalidated by our AI system.

Please enter the numbers as they are shown in the image above.