iT邦幫忙

2026 iThome 鐵人賽

DAY 3
0

不免俗地來個專屬 systemC 的 hello
只要依照以下步驟跑 ./run_docker.sh 再到 systemc_hello 下跑 ./run.sh 就可以了
git tag: ithome2026_D3

Thu Sep 17 11:56 PM [~]
root@HSU-PC:[TINY5_OOO]<main>$ git clone git@github.com:hsufit/TINY5_OOO.git
Thu Sep 17 11:57 PM [~]
root@HSU-PC:[TINY5_OOO]<main>$ cd TINY5_OOO
Thu Sep 17 11:57 PM [~/TINY5_OOO]
root@HSU-PC:[TINY5_OOO]<main>$ ./run_docker.sh
Docker image tiny5-dev already exists.
Do you want to rebuild it? (y/N): y
Rebuilding Docker image: tiny5-dev
...
Successfully built 05bc359edbac
Successfully tagged tiny5-dev:latest
Starting Docker container...
root@b8897fc145a0:/workspace# cd systemc_hello/
root@b8897fc145a0:/workspace/systemc_hello# ./run.sh
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SystemC 3.0.2.20251031 via SystemCLanguage
-- Configuring done
-- Generating done
-- Build files have been written to: /workspace/systemc_hello/build
[ 50%] Building CXX object CMakeFiles/systemc_hello.dir/main.cpp.o
[100%] Linking CXX executable systemc_hello
[100%] Built target systemc_hello
Internal ctest changing into directory: /workspace/systemc_hello/build
Test project /workspace/systemc_hello/build
    Start 1: systemc_hello
1/1 Test #1: systemc_hello ....................   Passed    0.01 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.01 sec

        SystemC 3.0.2-Accellera --- Sep 17 2026 05:03:41
        Copyright (c) 1996-2025 by all Contributors,
        ALL RIGHTS RESERVED
0 s: Hello, SystemC!
10 ns: Hello, SystemC!

Info: /OSCI/SystemC: Simulation stopped by user.
root@b8897fc145a0:/workspace/systemc_hello#

P.S. 開發中發現 ubuntu 從 22.04 就有 riscv gcc toolchain 了,不用自己編了蒸蚌


上一篇
化生萬物
下一篇
Simple Emulator based on systemC
系列文
猴子都寫得出來的 RISC-V OoO CPU5
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言