- The open source community has a wealth of different CPU models, each with their own API
- Similarly, various open source (and commercial) virtual prototype simulation frameworks exists, again each with their own APIs
- Re-using CPU models across these frameworks requires individual, laborious adaptation
- OpenCpuX provides a standard, open source set of APIs to integrate CPU models into a (virtual prototype) simulator
- The APIs are freely accessible under an open source license
- Foster re-use of CPU models across various simulation frameworks and reduces repetitive adaptation work
- CMake, version 3.6 or higher
gcc
andg++
-
Clone the repository and
cd
into the repository -
Initialize and update the googletest submodule:
git submodule init git submodule update
-
Create a
BUILD
directorymkdir BUILD cd BUILD
-
Run CMake, then
make
to build both the test harness and the dummy core in x64 mode:CXX="g++ -m64" CC="gcc -m64" cmake .. # on bash, or set CXX="g++ -m64"; set CC="gcc -m64"; cmake .. # on csh make
-
As a sanity test, you can try and run the test harness against the dummy core integration. As this core integration does not actually implement any core behavior, only the most basic test is executed by the
test
targetmake test Start 1: smoke 1/1 Test #1: smoke ............................ Passed 0.00 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 0.01 sec
-
Start Visual Studio
-
Use File -> Open Folder... to open the directory to which you have cloned the ocx repository.
-
Visual Studio will detect that this is a CMake project and will generate the necessary build files. Once this has completed ...
-
Build -> Build all
-
As a sanity test, you can try and run the test harness against the dummy core integration. As this core integration does not actually implement any core behavior, only the most basic test is executed by the
test
targetTest -> Run CTest for ocx Start 1: smoke 1/1 Test #1: smoke ............................ Passed 0.16 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 0.18 sec