picosim
所属分类:处理器开发
开发工具:C
文件大小:0KB
下载次数:0
上传日期:2023-09-30 09:11:49
上 传 者:
sh-1993
说明: RP2040微控制器模拟器,
(Simulator of RP2040 microcontroller,)
文件列表:
.clang-format (1388, 2023-10-12)
CMakeLists.txt (3044, 2023-10-12)
LICENSE (11357, 2023-10-12)
Makefile (947, 2023-10-12)
artifacts/ (0, 2023-10-12)
artifacts/cortex-m0-long-opcodes.txt (16932, 2023-10-12)
artifacts/cortex-m0-short-opcodes.txt (1766107, 2023-10-12)
artifacts/hello_serial-pico.elf (265252, 2023-10-12)
artifacts/hello_world-cm0p.elf (151576, 2023-10-12)
artifacts/pico-bootrom-b2.dis (308712, 2023-10-12)
artifacts/pico-bootrom-b2.elf (231324, 2023-10-12)
artifacts/rom-to-c.sh (173, 2023-10-12)
artifacts/syscalls.txt (1231, 2023-10-12)
doc/ (0, 2023-10-12)
doc/ARM7-TDMI-manual-pt3.pdf (399807, 2023-10-12)
doc/DDI0419D_armv6m_arm.pdf (2265286, 2023-10-12)
doc/Thumb-decode.pdf (31343, 2023-10-12)
doc/ThumbRefCard.pdf (129945, 2023-10-12)
doc/rp2040-datasheet.pdf (5121303, 2023-10-12)
src/ (0, 2023-10-12)
src/CMakeLists.txt (679, 2023-10-12)
src/bus_controller.cpp (6895, 2023-10-12)
src/bus_controller.h (3200, 2023-10-12)
src/debug.cpp (8196, 2023-10-12)
src/debug.h (909, 2023-10-12)
src/disassemble.cpp (21980, 2023-10-12)
src/disassemble.h (1445, 2023-10-12)
src/exec_elf32.h (14040, 2023-10-12)
src/flash.cpp (4690, 2023-10-12)
src/instructions.cpp (26163, 2023-10-12)
src/log.cpp (1531, 2023-10-12)
src/log.h (427, 2023-10-12)
src/main.cpp (5853, 2023-10-12)
src/periph_names.cpp (40725, 2023-10-12)
src/peripherals.cpp (4399, 2023-10-12)
... ...
# Simulator of RP2020 microcontroller
Picosim is a system level simulator of RP2040 based boards.
The simulator is based on SystemC framework.
# Usage
$ picosim
RP2040 Simulator, Version 0.1
Usage:
picosim [-L FILE] [-D] filename.elf
Options:
-L FILE Enable log output to the specified file
-D Debug session
-h Show the usage
-V Show the version and finish
# Build
Build the SystemC library from sources for C++17 compiler:
wget https://www.accellera.org/images/downloads/standards/systemc/systemc-2.3.3.tar.gz
tar xzf systemc-2.3.3.tar.gz
cd systemc-2.3.3
mkdir build
cd build
cmake .. -DCMAKE_CXX_STANDARD=17 -DDISABLE_COPYRIGHT_MESSAGE=ON -DCMAKE_INSTALL_PREFIX=/usr/local
make
make install
The SystemC library is sensitive to the C++ standard.
It must be compiled with option -std=c++17, to match the simulator.
We cannot rely on a traditional install like 'apt install libsystemc-dev' or 'brew install systemc'.
It would not link with the simulator.
Configure and build the simulator
$ cd picosim
$ mkdir build
$ cd build
$ cmake ..
$ make
$ make install
# Testing
Run all tests:
$ cd build
$ make test
Running tests...
Start 1: tlm.smoke_test
1/91 Test #1: tlm.smoke_test ................... Passed 0.00 sec
...
Start 89: c_extension.cswsp_test
89/91 Test #89: c_extension.cswsp_test ........... Passed 0.00 sec
Start 90: c_extension.cxor_test
90/91 Test #90: c_extension.cxor_test ............ Passed 0.01 sec
Start 91: disasm.disasm_test
91/91 Test #91: disasm.disasm_test ............... Passed 0.00 sec
100% tests passed, 0 tests failed out of 91
Total Test time (real) = 0.40 sec
Test run can be made faster by setting the variable `CTEST_PARALLEL_LEVEL` to the number of available processors
on your workstation. For example:
$ export CTEST_PARALLEL_LEVEL=16
You can also start the tests with `ctest` utility. See `ctest --help` for options.
To run one specific test or a subset of tests, invoke `ctest` with `-R` option and a test name or a matching substring.
Add -V to show the full output.
# Links
TODO
近期下载者:
相关文件:
收藏者: