Skip to content

Commit

Permalink
0.9.4 Release (#256)
Browse files Browse the repository at this point in the history
Release 0.9.4 contains a variety of new features including:

* A new Branch Predictor
* Draft of an Apple M1 Firestorm core model
* Update targetted AArch64 support to Armv9.2
* New creation process for modelled core
* SimEng output prefixes
  • Loading branch information
jj16791 authored Oct 18, 2022
1 parent 1401c0c commit 62c2890
Show file tree
Hide file tree
Showing 120 changed files with 7,604 additions and 18,119 deletions.
7 changes: 3 additions & 4 deletions .jenkins/build_arm20.sh → .jenkins/build_arm22.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ source .jenkins/build_test_run.sh
checkout

## Setup environment
module load cdt/20.03
export CMAKE_C_COMPILER=cc
export CMAKE_CXX_COMPILER=CC

## Load compilers/libraries
echo "Compiler Armclang 20.0"
module swap PrgEnv-cray PrgEnv-allinea
module swap Generic-AArch64/SUSE/12/arm-linux-compiler/20.0 ThunderX2CN99/SUSE/12/arm-linux-compiler-20.0/armpl/20.0.0
echo "Compiler Armclang 22.0.2"
module use /software/arm64/modulefiles
module load tools/arm-compiler-sles
module load tools/cmake

## Build, test, and run SimEng
Expand Down
8 changes: 4 additions & 4 deletions .jenkins/build_test_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ run () {
echo "Simulation without configuration file argument:"
cat run
echo ""
compare_outputs "$(tail -n 3 run | head -n 1)" "retired: 3145731" "retired instructions"
compare_outputs "$(tail -n 1 run | cut -c10-16)" "3145738" "simulated ticks"
compare_outputs "$(grep "retired:" run | rev | cut -d ' ' -f1 | rev)" "3145731" "retired instructions"
compare_outputs "$(grep "cycles:" run | rev | cut -d ' ' -f1 | rev)" "3145736" "simulated cycles"
echo ""

./bin/simeng "$SIMENG_TOP"/configs/tx2.yaml > run
echo "Simulation with configuration file argument:"
cat run
echo ""
compare_outputs "$(tail -n 3 run | head -n 1)" "retired: 3145732" "retired instructions"
compare_outputs "$(tail -n 1 run | cut -c10-16)" "1048593" "simulated ticks"
compare_outputs "$(grep "retired:" run | rev | cut -d ' ' -f1 | rev)" "3145732" "retired instructions"
compare_outputs "$(grep "cycles:" run | rev | cut -d ' ' -f1 | rev)" "1048588" "simulated cycles"
echo ""
}

Expand Down
26 changes: 18 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ FetchContent_Declare(
)

FetchContent_Declare(
capstone
capstone-lib
GIT_REPOSITORY https://github.com/UoB-HPC/capstone.git
GIT_TAG e7be7d99e718ef9741026b80fc6f5e100fdf4f94 # trunk
GIT_TAG Armv9.2-update
GIT_PROGRESS TRUE

# Old Git tag pre-Armv9.2
# GIT_TAG e7be7d99e718ef9741026b80fc6f5e100fdf4f94 # trunk
)

cmake_policy(SET CMP0048 NEW)
project(SimEng VERSION 0.9.3 LANGUAGES C CXX)
project(SimEng VERSION 0.9.4 LANGUAGES C CXX)

# If no build type was defined, default to Release
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -87,6 +91,7 @@ install(DIRECTORY src/include/simeng
set(CAPSTONE_BUILD_TESTS OFF CACHE BOOL "Disable Capstone tests")
set(CAPSTONE_BUILD_SHARED OFF CACHE BOOL "Disable Capstone shared library")
set(CAPSTONE_BUILD_CSTOOL OFF CACHE BOOL "Disable cstool build")
set(CAPSTONE_INSTALL OFF CACHE BOOL "Disable install of capstone")

set(CAPSTONE_ARM_SUPPORT OFF CACHE BOOL "Disable A32 support")
set(CAPSTONE_MIPS_SUPPORT OFF CACHE BOOL "Disable MIPS support")
Expand All @@ -104,7 +109,7 @@ set(CAPSTONE_WASM_SUPPORT OFF CACHE BOOL "Disable WASM support")
set(CAPSTONE_BPF_SUPPORT OFF CACHE BOOL "Disable BPF support")
set(CAPSTONE_RISCV_SUPPORT OFF CACHE BOOL "Disable RISCV support")

FetchContent_MakeAvailable_Args(capstone EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable_Args(capstone-lib EXCLUDE_FROM_ALL)
include_directories("${capstone_BINARY_DIR}/include" "${capstone_SOURCE_DIR}/include")

## Setup yaml-cpp ##
Expand All @@ -118,7 +123,7 @@ option(SIMENG_USE_EXTERNAL_LLVM "Use an external LLVM rather than building it as
option(SIMENG_SANITIZE "Enable compiler sanitizers" OFF)
option(SIMENG_OPTIMIZE "Enable Extra Compiler Optimizatoins" OFF)

if(SIMENG_OPTIMIZE)
if (SIMENG_OPTIMIZE)
# Turn on link time optimization for all targets.
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)

Expand Down Expand Up @@ -177,12 +182,17 @@ if(SIMENG_ENABLE_TESTS)
# make sure we get the headers too
include_directories("${llvm_BINARY_DIR}/include" "${llvm_SOURCE_DIR}/include")

find_package(LLVM REQUIRED CONFIG NO_DEFAULT_PATH
find_package(LLVM REQUIRED CONFIG NO_DEFAULT_PATH
PATHS "${llvm_BINARY_DIR}/lib/cmake/llvm")

# NOTE: we don't do the usual version checks here because it needs vars exported in find_LLVM
# we just assume it's good beacuse it must be whitelisted in FetchContent_Declare


endif()

# Check LLVM version
if ((${LLVM_PACKAGE_VERSION} VERSION_LESS "9.0") OR (${LLVM_PACKAGE_VERSION} VERSION_GREATER_EQUAL "13.0"))
message(FATAL_ERROR "LLVM version must be >= 9.0 and < 13.0")
endif()

set(SIMENG_LLVM_VERSION ${LLVM_VERSION_MAJOR} CACHE INTERNAL "LLVM major version number used.")
Expand Down
38 changes: 18 additions & 20 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
Major contributors to SimEng to date include:

Project leader
Simon McIntosh-Smith
Project leader:
Simon McIntosh-Smith

Original SimEng design and implementation:
Hal Jones
James Price
Hal Jones
James Price

Current development team:
Jack Jones (lead developer)
Finn Wilkinson

Prior development members:
Harry Waugh

Code reviewers:
Andrei Poenaru

Build structure design:
Tom Lin
Jack Jones (Lead Developer)
Finn Wilkinson
Rahat Muneeb
Daniel Weaver

Internship contributions:
Daniel Weaver
Mutalib Mohammed
Seunghun Lee
Additional Contributors:
Ainsley Rutterford
Andrei Poenaru
Harry Waugh
Mutalib Mohammed
Seunghun Lee
Tom Hepworth
Tom Lin
Will Robinson

SimEng's development has been funded by the UKRI/EPSRC ASiMoV project, EP/S005072/1.
31 changes: 31 additions & 0 deletions LICENSE_CAPSTONE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
This is the software license for Capstone disassembly framework.
Capstone has been designed & implemented by Nguyen Anh Quynh <[email protected]>

See http://www.capstone-engine.org for further information.

Copyright (c) 2013, COSEINC.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the developer(s) nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
28 changes: 28 additions & 0 deletions LICENSE_GTEST.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Copyright 2008, Google Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 62c2890

Please sign in to comment.