Showing preview only (1,605K chars total). Download the full file or copy to clipboard to get everything.
Repository: tukl-msd/DRAMPower
Branch: master
Commit: 8b0dedaf45f9
Files: 255
Total size: 1.5 MB
Directory structure:
gitextract_nfddae32/
├── .clang-format
├── .clang-tidy
├── .github/
│ └── workflows/
│ └── CI.yml
├── .gitignore
├── CMakeLists.txt
├── CMakePresets.json
├── LICENSE.txt
├── README.md
├── benches/
│ ├── CMakeLists.txt
│ ├── main.cpp
│ └── simulation.cpp
├── cmake/
│ ├── build_source_group.cmake
│ ├── diagnostics_print.cmake
│ ├── enable_clang_format.cmake
│ ├── enable_clang_tidy.cmake
│ └── enable_cppcheck.cmake
├── lib/
│ ├── cli11/
│ │ └── CMakeLists.txt
│ └── spdlog/
│ └── CMakeLists.txt
├── src/
│ ├── DRAMPower/
│ │ ├── CMakeLists.txt
│ │ └── DRAMPower/
│ │ ├── Exceptions.h
│ │ ├── Types.h
│ │ ├── command/
│ │ │ ├── CmdType.h
│ │ │ ├── Command.cpp
│ │ │ ├── Command.h
│ │ │ ├── Pattern.cpp
│ │ │ └── Pattern.h
│ │ ├── data/
│ │ │ ├── energy.cpp
│ │ │ ├── energy.h
│ │ │ └── stats.h
│ │ ├── dram/
│ │ │ ├── Bank.h
│ │ │ ├── Interface.cpp
│ │ │ ├── Interface.h
│ │ │ ├── Rank.cpp
│ │ │ ├── Rank.h
│ │ │ └── dram_base.h
│ │ ├── memspec/
│ │ │ ├── MemSpec.h
│ │ │ ├── MemSpecDDR4.cpp
│ │ │ ├── MemSpecDDR4.h
│ │ │ ├── MemSpecDDR5.cpp
│ │ │ ├── MemSpecDDR5.h
│ │ │ ├── MemSpecLPDDR4.cpp
│ │ │ ├── MemSpecLPDDR4.h
│ │ │ ├── MemSpecLPDDR5.cpp
│ │ │ └── MemSpecLPDDR5.h
│ │ ├── simconfig/
│ │ │ └── simconfig.h
│ │ ├── standards/
│ │ │ ├── ddr4/
│ │ │ │ ├── DDR4.cpp
│ │ │ │ ├── DDR4.h
│ │ │ │ ├── DDR4Core.cpp
│ │ │ │ ├── DDR4Core.h
│ │ │ │ ├── DDR4Interface.cpp
│ │ │ │ ├── DDR4Interface.h
│ │ │ │ ├── core_calculation_DDR4.cpp
│ │ │ │ ├── core_calculation_DDR4.h
│ │ │ │ ├── interface_calculation_DDR4.cpp
│ │ │ │ ├── interface_calculation_DDR4.h
│ │ │ │ └── types.h
│ │ │ ├── ddr5/
│ │ │ │ ├── DDR5.cpp
│ │ │ │ ├── DDR5.h
│ │ │ │ ├── DDR5Core.cpp
│ │ │ │ ├── DDR5Core.h
│ │ │ │ ├── DDR5Interface.cpp
│ │ │ │ ├── DDR5Interface.h
│ │ │ │ ├── core_calculation_DDR5.cpp
│ │ │ │ ├── core_calculation_DDR5.h
│ │ │ │ ├── interface_calculation_DDR5.cpp
│ │ │ │ ├── interface_calculation_DDR5.h
│ │ │ │ └── types.h
│ │ │ ├── lpddr4/
│ │ │ │ ├── LPDDR4.cpp
│ │ │ │ ├── LPDDR4.h
│ │ │ │ ├── LPDDR4Core.cpp
│ │ │ │ ├── LPDDR4Core.h
│ │ │ │ ├── LPDDR4Interface.cpp
│ │ │ │ ├── LPDDR4Interface.h
│ │ │ │ ├── core_calculation_LPDDR4.cpp
│ │ │ │ ├── core_calculation_LPDDR4.h
│ │ │ │ ├── interface_calculation_LPDDR4.cpp
│ │ │ │ ├── interface_calculation_LPDDR4.h
│ │ │ │ └── types.h
│ │ │ ├── lpddr5/
│ │ │ │ ├── LPDDR5.cpp
│ │ │ │ ├── LPDDR5.h
│ │ │ │ ├── LPDDR5Core.cpp
│ │ │ │ ├── LPDDR5Core.h
│ │ │ │ ├── LPDDR5Interface.cpp
│ │ │ │ ├── LPDDR5Interface.h
│ │ │ │ ├── core_calculation_LPDDR5.cpp
│ │ │ │ ├── core_calculation_LPDDR5.h
│ │ │ │ ├── interface_calculation_LPDDR5.cpp
│ │ │ │ ├── interface_calculation_LPDDR5.h
│ │ │ │ └── types.h
│ │ │ └── test_accessor.h
│ │ └── util/
│ │ ├── Deserialize.h
│ │ ├── ImplicitCommandHandler.h
│ │ ├── PatternHandler.h
│ │ ├── RegisterHelper.h
│ │ ├── Router.h
│ │ ├── Serialize.h
│ │ ├── binary_ops.h
│ │ ├── burst_storage.h
│ │ ├── bus.cpp
│ │ ├── bus.h
│ │ ├── bus_types.h
│ │ ├── cli_architecture_config.h
│ │ ├── clock.h
│ │ ├── command_counter.h
│ │ ├── cycle_stats.h
│ │ ├── databus.h
│ │ ├── databus_presets.h
│ │ ├── databus_types.h
│ │ ├── dbi.h
│ │ ├── dbialgos.h
│ │ ├── dbihelpers.h
│ │ ├── dbitypes.h
│ │ ├── dynamic_bitset.h
│ │ ├── extension_base.h
│ │ ├── extension_manager.h
│ │ ├── extension_manager_static.h
│ │ ├── extensions.cpp
│ │ ├── extensions.h
│ │ ├── pending_stats.h
│ │ ├── pin.h
│ │ ├── pin_types.h
│ │ └── sub_bitset.h
│ └── cli/
│ ├── CMakeLists.txt
│ ├── lib/
│ │ ├── CMakeLists.txt
│ │ └── DRAMPower/
│ │ └── cli/
│ │ ├── config.h
│ │ ├── csv.hpp
│ │ ├── run.cpp
│ │ ├── run.hpp
│ │ ├── util.cpp
│ │ └── util.hpp
│ └── main/
│ ├── CMakeLists.txt
│ ├── main.cpp
│ ├── validators.cpp
│ └── validators.h
└── tests/
├── CMakeLists.txt
├── tests_drampower/
│ ├── CMakeLists.txt
│ ├── base/
│ │ ├── test_ddr_base.cpp
│ │ ├── test_ddr_data.cpp
│ │ ├── test_ddr_serialize.cpp
│ │ └── test_pattern_pre_cycles.cpp
│ ├── core/
│ │ ├── DDR4/
│ │ │ ├── ddr4_multidevice_tests.cpp
│ │ │ ├── ddr4_multirank_tests.cpp
│ │ │ ├── ddr4_test_pattern_0.cpp
│ │ │ ├── ddr4_test_pattern_1.cpp
│ │ │ ├── ddr4_test_pattern_10.cpp
│ │ │ ├── ddr4_test_pattern_11.cpp
│ │ │ ├── ddr4_test_pattern_12.cpp
│ │ │ ├── ddr4_test_pattern_13.cpp
│ │ │ ├── ddr4_test_pattern_14.cpp
│ │ │ ├── ddr4_test_pattern_15.cpp
│ │ │ ├── ddr4_test_pattern_2.cpp
│ │ │ ├── ddr4_test_pattern_3.cpp
│ │ │ ├── ddr4_test_pattern_4.cpp
│ │ │ ├── ddr4_test_pattern_5.cpp
│ │ │ ├── ddr4_test_pattern_6.cpp
│ │ │ ├── ddr4_test_pattern_7.cpp
│ │ │ ├── ddr4_test_pattern_8.cpp
│ │ │ └── ddr4_test_pattern_9.cpp
│ │ ├── DDR5/
│ │ │ ├── ddr5_multidevice_tests.cpp
│ │ │ ├── ddr5_multirank_tests.cpp
│ │ │ ├── ddr5_test_pattern_0.cpp
│ │ │ ├── ddr5_test_pattern_1.cpp
│ │ │ ├── ddr5_test_pattern_10.cpp
│ │ │ ├── ddr5_test_pattern_11.cpp
│ │ │ ├── ddr5_test_pattern_12.cpp
│ │ │ ├── ddr5_test_pattern_13.cpp
│ │ │ ├── ddr5_test_pattern_14.cpp
│ │ │ ├── ddr5_test_pattern_15.cpp
│ │ │ ├── ddr5_test_pattern_16.cpp
│ │ │ ├── ddr5_test_pattern_17.cpp
│ │ │ ├── ddr5_test_pattern_18.cpp
│ │ │ ├── ddr5_test_pattern_2.cpp
│ │ │ ├── ddr5_test_pattern_3.cpp
│ │ │ ├── ddr5_test_pattern_4.cpp
│ │ │ ├── ddr5_test_pattern_5.cpp
│ │ │ ├── ddr5_test_pattern_6.cpp
│ │ │ ├── ddr5_test_pattern_7.cpp
│ │ │ ├── ddr5_test_pattern_8.cpp
│ │ │ └── ddr5_test_pattern_9.cpp
│ │ ├── LPDDR4/
│ │ │ ├── lpddr4_multidevice_tests.cpp
│ │ │ ├── lpddr4_multirank_tests.cpp
│ │ │ ├── lpddr4_test_pattern_0.cpp
│ │ │ ├── lpddr4_test_pattern_1.cpp
│ │ │ ├── lpddr4_test_pattern_10.cpp
│ │ │ ├── lpddr4_test_pattern_11.cpp
│ │ │ ├── lpddr4_test_pattern_12.cpp
│ │ │ ├── lpddr4_test_pattern_13.cpp
│ │ │ ├── lpddr4_test_pattern_14.cpp
│ │ │ ├── lpddr4_test_pattern_15.cpp
│ │ │ ├── lpddr4_test_pattern_16.cpp
│ │ │ ├── lpddr4_test_pattern_17.cpp
│ │ │ ├── lpddr4_test_pattern_18.cpp
│ │ │ ├── lpddr4_test_pattern_2.cpp
│ │ │ ├── lpddr4_test_pattern_3.cpp
│ │ │ ├── lpddr4_test_pattern_4.cpp
│ │ │ ├── lpddr4_test_pattern_5.cpp
│ │ │ ├── lpddr4_test_pattern_6.cpp
│ │ │ ├── lpddr4_test_pattern_7.cpp
│ │ │ ├── lpddr4_test_pattern_8.cpp
│ │ │ └── lpddr4_test_pattern_9.cpp
│ │ └── LPDDR5/
│ │ ├── lpddr5_multidevice_tests.cpp
│ │ ├── lpddr5_multirank_tests.cpp
│ │ ├── lpddr5_test_pattern_0.cpp
│ │ ├── lpddr5_test_pattern_1.cpp
│ │ ├── lpddr5_test_pattern_10.cpp
│ │ ├── lpddr5_test_pattern_11.cpp
│ │ ├── lpddr5_test_pattern_12.cpp
│ │ ├── lpddr5_test_pattern_13.cpp
│ │ ├── lpddr5_test_pattern_14.cpp
│ │ ├── lpddr5_test_pattern_15.cpp
│ │ ├── lpddr5_test_pattern_16.cpp
│ │ ├── lpddr5_test_pattern_17.cpp
│ │ ├── lpddr5_test_pattern_18.cpp
│ │ ├── lpddr5_test_pattern_19.cpp
│ │ ├── lpddr5_test_pattern_2.cpp
│ │ ├── lpddr5_test_pattern_20.cpp
│ │ ├── lpddr5_test_pattern_21.cpp
│ │ ├── lpddr5_test_pattern_3.cpp
│ │ ├── lpddr5_test_pattern_4.cpp
│ │ ├── lpddr5_test_pattern_5.cpp
│ │ ├── lpddr5_test_pattern_6.cpp
│ │ ├── lpddr5_test_pattern_7.cpp
│ │ ├── lpddr5_test_pattern_8.cpp
│ │ └── lpddr5_test_pattern_9.cpp
│ ├── interface/
│ │ ├── test_dbi_ddr4.cpp
│ │ ├── test_dbi_lpddr4.cpp
│ │ ├── test_dbi_lpddr5.cpp
│ │ ├── test_interface_ddr4.cpp
│ │ ├── test_interface_ddr5.cpp
│ │ ├── test_interface_lpddr4.cpp
│ │ ├── test_interface_lpddr5.cpp
│ │ ├── test_togglingrate_ddr4.cpp
│ │ ├── test_togglingrate_ddr5.cpp
│ │ ├── test_togglingrate_lpddr4.cpp
│ │ └── test_togglingrate_lpddr5.cpp
│ └── resources/
│ ├── cliconfig.json
│ ├── ddr4.csv
│ ├── ddr4.json
│ ├── ddr5.csv
│ ├── ddr5.json
│ ├── lpddr4.csv
│ ├── lpddr4.json
│ ├── lpddr5.csv
│ └── lpddr5.json
└── tests_misc/
├── CMakeLists.txt
├── test_bus.cpp
├── test_bus_extended.cpp
├── test_clock.cpp
├── test_dynamic_bitset.cpp
├── test_dynamic_extension_manager.cpp
├── test_interval.cpp
├── test_misc.cpp
├── test_pattern.cpp
├── test_pin.cpp
└── test_static_extension_manager.cpp
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
AccessModifierOffset: '-4'
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: Never
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBraces: Allman
BreakConstructorInitializers: AfterColon
ColumnLimit: '100'
IndentWidth: '4'
PackConstructorInitializers: CurrentLine
PointerAlignment: Left
================================================
FILE: .clang-tidy
================================================
Checks: >
clang-diagnostic-*,
clang-analyzer-*,
modernize-*,
bugprone-*,
concurrency-*,
cppcoreguidelines-*,
performance-*,
portability-*,
readability-*,
-modernize-use-trailing-return-type,
-readability-braces-around-statements,
-readability-identifier-length,
-readability-function-cognitive-complexity
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: file
================================================
FILE: .github/workflows/CI.yml
================================================
name: Continuous Integration
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
# Compile and test project on Linux based builds
build-gcc:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake --preset ci-unix
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j4
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
# Compile and test project on Linux based builds using clang
build-clang:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v4
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake --preset ci-unix
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j4
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
# Compile and test project on Windows based builds
build-msvc:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake
# Configure CMake in a 'build' subdirectory.
run: cmake --preset ci-msvc
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j4
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
================================================
FILE: .gitignore
================================================
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.app
# Common project files
.DS_Store
.project
.cproject
compile_commands.json
.clangd/
.vscode
.idea
build*/
bin/
*.swp
.~*
cmake-build-debug
cmake-build-release
.cache
================================================
FILE: CMakeLists.txt
================================================
# Copyright (c) 2022, Fraunhofer IESE
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. 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.
#
# 3. Neither the name of the copyright holder 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.
#
# Author:
# Thomas Psota
# Marco Mörz
#########################################
### DRAMPower ###
#########################################
cmake_minimum_required(VERSION 3.22.0)
# TODO change for release
set(DRAMPOWER_VERSION_MAJOR 6)
set(DRAMPOWER_VERSION_MINOR 0)
set(DRAMPOWER_VERSION_PATCH 0)
set(DRAMPOWER_VERSION_STRING "${DRAMPOWER_VERSION_MAJOR}.${DRAMPOWER_VERSION_MINOR}.${DRAMPOWER_VERSION_PATCH}")
add_compile_definitions(DRAMPOWER_VERSION_STRING="${DRAMPOWER_VERSION_STRING}")
set(PROJECT_NAME "DRAMPower ${DRAMPOWER_VERSION_STRING}")
set(PROJECT_SHORTNAME "DRAMPower")
project(${PROJECT_NAME} VERSION ${DRAMPOWER_VERSION_MAJOR}.${DRAMPOWER_VERSION_MINOR}.${DRAMPOWER_VERSION_PATCH} LANGUAGES CXX)
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
### CMake settings ###
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(build_source_group)
include(diagnostics_print)
include(enable_clang_format)
include(enable_clang_tidy)
include(enable_cppcheck)
if (PROJECT_IS_TOP_LEVEL)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
endif()
# set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
### Project settings ###
message(STATUS "CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
message(STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
message(STATUS "" )
### Build options ###
option(DRAMPOWER_BUILD_CLI "Build DRAMPower Command Line Tool" ${PROJECT_IS_TOP_LEVEL})
option(DRAMPOWER_BUILD_BENCHMARKS "Build DRAMPower Command Line Tool" OFF)
option(DRAMPOWER_BUILD_TESTS "Build DRAMPower unit tests" OFF)
### Compiler optimization settings ###
if(PROJECT_IS_TOP_LEVEL)
option(OPTIMIZE_FOR_NATIVE "Build with -march=native (overrides CPU_TYPE if enabled)" ON)
set(CPU_TYPE "" CACHE STRING "CPU type for -march=CPU_TYPE and -mtune=CPU_TYPE compile options")
# Set CPU_TYPE to native if OPTIMIZE_FOR_NATIVE is enabled
if(OPTIMIZE_FOR_NATIVE)
if(CPU_TYPE)
message(NOTICE "OPTIMIZE_FOR_NATIVE is enabled. Overriding CPU_TYPE from \"${CPU_TYPE}\" to \"native\".")
endif()
set(CPU_TYPE "native")
endif()
# add CPU_TYPE to cmake cxx flags
if(CPU_TYPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${CPU_TYPE} -mtune=${CPU_TYPE}")
endif()
endif()
# Use sane defaults for FetchContent:
# In case we are the top-level project, get everything by default
# In case we are included in another project, the user might want to provide their own system dependencies
option(DRAMPOWER_USE_FETCH_CONTENT "Enable the FetchContent module" ${PROJECT_IS_TOP_LEVEL})
option(DRAMPOWER_USE_FETCH_CONTENT_INTERNAL "Enable FetchContent to provide internal dependencies" ${DRAMPOWER_USE_FETCH_CONTENT})
option(DRAMPOWER_USE_FETCH_CONTENT_CLI11 "Enable FetchContent to provide CLI11" ${DRAMPOWER_USE_FETCH_CONTENT})
option(DRAMPOWER_USE_FETCH_CONTENT_SPDLOG "Enable FetchContent to provide spdlog" ${DRAMPOWER_USE_FETCH_CONTENT})
option(DRAMPOWER_USE_FETCH_CONTENT_NLOHMANN_JSON "Enable FetchContent to provide nlohmann json" ${DRAMPOWER_USE_FETCH_CONTENT})
### DRAMPower directories ###
set(DRAMPOWER_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(DRAMPOWER_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib")
set(DRAMPOWER_TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests")
###############################################
### Library Settings ###
###############################################
### Detect OS threading library ###
find_package(Threads)
if (DRAMPOWER_USE_FETCH_CONTENT)
include(FetchContent)
# nlohmann_json for DRAMUtils
if (DRAMPOWER_USE_FETCH_CONTENT_NLOHMANN_JSON)
FetchContent_Declare(nlohmann_json
URL "https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz"
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(nlohmann_json)
endif()
# DRAMUtils
if (DRAMPOWER_USE_FETCH_CONTENT_INTERNAL)
FetchContent_Declare(
DRAMUtils
URL "https://github.com/tukl-msd/DRAMUtils/archive/refs/tags/v1.12.1.tar.gz"
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(DRAMUtils)
endif()
# cli11
if (DRAMPOWER_USE_FETCH_CONTENT_CLI11 AND DRAMPOWER_BUILD_CLI)
add_subdirectory(${DRAMPOWER_LIBRARY_DIR}/cli11)
endif()
# spdlog
if (DRAMPOWER_USE_FETCH_CONTENT_SPDLOG AND (DRAMPOWER_BUILD_CLI OR DRAMPOWER_BUILD_BENCHMARKS))
add_subdirectory(${DRAMPOWER_LIBRARY_DIR}/spdlog)
endif()
endif()
###############################################
### Source Directory ###
###############################################
add_subdirectory(src/DRAMPower)
if(DRAMPOWER_BUILD_CLI OR DRAMPOWER_BUILD_BENCHMARKS)
add_subdirectory(src/cli)
endif()
###############################################
### Test Directory ###
###############################################
if(DRAMPOWER_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()
###############################################
### Benchmark Directory ###
###############################################
if(DRAMPOWER_BUILD_BENCHMARKS)
add_subdirectory(benches)
endif()
###############################################
### Utility Projects ###
###############################################
if(${DRAMPOWER_UTILITY_PROJECTS})
enable_clang_format()
enable_clang_tidy()
enable_cppcheck()
endif()
================================================
FILE: CMakePresets.json
================================================
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 14,
"patch": 0
},
"configurePresets": [
{
"name": "cmake-pedantic",
"hidden": true,
"warnings": {
"dev": true,
"deprecated": true,
"unusedCli": true,
"systemVars": false
}
},
{
"name": "dev-mode",
"hidden": true,
"binaryDir": "${sourceDir}/build",
"inherits": "cmake-pedantic",
"cacheVariables": {
"DRAMPOWER_BUILD_TESTS": "ON",
"CMAKE_BUILD_PARALLEL_LEVEL": "",
"DRAMPOWER_BUILD_CLI": "ON",
"DRAMPOWER_BUILD_BENCHMARKS": "ON"
}
},
{
"name": "ci-common",
"inherits": [
"dev-mode"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ci-unix",
"generator": "Unix Makefiles",
"inherits": [
"ci-common"
]
},
{
"name": "ci-msvc",
"generator": "Visual Studio 17 2022",
"inherits": [
"ci-common"
],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "/DWIN32 /D_WINDOWS /W3 /GR /EHsc /MP"
}
},
{
"name": "dev-unix",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"inherits": [
"dev-mode"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic"
}
},
{
"name": "dev-msvc",
"generator": "Visual Studio 17 2022",
"inherits": [
"dev-mode"
],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "/DWIN32 /D_WINDOWS /W3 /GR /EHsc /MP"
}
}
]
}
================================================
FILE: LICENSE.txt
================================================
Copyright (c) 2022, Technische Universität Kaiserslautern, Fraunhofer IESE
All rights reserved.
This software is released under the BSD 3-Clause License.
By using this software, the user implicitly agrees to the licensing terms.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. 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.
3. Neither the name of the copyright holder 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.
================================================
FILE: README.md
================================================
<img src="docs/images/logo_drampower_5_0.png" alt="DRAMPower 5.0" width="350" style="float: left;"/>
# DRAM Power Model (DRAMPower 6.0.0)
- [Releases](#releases)
- [Installation of the DRAMPower library](#installation-of-the-drampower-library)
- [Installation of the DRAMPower Command Line application](#installation-of-the-drampower-command-line-application)
- [Project structure](#project-structure)
- [Dependencies](#dependencies)
- [Usage of the DRAMPower library](#usage-of-the-drampower-library)
- [Usage of the DRAMPower Command Line application](#usage-of-the-drampower-command-line-application)
- [Memory Specifications](#memory-specifications)
- [Variation-aware Power And Energy Estimation](#variation-aware-power-and-energy-estimation)
- [Authors & Acknowledgment](#authors--acknowledgment)
- [Contact Information](#contact-information)
## Releases
The last official release can be found here: https://github.com/tukl-msd/DRAMPower/releases/tag/v6.0.0
The master branch of the repository should be regarded as the bleeding-edge version, which has all the latest features, but also all the latest bugs. Use at your own discretion.
## Installation of the DRAMPower library
CMake is required for the building of DRAMPower. If DRAMPower is the top level project DRAMPower fetches the required dependencies.
If DRAMPower is not the top level project, the dependencies have to be fetched manually, provided by the top level project or the DRAMPower library can fetch the dependencies. Fetching content is enabled by the following cmake flag:
```console
$ -D DRAMPOWER_USE_FETCH_CONTENT=Y
```
By default DRAMPower fetches all dependencies if `DRAMPOWER_USE_FETCH_CONTENT` is enabled. If you want to disable the fetching of a specific dependency, you can set the respective flag to N. The following flags are available:
- `DRAMPOWER_USE_FETCH_CONTENT_INTERNAL` Fetches the internal dependencies of DRAMPower (DRAMUtils)
- `DRAMPOWER_USE_FETCH_CONTENT_SPDLOG` Fetches the spdlog library used by the command line application
- `DRAMPOWER_USE_FETCH_CONTENT_CLI11` Fetches the CLI11 library used by the command line application
- `DRAMPOWER_USE_FETCH_CONTENT_NLOHMANN_JSON` Fetches the nlohmann_json library used by DRAMUtils
The following cmake flags show an example of how to disable the fetching of the spdlog and CLI11 libraries:
```console
$ -D DRAMPOWER_USE_FETCH_CONTENT=Y -D DRAMPOWER_USE_FETCH_CONTENT_SPDLOG=N -D DRAMPOWER_USE_FETCH_CONTENT_CLI11=N
```
For building DRAMPower clone the repository, or download the zip file of the release you would like to use and use CMake to generate the build files, e.g.
```console
$ cd DRAMPower
$ cmake -S . -B build
$ cmake --build build --parallel
```
Optionally, test cases can be built by toggling the `DRAMPOWER_BUILD_TESTS` flag with CMake.
## Installation of the DRAMPower Command Line application
The command line application is automatically build if DRAMPower is the top level project (see [Installation of the DRAMPower library](#installation-of-the-drampower-library)).
Alternatively, the `DRAMPOWER_BUILD_CLI` flag can be set to Y to force the build of the command line tool.
Clone the repository, or download the zip file of the release you would like to use and use CMake to generate the build files. The following commands force the build of the command line application:
```console
$ cd DRAMPower
$ cmake -S . -B build -D DRAMPOWER_BUILD_CLI=Y
$ cmake --build build
```
## Project structure
The project is structured in a library part, a (optional) test part and an (optional) Command Line application.
Integration of DRAMPower in other projects can be easily achieved by including it as a git submodule or by using the CMake FetchContent directive.
This repository contains the following sub-directoires
DRAMPower # top directory
└── cmake # cmake scripts used by configuration step
├── lib # contains bundled dependencies of the project
├── src # top level directory containing the actual sources
├── DRAMPower # source code of the actual DRAMPower library
└── cli # the optional Command Line tool
└── tests # test cases used by the project
## Dependencies
DRAMPower comes bundled with all necessary libraries and no installation of further system packages is required. DRAMPower uses the following libraries:
- [DRAMUtils](https://github.com/tukl-msd/DRAMUtils)
The DRAMPower cli tool uses the following libraries:
- DRAMPower
- [DRAMUtils](https://github.com/tukl-msd/DRAMUtils)
- [spdlog](https://github.com/gabime/spdlog/releases/tag/v1.9.2)
- [CLI11 (CLI11 2.2 Copyright (c) 2017-2024 University of Cincinnati, developed by Henry Schreiner under NSF AWARD 1414736. All rights reserved.)](https://github.com/CLIUtils/CLI11/releases/tag/v2.4.2)
## Usage of the DRAMPower library
The project is [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) ready and can be easily included in any other CMake based project.
```cmake
include(FetchContent)
FetchContent_Declare(
drampower
GIT_REPOSITORY https://github.com/tukl-msd/DRAMPower
GIT_TAG master)
FetchContent_MakeAvailable(drampower)
```
The library target DRAMPower is then available to the rest of the project and can be consumed by any other target, e.g.
```cmake
add_executable(drampower_app ${SOURCE_FILES})
target_link_libraries(drampower_app PRIVATE DRAMPower::DRAMPower)
```
All constructs inside DRAMPower are exposed through the DRAMPower namespace.
Therefore all the following examples will refer to them with the implied usage of their namespace.
```cpp
using namespace DRAMPower;
```
To use the actual DRAM calculations, first a memspec has to be supplied. Some example memspecs are supplied in the [tests directory](https://github.com/tukl-msd/DRAMPower/tree/master/tests/tests_drampower/resources). The values in the memspecs are in SI units.
An example snippet to initialize a DDR4 based DRAM spec can look like this (only the DRAMPower related includes are shown):
```cpp
#include <DRAMUtils/memspec/MemSpec.h>
#include <DRAMPower/memspec/MemSpecDDR4.h>
#include <DRAMPower/standards/ddr4/DDR4.h>
// optional for simulation with toggling rates
#include <DRAMUtils/config/toggling_rate.h>
// Use DRAMUtils library to parse the memspec
auto memspec = DRAMUtils::parse_memspec_from_file(
std::filesystem::path("tests/tests_drampower/resources/ddr4.json")
);
if (!memspec) {
throw std::runtime_error("Could not parse memspec");
}
// Make the DRAMPower specific memspec from the parsed memspec and initialize the DRAM
// The next line can throw std::bad_variant_access if the memspec is not a DDR4 memspec
// or an exception derived from std::exception if the json object is not valid
DDR4 dram(MemSpecDDR4::from_memspec(*memspec));
// Optionally use toggle rates if no data is available for the traces
// dram.setToggleRate(DRAMUtils::Config::ToggleRateDefinition{
// 0.5, // togglingRateRead 0.0 to 1.0
// 0.5, // togglingRateWrite 0.0 to 1.0
// 0.5, // dutyCycleRead 0.0 to 1.0
// 0.5, // dutyCycleWrite 0.0 to 1.0
// TogglingRateIdlePattern::H, // idlePatternRead H, L, Z
// TogglingRateIdlePattern::H // idlePatternWrite H, L, Z
// });
```
The created DRAM simulator then has to be fed with commands, e.g.
```cpp
#include <DRAMPower/command/Command.h>
#define SZ_BITS(x) sizeof(x)*8
uint8_t rd_data[] = {
0, 0, 0, 0, 0, 0, 0, 1,
};
std::vector<Command> testPattern = {
// {timestamp, commandtype, {bank_id, bank_group_id, rank_id, row_id}
{ 0, CmdType::ACT, {0, 0, 0, 0}},
// {timestamp, commandtype, {bank_id, bank_group_id, rank_id, row_id, column_id}, data, data_size}
{ 15, CmdType::RD , {0, 0, 0, 0, 16}, rd_data, SZ_BITS(rd_data)},
// optional for simulation with toggling rates (dram.setToggleRate() was called)
// { 15, CmdType::RD , {0, 0, 0, 0, 16}, nullptr, 64},
{ 35, CmdType::PRE, {0, 0, 0, 0}},
{ 45, CmdType::END_OF_SIMULATION },
};
for (const auto& command : testPattern) {
dram.doCoreInterfaceCommand(command);
};
```
The bank stats and energy calculations can then be accessed through their respective methods.
In the example energy_core holds the individual bank energy measures. total_energy_core holds the accumulated energy measures accessable through the energy type (e.g E_act, E_pre, E_RD, E_bg_act, E_bg_pre). total_core, total_interface and total_all hold the total energy measures for the core, interface and the sum of both as double values.
All values are returned in their respective SI units.
```cpp
auto stats = dram.getStats();
stats.bank[0].counter.act; // 1;
stats.bank[0].counter.reads; // 1;
stats.bank[0].counter.pre; // 1;
stats.rank_total[0].cycles.act; // 35;
stats.rank_total[0].cycles.pre; // 10;
stats.bank[0].cycles.act; // 35;
stats.bank[0].cycles.pre; // 10;
// Core energy
auto energy_core = dram.calcCoreEnergy(dram.getLastCommandTime());
// Interface energy
auto energy_interface = dram.calcInterfaceEnergy(dram.getLastCommandTime());
// Total energy with core and interface energy
// Accummulated bank energy
// Note: total_core_detailed.E_bg_act holds holds the accumulated backgound activation energy plus the shared background activation energy
auto total_energy_core = energy_core.total_energy();
energy_core.bank_energy[0].E_act; // 1.7949519230769228e-10 J
total_energy_core.E_act; // 1.7949519230769228e-10 J
energy_core.E_bg_act_shared; // 1.1832692307692309e-09 J
energy_core.bank_energy[0].E_bg_act; // 5.8052884615384527e-12 J
total_energy_core.E_bg_act; // 1.1890745192307694e-09 J (5.8052884615384527e-12 J + 1.1832692307692309e-09 J)
total_energy_core.E_pre; // 2.076923076923077e-10 J
energy_core.bank_energy[0].E_pre; // 2.076923076923077e-10 J
total_energy_core.E_bg_pre; // 3.1153846153846144e-10 J
energy_core.bank_energy[0].E_bg_pre; // 1.9471153846153847e-11 J
total_energy_core.E_RD; // 4.3569230769230762e-10 J
energy_core.bank_energy[0].E_RD; // 4.3569230769230762e-10 J
double total_core = core_energy.total(); // 2.3234927884615384e-09 J
double total_interface = interface_energy.total(); // 1.1102233846153846e-10 J
double total_all = dram.getTotalEnergy(dram.getLastCommandTime()); // 2.4345151269230767e-09 J
```
## Usage of the DRAMPower Command Line application
The Command Line application can be built directly by setting the DRAMPOWER_BUILD_CLI flag with CMake (see [Installation Command Line application](#installation-command-line-application)).
The Command Line application can be used to calculate energy consumption of a DRAM memory using a command trace. The output can be printed to the console or written as a JSON file. The application needs the following arguments:
- -m, --memspec (required): The path to the memory specification file (JSON format)
- -c, --config (required): Configuration file for the Command Line application (JSON format)
- -t, --trace (required): The path to the command trace file (CSV format) (see [tests directory](https://github.com/tukl-msd/DRAMPower/tree/master/tests/tests_drampower/resources))
- -j, --json (optional): The path to the output JSON file (default: print to console) (the output JSON file must exist and will be overwritten)
The configuration file has the following format:
```json
{
"useToggleRate": false, // true or false
"toggleRateConfig": {
"togglingRateRead": 0.5, // 0.0 to 1.0
"togglingRateWrite": 0.5, // 0.0 to 1.0
"dutyCycleRead": 0.5, // 0.0 to 1.0
"dutyCycleWrite": 0.5, // 0.0 to 1.0
"idlePatternRead": "H", // "H", "L" or "Z"
"idlePatternWrite": "H" // "H", "L" or "Z"
}
}
```
The Command Line application can be used as follows (in the following example the executable drampower_cli is located in the DRAMPower/build/bin directory):
```console
$ cd build/bin
$ touch output.json
$ touch config.json
$ # The configuration file config.json must be filled with a valid configuration (see above)
$ ./drampower_cli -c config.json -m ../../tests/tests_drampower/resources/ddr4.json -t ../../tests/tests_drampower/resources/ddr4.csv
$ ./drampower_cli -c config.json -m ../../tests/tests_drampower/resources/ddr4.json -t ../../tests/tests_drampower/resources/ddr4.csv -j output.json
```
## Memory Specifications
Note: The timing specifications in the JSONs are in clock cycles (cc). The current specifications for Reading and Writing do not include the I/O consumption. They are computed and included seperately. The IDD measures associated with different power supply sources of equal measure (VDD2, VDDCA and VDDQ). The current measures for dual-rank DIMMs reflect only the measures for the active rank. The default state of the idle rank is assumed to be the same as the complete memory state, for background power estimation. Accordingly, in all dual-rank memory specifications, IDD2P0 has been subtracted from the active currents and all background currents have been halved. They are also accounted for seperately by the power model. Stacking multiple Wide IO DRAM dies can also be captured by the nbrOfRanks parameter.
## Variation-aware Power And Energy Estimation
15 of the included datasheets reflect the impact of process-variations on DRAM currents for a selection of DDR3 memories manufactured at 50nm process technology. These memories include:
(1) MICRON_128MB_DDR3-1066_8bit - revision G
(2) MICRON_128MB_DDR3-1066_16bit - revision G
(3) MICRON_128MB_DDR3-1600_8bit - revision G
(4) MICRON_256MB_DDR3-1066_8bit - revision D
(5) MICRON_256MB_DDR3-1600_16bit - revision D
The original vendor-provided datasheet current specifications are given in XMLs
without suffixes such as _mu, _2s and _3s. XMLs including suffixes indicate that the
current measures are either: (1) typical (mu), or (2) include +2 sigma variation (2s),
or (3) include +3 sigma variation (3s). These measures are derived based on the
Monte-Carlo analysis performed on our SPICE-based DRAM cross-section.
To include these XMLs in your simulations, simply use them as the target memory.
## Authors & Acknowledgment
The tool is based on the DRAM power model developed jointly by the Computer Engineering Research Group at TU Delft and the Electronic Systems Group at TU Eindhoven
and verified by the Microelectronic System Design Research Group at TU Kaiserslautern with equivalent circuit-level simulations. This tool has been developed by
Karthik Chandrasekar with Yonghui Li under the supervision of Dr. Benny Akesson and Prof. Kees Goossens. The IO and Termination Power measures have been employed
from Micron's DRAM Power Calculator. If you decide to use DRAMPower in your research, please cite one of the following references:
**To cite the DRAMPower Tool:**
```
[1] DRAMPower: Open-source DRAM Power & Energy Estimation Tool
Karthik Chandrasekar, Christian Weis, Yonghui Li, Sven Goossens, Matthias Jung, Omar Naji, Benny Akesson, Norbert Wehn, and Kees Goossens
URL: http://www.drampower.info
```
**To cite the DRAM power model:**
```
[2] "Improved Power Modeling of DDR SDRAMs"
Karthik Chandrasekar, Benny Akesson, and Kees Goossens
In Proc. 14th Euromicro Conference on Digital System Design (DSD), 2011
```
**To cite the 3D-DRAM power model:**
```
[3] "System and Circuit Level Power Modeling of Energy-Efficient 3D-Stacked Wide I/O DRAMs"
Karthik Chandrasekar, Christian Weis, Benny Akesson, Norbert Wehn, and Kees Goossens
In Proc. Design, Automation and Test in Europe (DATE), 2013
```
**To cite variation-aware DRAM power estimation:**
```
[4] "Towards Variation-Aware System-Level Power Estimation of DRAMs: An Empirical Approach"
Karthik Chandrasekar, Christian Weis, Benny Akesson, Norbert Wehn, and Kees Goossens
In Proc. Design Automation Conference (DAC), 2013
```
## Contact Information
Further questions about the tool and the power model can be directed to:
Matthias Jung (matthias.jung@iese.fraunhofer.de)
Feel free to ask for updates to the tool's features and please do report any bugs
and errors you encounter. This will encourage us to continuously improve the tool.
## Disclaimer
The tool does not check the timing accuracy of the user's memory command trace
and the use of commands and memory modes. It is expected that the user employs
a valid trace generated using a DRAM memory controller or simulator, which
satisfies all memory timing constraints and other requirements. The user DOES
NOT get ANY WARRANTIES when using this tool. This software is released under the
BSD 3-Clause License. By using this software, the user implicitly agrees to the
licensing terms.
================================================
FILE: benches/CMakeLists.txt
================================================
# Copyright (c) 2024, RPTU Kaiserslautern-Landau
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. 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.
#
# 3. Neither the name of the copyright holder 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.
#
# Authors:
# Derek Christ
# Marco Mörz
###############################################
### benches_drampower ###
###############################################
option(DRAMPOWER_USE_FETCH_CONTENT_GOOGLE_BENCHMARK "Enable FetchContent to provide Google Benchmark" ${DRAMPOWER_USE_FETCH_CONTENT})
if(DRAMPOWER_USE_FETCH_CONTENT)
if(DRAMPOWER_USE_FETCH_CONTENT_GOOGLE_BENCHMARK AND DRAMPOWER_BUILD_BENCHMARKS)
set(BENCHMARK_ENABLE_TESTING OFF)
FetchContent_Declare(
benchmark
URL "https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz"
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(benchmark)
endif()
endif()
find_package(benchmark REQUIRED)
add_executable(benches_drampower
main.cpp
simulation.cpp
)
target_link_libraries(benches_drampower
PRIVATE
DRAMPower::DRAMPower
DRAMPower::cli_lib
DRAMUtils::DRAMUtils
benchmark::benchmark
)
target_compile_definitions(benches_drampower PUBLIC DRAMPOWER_BENCHMARK_CONFIGS_DIR="${CMAKE_SOURCE_DIR}/tests/tests_drampower/resources")
================================================
FILE: benches/main.cpp
================================================
/*
* Copyright (c) 2023, RPTU Kaiserslautern-Landau
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of the copyright holder 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.
*
* Authors:
* Derek Christ
* Marco Mörz
*/
#include <benchmark/benchmark.h>
int main(int argc, char** argv)
{
::benchmark::Initialize(&argc, argv);
::benchmark::RunSpecifiedBenchmarks();
return 0;
}
================================================
FILE: benches/simulation.cpp
================================================
/*
* Copyright (c) 2023, RPTU Kaiserslautern-Landau
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of the copyright holder 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.
*
* Authors:
* Derek Christ
* Marco Mörz
*/
#include <DRAMPower/simconfig/simconfig.h>
#include <DRAMPower/memspec/MemSpecLPDDR4.h>
#include <DRAMUtils/memspec/MemSpec.h>
#include <DRAMUtils/memspec/standards/MemSpecLPDDR4.h>
#include <DRAMPower/standards/lpddr4/LPDDR4.h>
#include <DRAMPower/dram/dram_base.h>
#include <DRAMPower/command/CmdType.h>
#include <DRAMPower/command/Command.h>
#include <DRAMPower/cli/run.hpp>
#include <benchmark/benchmark.h>
#include <filesystem>
#include <iostream>
#include <exception>
#include <optional>
#include <string>
#include <memory>
class LPDDR4_Bench : public benchmark::Fixture
{
public:
using Command = DRAMPower::Command;
using CmdType = DRAMPower::CmdType;
using CommandList_t = std::vector<std::pair<Command, std::unique_ptr<uint8_t[]>>>;
using BaseDDR_t = DRAMPower::dram_base<CmdType>;
void SetUp(::benchmark::State&) {
std::string memspecFile{DRAMPOWER_BENCHMARK_CONFIGS_DIR"/lpddr4.json"};
std::string commandFile{DRAMPOWER_BENCHMARK_CONFIGS_DIR"/lpddr4.csv"};
// Get dram
// auto ddr = DRAMPower::CLI::getMemory(memspecFile, std::nullopt);
auto memspeccontainer = DRAMUtils::parse_memspec_from_file(memspecFile);
if(!memspeccontainer)
{
throw std::runtime_error("Failed to parse memspec from file");
}
memspec = std::make_unique<DRAMPower::MemSpecLPDDR4>(DRAMPower::MemSpecLPDDR4::from_memspec(*memspeccontainer));
// Parse command list
if (!DRAMPower::DRAMPowerCLI::parse_command_list(commandFile, commandlist))
{
throw std::runtime_error("Failed to parse command list");
}
}
void TearDown(::benchmark::State&) {
commandlist.clear();
}
std::unique_ptr<DRAMPower::MemSpecLPDDR4> memspec;
CommandList_t commandlist;
};
BENCHMARK_DEFINE_F(LPDDR4_Bench, lpddr4PowerSimulation)(benchmark::State& state)
{
auto rdbuf = std::cout.rdbuf(nullptr);
for (auto _ : state)
{
std::unique_ptr<BaseDDR_t> ddr = std::make_unique<DRAMPower::LPDDR4>(*memspec);
DRAMPower::DRAMPowerCLI::runCommands(ddr, commandlist);
}
std::cout.rdbuf(rdbuf);
}
BENCHMARK_REGISTER_F(LPDDR4_Bench, lpddr4PowerSimulation)->Unit(benchmark::kMicrosecond)->Iterations(10);
BENCHMARK_DEFINE_F(LPDDR4_Bench, lpddr4PowerSimulationToggling)(benchmark::State& state)
{
auto rdbuf = std::cout.rdbuf(nullptr);
for (auto _ : state)
{
auto trd = DRAMUtils::Config::ToggleRateDefinition{
0.5, // togglingRateRead
0.5, // togglingRateWrite
0.5, // dutyCycleRead
0.5, // dutyCycleWrite
DRAMUtils::Config::TogglingRateIdlePattern::L, // idlePatternRead
DRAMUtils::Config::TogglingRateIdlePattern::L // idlePatternWrite
};
std::unique_ptr<BaseDDR_t> ddr = std::make_unique<DRAMPower::LPDDR4>(*memspec, DRAMPower::config::SimConfig{trd});
DRAMPower::DRAMPowerCLI::runCommands(ddr, commandlist);
}
std::cout.rdbuf(rdbuf);
}
BENCHMARK_REGISTER_F(LPDDR4_Bench, lpddr4PowerSimulationToggling)->Unit(benchmark::kMicrosecond)->Iterations(10);
================================================
FILE: cmake/build_source_group.cmake
================================================
###############################################
### build_source_group ###
###############################################
###
### Builds a source group from a set of files
### for nicer display in IDEs
###
function( build_source_group )
file(GLOB_RECURSE files ${CMAKE_CURRENT_SOURCE_DIR}/*.* )
list(REMOVE_ITEM files "CMakeLists.txt")
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "[src]" FILES ${files})
endfunction()
================================================
FILE: cmake/diagnostics_print.cmake
================================================
###############################################
### diagnostics_print ###
###############################################
###
### Prints different diagnostics and infos
### about the specified target
###
function( diagnostics_print target_name )
message(STATUS "${target_name} settings:")
message(STATUS "==============\n")
message(STATUS "Source Files:")
get_target_property(SOURCE_FILES ${target_name} SOURCES)
if(SOURCE_FILES)
message(STATUS "${SOURCE_FILES}")
endif()
message(STATUS "\nInclude Directories:")
get_target_property(HEADER_DIR ${target_name} INCLUDE_DIRECTORIES)
if(HEADER_DIR)
message(STATUS "${HEADER_DIR}")
endif()
message(STATUS "\nLink Libraries:")
get_target_property(LINKED_LIBS ${target_name} LINK_LIBRARIES)
if(LINKED_LIBS)
message(STATUS "${LINKED_LIBS}")
endif()
message(STATUS "\n")
endfunction()
================================================
FILE: cmake/enable_clang_format.cmake
================================================
###############################################
### enable_clang_format ###
###############################################
###
### Enables a clang-format target, if
### clang-format is installed, automatically
### formatting all sources in the tree
###
function( enable_clang_format )
endfunction()
================================================
FILE: cmake/enable_clang_tidy.cmake
================================================
###############################################
### enable_clang_tidy ###
###############################################
###
### Enables a clang-tidy target, if
### clang-tidy is installed, to run static
### code analysis on all sources
###
function( enable_clang_tidy )
file(GLOB_RECURSE SOURCE_FILES src/*.c src/*.cpp src/*.cxx src/*.cc )
file(GLOB_RECURSE HEADER_FILES src/*.h src/*.hpp src/*.hxx src/*.hh )
find_program(UTIL_TIDY_PATH clang-tidy)
if(UTIL_TIDY_PATH)
message(STATUS "Using clang-tidy static-analysis: yes")
add_custom_target(clang-tidy
COMMAND ${UTIL_TIDY_PATH} ${SOURCE_FILES} ${HEADER_FILES} -p=./ )
else()
message(STATUS "Using clang-tidy static-analysis: no")
endif()
endfunction()
================================================
FILE: cmake/enable_cppcheck.cmake
================================================
###############################################
### enable_cppcheck ###
###############################################
###
### Enables a cppcheck target, if
### cppcheck is installed, to run static
### analysis on all sources
###
function( enable_cppcheck )
file(GLOB_RECURSE SOURCE_FILES src/*.c src/*.cpp src/*.cxx src/*.cc )
file(GLOB_RECURSE HEADER_FILES src/*.h src/*.hpp src/*.hxx src/*.hh )
find_program(UTIL_CPPCHECK_PATH cppcheck)
if(UTIL_CPPCHECK_PATH)
message(STATUS "Using cppcheck static-analysis: yes ")
add_custom_target(
cppcheck
COMMAND ${UTIL_CPPCHECK_PATH}
--enable=warning,performance,portability,information,missingInclude
--language=c++
--std=c++11
--template=gcc
--verbose
--quiet
${SOURCE_FILES} ${HEADER_FILES}
)
else()
message(STATUS "Using cppcheck static-analysis: no ")
endif()
endfunction()
================================================
FILE: lib/cli11/CMakeLists.txt
================================================
########################################
### CLI11 ###
########################################
FetchContent_Declare(cli11
URL "https://github.com/CLIUtils/CLI11/archive/refs/tags/v2.4.2.tar.gz"
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(cli11)
================================================
FILE: lib/spdlog/CMakeLists.txt
================================================
########################################
### spdlog ###
########################################
FetchContent_Declare(spdlog
URL "https://github.com/gabime/spdlog/archive/refs/tags/v1.9.2.tar.gz"
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(spdlog)
================================================
FILE: src/DRAMPower/CMakeLists.txt
================================================
########################################
### DRAMPower ###
########################################
find_package(DRAMUtils REQUIRED)
add_library(DRAMPower
DRAMPower/command/Command.cpp
DRAMPower/command/Pattern.cpp
DRAMPower/data/energy.cpp
DRAMPower/dram/Interface.cpp
DRAMPower/dram/Rank.cpp
DRAMPower/memspec/MemSpecDDR4.cpp
DRAMPower/memspec/MemSpecDDR5.cpp
DRAMPower/memspec/MemSpecLPDDR4.cpp
DRAMPower/memspec/MemSpecLPDDR5.cpp
DRAMPower/standards/ddr4/core_calculation_DDR4.cpp
DRAMPower/standards/ddr4/DDR4.cpp
DRAMPower/standards/ddr4/DDR4Core.cpp
DRAMPower/standards/ddr4/DDR4Interface.cpp
DRAMPower/standards/ddr4/interface_calculation_DDR4.cpp
DRAMPower/standards/ddr5/core_calculation_DDR5.cpp
DRAMPower/standards/ddr5/DDR5.cpp
DRAMPower/standards/ddr5/DDR5Core.cpp
DRAMPower/standards/ddr5/DDR5Interface.cpp
DRAMPower/standards/ddr5/interface_calculation_DDR5.cpp
DRAMPower/standards/lpddr4/core_calculation_LPDDR4.cpp
DRAMPower/standards/lpddr4/LPDDR4.cpp
DRAMPower/standards/lpddr4/LPDDR4Core.cpp
DRAMPower/standards/lpddr4/LPDDR4Interface.cpp
DRAMPower/standards/lpddr4/interface_calculation_LPDDR4.cpp
DRAMPower/standards/lpddr5/core_calculation_LPDDR5.cpp
DRAMPower/standards/lpddr5/LPDDR5.cpp
DRAMPower/standards/lpddr5/LPDDR5Core.cpp
DRAMPower/standards/lpddr5/LPDDR5Interface.cpp
DRAMPower/standards/lpddr5/interface_calculation_LPDDR5.cpp
DRAMPower/util/extensions.cpp
)
target_sources(DRAMPower
PUBLIC
FILE_SET api
TYPE HEADERS
FILES
DRAMPower/Types.h
DRAMPower/Exceptions.h
DRAMPower/dram/dram_base.h
DRAMPower/simconfig/simconfig.h
DRAMPower/command/Command.h
DRAMPower/data/energy.h
DRAMPower/data/stats.h
DRAMPower/util/extension_manager.h
DRAMPower/util/extensions.h
DRAMPower/memspec/MemSpec.h
DRAMPower/memspec/MemSpecDDR4.h
DRAMPower/standards/ddr4/DDR4.h
DRAMPower/standards/ddr4/DDR4Core.h
DRAMPower/standards/ddr4/DDR4Interface.h
DRAMPower/standards/ddr4/core_calculation_DDR4.h
DRAMPower/standards/ddr4/interface_calculation_DDR4.h
DRAMPower/standards/ddr4/types.h
DRAMPower/memspec/MemSpecDDR5.h
DRAMPower/standards/ddr5/DDR5.h
DRAMPower/standards/ddr5/DDR5Core.h
DRAMPower/standards/ddr5/DDR5Interface.h
DRAMPower/standards/ddr5/core_calculation_DDR5.h
DRAMPower/standards/ddr5/interface_calculation_DDR5.h
DRAMPower/standards/ddr5/types.h
DRAMPower/memspec/MemSpecLPDDR4.h
DRAMPower/standards/lpddr4/LPDDR4.h
DRAMPower/standards/lpddr4/LPDDR4Core.h
DRAMPower/standards/lpddr4/LPDDR4Interface.h
DRAMPower/standards/lpddr4/core_calculation_LPDDR4.h
DRAMPower/standards/lpddr4/interface_calculation_LPDDR4.h
DRAMPower/standards/lpddr4/types.h
DRAMPower/memspec/MemSpecLPDDR5.h
DRAMPower/standards/lpddr5/LPDDR5.h
DRAMPower/standards/lpddr5/LPDDR5Core.h
DRAMPower/standards/lpddr5/LPDDR5Interface.h
DRAMPower/standards/lpddr5/core_calculation_LPDDR5.h
DRAMPower/standards/lpddr5/interface_calculation_LPDDR5.h
DRAMPower/standards/lpddr5/types.h
DRAMPower/util/Serialize.h
DRAMPower/util/Deserialize.h
)
target_include_directories(DRAMPower PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_features(DRAMPower PUBLIC cxx_std_17)
set_target_properties(DRAMPower PROPERTIES CXX_EXTENSIONS OFF)
set_target_properties(DRAMPower PROPERTIES CXX_STANDARD_REQUIRED ON)
target_link_libraries(DRAMPower
PUBLIC
DRAMUtils::DRAMUtils
)
# Add test functions
if(DRAMPOWER_BUILD_TESTS)
target_compile_definitions(DRAMPower PUBLIC DRAMPOWER_TESTING)
endif()
add_library(DRAMPower::DRAMPower ALIAS DRAMPower)
install(TARGETS DRAMPower FILE_SET api)
================================================
FILE: src/DRAMPower/DRAMPower/Exceptions.h
================================================
#ifndef DRAMPOWER_EXCEPTIONS_H
#define DRAMPOWER_EXCEPTIONS_H
#include <exception>
#include <string>
namespace DRAMPower {
class Exception : public std::exception {
// protected constructors
protected:
// public constructors
public:
// Constructors with message
explicit Exception(const std::string &message) : m_message(message) {}
explicit Exception(std::string &&message) : m_message(std::move(message)) {}
// Exception without message should not be allowed
Exception() = delete;
// Copy and move constructors and assignment operators
Exception(const Exception &other) = default;
Exception &operator=(const Exception &other) = default;
Exception(Exception &&other) = default;
Exception &operator=(Exception &&other) = default;
// Destructor
virtual ~Exception() noexcept = default;
// Public member functions
public:
const char *what() const noexcept override {
return m_message.c_str();
}
// Private member variables
private:
std::string m_message;
};
} // namespace DRAMPower
#endif /* DRAMPOWER_EXCEPTIONS_H */
================================================
FILE: src/DRAMPower/DRAMPower/Types.h
================================================
#ifndef DRAMPOWER_TYPES_H
#define DRAMPOWER_TYPES_H
#include <DRAMPower/util/cycle_stats.h>
#include <stdint.h>
namespace DRAMPower {
using timestamp_t = uint64_t;
using interval_t = util::interval_counter<timestamp_t>;
}
#endif /* DRAMPOWER_TYPES_H */
================================================
FILE: src/DRAMPower/DRAMPower/command/CmdType.h
================================================
#ifndef DRAMPOWER_COMMAND_CMDTYPE_H
#define DRAMPOWER_COMMAND_CMDTYPE_H
#include <iostream>
#include <string>
namespace DRAMPower
{
// Taken from DRAM 4.0
// DRAMSys
// \ \__> DRAMPower
// \ \_v
// \_______> DRAMCommon
enum class CmdType {
NOP = 0, // 0
RD, // 1
WR, // 2
RDA, // 3
WRA, // 4
ACT, // 5
PRE, // 6
REFB, // 7
REFP2B, // 8
PRESB, // 9
REFSB, // 10
PREA, // 11
REFA, // 12
PDEA, // 13
PDEP, // 14
PDXA, // 15
PDXP, // 16
SREFEN, // 17
SREFEX, // 18
DSMEN, // 19
DSMEX, // 20
END_OF_SIMULATION, // 21
COUNT, // 22
};
namespace CmdTypeUtil
{
constexpr bool needs_data(CmdType cmd)
{
switch (cmd)
{
case CmdType::RD:
case CmdType::RDA:
case CmdType::WR:
case CmdType::WRA:
return true;
default:
return false;
};
};
constexpr CmdType from_string(const std::string_view& str)
{
if (str == "NOP")
return CmdType::NOP;
if (str == "ACT")
return CmdType::ACT;
if (str == "PRE")
return CmdType::PRE;
if (str == "PREA")
return CmdType::PREA;
if (str == "PRESB")
return CmdType::PRESB;
if (str == "REFA")
return CmdType::REFA;
if (str == "REFB")
return CmdType::REFB;
if (str == "REFSB")
return CmdType::REFSB;
if (str == "REFP2B")
return CmdType::REFP2B;
if (str == "RD")
return CmdType::RD;
if (str == "RDA")
return CmdType::RDA;
if (str == "WR")
return CmdType::WR;
if (str == "WRA")
return CmdType::WRA;
if (str == "PDEA")
return CmdType::PDEA;
if (str == "PDEP")
return CmdType::PDEP;
if (str == "PDXA")
return CmdType::PDXA;
if (str == "PDXP")
return CmdType::PDXP;
if (str == "SREFEN")
return CmdType::SREFEN;
if (str == "SREFEX")
return CmdType::SREFEX;
if (str == "DSMEN")
return CmdType::DSMEN;
if (str == "DSMEX")
return CmdType::DSMEX;
if (str == "END")
return CmdType::END_OF_SIMULATION;
return CmdType::NOP;
};
constexpr const char * to_string(CmdType cmd)
{
switch (cmd)
{
case CmdType::NOP:
return "NOP";
case CmdType::ACT:
return "ACT";
case CmdType::PRE:
return "PRE";
case CmdType::PREA:
return "PREA";
case CmdType::REFA:
return "REFA";
case CmdType::REFB:
return "REFB";
case CmdType::RD:
return "RD";
case CmdType::RDA:
return "RDA";
case CmdType::WR:
return "WR";
case CmdType::WRA:
return "WRA";
case CmdType::REFSB:
return "REFSB";
case CmdType::REFP2B:
return "REFP2B";
case CmdType::PRESB:
return "PRESB";
case CmdType::PDEA:
return "PDEA";
case CmdType::PDEP:
return "PDEP";
case CmdType::PDXA:
return "PDXA";
case CmdType::PDXP:
return "PDXP";
case CmdType::SREFEN:
return "SREFEN";
case CmdType::SREFEX:
return "SREFEX";
case CmdType::DSMEN:
return "DSMEN";
case CmdType::DSMEX:
return "DSMEX";
case CmdType::END_OF_SIMULATION:
return "END_OF_SIMULATION";
default:
return "to_string()";
}
}
inline std::ostream& operator<<(std::ostream& os, CmdType cmd) {
return os << to_string(cmd);
}
}
}
#endif /* DRAMPOWER_COMMAND_CMDTYPE_H */
================================================
FILE: src/DRAMPower/DRAMPower/command/Command.cpp
================================================
#include "Command.h"
namespace DRAMPower {
TargetCoordinate::TargetCoordinate(std::size_t bank_id, std::size_t bank_group_id, std::size_t rank_id)
: bank(bank_id), bankGroup(bank_group_id), rank(rank_id)
{};
TargetCoordinate::TargetCoordinate(std::size_t bank_id, std::size_t bank_group_id, std::size_t rank_id, std::size_t row_id)
: bank(bank_id), bankGroup(bank_group_id), rank(rank_id), row(row_id)
{};
TargetCoordinate::TargetCoordinate(std::size_t bank_id, std::size_t bank_group_id, std::size_t rank_id, std::size_t row_id, std::size_t column_id)
: bank(bank_id), bankGroup(bank_group_id), rank(rank_id), row(row_id), column(column_id)
{};
Command::Command(timestamp_t timestamp, CmdType type, TargetCoordinate targetCoord, const uint8_t * data, std::size_t sz_bits)
: timestamp(timestamp)
, type(type)
, targetCoordinate(targetCoord)
, data(data)
, sz_bits(sz_bits)
{};
} // namespace DRAMPower
================================================
FILE: src/DRAMPower/DRAMPower/command/Command.h
================================================
#ifndef DRAMPOWER_COMMAND_COMMAND_H
#define DRAMPOWER_COMMAND_COMMAND_H
#include <DRAMPower/Types.h>
#include <DRAMPower/command/CmdType.h>
#include <optional>
namespace DRAMPower {
struct TargetCoordinate {
std::size_t bank = 0;
std::size_t bankGroup = 0;
std::size_t rank = 0;
std::size_t row = 0;
std::size_t column = 0;
TargetCoordinate() = default;
TargetCoordinate(std::size_t bank_id, std::size_t bank_group_id, std::size_t rank_id);
TargetCoordinate(std::size_t bank_id, std::size_t bank_group_id, std::size_t rank_id, std::size_t row_id);
TargetCoordinate(std::size_t bank_id, std::size_t bank_group_id, std::size_t rank_id, std::size_t row_id, std::size_t column_id);
};
class Command {
public:
Command() = default;
Command(timestamp_t timestamp, CmdType type, TargetCoordinate targetCoord = {}, const uint8_t * data = nullptr, std::size_t sz_bits = 0);
public:
timestamp_t timestamp = 0;
CmdType type;
TargetCoordinate targetCoordinate;
const uint8_t * data = 0x00;
std::size_t sz_bits;
//uint64_t burstLength;
public:
};
}
#endif /* DRAMPOWER_COMMAND_COMMAND_H */
================================================
FILE: src/DRAMPower/DRAMPower/command/Pattern.cpp
================================================
#include "Pattern.h"
#include <limits>
#include <cassert>
#include <bitset>
namespace DRAMPower {
PatternEncoderOverrides::PatternEncoderOverrides(std::initializer_list<PatternEncoderSettingsEntry> _settings)
{
for (const auto &setting : _settings)
{
this->settings.emplace(setting.descriptor, setting.bitSpec);
}
}
void PatternEncoderOverrides::updateSettings(std::initializer_list<PatternEncoderSettingsEntry> _settings)
{
// Update settings if descriptor is already present
for (const auto &setting : _settings)
{
this->settings[setting.descriptor] = setting.bitSpec;
}
}
std::unordered_map<pattern_descriptor::t, PatternEncoderBitSpec> PatternEncoderOverrides::getSettings()
{
return this->settings;
}
const std::unordered_map<pattern_descriptor::t, PatternEncoderBitSpec>& PatternEncoderOverrides::getSettings() const {
return this->settings;
}
PatternEncoderBitSpec PatternEncoderOverrides::getSetting(pattern_descriptor::t descriptor)
{
if (this->settings.find(descriptor) != this->settings.end())
{
return this->settings.at(descriptor);
}
return PatternEncoderBitSpec::INVALID;
}
bool PatternEncoderOverrides::hasSetting(pattern_descriptor::t descriptor)
{
return this->settings.find(descriptor) != this->settings.end();
}
bool PatternEncoderOverrides::removeSetting(pattern_descriptor::t descriptor)
{
return this->settings.erase(descriptor) > 0;
}
PatternEncoder::PatternEncoder(PatternEncoderOverrides settings)
: settings(settings)
{}
inline bool PatternEncoder::applyBitSpec(
PatternEncoderOverrides &spec,
pattern_descriptor::t descriptor,
bool LAST_BIT,
bool default_bit
)
{
auto setting = spec.getSetting(descriptor);
switch (setting)
{
case PatternEncoderBitSpec::L:
return false;
case PatternEncoderBitSpec::H:
return true;
case PatternEncoderBitSpec::LAST_BIT:
return LAST_BIT;
case PatternEncoderBitSpec::INVALID:
return default_bit;
default:
assert(false);
break;
}
return false;
}
uint64_t PatternEncoder::encode(const Command& cmd, const std::vector<pattern_descriptor::t>& pattern, const uint64_t lastpattern)
{
return encode(cmd.targetCoordinate, pattern, lastpattern);
}
uint64_t PatternEncoder::encode(const TargetCoordinate& targetCoordinate, const std::vector<pattern_descriptor::t>& pattern, const uint64_t lastpattern)
{
using namespace pattern_descriptor;
std::bitset<64> bitset(0);
std::bitset<32> bank_bits(targetCoordinate.bank);
std::bitset<32> row_bits(targetCoordinate.row);
std::bitset<32> column_bits(targetCoordinate.column);
std::bitset<32> bank_group_bits(targetCoordinate.bankGroup);
std::size_t n = pattern.size() - 1;
uint64_t opcodeshifter = 1;
uint16_t opcodecount = 0;
assert(n < 64);
for (const auto descriptor : pattern) {
// assert(n >= 0); // std::size_t is unsigned
switch (descriptor) {
case H:
bitset[n] = true;
break;
case L:
bitset[n] = false;
break;
// Command bits
case BL:
case CID0:
case CID1:
case CID2:
case CID3:
bitset[n] = applyBitSpec(settings, descriptor, ((lastpattern >> n) & 1) == 1, true);
break;
case V:
case X:
case AP:
bitset[n] = applyBitSpec(settings, descriptor, ((lastpattern >> n) & 1) == 1, false);
break;
// Target Coordinate bits
// Bank bits
case BA0:
bitset[n] = bank_bits[0];
break;
case BA1:
bitset[n] = bank_bits[1];
break;
case BA2:
bitset[n] = bank_bits[2];
break;
case BA3:
bitset[n] = bank_bits[3];
break;
case BA4:
bitset[n] = bank_bits[4];
break;
case BA5:
bitset[n] = bank_bits[5];
break;
case BA6:
bitset[n] = bank_bits[6];
break;
case BA7:
bitset[n] = bank_bits[7];
break;
case BA8:
bitset[n] = bank_bits[8];
break;
// BG bits
case BG0:
bitset[n] = bank_group_bits[0];
break;
case BG1:
bitset[n] = bank_group_bits[1];
break;
case BG2:
bitset[n] = bank_group_bits[2];
break;
case C0:
bitset[n] = applyBitSpec(settings, descriptor, ((lastpattern >> n) & 1) == 1, column_bits[0]);
break;
case C1:
bitset[n] = applyBitSpec(settings, descriptor, ((lastpattern >> n) & 1) == 1, column_bits[1]);
break;
case C2:
bitset[n] = applyBitSpec(settings, descriptor, ((lastpattern >> n) & 1) == 1, column_bits[2]);
break;
case C3:
bitset[n] = applyBitSpec(settings, descriptor, ((lastpattern >> n) & 1) == 1, column_bits[3]);
break;
case C4:
bitset[n] = applyBitSpec(settings, descriptor, ((lastpattern >> n) & 1) == 1, column_bits[4]);
break;
case C5:
bitset[n] = column_bits[5];
break;
case C6:
bitset[n] = column_bits[6];
break;
case C7:
bitset[n] = column_bits[7];
break;
case C8:
bitset[n] = column_bits[8];
break;
case C9:
bitset[n] = column_bits[9];
break;
case C10:
bitset[n] = applyBitSpec(settings, descriptor, ((lastpattern >> n) & 1) == 1, column_bits[10]);
break;
case C11:
bitset[n] = column_bits[C11];
break;
case C12:
bitset[n] = column_bits[C12];
break;
case C13:
bitset[n] = column_bits[C13];
break;
case C14:
bitset[n] = column_bits[C14];
break;
case C15:
bitset[n] = column_bits[C15];
break;
case C16:
bitset[n] = column_bits[C16];
break;
// Row bits
case R0:
bitset[n] = row_bits[0];
break;
case R1:
bitset[n] = row_bits[1];
break;
case R2:
bitset[n] = row_bits[2];
break;
case R3:
bitset[n] = row_bits[3];
break;
case R4:
bitset[n] = row_bits[4];
break;
case R5:
bitset[n] = row_bits[5];
break;
case R6:
bitset[n] = row_bits[6];
break;
case R7:
bitset[n] = row_bits[7];
break;
case R8:
bitset[n] = row_bits[8];
break;
case R9:
bitset[n] = row_bits[9];
break;
case R10:
bitset[n] = row_bits[10];
break;
case R11:
bitset[n] = row_bits[11];
break;
case R12:
bitset[n] = row_bits[12];
break;
case R13:
bitset[n] = row_bits[13];
break;
case R14:
bitset[n] = row_bits[14];
break;
case R15:
bitset[n] = row_bits[15];
break;
case R16:
bitset[n] = row_bits[16];
break;
case R17:
bitset[n] = row_bits[17];
break;
case OPCODE:
// Example: opcode 0x31 results in pattern 0b0011'0001
assert(m_opcodeLength > opcodecount);
bitset[n] = m_opcode & opcodeshifter;
opcodeshifter <<= 1;
++opcodecount;
break;
default:
break;
}
--n;
}
return bitset.to_ullong();
}
void PatternEncoder::setOpcode(uint64_t opcode, uint16_t opcodeLength) {
m_opcode = opcode;
m_opcodeLength = opcodeLength;
}
uint64_t PatternEncoder::getOpcode() const {
return m_opcode;
}
uint16_t PatternEncoder::getOpcodeLength() const {
return m_opcodeLength;
}
void PatternEncoder::serialize(std::ostream& stream) const {
stream.write(reinterpret_cast<const char*>(&m_opcode), sizeof(m_opcode));
stream.write(reinterpret_cast<const char*>(&m_opcodeLength), sizeof(m_opcodeLength));
// settings
const std::size_t settingsSize = settings.getSettings().size();
stream.write(reinterpret_cast<const char*>(&settingsSize), sizeof(settingsSize));
for (const auto& [descriptor, bitSpec] : settings.getSettings()) {
stream.write(reinterpret_cast<const char*>(&descriptor), sizeof(descriptor));
stream.write(reinterpret_cast<const char*>(&bitSpec), sizeof(bitSpec));
}
}
void PatternEncoder::deserialize(std::istream& stream) {
stream.read(reinterpret_cast<char*>(&m_opcode), sizeof(m_opcode));
stream.read(reinterpret_cast<char*>(&m_opcodeLength), sizeof(m_opcodeLength));
// settings
std::size_t settingsSize = 0;
stream.read(reinterpret_cast<char*>(&settingsSize), sizeof(settingsSize));
settings = PatternEncoderOverrides{};
for (std::size_t i = 0; i < settingsSize; ++i) {
pattern_descriptor::t descriptor;
PatternEncoderBitSpec bitSpec;
stream.read(reinterpret_cast<char*>(&descriptor), sizeof(descriptor));
stream.read(reinterpret_cast<char*>(&bitSpec), sizeof(bitSpec));
settings.updateSettings({{descriptor, bitSpec}});
}
}
} // namespace DRAMPower
================================================
FILE: src/DRAMPower/DRAMPower/command/Pattern.h
================================================
#ifndef DRAMPOWER_COMMAND_PATTERN_H
#define DRAMPOWER_COMMAND_PATTERN_H
#include <DRAMPower/command/Command.h>
#include <DRAMPower/util/Serialize.h>
#include <DRAMPower/util/Deserialize.h>
#include <unordered_map>
#include <vector>
namespace DRAMPower {
namespace pattern_descriptor {
enum t {
H, L,
V, X,
A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17,
BG0, BG1, BG2, BA0, BA1, BA2, BA3, BA4, BA5, BA6, BA7, BA8,
C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16,
R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R20, R21, R22, R23,
CID0, CID1, CID2, CID3,
AP,
BL,
OPCODE, // Example: opcode 0x03 pattern: {H, L, OPCODE, OPCODE, OPCODE, OPCODE} result in 0b100011
};
}
enum class PatternEncoderBitSpec
{
L = 0,
H = 1,
LAST_BIT = 2,
INVALID = -1
};
// struct for initializer list in PatternEncoderSettings
struct PatternEncoderSettingsEntry {
pattern_descriptor::t descriptor;
PatternEncoderBitSpec bitSpec;
};
// class to store pattern descriptor overrides
class PatternEncoderOverrides
{
private:
std::unordered_map<pattern_descriptor::t, PatternEncoderBitSpec> settings;
public:
// Constructor with initializer list for settings
PatternEncoderOverrides() = default;
PatternEncoderOverrides(std::initializer_list<PatternEncoderSettingsEntry> _settings);
public:
void updateSettings(std::initializer_list<PatternEncoderSettingsEntry> _settings);
std::unordered_map<pattern_descriptor::t, PatternEncoderBitSpec> getSettings();
PatternEncoderBitSpec getSetting(pattern_descriptor::t descriptor);
const std::unordered_map<pattern_descriptor::t, PatternEncoderBitSpec>& getSettings() const;
bool hasSetting(pattern_descriptor::t descriptor);
bool removeSetting(pattern_descriptor::t descriptor);
};
class PatternEncoder : public util::Serialize, public util::Deserialize // Currently LPDDR4
{
public:
PatternEncoderOverrides settings;
PatternEncoder(PatternEncoderOverrides settings);
private:
inline bool applyBitSpec(
PatternEncoderOverrides &spec,
pattern_descriptor::t descriptor,
bool LAST_BIT,
bool default_bit
);
public:
void setOpcode(uint64_t opcode, uint16_t opcodeLength);
uint64_t getOpcode() const;
uint16_t getOpcodeLength() const;
// Overrides
public:
void serialize(std::ostream& stream) const override;
void deserialize(std::istream& stream) override;
public:
uint64_t encode(const Command& cmd, const std::vector<pattern_descriptor::t>& pattern, const uint64_t lastpattern);
uint64_t encode(const TargetCoordinate& coordinate, const std::vector<pattern_descriptor::t>& pattern, const uint64_t lastpattern);
// Private member variables
private:
uint64_t m_opcode = 0;
uint16_t m_opcodeLength = 0;
};
} // namespace DRAMPower
#endif /* DRAMPOWER_COMMAND_PATTERN_H */
================================================
FILE: src/DRAMPower/DRAMPower/data/energy.cpp
================================================
#include "energy.h"
using namespace DRAMPower;
double energy_info_t::total() const
{
auto total = E_act
+ E_pre
+ E_bg_act
+ E_bg_pre
+ E_RD
+ E_WR
+ E_RDA
+ E_WRA
//+ E_pre_RDA
//+ E_pre_WRA
+ E_ref_AB
+ E_ref_PB
+ E_ref_SB
+ E_ref_2B;
return total;
};
void energy_info_t::to_json(json_t &j) const
{
j = nlohmann::json{
{"ACT", E_act},
{"PRE", E_pre},
{"BG_ACT", E_bg_act},
{"BG_PRE", E_bg_pre},
{"RD", E_RD},
{"WR", E_WR},
{"RDA", E_RDA},
{"WRA", E_WRA},
{"PRE_RDA", E_pre_RDA},
{"PRE_WRA", E_pre_WRA},
{"REF_AB", E_ref_AB},
{"REF_PB", E_ref_PB},
{"REF_SB", E_ref_SB},
{"REF_2B", E_ref_2B}
};
}
energy_info_t& energy_info_t::operator+=(const DRAMPower::energy_info_t& other)
{
this->E_act += other.E_act;
this->E_pre += other.E_pre;
this->E_bg_act += other.E_bg_act;
this->E_bg_pre += other.E_bg_pre;
this->E_RD += other.E_RD;
this->E_WR += other.E_WR;
this->E_RDA += other.E_RDA;
this->E_WRA += other.E_WRA;
this->E_pre_RDA += other.E_pre_RDA;
this->E_pre_WRA += other.E_pre_WRA;
this->E_ref_AB += other.E_ref_AB;
this->E_ref_PB += other.E_ref_PB;
this->E_ref_SB += other.E_ref_SB;
this->E_ref_2B += other.E_ref_2B;
return *this;
}
double DRAMPower::energy_t::total() const
{
double total = 0.0;
energy_info_t bank_energy_total;
for (const auto& bank_e : this->bank_energy)
bank_energy_total += bank_e;
total += bank_energy_total.total() + E_bg_act_shared + E_PDNA + E_PDNP + E_sref + E_dsm + E_refab;
return total;
}
void DRAMPower::interface_energy_info_t::to_json(json_t &j) const
{
j = nlohmann::json{};
j["controller"]["dynamicEnergy"] = controller.dynamicEnergy;
j["controller"]["staticEnergy"] = controller.staticEnergy;
j["dram"]["dynamicEnergy"] = dram.dynamicEnergy;
j["dram"]["staticEnergy"] = dram.staticEnergy;
}
void DRAMPower::energy_t::to_json(json_t &j) const
{
j = nlohmann::json{
{"E_bg_act_shared", E_bg_act_shared},
{"E_PDNA", E_PDNA},
{"E_PDNP", E_PDNP},
{"E_sref", E_sref},
{"E_dsm", E_dsm},
{"E_refab", E_refab}
};
// Bank energy
auto energy_arr = nlohmann::json::array();
for (const energy_info_t& energy : bank_energy)
{
json_t bank_energy_json;
energy.to_json(bank_energy_json);
energy_arr.push_back(bank_energy_json);
}
j[this->get_Bank_energy_keyword()] = energy_arr;
}
energy_info_t DRAMPower::energy_t::aggregated_bank_energy() const
{
energy_info_t total;
for (const auto& bank_e : this->bank_energy)
total += bank_e;
total.E_bg_act += this->E_bg_act_shared;
return total;
}
================================================
FILE: src/DRAMPower/DRAMPower/data/energy.h
================================================
#ifndef DRAMPOWER_CALCULATION_ENERGY_H
#define DRAMPOWER_CALCULATION_ENERGY_H
#pragma once
#include <vector>
#include <iostream>
#include <DRAMUtils/util/json_utils.h>
namespace DRAMPower {
struct energy_info_t
{
double E_act = 0.0;
double E_pre = 0.0;
double E_bg_act = 0.0;
double E_bg_pre = 0.0;
double E_RD = 0.0;
double E_WR = 0.0;
double E_RDA = 0.0;
double E_WRA = 0.0;
double E_pre_RDA = 0.0;
double E_pre_WRA = 0.0;
double E_ref_AB = 0.0;
double E_ref_PB = 0.0;
double E_ref_SB = 0.0;
double E_ref_2B = 0.0;
double total() const;
void to_json(json_t &j) const;
energy_info_t& operator+=(const energy_info_t & other);
// Operator << for std::cout
friend std::ostream & operator<<(std::ostream & os, const energy_info_t & ei)
{
os << "ACT: " << ei.E_act << " ";
os << "PRE: " << ei.E_pre << " ";
os << "BG_ACT: " << ei.E_bg_act << " ";
os << "BG_PRE: " << ei.E_bg_pre << " ";
os << "RD: " << ei.E_RD << " ";
os << "WR: " << ei.E_WR << " ";
os << "RDA: " << ei.E_RDA << " ";
os << "WRA: " << ei.E_WRA << " ";
os << "PRE_RDA: " << ei.E_pre_RDA << " ";
os << "PRE_WRA: " << ei.E_pre_WRA << " ";
os << "REF_AB: " << ei.E_ref_AB << " ";
os << "REF_PB: " << ei.E_ref_PB << " ";
os << "REF_SB: " << ei.E_ref_SB << " ";
os << "REF_2B: " << ei.E_ref_2B << " ";
return os;
}
};
struct energy_t
{
std::vector<energy_info_t> bank_energy;
energy_info_t aggregated_bank_energy() const;
void to_json(json_t &j) const;
constexpr inline const char * get_Bank_energy_keyword() const
{
return "BankEnergy";
}
double E_bg_act_shared = 0.0;
double E_PDNA = 0.0;
double E_PDNP = 0.0;
double E_sref = 0.0;
double E_dsm = 0.0;
double E_refab = 0.0;
energy_t(std::size_t num_banks) : bank_energy(num_banks) {};
// get fields of os stream output
friend std::ostream & operator<<(std::ostream & os, const energy_t & e)
{
os << "E_bg_act_shared: " << e.E_bg_act_shared << " ";
os << "E_PDNA: " << e.E_PDNA << " ";
os << "E_PDNP: " << e.E_PDNP << " ";
os << "E_sref: " << e.E_sref << " ";
os << "E_dsm: " << e.E_dsm << " ";
os << "E_refab: " << e.E_refab << " ";
return os;
}
double total() const;
};
struct interface_energy_t
{
double dynamicEnergy = 0.0;
double staticEnergy = 0.0;
interface_energy_t &operator+=(const interface_energy_t &rhs) {
dynamicEnergy += rhs.dynamicEnergy;
staticEnergy += rhs.staticEnergy;
return *this;
}
friend interface_energy_t operator+(interface_energy_t lhs, const interface_energy_t &rhs) {
lhs += rhs;
return lhs;
}
};
struct interface_energy_info_t
{
interface_energy_t controller;
interface_energy_t dram;
double total() const {
return controller.dynamicEnergy + controller.staticEnergy + dram.dynamicEnergy + dram.staticEnergy;
}
interface_energy_info_t &operator+=(const interface_energy_info_t &rhs) {
controller += rhs.controller;
dram += rhs.dram;
return *this;
}
friend interface_energy_info_t operator+(interface_energy_info_t lhs,
const interface_energy_info_t &rhs) {
lhs += rhs;
return lhs;
}
friend std::ostream & operator<<(std::ostream & os, const interface_energy_info_t & e)
{
os << "Controller: dynamicEnergy: " << e.controller.dynamicEnergy << " ";
os << "staticEnergy: " << e.controller.staticEnergy << std::endl;
os << "DRAM: dynamicEnergy: " << e.dram.dynamicEnergy << " ";
os << "staticEnergy: " << e.dram.staticEnergy << std::endl;
os << "Total: " << e.total();
return os;
}
void to_json(json_t &j) const;
};
};
#endif /* DRAMPOWER_CALCULATION_ENERGY_H */
================================================
FILE: src/DRAMPower/DRAMPower/data/stats.h
================================================
#ifndef DRAMPOWER_DATA_STATS_H
#define DRAMPOWER_DATA_STATS_H
#include <DRAMPower/util/bus.h>
#include <DRAMPower/dram/Interface.h>
#include <DRAMPower/util/Serialize.h>
#include <DRAMPower/util/Deserialize.h>
#include <cstdint>
namespace DRAMPower
{
struct CycleStats : public util::Serialize, public util::Deserialize
{
struct command_stats_t : public util::Serialize, public util::Deserialize {
uint64_t act = 0;
uint64_t pre = 0;
uint64_t preSameBank = 0;
uint64_t reads = 0;
uint64_t writes = 0;
uint64_t refAllBank = 0;
uint64_t refPerBank = 0;
uint64_t refPerTwoBanks = 0;
uint64_t refSameBank = 0;
uint64_t readAuto = 0;
uint64_t writeAuto = 0;
void serialize(std::ostream& stream) const override {
stream.write(reinterpret_cast<const char *>(&act), sizeof(act));
stream.write(reinterpret_cast<const char *>(&pre), sizeof(pre));
stream.write(reinterpret_cast<const char *>(&preSameBank), sizeof(preSameBank));
stream.write(reinterpret_cast<const char *>(&reads), sizeof(reads));
stream.write(reinterpret_cast<const char *>(&writes), sizeof(writes));
stream.write(reinterpret_cast<const char *>(&refAllBank), sizeof(refAllBank));
stream.write(reinterpret_cast<const char *>(&refPerBank), sizeof(refPerBank));
stream.write(reinterpret_cast<const char *>(&refPerTwoBanks), sizeof(refPerTwoBanks));
stream.write(reinterpret_cast<const char *>(&refSameBank), sizeof(refSameBank));
stream.write(reinterpret_cast<const char *>(&readAuto), sizeof(readAuto));
stream.write(reinterpret_cast<const char *>(&writeAuto), sizeof(writeAuto));
}
void deserialize(std::istream& stream) override {
stream.read(reinterpret_cast<char *>(&act), sizeof(act));
stream.read(reinterpret_cast<char *>(&pre), sizeof(pre));
stream.read(reinterpret_cast<char *>(&preSameBank), sizeof(preSameBank));
stream.read(reinterpret_cast<char *>(&reads), sizeof(reads));
stream.read(reinterpret_cast<char *>(&writes), sizeof(writes));
stream.read(reinterpret_cast<char *>(&refAllBank), sizeof(refAllBank));
stream.read(reinterpret_cast<char *>(&refPerBank), sizeof(refPerBank));
stream.read(reinterpret_cast<char *>(&refPerTwoBanks), sizeof(refPerTwoBanks));
stream.read(reinterpret_cast<char *>(&refSameBank), sizeof(refSameBank));
stream.read(reinterpret_cast<char *>(&readAuto), sizeof(readAuto));
stream.read(reinterpret_cast<char *>(&writeAuto), sizeof(writeAuto));
}
// operator ==
bool operator==(const command_stats_t& rhs) const {
return act == rhs.act &&
pre == rhs.pre &&
preSameBank == rhs.preSameBank &&
reads == rhs.reads &&
writes == rhs.writes &&
refAllBank == rhs.refAllBank &&
refPerBank == rhs.refPerBank &&
refPerTwoBanks == rhs.refPerTwoBanks &&
refSameBank == rhs.refSameBank &&
readAuto == rhs.readAuto &&
writeAuto == rhs.writeAuto;
}
} counter;
struct cycles_t : public util::Serialize, public util::Deserialize {
uint64_t act = 0;
uint64_t pre = 0;
uint64_t powerDownAct = 0;
uint64_t powerDownPre = 0;
uint64_t selfRefresh = 0;
uint64_t deepSleepMode = 0;
uint64_t activeTime() const { return act; };
//uint64_t prechargeTime;
void serialize(std::ostream& stream) const override {
stream.write(reinterpret_cast<const char *>(&act), sizeof(act));
stream.write(reinterpret_cast<const char *>(&pre), sizeof(pre));
stream.write(reinterpret_cast<const char *>(&powerDownAct), sizeof(powerDownAct));
stream.write(reinterpret_cast<const char *>(&powerDownPre), sizeof(powerDownPre));
stream.write(reinterpret_cast<const char *>(&selfRefresh), sizeof(selfRefresh));
stream.write(reinterpret_cast<const char *>(&deepSleepMode), sizeof(deepSleepMode));
}
void deserialize(std::istream& stream) override {
stream.read(reinterpret_cast<char *>(&act), sizeof(act));
stream.read(reinterpret_cast<char *>(&pre), sizeof(pre));
stream.read(reinterpret_cast<char *>(&powerDownAct), sizeof(powerDownAct));
stream.read(reinterpret_cast<char *>(&powerDownPre), sizeof(powerDownPre));
stream.read(reinterpret_cast<char *>(&selfRefresh), sizeof(selfRefresh));
stream.read(reinterpret_cast<char *>(&deepSleepMode), sizeof(deepSleepMode));
}
// operator ==
bool operator==(const cycles_t& rhs) const {
return act == rhs.act &&
pre == rhs.pre &&
powerDownAct == rhs.powerDownAct &&
powerDownPre == rhs.powerDownPre &&
selfRefresh == rhs.selfRefresh &&
deepSleepMode == rhs.deepSleepMode;
}
} cycles;
struct prepos_t : public util::Serialize, public util::Deserialize {
uint64_t readMerged = 0;
uint64_t readMergedTime = 0;
uint64_t writeMerged = 0;
uint64_t writeMergedTime = 0;
uint64_t readSeamless = 0;
uint64_t writeSeamless = 0;
void serialize(std::ostream& stream) const override {
stream.write(reinterpret_cast<const char *>(&readMerged), sizeof(readMerged));
stream.write(reinterpret_cast<const char *>(&readMergedTime), sizeof(readMergedTime));
stream.write(reinterpret_cast<const char *>(&writeMerged), sizeof(writeMerged));
stream.write(reinterpret_cast<const char *>(&writeMergedTime), sizeof(writeMergedTime));
stream.write(reinterpret_cast<const char *>(&readSeamless), sizeof(readSeamless));
stream.write(reinterpret_cast<const char *>(&writeSeamless), sizeof(writeSeamless));
}
void deserialize(std::istream& stream) override {
stream.read(reinterpret_cast<char *>(&readMerged), sizeof(readMerged));
stream.read(reinterpret_cast<char *>(&readMergedTime), sizeof(readMergedTime));
stream.read(reinterpret_cast<char *>(&writeMerged), sizeof(writeMerged));
stream.read(reinterpret_cast<char *>(&writeMergedTime), sizeof(writeMergedTime));
stream.read(reinterpret_cast<char *>(&readSeamless), sizeof(readSeamless));
stream.read(reinterpret_cast<char *>(&writeSeamless), sizeof(writeSeamless));
}
// operator ==
bool operator==(const prepos_t& rhs) const {
return readMerged == rhs.readMerged &&
readMergedTime == rhs.readMergedTime &&
writeMerged == rhs.writeMerged &&
writeMergedTime == rhs.writeMergedTime &&
readSeamless == rhs.readSeamless &&
writeSeamless == rhs.writeSeamless;
}
} prepos;
void serialize(std::ostream& stream) const override {
counter.serialize(stream);
cycles.serialize(stream);
prepos.serialize(stream);
}
void deserialize(std::istream& stream) override {
counter.deserialize(stream);
cycles.deserialize(stream);
prepos.deserialize(stream);
}
// operator ==
bool operator==(const CycleStats& rhs) const {
return counter == rhs.counter &&
cycles == rhs.cycles &&
prepos == rhs.prepos;
}
};
struct TogglingStats
{
util::bus_stats_t read;
util::bus_stats_t write;
};
struct SimulationStats
{
util::bus_stats_t commandBus;
util::bus_stats_t readBus;
util::bus_stats_t writeBus;
util::bus_stats_t clockStats;
util::bus_stats_t wClockStats;
util::bus_stats_t readDBI;
util::bus_stats_t writeDBI;
TogglingStats togglingStats;
util::bus_stats_t readDQSStats;
util::bus_stats_t writeDQSStats;
std::vector<CycleStats> bank;
std::vector<CycleStats> rank_total;
// Operator ==
bool operator==(const SimulationStats& other) const {
// Compare banks
bool banksEqual = true;
if (bank.size() != other.bank.size()) {
banksEqual = false;
} else {
for (size_t i = 0; i < bank.size(); ++i) {
if (!(bank[i] == other.bank[i])) {
banksEqual = false;
break;
}
}
}
bool rank_totalEqual = true;
if (rank_total.size() != other.rank_total.size()) {
rank_totalEqual = false;
} else {
for (size_t i = 0; i < rank_total.size(); ++i) {
if (!(rank_total[i] == other.rank_total[i])) {
rank_totalEqual = false;
break;
}
}
}
return commandBus == other.commandBus &&
readBus == other.readBus &&
writeBus == other.writeBus &&
clockStats == other.clockStats &&
wClockStats == other.wClockStats &&
readDBI == other.readDBI &&
writeDBI == other.writeDBI &&
togglingStats.read == other.togglingStats.read &&
togglingStats.write == other.togglingStats.write &&
readDQSStats == other.readDQSStats &&
writeDQSStats == other.writeDQSStats &&
banksEqual &&
rank_totalEqual;
}
};
};
#endif /* DRAMPOWER_DATA_STATS_H */
================================================
FILE: src/DRAMPower/DRAMPower/dram/Bank.h
================================================
#ifndef DRAMPOWER_DDR_BANK_H
#define DRAMPOWER_DDR_BANK_H
#include <DRAMPower/data/stats.h>
#include <DRAMPower/Types.h>
#include <DRAMPower/util/Serialize.h>
#include <DRAMPower/util/Deserialize.h>
#include <stdint.h>
namespace DRAMPower {
struct Bank : public util::Serialize, public util::Deserialize {
public:
enum class BankState {
BANK_PRECHARGED = 0,
BANK_ACTIVE = 1,
};
public:
CycleStats::command_stats_t counter;
struct {
interval_t act;
interval_t powerDownAct;
interval_t powerDownPre;
} cycles;
BankState bankState;
public:
timestamp_t latestPre = 0;
timestamp_t refreshEndTime = 0;
void serialize(std::ostream& stream) const override {
stream.write(reinterpret_cast<const char *>(&bankState), sizeof(bankState));
stream.write(reinterpret_cast<const char *>(&latestPre), sizeof(latestPre));
stream.write(reinterpret_cast<const char *>(&refreshEndTime), sizeof(refreshEndTime));
cycles.act.serialize(stream);
cycles.powerDownAct.serialize(stream);
cycles.powerDownPre.serialize(stream);
counter.serialize(stream);
}
void deserialize(std::istream& stream) override {
stream.read(reinterpret_cast<char *>(&bankState), sizeof(bankState));
stream.read(reinterpret_cast<char *>(&latestPre), sizeof(latestPre));
stream.read(reinterpret_cast<char *>(&refreshEndTime), sizeof(refreshEndTime));
cycles.act.deserialize(stream);
cycles.powerDownAct.deserialize(stream);
cycles.powerDownPre.deserialize(stream);
counter.deserialize(stream);
}
};
}
#endif /* DRAMPOWER_DDR_BANK_H */
================================================
FILE: src/DRAMPower/DRAMPower/dram/Interface.cpp
================================================
#include "Interface.h"
namespace DRAMPower {
using namespace DRAMUtils::Config;
void TogglingHandle::TogglingHandleLastBurst::serialize(std::ostream &stream) const
{
stream.write(reinterpret_cast<const char*>(&last_length), sizeof(last_length));
stream.write(reinterpret_cast<const char*>(&last_load), sizeof(last_load));
stream.write(reinterpret_cast<const char*>(&handled), sizeof(handled));
}
void TogglingHandle::TogglingHandleLastBurst::deserialize(std::istream &stream) {
stream.read(reinterpret_cast<char*>(&last_length), sizeof(last_length));
stream.read(reinterpret_cast<char*>(&last_load), sizeof(last_load));
stream.read(reinterpret_cast<char*>(&handled), sizeof(handled));
}
TogglingHandle::TogglingHandle(const uint64_t width, const uint64_t datarate, const double toggling_rate, const double duty_cycle, const bool enabled)
: width(width)
, datarate(datarate)
, toggling_rate(toggling_rate)
, duty_cycle(duty_cycle)
, enableflag(enabled)
{
assert(width > 0); // Check bounds
assert(datarate > 0); // Check bounds
assert(duty_cycle >= 0 && duty_cycle <= 1); // Check bounds
assert(toggling_rate >= 0 && toggling_rate <= 1); // Check bounds
}
TogglingHandle::TogglingHandle(const uint64_t width, const uint64_t datarate, const double toggling_rate, const double duty_cycle, DRAMUtils::Config::TogglingRateIdlePattern idlepattern, const bool enabled)
: width(width)
, datarate(datarate)
, toggling_rate(toggling_rate)
, duty_cycle(duty_cycle)
, enableflag(enabled)
, idlepattern(idlepattern)
{
assert(width > 0); // Check bounds
assert(datarate > 0); // Check bounds
assert(duty_cycle >= 0 && duty_cycle <= 1); // Check bounds
assert(toggling_rate >= 0 && toggling_rate <= 1); // Check bounds
}
void TogglingHandle::disable(timestamp_t timestamp)
{
timestamp_t virtualtimestamp = timestamp * this->datarate;
if(!this->enableflag) {
return;
}
if (this->last_burst) {
if(virtualtimestamp >= this->last_burst.last_length + this->last_burst.last_load) {
this->count += this->last_burst.last_length;
} else {
// Partial burst is lost
this->count += virtualtimestamp - this->last_burst.last_load;
}
this->last_burst.handled = true;
}
this->disable_timestamp = virtualtimestamp;
this->enableflag = false;
}
void TogglingHandle::enable(timestamp_t timestamp)
{
if (this->enableflag) {
return;
}
this->disable_time += timestamp * this->datarate - this->disable_timestamp;
this->enableflag = true;
}
bool TogglingHandle::isEnabled() const
{
return this->enableflag;
}
double TogglingHandle::getTogglingRate() const
{
return this->toggling_rate;
}
double TogglingHandle::getDutyCycle() const
{
return this->duty_cycle;
}
uint64_t TogglingHandle::getWidth() const
{
return this->width;
}
void TogglingHandle::setWidth(const uint64_t width)
{
this->width = width;
}
uint64_t TogglingHandle::getDatarate() const
{
return this->datarate;
}
void TogglingHandle::setDataRate(const uint64_t datarate)
{
this->datarate = datarate;
}
void TogglingHandle::setTogglingRateAndDutyCycle(const double toggling_rate, const double duty_cycle, const TogglingRateIdlePattern idlepattern)
{
this->toggling_rate = toggling_rate;
this->duty_cycle = duty_cycle;
this->idlepattern = idlepattern;
}
uint64_t TogglingHandle::getCount() const
{
return this->count;
}
// Returns timestamp of last burst
timestamp_t TogglingHandle::get_lastburst_timestamp(bool relative_to_clock) const
{
timestamp_t lastburst = this->last_burst.last_load + this->last_burst.last_length;
if (relative_to_clock) {
auto remainder = lastburst % this->datarate;
if (remainder != 0) {
lastburst += this->datarate - remainder;
}
return lastburst / this->datarate;
}
return lastburst;
}
void TogglingHandle::incCountBurstLength(timestamp_t timestamp, uint64_t burstlength)
{
// Convert to bus timings
timestamp_t virtual_timestamp = timestamp * this->datarate;
assert(virtual_timestamp / this->datarate == timestamp); // No overflow
assert(
(this->last_burst && (virtual_timestamp >= (this->last_burst.last_length + this->last_burst.last_load)))
|| !this->last_burst
);
// Add last burst
if (!this->last_burst.handled) {
// Add last burst to count
this->count += this->last_burst.last_length;
}
// Store burst in last_length and last_load if enabled
if (this->enableflag) {
// Set last_length and last_load to new burst_length
this->last_burst = TogglingHandleLastBurst {
burstlength, // last_length
virtual_timestamp, // last_load
false // handled
};
} else {
// Clear last_burst
this->last_burst.handled = true;
}
}
void TogglingHandle::incCountBitLength(timestamp_t timestamp, uint64_t bitlength)
{
assert(bitlength % this->width == 0);
this->incCountBurstLength(timestamp, bitlength / this->width);
}
util::bus_stats_t TogglingHandle::get_stats(timestamp_t timestamp) const
{
// Convert to bus timings
timestamp_t virtual_timestamp = timestamp * this->datarate;
assert(virtual_timestamp / this->datarate == timestamp); // No overflow
util::bus_stats_t stats;
uint64_t count = this->count;
timestamp_t disable_time = this->disable_time;
if(this->enableflag) {
// Check if last burst is finished
if ((this->last_burst)
&& (virtual_timestamp < this->last_burst.last_length + this->last_burst.last_load)
) {
// last burst not finished
count += virtual_timestamp - this->last_burst.last_load;
} else if (this->last_burst) {
// last burst finished
count += this->last_burst.last_length;
}
} else {
disable_time += virtual_timestamp - this->disable_timestamp;
}
// Compute toggles
stats.ones = count * this->duty_cycle;
stats.zeroes = count * (1 - this->duty_cycle);
stats.ones_to_zeroes = count * this->toggling_rate / 2; // Round down
// Compute idle
switch (this->idlepattern) {
case TogglingRateIdlePattern::L:
stats.zeroes += virtual_timestamp - disable_time - count;
break;
case TogglingRateIdlePattern::H:
stats.ones += virtual_timestamp - disable_time - count;
break;
case TogglingRateIdlePattern::Invalid:
assert(false); // Fallback to Z
case TogglingRateIdlePattern::Z:
// Nothing to do in high impedance mode
break;
}
// Scale by bus width
stats.ones *= this->width;
stats.zeroes *= this->width;
stats.ones_to_zeroes *= this->width;
// Compute zeroes_to_ones and bit changes
stats.zeroes_to_ones = stats.ones_to_zeroes;
stats.bit_changes = stats.ones_to_zeroes + stats.zeroes_to_ones;
return stats;
}
void TogglingHandle::serialize(std::ostream &stream) const {
stream.write(reinterpret_cast<const char*>(&width), sizeof(width));
stream.write(reinterpret_cast<const char*>(&datarate), sizeof(datarate));
stream.write(reinterpret_cast<const char*>(&toggling_rate), sizeof(toggling_rate));
stream.write(reinterpret_cast<const char*>(&duty_cycle), sizeof(duty_cycle));
last_burst.serialize(stream);
stream.write(reinterpret_cast<const char*>(&enableflag), sizeof(enableflag));
stream.write(reinterpret_cast<const char*>(&count), sizeof(count));
stream.write(reinterpret_cast<const char*>(&disable_timestamp), sizeof(disable_timestamp));
stream.write(reinterpret_cast<const char*>(&disable_time), sizeof(disable_time));
stream.write(reinterpret_cast<const char*>(&idlepattern), sizeof(idlepattern));
}
void TogglingHandle::deserialize(std::istream &stream) {
stream.read(reinterpret_cast<char*>(&width), sizeof(width));
stream.read(reinterpret_cast<char*>(&datarate), sizeof(datarate));
stream.read(reinterpret_cast<char*>(&toggling_rate), sizeof(toggling_rate));
stream.read(reinterpret_cast<char*>(&duty_cycle), sizeof(duty_cycle));
last_burst.deserialize(stream);
stream.read(reinterpret_cast<char*>(&enableflag), sizeof(enableflag));
stream.read(reinterpret_cast<char*>(&count), sizeof(count));
stream.read(reinterpret_cast<char*>(&disable_timestamp), sizeof(disable_timestamp));
stream.read(reinterpret_cast<char*>(&disable_time), sizeof(disable_time));
stream.read(reinterpret_cast<char*>(&idlepattern), sizeof(idlepattern));
}
} // namespace DRAMPower
================================================
FILE: src/DRAMPower/DRAMPower/dram/Interface.h
================================================
#ifndef DRAMPOWER_DDR_INTERFACE_H
#define DRAMPOWER_DDR_INTERFACE_H
#pragma once
#include <DRAMPower/Types.h>
#include <DRAMPower/util/bus.h>
#include <DRAMPower/util/Serialize.h>
#include <DRAMPower/util/Deserialize.h>
#include <DRAMUtils/config/toggling_rate.h>
#include <stdint.h>
#include <optional>
namespace DRAMPower {
class TogglingHandle : public util::Serialize, public util::Deserialize
{
struct TogglingHandleLastBurst : public util::Serialize, public util::Deserialize {
uint64_t last_length = 0;
timestamp_t last_load = 0;
bool handled = true;
TogglingHandleLastBurst() = default;
TogglingHandleLastBurst(uint64_t last_length, timestamp_t last_load, bool handled)
: last_length(last_length), last_load(last_load), handled(handled) {}
operator bool() const { return !this->handled; }
void serialize(std::ostream &stream) const override;
void deserialize(std::istream &stream) override;
};
private:
uint64_t width = 0;
uint64_t datarate = 1;
double toggling_rate = 0; // [0, 1] allowed
double duty_cycle = 0.0; // [0, 1] allowed
TogglingHandleLastBurst last_burst;
bool enableflag = false; // default disabled if default constructor is used
uint64_t count = 0;
timestamp_t disable_timestamp = 0;
timestamp_t disable_time = 0;
DRAMUtils::Config::TogglingRateIdlePattern idlepattern = DRAMUtils::Config::TogglingRateIdlePattern::Z;
public:
TogglingHandle(const uint64_t width, const uint64_t datarate, const double toggling_rate, const double duty_cycle, const bool enabled = true);
TogglingHandle(const uint64_t width, const uint64_t datarate, const double toggling_rate, const double duty_cycle, DRAMUtils::Config::TogglingRateIdlePattern idlepattern, const bool enabled = true);
TogglingHandle() = default;
public:
// Getters and Setters
double getTogglingRate() const;
double getDutyCycle() const;
bool isEnabled() const;
uint64_t getWidth() const;
uint64_t getDatarate() const;
timestamp_t get_lastburst_timestamp(bool relative_to_clock = true) const;
void setTogglingRateAndDutyCycle(const double toggling_rate, const double duty_cycle, const DRAMUtils::Config::TogglingRateIdlePattern idlepattern);
void disable(timestamp_t timestamp);
void enable(timestamp_t timestamp);
void setWidth(const uint64_t width);
void setDataRate(const uint64_t datarate);
uint64_t getCount() const;
public:
void incCountBurstLength(timestamp_t timestamp, uint64_t burstlength);
void incCountBitLength(timestamp_t timestamp, uint64_t bitlength);
util::bus_stats_t get_stats(timestamp_t timestamp) const;
// Overrides
void serialize(std::ostream &stream) const override;
void deserialize(std::istream &stream) override;
};
struct interface_stats_t
{
util::bus_stats_t command_bus;
util::bus_stats_t read_bus;
util::bus_stats_t write_bus;
};
} // namespace DRAMPower
#endif /* DRAMPOWER_DDR_INTERFACE_H */
================================================
FILE: src/DRAMPower/DRAMPower/dram/Rank.cpp
================================================
#include "Rank.h"
#include <algorithm>
namespace DRAMPower {
Rank::Rank(std::size_t numBanks)
: banks(numBanks)
{};
bool Rank::isActive(timestamp_t timestamp) {
if ( timestamp < this->endRefreshTime ) {
std::cout << "[WARN] Rank::isActive() -> timestamp (" << timestamp <<") < " << "endRefreshTime (" << this->endRefreshTime << ")" << std::endl;
}
return countActiveBanks() > 0 || timestamp < this->endRefreshTime;
}
std::size_t Rank::countActiveBanks() const {
return (unsigned)std::count_if(banks.begin(), banks.end(),
[](const auto& bank) {
return (bank.bankState == Bank::BankState::BANK_ACTIVE);
});
}
void Rank::serialize(std::ostream& stream) const {
stream.write(reinterpret_cast<const char*>(&memState), sizeof(memState));
stream.write(reinterpret_cast<const char *>(&endRefreshTime), sizeof(endRefreshTime));
commandCounter.serialize(stream);
stream.write(reinterpret_cast<const char* >(&counter.selfRefresh), sizeof(counter.selfRefresh));
stream.write(reinterpret_cast<const char* >(&counter.deepSleepMode), sizeof(counter.deepSleepMode));
stream.write(reinterpret_cast<const char* >(&endRefreshTime), sizeof(endRefreshTime));
cycles.pre.serialize(stream);
cycles.act.serialize(stream);
cycles.ref.serialize(stream);
cycles.sref.serialize(stream);
cycles.powerDownAct.serialize(stream);
cycles.powerDownPre.serialize(stream);
cycles.deepSleepMode.serialize(stream);
for (const auto& bank : banks) {
bank.serialize(stream);
}
};
void Rank::deserialize(std::istream& stream) {
stream.read(reinterpret_cast<char *>(&memState), sizeof(memState));
stream.read(reinterpret_cast<char *>(&endRefreshTime), sizeof(endRefreshTime));
commandCounter.deserialize(stream);
stream.read(reinterpret_cast<char* >(&counter.selfRefresh), sizeof(counter.selfRefresh));
stream.read(reinterpret_cast<char* >(&counter.deepSleepMode), sizeof(counter.deepSleepMode));
stream.read(reinterpret_cast<char* >(&endRefreshTime), sizeof(endRefreshTime));
cycles.pre.deserialize(stream);
cycles.act.deserialize(stream);
cycles.ref.deserialize(stream);
cycles.sref.deserialize(stream);
cycles.powerDownAct.deserialize(stream);
cycles.powerDownPre.deserialize(stream);
cycles.deepSleepMode.deserialize(stream);
for (auto & bank : banks) {
bank.deserialize(stream);
}
};
void RankInterface::serialize(std::ostream& stream) const {
stream.write(reinterpret_cast<const char*>(&seamlessPrePostambleCounter_read), sizeof(seamlessPrePostambleCounter_read));
stream.write(reinterpret_cast<const char*>(&seamlessPrePostambleCounter_write), sizeof(seamlessPrePostambleCounter_write));
stream.write(reinterpret_cast<const char*>(&mergedPrePostambleCounter_read), sizeof(mergedPrePostambleCounter_read));
stream.write(reinterpret_cast<const char*>(&mergedPrePostambleCounter_write), sizeof(mergedPrePostambleCounter_write));
stream.write(reinterpret_cast<const char*>(&mergedPrePostambleTime_read), sizeof(mergedPrePostambleTime_read));
stream.write(reinterpret_cast<const char*>(&mergedPrePostambleTime_write), sizeof(mergedPrePostambleTime_write));
stream.write(reinterpret_cast<const char*>(&lastReadEnd), sizeof(lastReadEnd));
stream.write(reinterpret_cast<const char*>(&lastWriteEnd), sizeof(lastWriteEnd));
}
void RankInterface::deserialize(std::istream& stream) {
stream.read(reinterpret_cast<char*>(&seamlessPrePostambleCounter_read), sizeof(seamlessPrePostambleCounter_read));
stream.read(reinterpret_cast<char*>(&seamlessPrePostambleCounter_write), sizeof(seamlessPrePostambleCounter_write));
stream.read(reinterpret_cast<char*>(&mergedPrePostambleCounter_read), sizeof(mergedPrePostambleCounter_read));
stream.read(reinterpret_cast<char*>(&mergedPrePostambleCounter_write), sizeof(mergedPrePostambleCounter_write));
stream.read(reinterpret_cast<char*>(&mergedPrePostambleTime_read), sizeof(mergedPrePostambleTime_read));
stream.read(reinterpret_cast<char*>(&mergedPrePostambleTime_write), sizeof(mergedPrePostambleTime_write));
stream.read(reinterpret_cast<char*>(&lastReadEnd), sizeof(lastReadEnd));
stream.read(reinterpret_cast<char*>(&lastWriteEnd), sizeof(lastWriteEnd));
}
} // namespace DRAMPower
================================================
FILE: src/DRAMPower/DRAMPower/dram/Rank.h
================================================
#ifndef DRAMPOWER_DDR_RANK_H
#define DRAMPOWER_DDR_RANK_H
#include <DRAMPower/util/command_counter.h>
#include <DRAMPower/command/CmdType.h>
#include <DRAMPower/dram/Bank.h>
#include <DRAMPower/Types.h>
#include <DRAMPower/util/Serialize.h>
#include <DRAMPower/util/Deserialize.h>
#include <vector>
namespace DRAMPower {
// Power-Down and Self-refresh related memory states
enum class MemState {
NOT_IN_PD = 0,
PDN_ACT,
PDN_PRE,
SREF,
DSM,
};
struct Rank : public util::Serialize, public util::Deserialize {
// Type aliases
using commandCounter_t = util::CommandCounter<CmdType>;
public:
// Variables
MemState memState = MemState::NOT_IN_PD;
commandCounter_t commandCounter;
struct {
interval_t pre; // useful ???
interval_t act;
interval_t ref;
interval_t sref;
interval_t powerDownAct;
interval_t powerDownPre;
interval_t deepSleepMode;
} cycles;
struct {
uint64_t selfRefresh = 0;
uint64_t deepSleepMode = 0;
} counter = { 0 };
timestamp_t endRefreshTime = 0;
std::vector<Bank> banks;
public:
// Constructors
Rank(std::size_t numBanks);
// Functions
public:
bool isActive(timestamp_t timestamp);
std::size_t countActiveBanks() const;
// Overrides
void serialize(std::ostream& stream) const override;
void deserialize(std::istream& stream) override;
};
struct RankInterface : public util::Serialize, public util::Deserialize {
uint64_t seamlessPrePostambleCounter_read = 0;
uint64_t seamlessPrePostambleCounter_write = 0;
uint64_t mergedPrePostambleCounter_read = 0;
uint64_t mergedPrePostambleCounter_write = 0;
timestamp_t mergedPrePostambleTime_read = 0;
timestamp_t mergedPrePostambleTime_write = 0;
timestamp_t lastReadEnd = 0;
timestamp_t lastWriteEnd = 0;
// Overrides
void serialize(std::ostream& stream) const override;
void deserialize(std::istream& stream) override;
};
} // namespace DRAMPower
#endif /* DRAMPOWER_DDR_RANK_H */
================================================
FILE: src/DRAMPower/DRAMPower/dram/dram_base.h
================================================
#ifndef DRAMPOWER_DRAM_DRAM_BASE_H
#define DRAMPOWER_DRAM_DRAM_BASE_H
#include <DRAMPower/command/Command.h>
#include <DRAMPower/data/energy.h>
#include <DRAMPower/data/stats.h>
#include <DRAMPower/util/extension_manager.h>
#include <DRAMPower/util/extensions.h>
#include <DRAMPower/util/Router.h>
#include <DRAMPower/util/PatternHandler.h>
#include <DRAMPower/util/ImplicitCommandHandler.h>
#include <DRAMPower/util/cli_architecture_config.h>
#include <DRAMPower/util/Serialize.h>
#include <DRAMPower/util/Deserialize.h>
#include <DRAMUtils/config/toggling_rate.h>
#include <cassert>
#include <vector>
namespace DRAMPower {
using namespace DRAMUtils::Config;
template <typename CommandEnum>
class dram_base : public util::Serialize, public util::Deserialize
{
// Public type definitions
public:
using commandEnum_t = CommandEnum;
using commandCount_t = std::vector<std::size_t>;
// ExtensionManager
using extension_manager_t = util::extension_manager::ExtensionManager<
extensions::Base
>;
// Public constructors and assignment operators
public:
dram_base(const dram_base&) = default; // copy constructor
dram_base& operator=(const dram_base&) = default; // copy assignment operator
dram_base(dram_base&&) = default; // Move constructor
dram_base& operator=(dram_base&&) = default; // Move assignment operator
virtual ~dram_base() = 0;
// Protected constructors
protected:
dram_base() = default;
// Public member functions
public:
// ExtensionManager
extension_manager_t& getExtensionManager() { return m_extensionManager; }
const extension_manager_t& getExtensionManager() const { return m_extensionManager; }
void doCoreCommand(const Command& command) {
doCoreCommandImpl(command);
}
void doInterfaceCommand(const Command& command) {
doInterfaceCommandImpl(command);
}
void doCommand(const Command& command) {
doCoreCommandImpl(command);
doInterfaceCommandImpl(command);
}
// deprecated
void doCoreInterfaceCommand(const Command& command) {
doCommand(command);
}
timestamp_t getLastCommandTime() const {
return getLastCommandTime_impl();
}
double getTotalEnergy(timestamp_t timestamp) {
return calcCoreEnergy(timestamp).total() + calcInterfaceEnergy(timestamp).total();
};
SimulationStats getStats() {
return getWindowStats(getLastCommandTime());
}
void serialize(std::ostream& stream) const override {
// Serialize the extension manager
m_extensionManager.serialize(stream);
serialize_impl(stream);
}
void deserialize(std::istream& stream) override {
// Deserialize the extension manager
m_extensionManager.deserialize(stream);
deserialize_impl(stream);
}
// Public virtual methods
public:
virtual energy_t calcCoreEnergyStats(const SimulationStats& stats) const = 0;
energy_t calcCoreEnergy(timestamp_t timestamp) {
return calcCoreEnergyStats(getWindowStats(timestamp));
}
virtual interface_energy_info_t calcInterfaceEnergyStats(const SimulationStats& stats) const = 0;
interface_energy_info_t calcInterfaceEnergy(timestamp_t timestamp) {
return calcInterfaceEnergyStats(getWindowStats(timestamp));
}
virtual SimulationStats getWindowStats(timestamp_t timestamp) = 0;
virtual util::CLIArchitectureConfig getCLIArchitectureConfig() = 0;
virtual bool isSerializable() const = 0;
// Private virtual methods
private:
virtual void doCoreCommandImpl(const Command& command) = 0;
virtual void doInterfaceCommandImpl(const Command& command) = 0;
virtual timestamp_t getLastCommandTime_impl() const = 0;
virtual void serialize_impl(std::ostream& stream) const = 0;
virtual void deserialize_impl(std::istream& stream) = 0;
// Private member variables
private:
extension_manager_t m_extensionManager;
};
template <typename CommandEnum>
dram_base<CommandEnum>::~dram_base() = default;
}
#endif /* DRAMPOWER_DDR_DRAM_BASE_H */
================================================
FILE: src/DRAMPower/DRAMPower/memspec/MemSpec.h
================================================
/*
* Copyright (c) 2015-2020, University of Kaiserslautern
* Copyright (c) 2012-2021, Fraunhofer IESE
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of the copyright holder 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.
*
* Authors:
* Janik Schlemminger
* Matthias Jung
* Lukas Steiner
* Luiza Correa
*/
#ifndef DRAMPOWER_MEMSPEC_MEMSPEC_H
#define DRAMPOWER_MEMSPEC_MEMSPEC_H
#include <DRAMPower/command/CmdType.h>
#include <DRAMUtils/util/json_utils.h>
#include <DRAMUtils/util/types.h>
#include <DRAMUtils/memspec/MemSpec.h>
#include <vector>
#include <algorithm>
namespace DRAMPower {
template <typename T>
class MemSpec
{
T rawmemspec;
public:
uint64_t numberOfBanks;
uint64_t numberOfRows;
uint64_t numberOfColumns;
uint64_t numberOfDevices; // Number of devices per rank
uint64_t burstLength;
uint64_t dataRate;
uint64_t bitWidth;
/* MEMSPEC specific parameters
unsigned numberOfBankGroups;
unsigned numberOfDevicesOnDIMM;
unsigned numberOfRanks;
unsigned banksPerRank;
unsigned groupsPerRank;
unsigned banksPerGroup;
unsigned numberOfChannels;
*/
std::string memoryId;
std::string memoryType;
uint64_t prechargeOffsetRD;
uint64_t prechargeOffsetWR;
MemSpec() = delete;
virtual ~MemSpec() = default;
// MemSpec() = default;
MemSpec(const T &memspec) : rawmemspec(memspec)
{
numberOfBanks = memspec.memarchitecturespec.nbrOfBanks;
numberOfRows = memspec.memarchitecturespec.nbrOfRows;
numberOfColumns = memspec.memarchitecturespec.nbrOfColumns;
numberOfDevices = memspec.memarchitecturespec.nbrOfDevices;
if (numberOfDevices < 1)
{
numberOfDevices = 1;
}
burstLength = memspec.memarchitecturespec.burstLength;
dataRate = memspec.memarchitecturespec.dataRate;
bitWidth = memspec.memarchitecturespec.width;
memoryId = memspec.memoryId;
memoryType = memspec.id;
}
};
} // namespace DRAMPower
#endif /* DRAMPOWER_MEMSPEC_MEMSPEC_H */
================================================
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecDDR4.cpp
================================================
/*
* Copyright (c) 2019, University of Kaiserslautern
* Copyright (c) 2012-2021, Fraunhofer IESE
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of the copyright holder 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.
*
* Authors:
* Lukas Steiner
* Luiza Correa
*/
#include "MemSpecDDR4.h"
using namespace DRAMPower;
MemSpecDDR4::MemSpecDDR4(const DRAMUtils::MemSpec::MemSpecDDR4 &memspec)
: MemSpec(memspec)
{
numberOfBankGroups = memspec.memarchitecturespec.nbrOfBankGroups;
numberOfRanks = memspec.memarchitecturespec.nbrOfRanks;
memTimingSpec.tCK = memspec.memtimingspec.tCK;
memTimingSpec.tRAS = memspec.memtimingspec.RAS;
memTimingSpec.tRCD = memspec.memtimingspec.RCD;
memTimingSpec.tRTP = memspec.memtimingspec.RTP;
memTimingSpec.tWL = memspec.memtimingspec.WL;
memTimingSpec.tWR = memspec.memtimingspec.WR;
memTimingSpec.tRP = memspec.memtimingspec.RP;
memTimingSpec.tAL = memspec.memtimingspec.AL;
auto VDD = VoltageDomain::VDD;
auto VPP = VoltageDomain::VPP;
memPowerSpec.push_back(MemPowerSpec());
memPowerSpec[VDD].vXX = memspec.mempowerspec.vdd;
memPowerSpec[VDD].iXX0 = memspec.mempowerspec.idd0;
memPowerSpec[VDD].iXX2N = memspec.mempowerspec.idd2n;
memPowerSpec[VDD].iXX3N = memspec.mempowerspec.idd3n;
memPowerSpec[VDD].iXX4R = memspec.mempowerspec.idd4r;
memPowerSpec[VDD].iXX4W = memspec.mempowerspec.idd4w;
memPowerSpec[VDD].iXX6N = memspec.mempowerspec.idd6n;
memPowerSpec[VDD].iXX2P = memspec.mempowerspec.idd2p;
memPowerSpec[VDD].iXX3P = memspec.mempowerspec.idd3p;
memPowerSpec.push_back(MemPowerSpec());
memPowerSpec[VPP].vXX = memspec.mempowerspec.vpp;
memPowerSpec[VPP].iXX0 = memspec.mempowerspec.ipp0;
memPowerSpec[VPP].iXX2N = memspec.mempowerspec.ipp2n;
memPowerSpec[VPP].iXX3N = memspec.mempowerspec.ipp3n;
memPowerSpec[VPP].iXX4R = memspec.mempowerspec.ipp4r;
memPowerSpec[VPP].iXX4W = memspec.mempowerspec.ipp4w;
memPowerSpec[VPP].iXX6N = memspec.mempowerspec.ipp6n;
memPowerSpec[VPP].iXX2P = memspec.mempowerspec.ipp2p;
memPowerSpec[VPP].iXX3P = memspec.mempowerspec.ipp3p;
vddq = memspec.mempowerspec.vddq;
if (DRAMUtils::MemSpec::RefModeTypeDDR4::REF_MODE_2 == memspec.memarchitecturespec.RefMode) {
memPowerSpec[VDD].iXX5X = memspec.mempowerspec.idd5F2;
memPowerSpec[VPP].iXX5X = memspec.mempowerspec.ipp5F2;
memTimingSpec.tRFC = memspec.memtimingspec.RFC2;
} else if (DRAMUtils::MemSpec::RefModeTypeDDR4::REF_MODE_4 == memspec.memarchitecturespec.RefMode) {
memPowerSpec[VDD].iXX5X = memspec.mempowerspec.idd5F4;
memPowerSpec[VPP].iXX5X = memspec.mempowerspec.ipp5F4;
memTimingSpec.tRFC = memspec.memtimingspec.RFC4;
} else {
// RefModeTypeDDR4::REF_MODE_1 || RefModeTypeDDR4::INVALID
memPowerSpec[VDD].iXX5X = memspec.mempowerspec.idd5B;
memPowerSpec[VPP].iXX5X = memspec.mempowerspec.ipp5B;
memTimingSpec.tRFC = memspec.memtimingspec.RFC1;
}
memPowerSpec[VDD].iBeta = memspec.mempowerspec.iBeta_vdd.value_or(memspec.mempowerspec.idd0);
memPowerSpec[VPP].iBeta = memspec.mempowerspec.iBeta_vpp.value_or(memspec.mempowerspec.ipp0);
if(memspec.bankwisespec.has_value())
{
bwParams.bwPowerFactRho = memspec.bankwisespec.value().factRho.value_or(1);
}
else
{
bwParams.bwPowerFactRho = 1;
}
memTimingSpec.tBurst = burstLength/dataRate;
prechargeOffsetRD = memTimingSpec.tAL + memTimingSpec.tRTP;
prechargeOffsetWR = memTimingSpec.tBurst + memTimingSpec.tWL + memTimingSpec.tWR;
parseImpedanceSpec(memspec);
parsePrePostamble(memspec);
}
void MemSpecDDR4::parseImpedanceSpec(const DRAMUtils::MemSpec::MemSpecDDR4 &memspec) {
memImpedanceSpec = memspec.memimpedancespec;
}
void MemSpecDDR4::parsePrePostamble(const DRAMUtils::MemSpec::MemSpecDDR4 &memspec)
{
prePostamble.read_zeroes = memspec.prepostamble.read_zeroes;
prePostamble.write_zeroes = memspec.prepostamble.write_zeroes;
prePostamble.read_ones = memspec.prepostamble.read_ones;
prePostamble.write_ones = memspec.prepostamble.write_ones;
prePostamble.read_zeroes_to_ones = memspec.prepostamble.read_zeroes_to_ones;
prePostamble.write_zeroes_to_ones = memspec.prepostamble.write_zeroes_to_ones;
prePostamble.write_ones_to_zeroes = memspec.prepostamble.write_ones_to_zeroes;
prePostamble.read_ones_to_zeroes = memspec.prepostamble.read_ones_to_zeroes;
prePostamble.readMinTccd = memspec.prepostamble.readMinTccd;
prePostamble.writeMinTccd = memspec.prepostamble.writeMinTccd;;
}
MemSpecDDR4 MemSpecDDR4::from_memspec(const DRAMUtils::MemSpec::MemSpecVariant& memSpec)
{
return std::get<DRAMUtils::MemSpec::MemSpecDDR4>(memSpec.getVariant());
}
================================================
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecDDR4.h
================================================
/*
* Copyright (c) 2019, University of Kaiserslautern
* Copyright (c) 2012-2021, Fraunhofer IESE
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of the copyright holder 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.
*
* Authors:
* Lukas Steiner
* Luiza Correa
*/
#ifndef DRAMPOWER_MEMSPEC_MEMSPECDDR4_H
#define DRAMPOWER_MEMSPEC_MEMSPECDDR4_H
#include "MemSpec.h"
#include <DRAMUtils/memspec/standards/MemSpecDDR4.h>
#include <DRAMUtils/util/json.h>
namespace DRAMPower {
class MemSpecDDR4 final : public MemSpec<DRAMUtils::MemSpec::MemSpecDDR4>
{
public:
using MemImpedanceSpec = DRAMUtils::MemSpec::MemImpedanceSpecTypeDDR4;
enum VoltageDomain {
VDD = 0,
VPP = 1,
};
public:
MemSpecDDR4() = delete;
MemSpecDDR4(const DRAMUtils::MemSpec::MemSpecDDR4 &memspec);
MemSpecDDR4(json_t &data) = delete;
MemSpecDDR4(const json_t &data) = delete;
// Copy constructor and assignment operator
MemSpecDDR4(const MemSpecDDR4&) = default;
MemSpecDDR4& operator=(const MemSpecDDR4&) = default;
// Move constructor and assignment operator
MemSpecDDR4(MemSpecDDR4&&) = default;
MemSpecDDR4& operator=(MemSpecDDR4&&) = default;
uint64_t numberOfBankGroups;
uint64_t numberOfRanks;
double vddq;
// Memspec Variables:
struct MemTimingSpec
{
double fck;
double tCK;
uint64_t tRAS;
uint64_t tRCD;
uint64_t tRL;
uint64_t tRTP;
uint64_t tWL;
uint64_t tWR;
uint64_t tRFC;
uint64_t tRP;
uint64_t tAL;
uint64_t tBurst;
};
// Currents and Voltages:
struct MemPowerSpec
{
double iXX0;
double iXX2N;
double iXX3N;
double iXX4R;
double iXX4W;
double iXX5X;
double iXX6N;
double vXX;
double iXX2P;
double iXX3P;
double iBeta;
};
struct BankWiseParams
{
// ACT Standby power factor
double bwPowerFactRho;
};
// Pre and Postamble
// Total number of zero cycles relative to tCK (one cycle = tCK) for example, if tCK = 1ns, and read_zeroes = 2.5, then the total time is 2.5ns
struct PrePostamble
{
// Total number of zero/one cycles per DQs differential pair
// relative to tCK (one cycle = tCK)
// for example, if tCK = 1ns, and read_zeroes = 2.5, then the total time is 2.5ns
double read_zeroes;
double write_zeroes;
double read_ones;
double write_ones;
// Total number of zero to one and one to zero transitions per DQs differential pair
uint64_t read_zeroes_to_ones;
uint64_t write_zeroes_to_ones;
uint64_t write_ones_to_zeroes;
uint64_t read_ones_to_zeroes;
// Minimum time interval between two consecutive read/write commands to prevent merging or seamless transition.
uint64_t readMinTccd;
uint64_t writeMinTccd;
};
uint64_t refreshMode;
MemTimingSpec memTimingSpec;
std::vector<MemPowerSpec> memPowerSpec;
MemImpedanceSpec memImpedanceSpec;
PrePostamble prePostamble;
BankWiseParams bwParams;
private:
void parseImpedanceSpec(const DRAMUtils::MemSpec::MemSpecDDR4 &memspec);
void parsePrePostamble(const DRAMUtils::MemSpec::MemSpecDDR4 &memspec);
public:
static MemSpecDDR4 from_memspec(const DRAMUtils::MemSpec::MemSpecVariant&);
};
}
#endif /* DRAMPOWER_MEMSPEC_MEMSPECDDR4_H */
================================================
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecDDR5.cpp
================================================
#include "MemSpecDDR5.h"
using namespace DRAMPower;
MemSpecDDR5::MemSpecDDR5(const DRAMUtils::MemSpec::MemSpecDDR5 &memspec)
: MemSpec(memspec)
{
numberOfBankGroups = memspec.memarchitecturespec.nbrOfBankGroups;
numberOfRanks = memspec.memarchitecturespec.nbrOfRanks;
banksPerGroup = numberOfBanks / numberOfBankGroups;
memTimingSpec.tCK = memspec.memtimingspec.tCK;
memTimingSpec.tRAS = memspec.memtimingspec.RAS;
memTimingSpec.tRCD = memspec.memtimingspec.RCD;
memTimingSpec.tRTP = memspec.memtimingspec.RTP;
memTimingSpec.tWL = memspec.memtimingspec.WL;
memTimingSpec.tWR = memspec.memtimingspec.WR;
memTimingSpec.tRP = memspec.memtimingspec.RP;
memTimingSpec.tRFCsb = memspec.memtimingspec.RFCsb_slr;
auto VDD = VoltageDomain::VDD;
auto VPP = VoltageDomain::VPP;
memPowerSpec.push_back(MemPowerSpec());
memPowerSpec[VDD].vXX = memspec.mempowerspec.vdd;
memPowerSpec[VDD].iXX0 = memspec.mempowerspec.idd0;
memPowerSpec[VDD].iXX2N = memspec.mempowerspec.idd2n;
memPowerSpec[VDD].iXX3N = memspec.mempowerspec.idd3n;
memPowerSpec[VDD].iXX4R = memspec.mempowerspec.idd4r;
memPowerSpec[VDD].iXX4W = memspec.mempowerspec.idd4w;
memPowerSpec[VDD].iXX5C = memspec.mempowerspec.idd5c;
memPowerSpec[VDD].iXX6N = memspec.mempowerspec.idd6n;
memPowerSpec[VDD].iXX2P = memspec.mempowerspec.idd2p;
memPowerSpec[VDD].iXX3P = memspec.mempowerspec.idd3p;
memPowerSpec.push_back(MemPowerSpec());
memPowerSpec[VPP].vXX = memspec.mempowerspec.vpp;
memPowerSpec[VPP].iXX0 = memspec.mempowerspec.ipp0;
memPowerSpec[VPP].iXX2N = memspec.mempowerspec.ipp2n;
memPowerSpec[VPP].iXX3N = memspec.mempowerspec.ipp3n;
memPowerSpec[VPP].iXX4R = memspec.mempowerspec.ipp4r;
memPowerSpec[VPP].iXX4W = memspec.mempowerspec.ipp4w;
memPowerSpec[VPP].iXX5C = memspec.mempowerspec.ipp5c;
memPowerSpec[VPP].iXX6N = memspec.mempowerspec.ipp6n;
memPowerSpec[VPP].iXX2P = memspec.mempowerspec.ipp2p;
memPowerSpec[VPP].iXX3P = memspec.mempowerspec.ipp3p;
vddq = memspec.mempowerspec.vddq;
if (DRAMUtils::MemSpec::RefModeTypeDDR5::REF_MODE_2 == memspec.memarchitecturespec.RefMode) {
memPowerSpec[VDD].iXX5X = memspec.mempowerspec.idd5f;
memPowerSpec[VPP].iXX5X = memspec.mempowerspec.ipp5f;
memTimingSpec.tRFC = memspec.memtimingspec.RFC2_slr;
} else {
// RefModeTypeDDR5::REF_MODE_1 || RefModeTypeDDR5::INVALID
memPowerSpec[VDD].iXX5X = memspec.mempowerspec.idd5b;
memPowerSpec[VPP].iXX5X = memspec.mempowerspec.ipp5b;
memTimingSpec.tRFC = memspec.memtimingspec.RFC1_slr;
}
memPowerSpec[VDD].iBeta = memspec.mempowerspec.iBeta_vdd.value_or(memspec.mempowerspec.idd0);
memPowerSpec[VPP].iBeta = memspec.mempowerspec.iBeta_vpp.value_or(memspec.mempowerspec.ipp0);
if (memspec.bankwisespec.has_value())
{
bwParams.bwPowerFactRho = memspec.bankwisespec.value().factRho.value_or(1);
}
else
{
bwParams.bwPowerFactRho = 1;
}
memTimingSpec.tBurst = burstLength/dataRate;
prechargeOffsetRD = memTimingSpec.tRTP;
prechargeOffsetWR = memTimingSpec.tBurst + memTimingSpec.tWL + memTimingSpec.tWR;
parseImpedanceSpec(memspec);
parseDataRateSpec(memspec);
}
void MemSpecDDR5::parseImpedanceSpec(const DRAMUtils::MemSpec::MemSpecDDR5 &memspec) {
memImpedanceSpec = memspec.memimpedancespec;
}
void MemSpecDDR5::parseDataRateSpec(const DRAMUtils::MemSpec::MemSpecDDR5 &memspec) {
if (!memspec.dataratespec.has_value()) {
dataRateSpec = {2, 2, 2};
return;
}
dataRateSpec.commandBusRate = memspec.dataratespec.value().ca_bus_rate;
dataRateSpec.dataBusRate = memspec.dataratespec.value().dq_bus_rate;
dataRateSpec.dqsBusRate = memspec.dataratespec.value().dqs_bus_rate;
}
MemSpecDDR5 MemSpecDDR5::from_memspec(const DRAMUtils::MemSpec::MemSpecVariant& memSpec)
{
return std::get<DRAMUtils::MemSpec::MemSpecDDR5>(memSpec.getVariant());
}
================================================
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecDDR5.h
================================================
#ifndef DRAMPOWER_MEMSPEC_MEMSPECDDR5_H
#define DRAMPOWER_MEMSPEC_MEMSPECDDR5_H
#include "MemSpec.h"
#include <DRAMUtils/memspec/standards/MemSpecDDR5.h>
namespace DRAMPower {
class MemSpecDDR5 final : public MemSpec<DRAMUtils::MemSpec::MemSpecDDR5> {
public:
using MemImpedanceSpec = DRAMUtils::MemSpec::MemImpedanceSpecTypeDDR5;
enum VoltageDomain {
VDD = 0,
VPP = 1,
};
public:
MemSpecDDR5() = delete;
MemSpecDDR5(const DRAMUtils::MemSpec::MemSpecDDR5 &memspec);
MemSpecDDR5(json_t &data) = delete;
MemSpecDDR5(const json_t &data) = delete;
// Copy constructor and assignment operator
MemSpecDDR5(const MemSpecDDR5&) = default;
MemSpecDDR5& operator=(const MemSpecDDR5&) = default;
// Move constructor and assignment operator
MemSpecDDR5(MemSpecDDR5&&) = default;
MemSpecDDR5& operator=(MemSpecDDR5&&) = default;
uint64_t numberOfBankGroups;
uint64_t banksPerGroup;
uint64_t numberOfRanks;
double vddq;
// Memspec Variables:
struct MemTimingSpec
{
double fck;
double tCK;
uint64_t tRAS;
uint64_t tRCD;
uint64_t tRL;
uint64_t tRTP;
uint64_t tWL;
uint64_t tWR;
uint64_t tRFC;
uint64_t tRFCsb;
uint64_t tRP;
uint64_t tBurst;
};
// Currents and Voltages:
struct MemPowerSpec
{
double vXX;
double iXX0;
double iXX2N;
double iXX3N;
double iXX2P;
double iXX3P;
double iXX4R;
double iXX4W;
double iXX5X;
double iXX5C;
double iXX6N;
double iBeta;
};
struct DataRateSpec {
uint64_t commandBusRate;
uint64_t dataBusRate;
uint64_t dqsBusRate;
};
struct BankWiseParams
{
// ACT Standby power factor
double bwPowerFactRho;
};
MemTimingSpec memTimingSpec;
MemImpedanceSpec memImpedanceSpec;
DataRateSpec dataRateSpec;
std::vector<MemPowerSpec> memPowerSpec;
BankWiseParams bwParams;
private:
void parseImpedanceSpec(const DRAMUtils::MemSpec::MemSpecDDR5 &memspec);
void parseDataRateSpec(const DRAMUtils::MemSpec::MemSpecDDR5 &memspec);
public:
static MemSpecDDR5 from_memspec(const DRAMUtils::MemSpec::MemSpecVariant&);
};
}
#endif /* DRAMPOWER_MEMSPEC_MEMSPECDDR5_H */
================================================
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR4.cpp
================================================
#include "MemSpecLPDDR4.h"
using namespace DRAMPower;
MemSpecLPDDR4::MemSpecLPDDR4(const DRAMUtils::MemSpec::MemSpecLPDDR4 &memspec)
: MemSpec(memspec), memImpedanceSpec{}
{
numberOfBankGroups = memspec.memarchitecturespec.nbrOfBankGroups;
numberOfRanks = memspec.memarchitecturespec.nbrOfRanks;
banksPerGroup = numberOfBanks / numberOfBankGroups;
memTimingSpec.tCK = memspec.memtimingspec.tCK;
memTimingSpec.tRAS = memspec.memtimingspec.RAS;
memTimingSpec.tRCD = memspec.memtimingspec.RCD;
memTimingSpec.tRL = memspec.memtimingspec.RL;
memTimingSpec.tRTP = memspec.memtimingspec.RTP;
memTimingSpec.tWL = memspec.memtimingspec.WL;
memTimingSpec.tWR = memspec.memtimingspec.WR;
memTimingSpec.tRP = memspec.memtimingspec.RPpb;
memTimingSpec.tRFCPB = memspec.memtimingspec.RFCpb;
memTimingSpec.tRFC = memspec.memtimingspec.RFCab;
memTimingSpec.tREFI = memspec.memtimingspec.REFI;
auto VDD1 = VoltageDomain::VDD1;
auto VDD2 = VoltageDomain::VDD2;
memPowerSpec.push_back(MemPowerSpec());
memPowerSpec.push_back(MemPowerSpec());
memPowerSpec[VDD1].vDDX = memspec.mempowerspec.vdd1;
memPowerSpec[VDD1].iDD0X = memspec.mempowerspec.idd01;
memPowerSpec[VDD1].iDD2NX = memspec.mempowerspec.idd2n1;
memPowerSpec[VDD1].iDD3NX = memspec.mempowerspec.idd3n1;
memPowerSpec[VDD1].iDD4RX = memspec.mempowerspec.idd4r1;
memPowerSpec[VDD1].iDD4WX = memspec.mempowerspec.idd4w1;
memPowerSpec[VDD1].iDD5X = memspec.mempowerspec.idd51;
memPowerSpec[VDD1].iDD5PBX = memspec.mempowerspec.idd5pb1;
memPowerSpec[VDD1].iDD6X = memspec.mempowerspec.idd61;
memPowerSpec[VDD1].iDD2PX = memspec.mempowerspec.idd2p1;
memPowerSpec[VDD1].iDD3PX = memspec.mempowerspec.idd3p1;
memPowerSpec[VDD2].vDDX = memspec.mempowerspec.vdd2;
memPowerSpec[VDD2].iDD0X = memspec.mempowerspec.idd02;
memPowerSpec[VDD2].iDD2NX = memspec.mempowerspec.idd2n2;
memPowerSpec[VDD2].iDD3NX = memspec.mempowerspec.idd3n2;
memPowerSpec[VDD2].iDD4RX = memspec.mempowerspec.idd4r2;
memPowerSpec[VDD2].iDD4WX = memspec.mempowerspec.idd4w2;
memPowerSpec[VDD2].iDD5X = memspec.mempowerspec.idd52;
memPowerSpec[VDD2].iDD5PBX = memspec.mempowerspec.idd5pb2;
memPowerSpec[VDD2].iDD6X = memspec.mempowerspec.idd62;
memPowerSpec[VDD2].iDD2PX = memspec.mempowerspec.idd2p2;
memPowerSpec[VDD2].iDD3PX = memspec.mempowerspec.idd3p2;
vddq = memspec.mempowerspec.vddq;
memPowerSpec[VDD1].iBeta = memspec.mempowerspec.iBeta_vdd1.value_or(memspec.mempowerspec.idd01);
memPowerSpec[VDD2].iBeta = memspec.mempowerspec.iBeta_vdd2.value_or(memspec.mempowerspec.idd02);
if(memspec.bankwisespec.has_value())
{
bwParams.bwPowerFactRho = memspec.bankwisespec.value().factRho.value_or(1);
bwParams.bwPowerFactSigma = memspec.bankwisespec.value().factSigma.value_or(1);
bwParams.flgPASR = memspec.bankwisespec.value().hasPASR.value_or(false);
if (memspec.bankwisespec.value().pasrMode.has_value())
{
if(memspec.bankwisespec.value().pasrMode.value() == DRAMUtils::MemSpec::pasrModesType::Invalid)
{
// pasrMode invalid
bwParams.pasrMode = 0;
}
else
{
// pasrMode valid
bwParams.pasrMode = static_cast<uint64_t>(memspec.bankwisespec.value().pasrMode.value());
}
}
else
{
bwParams.pasrMode = 0;
}
}
else
{
bwParams.bwPowerFactRho = 1;
bwParams.bwPowerFactSigma = 1;
bwParams.flgPASR = false;
bwParams.pasrMode = 0;
}
if (bwParams.flgPASR) {
///////////////////////////////////////////////////////////
// Activate banks for self refresh based on the PASR mode
// ACTIVE - X
// NOT ACTIVE - 0
///////////////////////////////////////////////////////////
switch(bwParams.pasrMode) {
case(BankWiseParams::pasrModes::PASR_0): {
// PASR MODE 0
// FULL ARRAY
// |X X X X |
// |X X X X |
bwParams.activeBanks.resize(numberOfBanks);
std::iota(bwParams.activeBanks.begin(), bwParams.activeBanks.end(), 0);
break;
}
case(BankWiseParams::pasrModes::PASR_1): {
// PASR MODE 1
// (1/2) ARRAY
// |X X X X |
// |0 0 0 0 |
bwParams.activeBanks.resize(numberOfBanks - 4);
std::iota(bwParams.activeBanks.begin(), bwParams.activeBanks.end(), 0);
break;
}
case(BankWiseParams::pasrModes::PASR_2): {
// PASR MODE 2
// (1/4) ARRAY
// |X X 0 0 |
// |0 0 0 0 |
bwParams.activeBanks.resize(numberOfBanks - 6);
std::iota(bwParams.activeBanks.begin(), bwParams.activeBanks.end(), 0);
break;
}
case(BankWiseParams::pasrModes::PASR_3): {
// PASR MODE 3
// (1/8) ARRAY
// |X 0 0 0 |
// |0 0 0 0 |
bwParams.activeBanks.resize(numberOfBanks - 7);
std::iota(bwParams.activeBanks.begin(), bwParams.activeBanks.end(), 0);
break;
}
case(BankWiseParams::pasrModes::PASR_4): {
// PASR MODE 4
// (3/4) ARRAY
// |0 0 X X |
// |X X X X |
bwParams.activeBanks.resize(numberOfBanks - 2);
std::iota(bwParams.activeBanks.begin(), bwParams.activeBanks.end(), 2);
break;
}
case(BankWiseParams::pasrModes::PASR_5): {
// PASR MODE 5
// (1/2) ARRAY
// |0 0 0 0 |
// |X X X X |
bwParams.activeBanks.resize(numberOfBanks - 4);
std::iota(bwParams.activeBanks.begin(), bwParams.activeBanks.end(), 4);
break;
}
case(BankWiseParams::pasrModes::PASR_6): {
// PASR MODE 6
// (1/4) ARRAY
// |0 0 0 0 |
// |0 0 X X |
bwParams.activeBanks.resize(numberOfBanks - 6);
std::iota(bwParams.activeBanks.begin(), bwParams.activeBanks.end(), 6);
break;
}
case(BankWiseParams::pasrModes::PASR_7): {
// PASR MODE 7
// (1/8) ARRAY
// |0 0 0 0 |
// |0 0 0 X |
bwParams.activeBanks.resize(numberOfBanks - 7);
std::iota(bwParams.activeBanks.begin(), bwParams.activeBanks.end(), 7);
break;
}
default: {
// PASR MODE 0
// FULL ARRAY
// |X X X X |
// |X X X X |
bwParams.activeBanks.resize(numberOfBanks);
std::iota(bwParams.activeBanks.begin(), bwParams.activeBanks.end(), 0);
break;
}
} //end switch
} // end IF flgPASR
//Source: JESD209-4 (LPDDR4); Table 21
if(burstLength == 16){
prechargeOffsetRD = memTimingSpec.tRTP;
}else{
prechargeOffsetRD = 8 + memTimingSpec.tRTP;
}
prechargeOffsetWR = memTimingSpec.tWL + burstLength/2 + memTimingSpec.tWR + 1;
parseImpedanceSpec(memspec);
}
bool MemSpecLPDDR4::BankWiseParams::isBankActiveInPasr(const unsigned bankIdx) const
{
return (std::find(activeBanks.begin(), activeBanks.end(), bankIdx)
!= activeBanks.end());
}
void MemSpecLPDDR4::parseImpedanceSpec(const DRAMUtils::MemSpec::MemSpecLPDDR4 &memspec) {
memImpedanceSpec = memspec.memimpedancespec;
}
MemSpecLPDDR4 MemSpecLPDDR4::from_memspec(const DRAMUtils::MemSpec::MemSpecVariant& memSpec)
{
return std::get<DRAMUtils::MemSpec::MemSpecLPDDR4>(memSpec.getVariant());
}
================================================
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR4.h
================================================
#ifndef DRAMPOWER_MEMSPEC_MEMSPECLPDDR4_H
#define DRAMPOWER_MEMSPEC_MEMSPECLPDDR4_H
#include "MemSpec.h"
#include <DRAMUtils/memspec/standards/MemSpecLPDDR4.h>
namespace DRAMPower {
class MemSpecLPDDR4 final : public MemSpec<DRAMUtils::MemSpec::MemSpecLPDDR4>
{
public:
using MemImpedanceSpec = DRAMUtils::MemSpec::MemImpedanceSpecTypeLPDDR4;
enum VoltageDomain {
VDD1 = 0,
VDD2 = 1,
};
public:
MemSpecLPDDR4() = delete;
MemSpecLPDDR4(const DRAMUtils::MemSpec::MemSpecLPDDR4 &memspec);
MemSpecLPDDR4(json_t &data) = delete;
MemSpecLPDDR4(const json_t &data) = delete;
// Copy constructor and assignment operator
MemSpecLPDDR4(const MemSpecLPDDR4&) = default;
MemSpecLPDDR4& operator=(const MemSpecLPDDR4&) = default;
// Move constructor and assignment operator
MemSpecLPDDR4(MemSpecLPDDR4&&) = default;
MemSpecLPDDR4& operator=(MemSpecLPDDR4&&) = default;
~MemSpecLPDDR4() = default;
uint64_t numberOfBankGroups;
uint64_t banksPerGroup;
uint64_t numberOfRanks;
double vddq;
struct MemTimingSpec
{
double fck;
double tCK;
uint64_t tRAS;
uint64_t tRCD;
uint64_t tRL;
uint64_t tRTP;
uint64_t tWL;
uint64_t tWR;
uint64_t tREFI;
uint64_t tRFC;
uint64_t tRFCPB;
uint64_t tRP;
};
// Currents and Voltages:
struct MemPowerSpec
{
double vDDX;
double iDD0X;
double iDD2NX;
double iDD3NX;
double iDD2PX;
double iDD3PX;
double iDD4RX;
double iDD4WX;
double iDD5X;
double iDD5PBX;
double iDD6X;
double iBeta;
};
struct BankWiseParams
{
// Set of possible PASR modes
enum pasrModes {
PASR_0,
PASR_1,
PASR_2,
PASR_3,
PASR_4,
PASR_5,
PASR_6,
PASR_7
};
// List of active banks under the specified PASR mode
std::vector<uint64_t> activeBanks;
// ACT Standby power factor
double bwPowerFactRho;
// Self-Refresh power factor
double bwPowerFactSigma;
// Whether PASR is enabled ( true : enabled )
bool flgPASR;
// PASR mode utilized (int 0-7)
uint64_t pasrMode;
// Whether bank is active in PASR
bool isBankActiveInPasr(const unsigned bankIdx) const;
};
MemTimingSpec memTimingSpec;
MemImpedanceSpec memImpedanceSpec;
std::vector<MemPowerSpec> memPowerSpec;
BankWiseParams bwParams;
private:
void parseImpedanceSpec(const DRAMUtils::MemSpec::MemSpecLPDDR4 &memspec);
public:
static MemSpecLPDDR4 from_memspec(const DRAMUtils::MemSpec::MemSpecVariant&);
};
}
#endif /* DRAMPOWER_MEMSPEC_MEMSPECLPDDR4_H */
================================================
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR5.cpp
================================================
#include "DRAMPower/memspec/MemSpecLPDDR5.h"
using namespace DRAMPower;
MemSpecLPDDR5::MemSpecLPDDR5(const DRAMUtils::MemSpec::MemSpecLPDDR5 &memspec)
: MemSpec(memspec)
{
numberOfBankGroups = memspec.memarchitecturespec.nbrOfBankGroups;
numberOfRanks = memspec.memarchitecturespec.nbrOfRanks;
banksPerGroup = numberOfBanks / numberOfBankGroups;
memTimingSpec.tCK = memspec.memtimingspec.tCK;
memTimingSpec.WCKtoCK = memspec.memtimingspec.WCK2CK;
memTimingSpec.tWCK = memTimingSpec.tCK / memTimingSpec.WCKtoCK;
memTimingSpec.tRAS = memspec.memtimingspec.RAS;
memTimingSpec.tRCD = memspec.memtimingspec.RCD_S;
memTimingSpec.tRBTP = memspec.memtimingspec.RBTP;
memTimingSpec.tWL = memspec.memtimingspec.WL;
memTimingSpec.tWR = memspec.memtimingspec.WR;
memTimingSpec.tRP = memspec.memtimingspec.RPpb;
memTimingSpec.tRFCPB = memspec.memtimingspec.RFCpb;
memTimingSpec.tRFC = memspec.memtimingspec.RFCab;
memTimingSpec.tREFI = memspec.memtimingspec.REFI;
auto VDD1 = VoltageDomain::VDD1;
auto VDD2H = VoltageDomain::VDD2H;
auto VDD2L = VoltageDomain::VDD2L;
memPowerSpec.push_back(MemPowerSpec()); // VDD1
memPowerSpec.push_back(MemPowerSpec()); // VDD2H
memPowerSpec.push_back(MemPowerSpec()); // VDD2L
memPowerSpec[VDD1].vDDX = memspec.mempowerspec.vdd1;
memPowerSpec[VDD1].iDD0X = memspec.mempowerspec.idd01;
memPowerSpec[VDD1].iDD2NX = memspec.mempowerspec.idd2n1;
memPowerSpec[VDD1].iDD3NX = memspec.mempowerspec.idd3n1;
memPowerSpec[VDD1].iDD4RX = memspec.mempowerspec.idd4r1;
memPowerSpec[VDD1].iDD4WX = memspec.mempowerspec.idd4w1;
memPowerSpec[VDD1].iDD5X = memspec.mempowerspec.idd51;
memPowerSpec[VDD1].iDD5PBX = memspec.mempowerspec.idd5pb1;
memPowerSpec[VDD1].iDD6X = memspec.mempowerspec.idd61;
memPowerSpec[VDD1].iDD6DSX = memspec.mempowerspec.idd6ds1;
memPowerSpec[VDD1].iDD2PX = memspec.mempowerspec.idd2p1;
memPowerSpec[VDD1].iDD3PX = memspec.mempowerspec.idd3p1;
memPowerSpec[VDD2H].vDDX = memspec.mempowerspec.vdd2h;
memPowerSpec[VDD2H].iDD0X = memspec.mempowerspec.idd02h;
memPowerSpec[VDD2H].iDD2NX = memspec.mempowerspec.idd2n2h;
memPowerSpec[VDD2H].iDD3NX = memspec.mempowerspec.idd3n2h;
memPowerSpec[VDD2H].iDD4RX = memspec.mempowerspec.idd4r2h;
memPowerSpec[VDD2H].iDD4WX = memspec.mempowerspec.idd4w2h;
memPowerSpec[VDD2H].iDD5X = memspec.mempowerspec.idd52h;
memPowerSpec[VDD2H].iDD5PBX = memspec.mempowerspec.idd5pb2h;
memPowerSpec[VDD2H].iDD6X = memspec.mempowerspec.idd62h;
memPowerSpec[VDD2H].iDD6DSX = memspec.mempowerspec.idd6ds2h;
memPowerSpec[VDD2H].iDD2PX = memspec.mempowerspec.idd2p2h;
memPowerSpec[VDD2H].iDD3PX = memspec.mempowerspec.idd3p2h;
memPowerSpec[VDD2L].vDDX = memspec.mempowerspec.vdd2l;
memPowerSpec[VDD2L].iDD0X = memspec.mempowerspec.idd02l;
memPowerSpec[VDD2L].iDD2NX = memspec.mempowerspec.idd2n2l;
memPowerSpec[VDD2L].iDD3NX = memspec.mempowerspec.idd3n2l;
memPowerSpec[VDD2L].iDD4RX = memspec.mempowerspec.idd4r2l;
memPowerSpec[VDD2L].iDD4WX = memspec.mempowerspec.idd4w2l;
memPowerSpec[VDD2L].iDD5X = memspec.mempowerspec.idd52l;
memPowerSpec[VDD2L].iDD5PBX = memspec.mempowerspec.idd5pb2l;
memPowerSpec[VDD2L].iDD6X = memspec.mempowerspec.idd62l;
memPowerSpec[VDD2L].iDD6DSX = memspec.mempowerspec.idd6ds2l;
memPowerSpec[VDD2L].iDD2PX = memspec.mempowerspec.idd2p2l;
memPowerSpec[VDD2L].iDD3PX = memspec.mempowerspec.idd3p2l;
vddq = memspec.mempowerspec.vddq;
memPowerSpec[VDD1].iBeta = memspec.mempowerspec.iBeta_vdd1.value_or(memspec.mempowerspec.idd01);
memPowerSpec[VDD2H].iBeta = memspec.mempowerspec.iBeta_vdd2h.value_or(memspec.mempowerspec.idd02h);
memPowerSpec[VDD2L].iBeta = memspec.mempowerspec.iBeta_vdd2l.value_or(memspec.mempowerspec.idd02l);
if (memspec.bankwisespec.has_value()) {
bwParams.bwPowerFactRho = memspec.bankwisespec.value().factRho.value_or(1);
}
else {
bwParams.bwPowerFactRho = 1;
}
auto BankArchError = [this]() {
std::cout << "Invalid bank architecture selected" << std::endl;
std::cout << "Selected values:" << std::endl;
std::cout << " - Number of banks: " << numberOfBanks << std::endl;
std::cout << " - Number of bank groups: " << numberOfBankGroups << std::endl;
std::cout << "Valid values are 16|1 (16B mode), 16|4 (BG mode) or 8|1 (8B mode)" << std::endl;
std::cout << std::endl << "Assuming 16B architecture." << std::endl;
bank_arch = BankArchitectureMode::M16B;
numberOfBanks = 16;
numberOfBankGroups = 1;
};
if (numberOfBanks == 16) {
if (numberOfBankGroups == 1 || numberOfBankGroups == 0) {
bank_arch = BankArchitectureMode::M16B;
} else if (numberOfBankGroups == 4) {
bank_arch = BankArchitectureMode::MBG;
} else {
BankArchError();
}
} else if (numberOfBanks == 8) {
if (numberOfBankGroups > 1) {
BankArchError();
} else {
bank_arch = BankArchitectureMode::M8B;
}
} else {
BankArchError();
}
// Source: LPDDR5 standard; table 312
memTimingSpec.tBurst = burstLength/(dataRate * memTimingSpec.WCKtoCK);
// Source: LPDDR5 standard; figure 96
prechargeOffsetRD = memTimingSpec.tBurst + memTimingSpec.tRBTP;
// Source: LPDDR5 standard; figure 97
prechargeOffsetWR = memTimingSpec.tWL + memTimingSpec.tBurst + 1 + memTimingSpec.tWR;
wckAlwaysOnMode = memspec.memarchitecturespec.WCKalwaysOn;
parseImpedanceSpec(memspec);
}
void MemSpecLPDDR5::parseImpedanceSpec(const DRAMUtils::MemSpec::MemSpecLPDDR5 &memspec) {
memImpedanceSpec = memspec.memimpedancespec;
}
MemSpecLPDDR5 MemSpecLPDDR5::from_memspec(const DRAMUtils::MemSpec::MemSpecVariant& memSpec)
{
return std::get<DRAMUtils::MemSpec::MemSpecLPDDR5>(memSpec.getVariant());
}
================================================
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR5.h
================================================
#ifndef DRAMPOWER_MEMSPEC_MEMSPECLPDDR5_H
#define DRAMPOWER_MEMSPEC_MEMSPECLPDDR5_H
#include "MemSpec.h"
#include <DRAMUtils/memspec/standards/MemSpecLPDDR5.h>
namespace DRAMPower {
class MemSpecLPDDR5 final : public MemSpec<DRAMUtils::MemSpec::MemSpecLPDDR5> {
public:
using MemImpedanceSpec = DRAMUtils::MemSpec::MemImpedanceSpecTypeLPDDR5;
enum VoltageDomain {
VDD1 = 0,
VDD2H,
VDD2L,
};
enum BankArchitectureMode {
MBG, // 4 banks, 4 bank groups
M16B, // 16 banks, no bank groups
M8B // 8 banks, no bank groups
};
public:
MemSpecLPDDR5() = delete;
MemSpecLPDDR5(const DRAMUtils::MemSpec::MemSpecLPDDR5 &memspec);
MemSpecLPDDR5(json_t &data) = delete;
MemSpecLPDDR5(const json_t &data) = delete;
// Copy constructor and assignment operator
MemSpecLPDDR5(const MemSpecLPDDR5&) = default;
MemSpecLPDDR5& operator=(const MemSpecLPDDR5&) = default;
// Move constructor and assignment operator
MemSpecLPDDR5(MemSpecLPDDR5&&) = default;
MemSpecLPDDR5& operator=(MemSpecLPDDR5&&) = default;
~MemSpecLPDDR5() = default;
uint64_t numberOfBankGroups;
uint64_t banksPerGroup;
uint64_t numberOfRanks;
std::size_t perTwoBankOffset = 8;
BankArchitectureMode bank_arch;
bool wckAlwaysOnMode;
double vddq;
// Memspec Variables:
struct MemTimingSpec
{
double fck;
double tCK;
double tWCK;
uint64_t WCKtoCK;
uint64_t tRAS;
uint64_t tRCD;
uint64_t tRL;
uint64_t tWL;
uint64_t tWR;
uint64_t tRFC;
uint64_t tRFCPB;
uint64_t tREFI;
uint64_t tRP;
uint64_t tRBTP;
uint64_t tBurst;
};
// Currents and Voltages:
struct MemPowerSpec
{
double vDDX;
double iDD0X;
double iDD2NX;
double iDD3NX;
double iDD2PX;
double iDD3PX;
double iDD4RX;
double iDD4WX;
double iDD5X;
double iDD5PBX;
double iDD6X;
double iDD6DSX;
double iBeta;
};
struct BankWiseParams {
// ACT Standby power factor
double bwPowerFactRho;
};
MemTimingSpec memTimingSpec;
MemImpedanceSpec memImpedanceSpec;
std::vector<MemPowerSpec> memPowerSpec;
BankWiseParams bwParams;
private:
void parseImpedanceSpec(const DRAMUtils::MemSpec::MemSpecLPDDR5 &memspec);
public:
static MemSpecLPDDR5 from_memspec(const DRAMUtils::MemSpec::MemSpecVariant&);
};
} // namespace DRAMPower
#endif /* DRAMPOWER_MEMSPEC_MEMSPECLPDDR5_H */
================================================
FILE: src/DRAMPower/DRAMPower/simconfig/simconfig.h
================================================
#ifndef DRAMPOWER_SIMCONFIG_SIMCONFIG_H
#define DRAMPOWER_SIMCONFIG_SIMCONFIG_H
#include "DRAMUtils/util/json_utils.h"
#include "DRAMUtils/config/toggling_rate.h"
namespace DRAMPower::config {
struct SimConfig {
// Public type definitions
public:
using ToggleRateDefinition_t = DRAMUtils::Config::ToggleRateDefinition;
// Public Constructors
public:
SimConfig() = default;
// Public members
public:
std::optional<ToggleRateDefinition_t> toggleRateDefinition;
};
NLOHMANN_JSONIFY_ALL_THINGS(SimConfig, toggleRateDefinition);
} // DRAMPower::config
#endif /* DRAMPOWER_SIMCONFIG_SIMCONFIG_H */
================================================
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4.cpp
================================================
#include "DDR4.h"
#include "DRAMPower/Types.h"
#include "DRAMPower/data/stats.h"
#include "DRAMPower/memspec/MemSpecDDR4.h"
#include "DRAMPower/standards/ddr4/DDR4Interface.h"
#include "DRAMPower/standards/ddr4/core_calculation_DDR4.h"
#include "DRAMPower/standards/ddr4/interface_calculation_DDR4.h"
#include "DRAMPower/util/cli_architecture_config.h"
#include <DRAMPower/command/Pattern.h>
#include <DRAMPower/util/extensions.h>
namespace DRAMPower {
using namespace DRAMUtils::Config;
DDR4::DDR4(const MemSpecDDR4 &memSpec, const config::SimConfig &simConfig)
: m_memSpec(memSpec)
, m_interface(m_memSpec, simConfig)
, m_core(m_memSpec)
{
this->registerExtensions();
}
// Extensions
void DDR4::registerExtensions() {
getExtensionManager().registerExtension<extensions::DBI>([this](const timestamp_t, const bool enable) {
// Assumption: the enabling of the DBI does not interleave with previous data on the bus
// x4,x8,x16 devices: only x8 and x16 support dbi
if (4 == m_memSpec.bitWidth) {
std::cout << "[WARN] x4 devices don't support DBI" << std::endl;
return false;
}
m_interface.enableDBI(enable);
return true;
}, false);
}
// Getters for CLI
util::CLIArchitectureConfig DDR4::getCLIArchitectureConfig() {
return util::CLIArchitectureConfig{
m_memSpec.numberOfDevices,
m_memSpec.numberOfRanks,
m_memSpec.numberOfBanks
};
}
// Calculation
energy_t DDR4::calcCoreEnergyStats(const SimulationStats& stats) const {
Calculation_DDR4 calculation(m_memSpec);
return calculation.calcEnergy(stats);
}
interface_energy_info_t DDR4::calcInterfaceEnergyStats(const SimulationStats& stats) const {
InterfaceCalculation_DDR4 calculation(m_memSpec);
return calculation.calculateEnergy(stats);
}
// Stats
SimulationStats DDR4::getWindowStats(timestamp_t timestamp) {
SimulationStats stats;
m_core.getWindowStats(timestamp, stats);
m_interface.getWindowStats(timestamp, stats);
return stats;
}
// Serialization
void DDR4::serialize_impl(std::ostream& stream) const {
m_core.serialize(stream);
m_interface.serialize(stream);
}
void DDR4::deserialize_impl(std::istream& stream) {
m_core.deserialize(stream);
m_interface.deserialize(stream);
}
} // namespace DRAMPower
================================================
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4.h
================================================
#ifndef DRAMPOWER_STANDARDS_DDR4_DDR4_H
#define DRAMPOWER_STANDARDS_DDR4_DDR4_H
#include "DRAMPower/util/cli_architecture_config.h"
#include <DRAMPower/Types.h>
#include <DRAMPower/dram/dram_base.h>
#include <DRAMPower/command/Command.h>
#include <DRAMPower/data/energy.h>
#include <DRAMPower/data/stats.h>
#include <DRAMPower/standards/ddr4/DDR4Interface.h>
#include <DRAMPower/standards/ddr4/DDR4Core.h>
#include <DRAMPower/memspec/MemSpecDDR4.h>
#include <DRAMPower/standards/ddr4/core_calculation_DDR4.h>
#include <DRAMPower/standards/ddr4/interface_calculation_DDR4.h>
#include "DRAMPower/simconfig/simconfig.h"
#include <algorithm>
namespace DRAMPower {
class DDR4 : public dram_base<CmdType> {
// Public constructors and assignment operators
public:
DDR4() = delete; // No default constructor
DDR4(const DDR4& other) = default; // copy constructor
DDR4(DDR4&& other) noexcept = default; // move constructor
DDR4& operator=(const DDR4&) = default; // copy assignment operator
DDR4& operator=(DDR4&&) = default; // move assignment operator
~DDR4() override = default;
DDR4(const MemSpecDDR4 &memSpec, const config::SimConfig &simConfig = {});
// Public member functions
public:
// Member functions
DDR4Core& getCore() {
return m_core;
}
const DDR4Core& getCore() const {
return m_core;
}
DDR4Interface& getInterface() {
return m_interface;
}
const DDR4Interface& getInterface() const {
return m_interface;
}
// Overrides
energy_t calcCoreEnergyStats(const SimulationStats& stats) const override;
interface_energy_info_t calcInterfaceEnergyStats(const SimulationStats& stats) const override;
SimulationStats getWindowStats(timestamp_t timestamp) override;
util::CLIArchitectureConfig getCLIArchitectureConfig() override;
bool isSerializable() const override {
return m_core.isSerializable();
}
// Private member functions
private:
// Member functions
void registerExtensions();
// Overrides
void doCoreCommandImpl(const Command& command) override {
m_core.doCommand(command);
}
void doInterfaceCommandImpl(const Command& command) override {
m_interface.doCommand(command);
}
timestamp_t getLastCommandTime_impl() const override {
return std::max(m_core.getLastCommandTime(), m_interface.getLastCommandTime());
}
void serialize_impl(std::ostream& stream) const override;
void deserialize_impl(std::istream& stream) override;
// Private member variables
private:
MemSpecDDR4 m_memSpec;
DDR4Interface m_interface;
DDR4Core m_core;
};
} // namespace DRAMPower
#endif /* DRAMPOWER_STANDARDS_DDR4_DDR4_H */
================================================
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4Core.cpp
================================================
#include "DDR4Core.h"
#include "DRAMPower/Types.h"
#include "DRAMPower/util/RegisterHelper.h"
#include <cstddef>
namespace DRAMPower {
void DDR4Core::doCommand(const Command& cmd) {
m_implicitCommandHandler.processImplicitCommandQueue(*this, cmd.timestamp, m_last_command_time);
m_last_command_time = std::max(cmd.timestamp, m_last_command_time);
switch(cmd.type) {
case CmdType::ACT:
util::coreHelpers::bankHandler(cmd, m_ranks, this, &DDR4Core::handleAct);
break;
case CmdType::PRE:
util::coreHelpers::bankHandler(cmd, m_ranks, this, &DDR4Core::handlePre);
break;
case CmdType::PREA:
util::coreHelpers::rankHandler(cmd, m_ranks, this, &DDR4Core::handlePreAll);
break;
case CmdType::REFA:
util::coreHelpers::rankHandlerIdx(cmd, m_ranks, this, &DDR4Core::handleRefAll);
break;
case CmdType::RD:
util::coreHelpers::bankHandler(cmd, m_ranks, this, &DDR4Core::handleRead);
break;
case CmdType::RDA:
util::coreHelpers::bankHandlerIdx(cmd, m_ranks, this, &DDR4Core::handleReadAuto);
break;
case CmdType::WR:
util::coreHelpers::bankHandler(cmd, m_ranks, this, &DDR4Core::handleWrite);
break;
case CmdType::WRA:
util::coreHelpers::bankHandlerIdx(cmd, m_ranks, this, &DDR4Core::handleWriteAuto);
break;
case CmdType::SREFEN:
util::coreHelpers::rankHandlerIdx(cmd, m_ranks, this, &DDR4Core::handleSelfRefreshEntry);
break;
case CmdType::SREFEX:
util::coreHelpers::rankHandler(cmd, m_ranks, this, &DDR4Core::handleSelfRefreshExit);
break;
case CmdType::PDEA:
util::coreHelpers::rankHandlerIdx(cmd, m_ranks, this, &DDR4Core::handlePowerDownActEntry);
break;
case CmdType::PDEP:
util::coreHelpers::rankHandlerIdx(cmd, m_ranks, this, &DDR4Core::handlePowerDownPreEntry);
break;
case CmdType::PDXA:
util::coreHelpers::rankHandlerIdx(cmd, m_ranks, this, &DDR4Core::handlePowerDownActExit);
break;
case CmdType::PDXP:
util::coreHelpers::rankHandlerIdx(cmd, m_ranks, this, &DDR4Core::handlePowerDownPreExit);
break;
case CmdType::END_OF_SIMULATION:
break;
default:
assert(false && "Unsupported command");
break;
}
}
timestamp_t DDR4Core::getLastCommandTime() const {
return m_last_command_time;
}
bool DDR4Core::isSerializable() const {
return 0 == m_implicitCommandHandler.implicitCommandCount();
}
void DDR4Core::handleAct(Rank &rank, Bank &bank, timestamp_t timestamp) {
bank.counter.act++;
bank.bankState = Bank::BankState::BANK_ACTIVE;
bank.cycles.act.start_interval(timestamp);
rank.cycles.act.start_interval_if_not_running(timestamp);
//rank.cycles.pre.close_interval(timestamp);
}
void DDR4Core::handlePre(Rank &rank, Bank &bank, timestamp_t timestamp) {
// If statement necessary for core power calculation
// bank.counter.pre doesn't correspond to the number of pre commands
// It corresponds to the number of state transisitons to the pre state
if (bank.bankState == Bank::BankState::BANK_PRECHARGED) return;
bank.counter.pre++;
bank.bankState = Bank::BankState::BANK_PRECHARGED;
bank.cycles.act.close_interval(timestamp);
bank.latestPre = timestamp; // used for earliest power down calculation
if ( !rank.isActive(timestamp) ) // stop rank active interval if no more banks active
{
// active counter increased if at least 1 bank is active, precharge counter increased if all banks are precharged
rank.cycles.act.close_interval(timestamp);
//rank.cycles.pre.start_interval_if_not_running(timestamp);
}
}
void DDR4Core::handlePreAll(Rank &rank, timestamp_t timestamp) {
for (auto &bank: rank.banks)
handlePre(rank, bank, timestamp);
}
void DDR4Core::handleRefAll(std::size_t rank_idx, timestamp_t timestamp) {
auto timestamp_end = timestamp + m_memSpec.tRFC;
auto& rank = m_ranks[rank_idx];
rank.endRefreshTime = timestamp_end;
rank.cycles.act.start_interval_if_not_running(timestamp);
//rank.cycles.pre.close_interval(timestamp);
for (std::size_t bank_idx = 0; bank_idx < rank.banks.size(); ++bank_idx) {
auto& bank = rank.banks[bank_idx];
bank.bankState = Bank::BankState::BANK_ACTIVE;
++bank.counter.refAllBank;
bank.cycles.act.start_interval_if_not_running(timestamp);
bank.refreshEndTime = timestamp_end; // used for earliest power down calculation
// Execute implicit pre-charge at refresh end
m_implicitCommandHandler.addImplicitCommand(timestamp_end, [rank_idx, bank_idx = bank_idx, timestamp_end](DDR4Core& self) {
auto& rank = self.m_ranks[rank_idx];
auto& bank = rank.banks[bank_idx];
bank.bankState = Bank::BankState::BANK_PRECHARGED;
bank.cycles.act.close_interval(timestamp_end);
// stop rank active interval if no more banks active
if (!rank.isActive(timestamp_end)) // stop rank active interval if no more banks active
{
rank.cycles.act.close_interval(timestamp_end);
//rank.cycles.pre.start_interval(timestamp_end);
}
});
}
// Required for precharge power-down
}
void DDR4Core::handleRead(Rank&, Bank &bank, timestamp_t) {
++bank.counter.reads;
}
void DDR4Core::handleReadAuto(std::size_t rank_idx, std::size_t bank_idx, timestamp_t timestamp) {
auto& bank = m_ranks[rank_idx].banks[bank_idx];
++bank.counter.readAuto;
auto minBankActiveTime = bank.cycles.act.get_start() + m_memSpec.tRAS;
auto minReadActiveTime = timestamp + m_memSpec.prechargeOffsetRD;
auto delayed_timestamp = std::max(minBankActiveTime, minReadActiveTime);
// Execute PRE after minimum active time
m_implicitCommandHandler.addImplicitCommand(delayed_timestamp, [rank_idx, bank_idx, delayed_timestamp](DDR4Core& self) {
self.handlePre(self.m_ranks[rank_idx], self.m_ranks[rank_idx].banks[bank_idx], delayed_timestamp);
});
}
void DDR4Core::handleWrite(Rank&, Bank &bank, timestamp_t) {
++bank.counter.writes;
}
void DDR4Core::handleWriteAuto(std::size_t rank_idx, std::size_t bank_idx, timestamp_t timestamp) {
auto& bank = m_ranks[rank_idx].banks[bank_idx];
++bank.counter.writeAuto;
auto minBankActiveTime = bank.cycles.act.get_start() + m_memSpec.tRAS;
auto minWriteActiveTime = timestamp + m_memSpec.prechargeOffsetWR;
auto delayed_timestamp = std::max(minBankActiveTime, minWriteActiveTime);
// Execute PRE after minimum active time
m_implicitCommandHandler.addImplicitCommand(delayed_timestamp, [rank_idx, bank_idx, delayed_timestamp](DDR4Core& self) {
self.handlePre(self.m_ranks[rank_idx], self.m_ranks[rank_idx].banks[bank_idx], delayed_timestamp);
});
}
void DDR4Core::handleSelfRefreshEntry(std::size_t rank_idx, timestamp_t timestamp) {
// Issue implicit refresh
handleRefAll(rank_idx, timestamp);
// Handle self-refresh entry after tRFC
auto timestampSelfRefreshStart = timestamp + m_memSpec.tRFC;
m_implicitCommandHandler.addImplicitCommand(timestampSelfRefreshStart, [rank_idx, timestampSelfRefreshStart](DDR4Core& self) {
auto& rank = self.m_ranks[rank_idx];
rank.counter.selfRefresh++;
rank.cycles.sref.start_interval(timestampSelfRefreshStart);
rank.memState = MemState::SREF;
});
}
void DDR4Core::handleSelfRefreshExit(Rank &rank, timestamp_t timestamp) {
assert(rank.memState == MemState::SREF); // check for previous SelfRefreshEntry
rank.cycles.sref.close_interval(timestamp); // Duration between entry and exit
rank.memState = MemState::NOT_IN_PD;
}
void DDR4Core::handlePowerDownActEntry(std::size_t rank_idx, timestamp_t timestamp) {
auto& rank = m_ranks[rank_idx];
auto earliestPossibleEntry = this->earliestPossiblePowerDownEntryTime(rank);
auto entryTime = std::max(timestamp, earliestPossibleEntry);
m_implicitCommandHandler.addImplicitCommand(entryTime, [rank_idx, entryTime](DDR4Core& self) {
auto& rank = self.m_ranks[rank_idx];
rank.memState = MemState::PDN_ACT;
rank.cycles.powerDownAct.start_interval(entryTime);
rank.cycles.act.close_interval(entryTime);
//rank.cycles.pre.close_interval(entryTime);
for (auto & bank : rank.banks) {
bank.cycles.act.close_interval(entryTime);
}
});
}
void DDR4Core::handlePowerDownActExit(std::size_t rank_idx, timestamp_t timestamp) {
auto& rank = m_ranks[rank_idx];
assert(rank.memState == MemState::PDN_ACT);
auto earliestPossibleExit = this->earliestPossiblePowerDownEntryTime(rank);
auto exitTime = std::max(timestamp, earliestPossibleExit);
m_implicitCommandHandler.addImplicitCommand(exitTime, [rank_idx, exitTime](DDR4Core& self) {
auto& rank = self.m_ranks[rank_idx];
rank.memState = MemState::NOT_IN_PD;
rank.cycles.powerDownAct.close_interval(exitTime);
// Activate banks that were active prior to PDA
for (auto & bank : rank.banks)
{
if (bank.bankState==Bank::BankState::BANK_ACTIVE)
{
bank.cycles.act.start_interval(exitTime);
}
}
// Activate rank if at least one bank is active
// At least one bank must be active for PDA -> remove if statement?
if(rank.isActive(exitTime))
rank.cycles.act.start_interval(exitTime);
});
}
void DDR4Core::handlePowerDownPreEntry(std::size_t rank_idx, timestamp_t timestamp) {
auto& rank = m_ranks[rank_idx];
auto earliestPossibleEntry = this->earliestPossiblePowerDownEntryTime(rank);
auto entryTime = std::max(timestamp, earliestPossibleEntry);
m_implicitCommandHandler.addImplicitCommand(entryTime, [rank_idx, entryTime](DDR4Core& self) {
auto& rank = self.m_ranks[rank_idx];
for (auto &bank : rank.banks)
bank.cycles.act.close_interval(entryTime);
rank.memState = MemState::PDN_PRE;
rank.cycles.powerDownPre.start_interval(entryTime);
//rank.cycles.pre.close_interval(entryTime);
rank.cycles.act.close_interval(entryTime);
});
}
void DDR4Core::handlePowerDownPreExit(std::size_t rank_idx, timestamp_t timestamp) {
auto& rank = m_ranks[rank_idx];
// The computation is necessary to exit at the earliest timestamp (upon entry)
auto earliestPossibleExit = this->earliestPossiblePowerDownEntryTime(rank);
auto exitTime = std::max(timestamp, earliestPossibleExit);
m_implicitCommandHandler.addImplicitCommand(exitTime, [rank_idx, exitTime](DDR4Core& self) {
auto& rank = self.m_ranks[rank_idx];
rank.memState = MemState::NOT_IN_PD;
rank.cycles.powerDownPre.close_interval(exitTime);
// Precharge banks that were precharged prior to PDP
for (auto & bank : rank.banks)
{
if (bank.bankState==Bank::BankState::BANK_ACTIVE)
{
bank.cycles.act.start_interval(exitTime);
}
}
// Precharge rank if all banks are precharged
// At least one bank must be precharged for PDP -> remove if statement?
// If statement ensures right state diagramm traversal
//if(!rank.isActive(exitTime))
// rank.cycles.pre.start_interval(exitTime);
});
}
timestamp_t DDR4Core::earliestPossiblePowerDownEntryTime(Rank & rank) const {
timestamp_t entryTime = 0;
for (const auto & bank : rank.banks) {
entryTime = std::max({ entryTime,
bank.counter.act == 0 ? 0 : bank.cycles.act.get_start() + m_memSpec.tRCD,
bank.counter.pre == 0 ? 0 : bank.latestPre + m_memSpec.tRP,
bank.refreshEndTime
});
}
return entryTime;
}
void DDR4Core::getWindowStats(timestamp_t timestamp, SimulationStats &stats) {
m_implicitCommandHandler.processImplicitCommandQueue(*this, timestamp, m_last_command_time);
// resize banks and ranks
stats.bank.resize(m_memSpec.numberOfBanks * m_memSpec.numberOfRanks);
stats.rank_total.resize(m_memSpec.numberOfRanks);
auto simulation_duration = timestamp;
for (size_t i = 0; i < m_memSpec.numberOfRanks; ++i) {
const Rank &rank = m_ranks[i];
size_t bank_offset = i * m_memSpec.numberOfBanks;
for (size_t j = 0; j < m_memSpec.numberOfBanks; ++j) {
stats.bank[bank_offset + j].counter = rank.banks[j].counter;
stats.bank[bank_offset + j].cycles.act =
rank.banks[j].cycles.act.get_count_at(timestamp);
stats.bank[bank_offset + j].cycles.selfRefresh =
rank.cycles.sref.get_count_at(timestamp);
stats.bank[bank_offset + j].cycles.powerDownAct =
rank.cycles.powerDownAct.get_count_at(timestamp);
stats.bank[bank_offset + j].cycles.powerDownPre =
rank.cycles.powerDownPre.get_count_at(timestamp);
stats.bank[bank_offset + j].cycles.pre =
simulation_duration - (stats.bank[bank_offset + j].cycles.act +
rank.cycles.powerDownAct.get_count_at(timestamp) +
rank.cycles.powerDownPre.get_count_at(timestamp) +
rank.cycles.sref.get_count_at(timestamp));
}
stats.rank_total[i].cycles.act = rank.cycles.act.get_count_at(timestamp);
stats.rank_total[i].cycles.powerDownAct = rank.cycles.powerDownAct.get_count_at(timestamp);
stats.rank_total[i].cycles.powerDownPre = rank.cycles.powerDownPre.get_count_at(timestamp);
stats.rank_total[i].cycles.selfRefresh = rank.cycles.sref.get_count_at(timestamp);
stats.rank_total[i].cycles.pre = simulation_duration -
(
stats.rank_total[i].cycles.act +
stats.rank_total[i].cycles.powerDownAct +
stats.rank_total[i].cycles.powerDownPre +
stats.rank_total[i].cycles.selfRefresh
);
//stats.rank_total[i].cycles.pre = rank.cycles.pre.get_count_at(timestamp);
}
}
void DDR4Core::serialize(std::ostream& stream) const {
stream.write(reinterpret_cast<const char*>(&m_last_command_time), sizeof(m_last_command_time));
// Serialize the ranks
for (const auto& rank : m_ranks) {
rank.serialize(stream);
}
}
void DDR4Core::deserialize(std::istream& stream) {
stream.read(reinterpret_cast<char*>(&m_last_command_time), sizeof(m_last_command_time));
// Deserialize the ranks
for (auto &rank : m_ranks) {
rank.deserialize(stream);
}
}
} // namespace DRAMPower
================================================
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4Core.h
================================================
#ifndef DRAMPOWER_STANDARDS_DDR4_DDR4CORE_H
#define DRAMPOWER_STANDARDS_DDR4_DDR4CORE_H
#include "DRAMPower/util/Deserialize.h"
#include "DRAMPower/util/Serialize.h"
#include <DRAMPower/Types.h>
#include <DRAMPower/dram/Rank.h>
#include <DRAMPower/command/Command.h>
#include <DRAMPower/data/stats.h>
#include <DRAMPower/util/ImplicitCommandHandler.h>
#include <DRAMPower/simconfig/simconfig.h>
#include <DRAMPower/memspec/MemSpecDDR4.h>
#include <vector>
namespace DRAMPower {
namespace internal {
template<typename Core>
class TestAccessor;
}
struct DDR4CoreMemSpec {
DDR4CoreMemSpec(const MemSpecDDR4& memSpec)
: numberOfBanks(memSpec.numberOfBanks)
, numberOfRanks(memSpec.numberOfRanks)
, tRFC(memSpec.memTimingSpec.tRFC)
, tRAS(memSpec.memTimingSpec.tRAS)
, tRCD(memSpec.memTimingSpec.tRCD)
, tRP(memSpec.memTimingSpec.tRP)
, prechargeOffsetRD(memSpec.prechargeOffsetRD)
, prechargeOffsetWR(memSpec.prechargeOffsetWR)
{}
uint64_t numberOfBanks;
uint64_t numberOfRanks;
uint64_t tRFC;
uint64_t tRAS;
uint64_t tRCD;
uint64_t tRP;
uint64_t prechargeOffsetRD;
uint64_t prechargeOffsetWR;
};
class DDR4Core : public util::Serialize, public util::Deserialize {
// Friend classes
friend class internal::TestAccessor<DDR4Core>;
// Public constructors and assignment operators
public:
DDR4Core(const MemSpecDDR4& memSpec)
: m_memSpec(memSpec)
, m_ranks(memSpec.numberOfRanks, {static_cast<std::size_t>(memSpec.numberOfBanks)})
{}
// Public member functions
public:
// Member functions
void doCommand(const Command& cmd);
timestamp_t getLastCommandTime() const;
bool isSerializable() const;
void getWindowStats(timestamp_t timestamp, SimulationStats &stats);
// Overrides
void serialize(std::ostream& stream) const override;
void deserialize(std::istream& stream) override;
// Private member functions
private:
void handleAct(Rank & rank, Bank & bank, timestamp_t timestamp);
void handlePre(Rank & rank, Bank & bank, timestamp_t timestamp);
void handlePreAll(Rank & rank, timestamp_t timestamp);
void handleRefAll(std::size_t rank_idx, timestamp_t timestamp);
void handleSelfRefreshEntry(std::size_t rank_idx, timestamp_t timestamp);
void handleSelfRefreshExit(Rank & rank, timestamp_t timestamp);
void handleRead(Rank & rank, Bank & bank, timestamp_t timestamp);
void handleWrite(Rank & rank, Bank & bank, timestamp_t timestamp);
void handleReadAuto(std::size_t rank_idx, std::size_t bank_idx, timestamp_t timestamp);
void handleWriteAuto(std::size_t rank_idx, std::size_t bank_idx, timestamp_t timestamp);
void handlePowerDownActEntry(std::size_t rank_idx, timestamp_t timestamp);
void handlePowerDownActExit(std::size_t rank_idx, timestamp_t timestamp);
void handlePowerDownPreEntry(std::size_t rank_idx, timestamp_t timestamp);
void handlePowerDownPreExit(std::size_t rank_idx, timestamp_t timestamp);
timestamp_t earliestPossiblePowerDownEntryTime(Rank & rank) const;
// Private members variables
private:
DDR4CoreMemSpec m_memSpec;
std::vector<Rank> m_ranks;
ImplicitCommandHandler<DDR4Core> m_implicitCommandHandler;
timestamp_t m_last_command_time = 0;
};
} // namespace DRAMPower
#endif /* DRAMPOWER_STANDARDS_DDR4_DDR4CORE_H */
================================================
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4Interface.cpp
================================================
#include "DDR4Interface.h"
#include "DRAMPower/util/databus_types.h"
namespace DRAMPower {
static constexpr DRAMUtils::Config::ToggleRateDefinition busConfig {
0,
0,
0,
0,
DRAMUtils::Config::TogglingRateIdlePattern::H,
DRAMUtils::Config::TogglingRateIdlePattern::H
};
DDR4Interface::DDR4Interface(const MemSpecDDR4& memSpec, const config::SimConfig &simConfig)
: m_memSpec(memSpec)
, m_commandBus{cmdBusWidth, 1,
util::BusIdlePatternSpec::H, util::BusInitPatternSpec::H}
, m_dataBus{
util::databus_presets::getDataBusPreset(
util::DataBusConfig{
memSpec.bitWidth * memSpec.numberOfDevices,
memSpec.dataRate,
simConfig.toggleRateDefinition.value_or(busConfig)
},
simConfig.toggleRateDefinition.has_value()
? util::DataBusMode::TogglingRate
: util::DataBusMode::Bus,
false
)
}
, m_readDQS(memSpec.dataRate, true)
, m_writeDQS(memSpec.dataRate, true)
, m_clock(2, false)
, m_dbi(memSpec.numberOfDevices * memSpec.bitWidth, memSpec.burstLength,
[this](timestamp_t load_timestamp, timestamp_t, std::size_t pin, bool inversion_state, bool read) {
this->handleDBIPinChange(load_timestamp, pin, inversion_state, read);
}, false)
, m_dbiread(m_dbi.getChunksPerWidth().value(), pin_dbi_t{m_dbi.getIdlePattern(), m_dbi.getIdlePattern()})
, m_dbiwrite(m_dbi.getChunksPerWidth().value(), pin_dbi_t{m_dbi.getIdlePattern(), m_dbi.getIdlePattern()})
, prepostambleReadMinTccd(memSpec.prePostamble.readMinTccd)
, prepostambleWriteMinTccd(memSpec.prePostamble.writeMinTccd)
, m_ranks(memSpec.numberOfRanks)
, m_patternHandler(PatternEncoderOverrides {
{pattern_descriptor::V, PatternEncoderBitSpec::H},
{pattern_descriptor::X, PatternEncoderBitSpec::H},
}, cmdBusInitPattern)
{
registerPatterns();
}
void DDR4Interface::registerPatterns() {
using namespace pattern_descriptor;
// ACT
m_patternHandler.registerPattern<CmdType::ACT>({
L, L, R16, R15, R14, BG0, BG1, BA0, BA1,
V, V, V, R12, R17, R13, R11, R10, R0,
R1, R2, R3, R4, R5, R6, R7, R8, R9
});
// PRE
m_patternHandler.registerPattern<CmdType::PRE>({
L, H, L, H, L, BG0, BG1, BA0, BA1,
V, V, V, V, V, V, V, L, V,
V, V, V, V, V, V, V, V, V
});
// PREA
m_patternHandler.registerPattern<CmdType::PREA>({
L, H, L, H, L, V, V, V, V,
V, V, V, V, V, V, V, H, V,
V, V, V, V, V, V, V, V, V
});
// REFA
m_patternHandler.registerPattern<CmdType::REFA>({
L, H, L, L, H, V, V, V, V,
V, V, V, V, V, V, V, V, V,
V, V, V, V, V, V, V, V, V
});
// RD
m_patternHandler.registerPattern<CmdType::RD>({
L, H, H, L, H, BG0, BG1, BA0, BA1,
V, V, V, V, V, V, V, L, C0,
C1, C2, C3, C4, C5, C6, C7, C8, C9
});
// RDA
m_patternHandler.registerPattern<CmdType::RDA>({
L, H, H, L, H, BG0, BG1, BA0, BA1,
V, V, V, V, V, V, V, H, C0,
C1, C2, C3, C4, C5, C6, C7, C8, C9
});
// WR
m_patternHandler.registerPattern<CmdType::WR>({
L, H, H, L, L, BG0, BG1, BA0, BA1,
V, V, V, V, V, V, V, L, C0,
C1, C2, C3, C4, C5, C6, C7, C8, C9
});
// WRA
m_patternHandler.registerPattern<CmdType::WRA>({
L, H, H, L, L, BG0, BG1, BA0, BA1,
V, V, V, V, V, V, V, H, C0,
C1, C2, C3, C4, C5, C6, C7, C8, C9
});
// SREFEN
m_patternHandler.registerPattern<CmdType::SREFEN>({
L, H, L, L, H, V, V, V, V,
V, V, V, V, V, V, V, V, V,
V, V, V, V, V, V, V, V, V
});
// SREFEX
m_patternHandler.registerPattern<CmdType::SREFEX>({
H, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
L, H, H, H, H, V, V, V, V,
V, V, V, V, V, V, V, V, V,
V, V, V, V, V, V, V, V, V
});
// PDEA
m_patternHandler.registerPattern<CmdType::PDEA>({
H, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
});
// PDEP
m_patternHandler.registerPattern<CmdType::PDEP>({
H, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
});
// PDXA
m_patternHandler.registerPattern<CmdType::PDXA>({
H, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
});
// PDXP
m_patternHandler.registerPattern<CmdType::PDXP>({
H, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
X, X, X, X, X, X, X, X, X,
});
}
timestamp_t DDR4Interface::getLastCommandTime() const {
return m_last_command_time;
}
void DDR4Interface::doCommand(const Command& cmd) {
switch(cmd.type) {
case CmdType::ACT:
case CmdType::PRE:
case CmdType::PREA:
case CmdType::REFA:
case CmdType::SREFEN:
case CmdType::SREFEX:
case CmdType::PDEA:
case CmdType::PDEP:
case CmdType::PDXA:
case CmdType::PDXP:
handleCommandBus(cmd);
break;
case CmdType::RD:
case CmdType::RDA:
handleData(cmd, true);
break;
case CmdType::WR:
case CmdType::WRA:
handleData(cmd, false);
break;
case CmdType::END_OF_SIMULATION:
endOfSimulation(cmd.timestamp);
break;
default:
assert(false && "Invalid command");
break;
}
m_last_command_time = cmd.timestamp;
}
void DDR4Interface::handleDBIPinChange(const timestamp_t load_timestamp, std::size_t pin, bool state, bool read) {
assert(pin < m_dbiread.size() || pin < m_dbiwrite.size());
if (read) {
this->m_dbiread[pin].set(load_timestamp, state ? util::PinState::L : util::PinState::H, 1);
} else {
this->m_dbiwrite[pin].set(load_timestamp, state ? util::PinState::L : util::PinState::H, 1);
}
}
std::optional<const uint8_t *> DDR4Interface::handleDBIInterface(timestamp_t timestamp, std::size_t n_bits, const uint8_t* data, bool read) {
if (0 == n_bits || !data || !m_dbi.isEnabled()) {
// No DBI or no data to process
return std::nullopt;
}
timestamp_t virtual_time = timestamp * m_memSpec.dataRate;
// updateDBI calls the given callback to handle pin changes
return m_dbi.updateDBI(virtual_time, n_bits, data, read);
}
void DDR4Interface::handlePrePostamble(
const timestamp_t timestamp,
const uint64_t length,
RankInterface &rank,
bool read
)
{
uint64_t *lastAccess = &rank.lastWriteEnd;
uint64_t diff = 0;
if(read)
{
lastAccess = &rank.lastReadEnd;
// minTccd = prepostambleReadMinTccd;
}
assert(timestamp >= *lastAccess);
if(timestamp < *lastAccess)
{
std::cout << "[Error] PrePostamble diff is negative. The last read/write transaction was not completed" << std::endl;
return;
}
diff = timestamp - *lastAccess;
*lastAccess = timestamp + length;
//assert(diff >= 0);
// Pre and Postamble seamless
if(diff == 0)
{
// Seamless read or write
if(read)
rank.seamlessPrePostambleCounter_read++;
else
rank.seamlessPrePostambleCounter_write++;
}
}
void DDR4Interface::handleOverrides(size_t length, bool read)
{
// Set command bus pattern overrides
switch(length) {
case 4:
if(read)
{
// Read
m_patternHandler.getEncoder().settings.updateSettings({
{pattern_descriptor::C2, PatternEncoderBitSpec::L},
{pattern_descriptor::C1, PatternEncoderBitSpec::L},
{pattern_descriptor::C0, PatternEncoderBitSpec::L},
});
}
else
{
// Write
m_patternHandler.getEncoder().settings.updateSettings({
{pattern_descriptor::C2, PatternEncoderBitSpec::L},
{pattern_descriptor::C1, PatternEncoderBitSpec::H},
{pattern_descriptor::C0, PatternEncoderBitSpec::H},
});
}
break;
default:
// Pull up
// No interface power needed for PatternEncoderBitSpec::H
// Defaults to burst length 8
case 8:
if(read)
{
// Read
m_patternHandler.getEncoder().settings.updateSettings({
{pattern_descriptor::C2, PatternEncoderBitSpec::L},
{pattern_descriptor::C1, PatternEncoderBitSpec::L},
{pattern_descriptor::C0, PatternEncoderBitSpec::L},
});
}
else
{
// Write
m_patternHandler.getEncoder().settings.updateSettings({
{pattern_descriptor::C2, PatternEncoderBitSpec::H},
{pattern_descriptor::C1, PatternEncoderBitSpec::H},
{pattern_descriptor::C0, PatternEncoderBitSpec::H},
});
}
break;
}
}
void DDR4Interface::handleCommandBus(const Command &cmd) {
auto pattern = m_patternHandler.getCommandPattern(cmd);
auto ca_length = m_patternHandler.getPattern(cmd.type).size() / m_commandBus.get_width();
this->m_commandBus.load(cmd.timestamp, pattern, ca_length);
}
void DDR4Interface::handleDQs(const Command &cmd, util::Clock &dqs, const size_t length) {
dqs.start(cmd.timestamp);
dqs.stop(cmd.timestamp + length / m_memSpec.dataRate);
}
void DDR4Interface::handleData(const Command &cmd, bool read) {
auto loadfunc = read ? &databus_t::loadRead : &databus_t::loadWrite;
util::Clock &dqs = read ? m_readDQS : m_writeDQS;
size_t length = 0;
if (0 == cmd.sz_bits) {
// No data provided by command
// Use default burst length
if (m_dataBus.isTogglingRate()) {
// If bus is enabled skip loading data
length = m_memSpec.burstLength;
(m_dataBus.*loadfunc)(cmd.timestamp, length * m_dataBus.getWidth(), nullptr);
}
} else {
std::optional<const uint8_t *> dbi_data = std::nullopt;
// Data provided by command
if (m_dataBus.isBus() && m_dbi.isEnabled()) {
// Only compute dbi for bus mode
dbi_data = handleDBIInterface(cmd.timestamp, cmd.sz_bits, cmd.data, read);
}
length = cmd.sz_bits / (m_dataBus.getWidth());
(m_dataBus.*loadfunc)(cmd.timestamp, cmd.sz_bits, dbi_data.value_or(cmd.data));
}
handleOverrides(length, read);
handleDQs(cmd, dqs, length);
handleCommandBus(cmd);
assert(m_ranks.size()>cmd.targetCoordinate.rank);
auto & rank = m_ranks[cmd.targetCoordinate.rank];
handlePrePostamble(cmd.timestamp, length / m_memSpec.dataRate, rank, read);
}
void DDR4Interface::endOfSimulation(timestamp_t timestamp) {
m_dbi.dispatchResetCallback(timestamp);
}
void DDR4Interface::getWindowStats(timestamp_t timestamp, SimulationStats &stats) const {
// DDR4 x16 have 2 DQs differential pairs
uint_fast8_t NumDQsPairs = 1;
if(m_memSpec.bitWidth == 16) {
NumDQsPairs = 2;
}
stats.rank_total.resize(m_memSpec.numberOfRanks);
for (size_t i = 0; i < m_memSpec.numberOfRanks; ++i) {
const RankInterface &rank_interface = m_ranks[i];
stats.rank_total[i].prepos.readSeamless = rank_interface.seamlessPrePostambleCounter_read;
stats.rank_total[i].prepos.writeSeamless = rank_interface.seamlessPrePostambleCounter_write;
stats.rank_total[i].prepos.readMerged = rank_interface.mergedPrePostambleCounter_read;
stats.rank_total[i].prepos.readMergedTime = rank_interface.mergedPrePostambleTime_read;
stats.rank_total[i].prepos.writeMerged = rank_interface.mergedPrePostambleCounter_write;
stats.rank_total[i].prepos.writeMergedTime = rank_interface.mergedPrePostambleTime_write;
}
stats.commandBus = m_commandBus.get_stats(timestamp);
m_dataBus.get_stats(timestamp,
stats.readBus,
stats.writeBus,
stats.togglingStats.read,
stats.togglingStats.write
);
// single line stored in stats
// differential power calculated in interface calculation
stats.clockStats = 2u * m_clock.get_stats_at(timestamp);
stats.readDQSStats = NumDQsPairs * 2u * m_readDQS.get_stats_at(timestamp);
stats.writeDQSStats = NumDQsPairs * 2u * m_writeDQS.get_stats_at(timestamp);
for (const auto &dbi_pin : m_dbiread) {
stats.readDBI += dbi_pin.get_stats_at(timestamp, 2);
}
for (const auto &dbi_pin : m_dbiwrite) {
stats.writeDBI += dbi_pin.get_stats_at(timestamp, 2);
}
}
void DDR4Interface::serialize(std::ostream& stream) const {
stream.write(reinterpret_cast<const char*>(&m_last_command_time), sizeof(m_last_command_time));
m_patternHandler.serialize(stream);
m_commandBus.serialize(stream);
m_dataBus.serialize(stream);
m_readDQS.serialize(stream);
m_writeDQS.serialize(stream);
m_clock.serialize(stream);
m_dbi.serialize(stream);
for (const auto& rank : m_ranks) {
rank.serialize(stream);
}
for (const auto& pin : m_dbiread) {
pin.serialize(stream);
}
for (const auto& pin : m_dbiwrite) {
pin.serialize(stream);
}
}
void DDR4Interface::deserialize(std::istream& stream) {
stream.read(reinterpret_cast<char*>(&m_last_command_time), sizeof(m_last_command_time));
m_patternHandler.deserialize(stream);
m_commandBus.deserialize(stream);
m_dataBus.deserialize(stream);
m_readDQS.deserialize(stream);
m_writeDQS.deserialize(stream);
m_clock.deserialize(stream);
m_dbi.deserialize(stream);
for (auto &rank : m_ranks) {
rank.deserialize(stream);
}
for (auto &pin : m_dbiread) {
pin.deserialize(stream);
}
for (auto &pin : m_dbiwrite) {
pin.deserialize(stream);
}
}
} // namespace DRAMPower
================================================
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4Interface.h
================================================
#ifndef DRAMPOWER_STANDARDS_DDR4_DDR4INTERFACE_H
#define DRAMPOWER_STANDARDS_DDR4_DDR4INTERFACE_H
#include "DRAMPower/util/pin.h"
#include "DRAMPower/util/bus.h"
#include "DRAMPower/util/databus_presets.h"
#include "DRAMPower/util/clock.h"
#include "DRAMPower/util/Serialize.h"
#include "DRAMPower/util/Deserialize.h"
#include "DRAMPower/Types.h"
#include "DRAMPower/command/Command.h"
#include "DRAMPower/dram/Rank.h"
#include "DRAMPower/data/stats.h"
#include "DRAMPower/util/PatternHandler.h"
#include "DRAMPower/util/dbi.h"
#include "DRAMPower/memspec/MemSpecDDR4.h"
#include "DRAMPower/simconfig/simconfig.h"
#include <stdint.h>
#include <cstddef>
#include <vector>
#include <optional>
namespace DRAMPower {
struct DDR4InterfaceMemSpec {
DDR4InterfaceMemSpec(const MemSpecDDR4& memSpec)
: dataRate(memSpec.dataRate)
, burstLength(memSpec.burstLength)
, bitWidth(memSpec.bitWidth)
, numberOfRanks(memSpec.numberOfRanks)
{}
uint64_t dataRate;
uint64_t burstLength;
uint64_t bitWidth;
uint64_t numberOfRanks;
};
class DDR4Interface : public util::Serialize, public util::Deserialize {
// Public constants
public:
const static std::size_t cmdBusWidth = 27;
const static uint64_t cmdBusInitPattern = (1<<cmdBusWidth)-1;
// Public type definitions
public:
using commandbus_t = util::Bus<cmdBusWidth>;
using pin_dbi_t = util::Pin<8>; // max_burst_length = 8
using databus_t = util::databus_presets::databus_preset_t;
using patternHandler_t = PatternHandler<CmdType>;
// Public constructors and assignment operators
public:
DDR4Interface(const MemSpecDDR4& memSpec, const config::SimConfig &simConfig = {});
// Public member functions
public:
// Member functions
timestamp_t getLastCommandTime() const;
void doCommand(const Command& cmd);
void getWindowStats(timestamp_t timestamp, SimulationStats &stats) const;
// Overrides
void serialize(std::ostream& stream) const override;
void deserialize(std::istream& stream) override;
// Extensions
void enableDBI(bool enable) {
m_dbi.enable(enable);
}
// Private member functions
private:
void registerPatterns();
std::optional<const uint8_t *> handleDBIInterface(timestamp_t timestamp, std::size_t n_bits, const uint8_t* data, bool read);
void handleDBIPinChange(const timestamp_t load_timestamp, std::size_t pin, bool state, bool read);
void handleOverrides(size_t length, bool read);
void handleDQs(const Command& cmd, util::Clock &dqs, size_t length);
void handleCommandBus(const Command& cmd);
void handleData(const Command &cmd, bool read);
void handlePrePostamble(
const timestamp_t timestamp,
const uint64_t length,
RankInterface & rank,
bool read
);
void endOfSimulation(timestamp_t timestamp);
// Private member variables
private:
DDR4InterfaceMemSpec m_memSpec;
commandbus_t m_commandBus;
databus_t m_dataBus;
util::Clock m_readDQS;
util::Clock m_writeDQS;
util::C
gitextract_nfddae32/
├── .clang-format
├── .clang-tidy
├── .github/
│ └── workflows/
│ └── CI.yml
├── .gitignore
├── CMakeLists.txt
├── CMakePresets.json
├── LICENSE.txt
├── README.md
├── benches/
│ ├── CMakeLists.txt
│ ├── main.cpp
│ └── simulation.cpp
├── cmake/
│ ├── build_source_group.cmake
│ ├── diagnostics_print.cmake
│ ├── enable_clang_format.cmake
│ ├── enable_clang_tidy.cmake
│ └── enable_cppcheck.cmake
├── lib/
│ ├── cli11/
│ │ └── CMakeLists.txt
│ └── spdlog/
│ └── CMakeLists.txt
├── src/
│ ├── DRAMPower/
│ │ ├── CMakeLists.txt
│ │ └── DRAMPower/
│ │ ├── Exceptions.h
│ │ ├── Types.h
│ │ ├── command/
│ │ │ ├── CmdType.h
│ │ │ ├── Command.cpp
│ │ │ ├── Command.h
│ │ │ ├── Pattern.cpp
│ │ │ └── Pattern.h
│ │ ├── data/
│ │ │ ├── energy.cpp
│ │ │ ├── energy.h
│ │ │ └── stats.h
│ │ ├── dram/
│ │ │ ├── Bank.h
│ │ │ ├── Interface.cpp
│ │ │ ├── Interface.h
│ │ │ ├── Rank.cpp
│ │ │ ├── Rank.h
│ │ │ └── dram_base.h
│ │ ├── memspec/
│ │ │ ├── MemSpec.h
│ │ │ ├── MemSpecDDR4.cpp
│ │ │ ├── MemSpecDDR4.h
│ │ │ ├── MemSpecDDR5.cpp
│ │ │ ├── MemSpecDDR5.h
│ │ │ ├── MemSpecLPDDR4.cpp
│ │ │ ├── MemSpecLPDDR4.h
│ │ │ ├── MemSpecLPDDR5.cpp
│ │ │ └── MemSpecLPDDR5.h
│ │ ├── simconfig/
│ │ │ └── simconfig.h
│ │ ├── standards/
│ │ │ ├── ddr4/
│ │ │ │ ├── DDR4.cpp
│ │ │ │ ├── DDR4.h
│ │ │ │ ├── DDR4Core.cpp
│ │ │ │ ├── DDR4Core.h
│ │ │ │ ├── DDR4Interface.cpp
│ │ │ │ ├── DDR4Interface.h
│ │ │ │ ├── core_calculation_DDR4.cpp
│ │ │ │ ├── core_calculation_DDR4.h
│ │ │ │ ├── interface_calculation_DDR4.cpp
│ │ │ │ ├── interface_calculation_DDR4.h
│ │ │ │ └── types.h
│ │ │ ├── ddr5/
│ │ │ │ ├── DDR5.cpp
│ │ │ │ ├── DDR5.h
│ │ │ │ ├── DDR5Core.cpp
│ │ │ │ ├── DDR5Core.h
│ │ │ │ ├── DDR5Interface.cpp
│ │ │ │ ├── DDR5Interface.h
│ │ │ │ ├── core_calculation_DDR5.cpp
│ │ │ │ ├── core_calculation_DDR5.h
│ │ │ │ ├── interface_calculation_DDR5.cpp
│ │ │ │ ├── interface_calculation_DDR5.h
│ │ │ │ └── types.h
│ │ │ ├── lpddr4/
│ │ │ │ ├── LPDDR4.cpp
│ │ │ │ ├── LPDDR4.h
│ │ │ │ ├── LPDDR4Core.cpp
│ │ │ │ ├── LPDDR4Core.h
│ │ │ │ ├── LPDDR4Interface.cpp
│ │ │ │ ├── LPDDR4Interface.h
│ │ │ │ ├── core_calculation_LPDDR4.cpp
│ │ │ │ ├── core_calculation_LPDDR4.h
│ │ │ │ ├── interface_calculation_LPDDR4.cpp
│ │ │ │ ├── interface_calculation_LPDDR4.h
│ │ │ │ └── types.h
│ │ │ ├── lpddr5/
│ │ │ │ ├── LPDDR5.cpp
│ │ │ │ ├── LPDDR5.h
│ │ │ │ ├── LPDDR5Core.cpp
│ │ │ │ ├── LPDDR5Core.h
│ │ │ │ ├── LPDDR5Interface.cpp
│ │ │ │ ├── LPDDR5Interface.h
│ │ │ │ ├── core_calculation_LPDDR5.cpp
│ │ │ │ ├── core_calculation_LPDDR5.h
│ │ │ │ ├── interface_calculation_LPDDR5.cpp
│ │ │ │ ├── interface_calculation_LPDDR5.h
│ │ │ │ └── types.h
│ │ │ └── test_accessor.h
│ │ └── util/
│ │ ├── Deserialize.h
│ │ ├── ImplicitCommandHandler.h
│ │ ├── PatternHandler.h
│ │ ├── RegisterHelper.h
│ │ ├── Router.h
│ │ ├── Serialize.h
│ │ ├── binary_ops.h
│ │ ├── burst_storage.h
│ │ ├── bus.cpp
│ │ ├── bus.h
│ │ ├── bus_types.h
│ │ ├── cli_architecture_config.h
│ │ ├── clock.h
│ │ ├── command_counter.h
│ │ ├── cycle_stats.h
│ │ ├── databus.h
│ │ ├── databus_presets.h
│ │ ├── databus_types.h
│ │ ├── dbi.h
│ │ ├── dbialgos.h
│ │ ├── dbihelpers.h
│ │ ├── dbitypes.h
│ │ ├── dynamic_bitset.h
│ │ ├── extension_base.h
│ │ ├── extension_manager.h
│ │ ├── extension_manager_static.h
│ │ ├── extensions.cpp
│ │ ├── extensions.h
│ │ ├── pending_stats.h
│ │ ├── pin.h
│ │ ├── pin_types.h
│ │ └── sub_bitset.h
│ └── cli/
│ ├── CMakeLists.txt
│ ├── lib/
│ │ ├── CMakeLists.txt
│ │ └── DRAMPower/
│ │ └── cli/
│ │ ├── config.h
│ │ ├── csv.hpp
│ │ ├── run.cpp
│ │ ├── run.hpp
│ │ ├── util.cpp
│ │ └── util.hpp
│ └── main/
│ ├── CMakeLists.txt
│ ├── main.cpp
│ ├── validators.cpp
│ └── validators.h
└── tests/
├── CMakeLists.txt
├── tests_drampower/
│ ├── CMakeLists.txt
│ ├── base/
│ │ ├── test_ddr_base.cpp
│ │ ├── test_ddr_data.cpp
│ │ ├── test_ddr_serialize.cpp
│ │ └── test_pattern_pre_cycles.cpp
│ ├── core/
│ │ ├── DDR4/
│ │ │ ├── ddr4_multidevice_tests.cpp
│ │ │ ├── ddr4_multirank_tests.cpp
│ │ │ ├── ddr4_test_pattern_0.cpp
│ │ │ ├── ddr4_test_pattern_1.cpp
│ │ │ ├── ddr4_test_pattern_10.cpp
│ │ │ ├── ddr4_test_pattern_11.cpp
│ │ │ ├── ddr4_test_pattern_12.cpp
│ │ │ ├── ddr4_test_pattern_13.cpp
│ │ │ ├── ddr4_test_pattern_14.cpp
│ │ │ ├── ddr4_test_pattern_15.cpp
│ │ │ ├── ddr4_test_pattern_2.cpp
│ │ │ ├── ddr4_test_pattern_3.cpp
│ │ │ ├── ddr4_test_pattern_4.cpp
│ │ │ ├── ddr4_test_pattern_5.cpp
│ │ │ ├── ddr4_test_pattern_6.cpp
│ │ │ ├── ddr4_test_pattern_7.cpp
│ │ │ ├── ddr4_test_pattern_8.cpp
│ │ │ └── ddr4_test_pattern_9.cpp
│ │ ├── DDR5/
│ │ │ ├── ddr5_multidevice_tests.cpp
│ │ │ ├── ddr5_multirank_tests.cpp
│ │ │ ├── ddr5_test_pattern_0.cpp
│ │ │ ├── ddr5_test_pattern_1.cpp
│ │ │ ├── ddr5_test_pattern_10.cpp
│ │ │ ├── ddr5_test_pattern_11.cpp
│ │ │ ├── ddr5_test_pattern_12.cpp
│ │ │ ├── ddr5_test_pattern_13.cpp
│ │ │ ├── ddr5_test_pattern_14.cpp
│ │ │ ├── ddr5_test_pattern_15.cpp
│ │ │ ├── ddr5_test_pattern_16.cpp
│ │ │ ├── ddr5_test_pattern_17.cpp
│ │ │ ├── ddr5_test_pattern_18.cpp
│ │ │ ├── ddr5_test_pattern_2.cpp
│ │ │ ├── ddr5_test_pattern_3.cpp
│ │ │ ├── ddr5_test_pattern_4.cpp
│ │ │ ├── ddr5_test_pattern_5.cpp
│ │ │ ├── ddr5_test_pattern_6.cpp
│ │ │ ├── ddr5_test_pattern_7.cpp
│ │ │ ├── ddr5_test_pattern_8.cpp
│ │ │ └── ddr5_test_pattern_9.cpp
│ │ ├── LPDDR4/
│ │ │ ├── lpddr4_multidevice_tests.cpp
│ │ │ ├── lpddr4_multirank_tests.cpp
│ │ │ ├── lpddr4_test_pattern_0.cpp
│ │ │ ├── lpddr4_test_pattern_1.cpp
│ │ │ ├── lpddr4_test_pattern_10.cpp
│ │ │ ├── lpddr4_test_pattern_11.cpp
│ │ │ ├── lpddr4_test_pattern_12.cpp
│ │ │ ├── lpddr4_test_pattern_13.cpp
│ │ │ ├── lpddr4_test_pattern_14.cpp
│ │ │ ├── lpddr4_test_pattern_15.cpp
│ │ │ ├── lpddr4_test_pattern_16.cpp
│ │ │ ├── lpddr4_test_pattern_17.cpp
│ │ │ ├── lpddr4_test_pattern_18.cpp
│ │ │ ├── lpddr4_test_pattern_2.cpp
│ │ │ ├── lpddr4_test_pattern_3.cpp
│ │ │ ├── lpddr4_test_pattern_4.cpp
│ │ │ ├── lpddr4_test_pattern_5.cpp
│ │ │ ├── lpddr4_test_pattern_6.cpp
│ │ │ ├── lpddr4_test_pattern_7.cpp
│ │ │ ├── lpddr4_test_pattern_8.cpp
│ │ │ └── lpddr4_test_pattern_9.cpp
│ │ └── LPDDR5/
│ │ ├── lpddr5_multidevice_tests.cpp
│ │ ├── lpddr5_multirank_tests.cpp
│ │ ├── lpddr5_test_pattern_0.cpp
│ │ ├── lpddr5_test_pattern_1.cpp
│ │ ├── lpddr5_test_pattern_10.cpp
│ │ ├── lpddr5_test_pattern_11.cpp
│ │ ├── lpddr5_test_pattern_12.cpp
│ │ ├── lpddr5_test_pattern_13.cpp
│ │ ├── lpddr5_test_pattern_14.cpp
│ │ ├── lpddr5_test_pattern_15.cpp
│ │ ├── lpddr5_test_pattern_16.cpp
│ │ ├── lpddr5_test_pattern_17.cpp
│ │ ├── lpddr5_test_pattern_18.cpp
│ │ ├── lpddr5_test_pattern_19.cpp
│ │ ├── lpddr5_test_pattern_2.cpp
│ │ ├── lpddr5_test_pattern_20.cpp
│ │ ├── lpddr5_test_pattern_21.cpp
│ │ ├── lpddr5_test_pattern_3.cpp
│ │ ├── lpddr5_test_pattern_4.cpp
│ │ ├── lpddr5_test_pattern_5.cpp
│ │ ├── lpddr5_test_pattern_6.cpp
│ │ ├── lpddr5_test_pattern_7.cpp
│ │ ├── lpddr5_test_pattern_8.cpp
│ │ └── lpddr5_test_pattern_9.cpp
│ ├── interface/
│ │ ├── test_dbi_ddr4.cpp
│ │ ├── test_dbi_lpddr4.cpp
│ │ ├── test_dbi_lpddr5.cpp
│ │ ├── test_interface_ddr4.cpp
│ │ ├── test_interface_ddr5.cpp
│ │ ├── test_interface_lpddr4.cpp
│ │ ├── test_interface_lpddr5.cpp
│ │ ├── test_togglingrate_ddr4.cpp
│ │ ├── test_togglingrate_ddr5.cpp
│ │ ├── test_togglingrate_lpddr4.cpp
│ │ └── test_togglingrate_lpddr5.cpp
│ └── resources/
│ ├── cliconfig.json
│ ├── ddr4.csv
│ ├── ddr4.json
│ ├── ddr5.csv
│ ├── ddr5.json
│ ├── lpddr4.csv
│ ├── lpddr4.json
│ ├── lpddr5.csv
│ └── lpddr5.json
└── tests_misc/
├── CMakeLists.txt
├── test_bus.cpp
├── test_bus_extended.cpp
├── test_clock.cpp
├── test_dynamic_bitset.cpp
├── test_dynamic_extension_manager.cpp
├── test_interval.cpp
├── test_misc.cpp
├── test_pattern.cpp
├── test_pin.cpp
└── test_static_extension_manager.cpp
Showing preview only (3,505K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (1590 symbols across 220 files)
FILE: benches/main.cpp
function main (line 39) | int main(int argc, char** argv)
FILE: benches/simulation.cpp
class LPDDR4_Bench (line 56) | class LPDDR4_Bench : public benchmark::Fixture
method SetUp (line 65) | void SetUp(::benchmark::State&) {
method TearDown (line 85) | void TearDown(::benchmark::State&) {
FILE: src/DRAMPower/DRAMPower/Exceptions.h
function namespace (line 8) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/Types.h
function namespace (line 8) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/command/CmdType.h
function CmdType (line 15) | enum class CmdType {
FILE: src/DRAMPower/DRAMPower/command/Command.cpp
type DRAMPower (line 3) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/command/Command.h
function namespace (line 9) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/command/Pattern.cpp
type DRAMPower (line 6) | namespace DRAMPower {
function PatternEncoderBitSpec (line 34) | PatternEncoderBitSpec PatternEncoderOverrides::getSetting(pattern_desc...
FILE: src/DRAMPower/DRAMPower/command/Pattern.h
function namespace (line 11) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/data/energy.cpp
function energy_info_t (line 48) | energy_info_t& energy_info_t::operator+=(const DRAMPower::energy_info_t&...
function energy_info_t (line 113) | energy_info_t DRAMPower::energy_t::aggregated_bank_energy() const
FILE: src/DRAMPower/DRAMPower/data/energy.h
function namespace (line 11) | namespace DRAMPower {
type interface_energy_t (line 92) | struct interface_energy_t
type interface_energy_info_t (line 111) | struct interface_energy_info_t
FILE: src/DRAMPower/DRAMPower/data/stats.h
function namespace (line 11) | namespace DRAMPower
type TogglingStats (line 164) | struct TogglingStats
function else (line 170) | struct SimulationStats
FILE: src/DRAMPower/DRAMPower/dram/Bank.h
function namespace (line 11) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/dram/Interface.cpp
type DRAMPower (line 3) | namespace DRAMPower {
function timestamp_t (line 118) | timestamp_t TogglingHandle::get_lastburst_timestamp(bool relative_to_c...
FILE: src/DRAMPower/DRAMPower/dram/Interface.h
function namespace (line 17) | namespace DRAMPower {
type interface_stats_t (line 77) | struct interface_stats_t
FILE: src/DRAMPower/DRAMPower/dram/Rank.cpp
type DRAMPower (line 5) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/dram/Rank.h
function MemState (line 17) | enum class MemState {
FILE: src/DRAMPower/DRAMPower/dram/dram_base.h
function namespace (line 23) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/memspec/MemSpec.h
function namespace (line 53) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecDDR4.cpp
function MemSpecDDR4 (line 140) | MemSpecDDR4 MemSpecDDR4::from_memspec(const DRAMUtils::MemSpec::MemSpecV...
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecDDR4.h
function namespace (line 48) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecDDR5.cpp
function MemSpecDDR5 (line 99) | MemSpecDDR5 MemSpecDDR5::from_memspec(const DRAMUtils::MemSpec::MemSpecV...
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecDDR5.h
function namespace (line 9) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR4.cpp
function MemSpecLPDDR4 (line 204) | MemSpecLPDDR4 MemSpecLPDDR4::from_memspec(const DRAMUtils::MemSpec::MemS...
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR4.h
function namespace (line 9) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR5.cpp
function MemSpecLPDDR5 (line 136) | MemSpecLPDDR5 MemSpecLPDDR5::from_memspec(const DRAMUtils::MemSpec::MemS...
FILE: src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR5.h
function namespace (line 7) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/simconfig/simconfig.h
function namespace (line 7) | namespace DRAMPower::config {
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4.cpp
type DRAMPower (line 13) | namespace DRAMPower {
function energy_t (line 49) | energy_t DDR4::calcCoreEnergyStats(const SimulationStats& stats) const {
function interface_energy_info_t (line 54) | interface_energy_info_t DDR4::calcInterfaceEnergyStats(const Simulatio...
function SimulationStats (line 60) | SimulationStats DDR4::getWindowStats(timestamp_t timestamp) {
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4.h
function namespace (line 22) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4Core.cpp
type DRAMPower (line 6) | namespace DRAMPower {
function timestamp_t (line 62) | timestamp_t DDR4Core::getLastCommandTime() const {
function timestamp_t (line 280) | timestamp_t DDR4Core::earliestPossiblePowerDownEntryTime(Rank & rank) ...
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4Core.h
function namespace (line 17) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4Interface.cpp
type DRAMPower (line 4) | namespace DRAMPower {
function timestamp_t (line 144) | timestamp_t DDR4Interface::getLastCommandTime() const {
FILE: src/DRAMPower/DRAMPower/standards/ddr4/DDR4Interface.h
function namespace (line 28) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/ddr4/core_calculation_DDR4.cpp
type DRAMPower (line 3) | namespace DRAMPower {
function energy_t (line 41) | energy_t Calculation_DDR4::calcEnergy(const SimulationStats &stats) co...
FILE: src/DRAMPower/DRAMPower/standards/ddr4/core_calculation_DDR4.h
function namespace (line 15) | namespace DRAMPower
FILE: src/DRAMPower/DRAMPower/standards/ddr4/interface_calculation_DDR4.cpp
type DRAMPower (line 4) | namespace DRAMPower {
function calc_static_energy (line 7) | static double calc_static_energy(double NxBits, double R_eq, double t_...
function calc_dynamic_energy (line 11) | static double calc_dynamic_energy(const uint64_t NxBits, const double ...
function calcStaticTermination (line 15) | static double calcStaticTermination(const bool termination, const DRAM...
function interface_energy_info_t (line 30) | interface_energy_info_t InterfaceCalculation_DDR4::calculateEnergy(con...
function interface_energy_info_t (line 42) | interface_energy_info_t InterfaceCalculation_DDR4::calcClockEnergy(con...
function interface_energy_info_t (line 53) | interface_energy_info_t InterfaceCalculation_DDR4::calcDQSEnergy(const...
function interface_energy_info_t (line 119) | interface_energy_info_t InterfaceCalculation_DDR4::calcDQEnergyTogglin...
function interface_energy_info_t (line 138) | interface_energy_info_t InterfaceCalculation_DDR4::calcDQEnergy(const ...
function interface_energy_info_t (line 155) | interface_energy_info_t InterfaceCalculation_DDR4::calcCAEnergy(const ...
function interface_energy_info_t (line 167) | interface_energy_info_t InterfaceCalculation_DDR4::calcDBIEnergy(const...
FILE: src/DRAMPower/DRAMPower/standards/ddr4/interface_calculation_DDR4.h
function namespace (line 9) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/ddr4/types.h
function namespace (line 12) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/ddr5/DDR5.cpp
type DRAMPower (line 12) | namespace DRAMPower {
function energy_t (line 32) | energy_t DDR5::calcCoreEnergyStats(const SimulationStats& stats) const {
function interface_energy_info_t (line 37) | interface_energy_info_t DDR5::calcInterfaceEnergyStats(const Simulatio...
function SimulationStats (line 43) | SimulationStats DDR5::getWindowStats(timestamp_t timestamp) {
FILE: src/DRAMPower/DRAMPower/standards/ddr5/DDR5.h
function namespace (line 21) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/ddr5/DDR5Core.cpp
type DRAMPower (line 4) | namespace DRAMPower {
function timestamp_t (line 67) | timestamp_t DDR5Core::getLastCommandTime() const {
function timestamp_t (line 297) | timestamp_t DDR5Core::earliestPossiblePowerDownEntryTime(Rank &rank) {
FILE: src/DRAMPower/DRAMPower/standards/ddr5/DDR5Core.h
function namespace (line 15) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/ddr5/DDR5Interface.cpp
type DRAMPower (line 4) | namespace DRAMPower {
function timestamp_t (line 123) | timestamp_t DDR5Interface::getLastCommandTime() const {
FILE: src/DRAMPower/DRAMPower/standards/ddr5/DDR5Interface.h
function namespace (line 23) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/ddr5/core_calculation_DDR5.cpp
type DRAMPower (line 5) | namespace DRAMPower {
function energy_t (line 52) | energy_t Calculation_DDR5::calcEnergy(const SimulationStats &stats) co...
FILE: src/DRAMPower/DRAMPower/standards/ddr5/core_calculation_DDR5.h
function namespace (line 13) | namespace DRAMPower
FILE: src/DRAMPower/DRAMPower/standards/ddr5/interface_calculation_DDR5.cpp
type DRAMPower (line 4) | namespace DRAMPower {
function calc_static_energy (line 6) | static double calc_static_energy(uint64_t NxBits, const double R_eq, c...
function calc_dynamic_energy (line 10) | static double calc_dynamic_energy(const uint64_t transitions, const do...
function calcStaticTermination (line 14) | static double calcStaticTermination(const bool termination, const DRAM...
function interface_energy_info_t (line 29) | interface_energy_info_t InterfaceCalculation_DDR5::calculateEnergy(con...
function interface_energy_info_t (line 45) | interface_energy_info_t InterfaceCalculation_DDR5::calcClockEnergy(con...
function interface_energy_info_t (line 56) | interface_energy_info_t InterfaceCalculation_DDR5::calcDQSEnergy(const...
function interface_energy_info_t (line 71) | interface_energy_info_t InterfaceCalculation_DDR5::calcDQEnergyTogglin...
function interface_energy_info_t (line 89) | interface_energy_info_t InterfaceCalculation_DDR5::calcDQEnergy(const ...
function interface_energy_info_t (line 107) | interface_energy_info_t InterfaceCalculation_DDR5::calcCAEnergy(const ...
FILE: src/DRAMPower/DRAMPower/standards/ddr5/interface_calculation_DDR5.h
function namespace (line 9) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/ddr5/types.h
function namespace (line 12) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4.cpp
type DRAMPower (line 10) | namespace DRAMPower {
function energy_t (line 42) | energy_t LPDDR4::calcCoreEnergyStats(const SimulationStats& stats) con...
function interface_energy_info_t (line 47) | interface_energy_info_t LPDDR4::calcInterfaceEnergyStats(const Simulat...
function SimulationStats (line 53) | SimulationStats LPDDR4::getWindowStats(timestamp_t timestamp) {
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4.h
function namespace (line 20) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4Core.cpp
type DRAMPower (line 4) | namespace DRAMPower {
function timestamp_t (line 63) | timestamp_t LPDDR4Core::getLastCommandTime() const {
function timestamp_t (line 274) | timestamp_t LPDDR4Core::earliestPossiblePowerDownEntryTime(Rank & rank...
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4Core.h
function namespace (line 16) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4Interface.cpp
type DRAMPower (line 6) | namespace DRAMPower {
function timestamp_t (line 118) | timestamp_t LPDDR4Interface::getLastCommandTime() const {
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4Interface.h
function namespace (line 26) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/core_calculation_LPDDR4.cpp
type DRAMPower (line 5) | namespace DRAMPower {
function energy_t (line 47) | energy_t Calculation_LPDDR4::calcEnergy(const SimulationStats &stats) ...
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/core_calculation_LPDDR4.h
function namespace (line 15) | namespace DRAMPower
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/interface_calculation_LPDDR4.cpp
type DRAMPower (line 3) | namespace DRAMPower {
function calc_static_energy (line 12) | static double calc_static_energy(const uint64_t NxBits, const double R...
function calc_dynamic_energy (line 16) | static double calc_dynamic_energy(const uint64_t NxBits, const double ...
function calcStaticTermination (line 20) | static double calcStaticTermination(const bool termination, const DRAM...
function interface_energy_info_t (line 29) | interface_energy_info_t InterfaceCalculation_LPDDR4::calcClockEnergy(c...
function interface_energy_info_t (line 41) | interface_energy_info_t InterfaceCalculation_LPDDR4::calcDQSEnergy(con...
function interface_energy_info_t (line 57) | interface_energy_info_t InterfaceCalculation_LPDDR4::calcCAEnergy(cons...
function interface_energy_info_t (line 67) | interface_energy_info_t InterfaceCalculation_LPDDR4::calcDQEnergy(cons...
function interface_energy_info_t (line 86) | interface_energy_info_t InterfaceCalculation_LPDDR4::calcDQEnergyToggl...
function interface_energy_info_t (line 105) | interface_energy_info_t InterfaceCalculation_LPDDR4::calculateEnergy(c...
function interface_energy_info_t (line 119) | interface_energy_info_t InterfaceCalculation_LPDDR4::calcDBIEnergy(con...
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/interface_calculation_LPDDR4.h
function namespace (line 13) | namespace DRAMPower
FILE: src/DRAMPower/DRAMPower/standards/lpddr4/types.h
function namespace (line 12) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5.cpp
type DRAMPower (line 14) | namespace DRAMPower {
function energy_t (line 43) | energy_t LPDDR5::calcCoreEnergyStats(const SimulationStats& stats) con...
function interface_energy_info_t (line 48) | interface_energy_info_t LPDDR5::calcInterfaceEnergyStats(const Simulat...
function SimulationStats (line 54) | SimulationStats LPDDR5::getWindowStats(timestamp_t timestamp) {
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5.h
function namespace (line 20) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5Core.cpp
type DRAMPower (line 5) | namespace DRAMPower {
function timestamp_t (line 76) | timestamp_t LPDDR5Core::getLastCommandTime() const {
function timestamp_t (line 306) | timestamp_t LPDDR5Core::earliestPossiblePowerDownEntryTime(Rank & rank...
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5Core.h
function namespace (line 16) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5Interface.cpp
type DRAMPower (line 4) | namespace DRAMPower {
function timestamp_t (line 243) | timestamp_t LPDDR5Interface::getLastCommandTime() const {
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5Interface.h
function namespace (line 26) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/core_calculation_LPDDR5.cpp
type DRAMPower (line 6) | namespace DRAMPower {
function energy_t (line 52) | energy_t Calculation_LPDDR5::calcEnergy(const SimulationStats &stats) ...
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/core_calculation_LPDDR5.h
function namespace (line 15) | namespace DRAMPower
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/interface_calculation_LPDDR5.cpp
type DRAMPower (line 4) | namespace DRAMPower {
function calc_static_energy (line 6) | static double calc_static_energy(uint64_t NxBits, double R_eq, double ...
function calc_dynamic_energy (line 10) | static double calc_dynamic_energy(const uint64_t NxBits, const double ...
function calcStaticTermination (line 14) | static double calcStaticTermination(const bool termination, const DRAM...
function interface_energy_info_t (line 30) | interface_energy_info_t InterfaceCalculation_LPDDR5::calculateEnergy(c...
function interface_energy_info_t (line 48) | interface_energy_info_t InterfaceCalculation_LPDDR5::calcClockEnergy(c...
function interface_energy_info_t (line 64) | interface_energy_info_t InterfaceCalculation_LPDDR5::calcDQSEnergy(con...
function interface_energy_info_t (line 76) | interface_energy_info_t InterfaceCalculation_LPDDR5::calcDQEnergyToggl...
function interface_energy_info_t (line 95) | interface_energy_info_t InterfaceCalculation_LPDDR5::calcDQEnergy(cons...
function interface_energy_info_t (line 113) | interface_energy_info_t InterfaceCalculation_LPDDR5::calcCAEnergy(cons...
function interface_energy_info_t (line 125) | interface_energy_info_t InterfaceCalculation_LPDDR5::calcDBIEnergy(con...
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/interface_calculation_LPDDR5.h
function namespace (line 9) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/lpddr5/types.h
function namespace (line 12) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/standards/test_accessor.h
function namespace (line 9) | namespace DRAMPower::internal {
FILE: src/DRAMPower/DRAMPower/util/Deserialize.h
function namespace (line 42) | namespace DRAMPower::util
FILE: src/DRAMPower/DRAMPower/util/ImplicitCommandHandler.h
function namespace (line 15) | namespace details {
FILE: src/DRAMPower/DRAMPower/util/PatternHandler.h
function namespace (line 16) | namespace DRAMPower {
function commandPattern_t (line 65) | const commandPattern_t& getPattern(CmdType cmd_type) const
function getCommandPattern (line 70) | uint64_t getCommandPattern(const Command& cmd)
function getCoordinatePattern (line 81) | uint64_t getCoordinatePattern(const TargetCoordinate& coordinate, const ...
function deserialize (line 96) | void deserialize(std::istream& stream) override {
FILE: src/DRAMPower/DRAMPower/util/RegisterHelper.h
function namespace (line 9) | namespace DRAMPower::util {
FILE: src/DRAMPower/DRAMPower/util/Router.h
function namespace (line 12) | namespace DRAMPower {
FILE: src/DRAMPower/DRAMPower/util/Serialize.h
function namespace (line 42) | namespace DRAMPower::util
FILE: src/DRAMPower/DRAMPower/util/binary_ops.h
function popcount_ (line 21) | inline std::size_t popcount_(uint64_t n) { return std::bitset<64>(n).cou...
function namespace (line 25) | namespace DRAMPower::util {
FILE: src/DRAMPower/DRAMPower/util/burst_storage.h
function namespace (line 22) | namespace DRAMPower::util
function count (line 354) | inline decltype(auto) count(timestamp_t start, timestamp_t end, std::opt...
function burst_t (line 358) | inline burst_t& get_or_add(std::size_t index) {
function setCount (line 363) | void setCount(std::size_t count) {
function burst_t (line 370) | burst_t get_burst(std::size_t n) const {
function clear (line 374) | void clear() {
function setLoadTime (line 378) | void setLoadTime(timestamp_t timestamp) {
function timestamp_t (line 382) | timestamp_t endTime() const {
function deserialize (line 389) | void deserialize(std::istream& stream) override {
type BurstStorageInsertHelper (line 396) | struct BurstStorageInsertHelper {
FILE: src/DRAMPower/DRAMPower/util/bus.h
function namespace (line 24) | namespace DRAMPower::util
function timestamp_t (line 284) | timestamp_t disable(timestamp_t timestamp) {
function enable (line 312) | void enable(timestamp_t timestamp) {
function stats_t (line 327) | stats_t get_stats(timestamp_t timestamp) const
function stats_t (line 365) | stats_t diff(std::optional<burst_t> high, std::optional<burst_t> low) co...
function stats_t (line 382) | stats_t diff(std::optional<burst_t> high, burst_t low) const {
function serialize (line 386) | void serialize(std::ostream& stream) const override {
function deserialize (line 398) | void deserialize(std::istream& stream) override {
FILE: src/DRAMPower/DRAMPower/util/bus_types.h
function namespace (line 9) | namespace DRAMPower::util {
FILE: src/DRAMPower/DRAMPower/util/cli_architecture_config.h
function namespace (line 6) | namespace DRAMPower::util {
FILE: src/DRAMPower/DRAMPower/util/clock.h
function namespace (line 13) | namespace DRAMPower::util {
FILE: src/DRAMPower/DRAMPower/util/cycle_stats.h
function namespace (line 10) | namespace DRAMPower::util
FILE: src/DRAMPower/DRAMPower/util/databus.h
function namespace (line 21) | namespace DRAMPower::util {
function enableBus (line 128) | void enableBus(timestamp_t timestamp) {
function enableTogglingRate (line 136) | void enableTogglingRate(timestamp_t timestamp) {
function setTogglingRateDefinition (line 144) | void setTogglingRateDefinition(DRAMUtils::Config::ToggleRateDefinition t...
function isBus (line 160) | bool isBus() const {
function get_stats (line 176) | void get_stats(timestamp_t timestamp,
function serialize (line 188) | void serialize(std::ostream &stream) const override {
function deserialize (line 196) | void deserialize(std::istream &stream) override {
function enableTogglingRate (line 310) | void enableTogglingRate(timestamp_t timestamp) {
function enableBus (line 316) | void enableBus(timestamp_t timestamp) {
function setTogglingRateDefinition (line 322) | void setTogglingRateDefinition(const DRAMUtils::Config::ToggleRateDefini...
function isTogglingRate (line 328) | bool isTogglingRate() const {
function timestamp_t (line 340) | timestamp_t lastBurst() const {
function get_stats (line 350) | void get_stats(timestamp_t timestamp, util::bus_stats_t &busReadStats, u...
function serialize (line 356) | void serialize(std::ostream& stream) const override {
function deserialize (line 362) | void deserialize(std::istream& stream) override {
FILE: src/DRAMPower/DRAMPower/util/databus_presets.h
function namespace (line 10) | namespace DRAMPower::util::databus_presets {
FILE: src/DRAMPower/DRAMPower/util/databus_types.h
function DataBusMode (line 13) | enum class DataBusMode {
FILE: src/DRAMPower/DRAMPower/util/dbi.h
function namespace (line 27) | namespace DRAMPower::util {
function deserialize (line 120) | void deserialize(std::istream& stream) override {
function set_all_bits (line 164) | void set_all_bits(bool ones, std::bitset<N>& out_val) const {
function DataBuffer_t (line 168) | DataBuffer_t getIdlePattern(std::size_t busWidth) const {
function getInvertedDataSize (line 308) | inline std::size_t getInvertedDataSize() const {
FILE: src/DRAMPower/DRAMPower/util/dbialgos.h
function namespace (line 13) | namespace DRAMPower::util {
FILE: src/DRAMPower/DRAMPower/util/dbihelpers.h
function namespace (line 8) | namespace DRAMPower::util {
function getDataTotal (line 125) | inline static constexpr std::size_t getDataTotal() {
function getDigits (line 128) | inline static constexpr std::size_t getDigits() {
FILE: src/DRAMPower/DRAMPower/util/dbitypes.h
function namespace (line 10) | namespace DRAMPower::util::types {
type is_contiguous_container (line 22) | struct is_contiguous_container
FILE: src/DRAMPower/DRAMPower/util/extension_base.h
function namespace (line 4) | namespace DRAMPower::util::extension_manager {
FILE: src/DRAMPower/DRAMPower/util/extension_manager.h
function namespace (line 23) | namespace DRAMPower::util::extension_manager {
function serialize (line 121) | void serialize(std::ostream& stream) const override {
FILE: src/DRAMPower/DRAMPower/util/extension_manager_static.h
function FuncTuple (line 101) | FuncTuple funcTuple{std::forward<Func>(funcs)...};
function hasExtension (line 110) | static bool hasExtension() {
function withExtension (line 129) | decltype(auto) withExtension(Func&& func) {
FILE: src/DRAMPower/DRAMPower/util/extensions.cpp
type DRAMPower::extensions (line 4) | namespace DRAMPower::extensions {
FILE: src/DRAMPower/DRAMPower/util/extensions.h
function namespace (line 14) | namespace DRAMPower::extensions {
FILE: src/DRAMPower/DRAMPower/util/pending_stats.h
function namespace (line 10) | namespace DRAMPower::util
FILE: src/DRAMPower/DRAMPower/util/pin.h
function namespace (line 15) | namespace DRAMPower::util {
type PinTempChange (line 34) | struct PinTempChange {
function addPendingStats (line 63) | void addPendingStats(timestamp_t t, timestamp_t pending_t, PinState to, ...
function pin_stats_t (line 72) | [[nodiscard]] pin_stats_t getPinChangeStats(const PinState &fromState, c...
function count (line 89) | void count(timestamp_t end, timestamp_t start, const PinState& state, pi...
function set_internal (line 121) | void set_internal(timestamp_t t, std::size_t dataRate, PendingStats<PinP...
function deserialize (line 208) | void deserialize(std::istream &stream) override {
function burst_storage_t (line 229) | burst_storage_t m_burst_storage{}
FILE: src/DRAMPower/DRAMPower/util/pin_types.h
function PinState (line 6) | enum class PinState
FILE: src/DRAMPower/DRAMPower/util/sub_bitset.h
function namespace (line 12) | namespace DRAMPower::util
FILE: src/cli/lib/DRAMPower/cli/config.h
function namespace (line 9) | namespace DRAMPower::DRAMPowerCLI::config {
FILE: src/cli/lib/DRAMPower/cli/csv.hpp
type mio (line 101) | namespace mio {
type access_mode (line 107) | enum class access_mode
function page_size (line 120) | inline size_t page_size()
function make_offset_page_aligned (line 140) | inline size_t make_offset_page_aligned(size_t offset) noexcept
type basic_mmap (line 183) | struct basic_mmap
method basic_mmap (line 234) | basic_mmap() = default;
method basic_mmap (line 243) | basic_mmap(const String& path, const size_type offset = 0, const siz...
method basic_mmap (line 255) | basic_mmap(const handle_type handle, const size_type offset = 0, con...
method basic_mmap (line 267) | basic_mmap(const basic_mmap&) = delete;
method basic_mmap (line 269) | basic_mmap& operator=(const basic_mmap&) = delete;
method handle_type (line 283) | handle_type file_handle() const noexcept { return file_handle_; }
method is_open (line 287) | bool is_open() const noexcept { return file_handle_ != invalid_handl...
method empty (line 294) | bool empty() const noexcept { return length() == 0; }
method size_type (line 305) | size_type size() const noexcept { return length(); }
method size_type (line 306) | size_type length() const noexcept { return length_; }
method size_type (line 307) | size_type mapped_length() const noexcept { return mapped_length_; }
method size_type (line 310) | size_type mapping_offset() const noexcept
method pointer (line 322) | pointer data() noexcept { return data_; }
method const_pointer (line 323) | const_pointer data() const noexcept { return data_; }
method iterator (line 332) | iterator begin() noexcept { return data(); }
method const_iterator (line 333) | const_iterator begin() const noexcept { return data(); }
method const_iterator (line 334) | const_iterator cbegin() const noexcept { return data(); }
method iterator (line 343) | iterator end() noexcept { return data() + length(); }
method const_iterator (line 344) | const_iterator end() const noexcept { return data() + length(); }
method const_iterator (line 345) | const_iterator cend() const noexcept { return data() + length(); }
method reverse_iterator (line 355) | reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
method const_reverse_iterator (line 356) | const_reverse_iterator rbegin() const noexcept
method const_reverse_iterator (line 358) | const_reverse_iterator crbegin() const noexcept
method reverse_iterator (line 368) | reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
method const_reverse_iterator (line 369) | const_reverse_iterator rend() const noexcept
method const_reverse_iterator (line 371) | const_reverse_iterator crend() const noexcept
method reference (line 379) | reference operator[](const size_type i) noexcept { return data_[i]; }
method const_reference (line 380) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 419) | void map(const String& path, std::error_code& error)
method map (line 457) | void map(const handle_type handle, std::error_code& error)
method pointer (line 489) | pointer get_mapping_start() noexcept
method const_pointer (line 494) | const_pointer get_mapping_start() const noexcept
function MMap (line 566) | MMap make_mmap(const MappingToken& token,
function mmap_source (line 582) | mmap_source make_mmap_source(const MappingToken& token, mmap_source::s...
function mmap_source (line 589) | mmap_source make_mmap_source(const MappingToken& token, std::error_cod...
function mmap_sink (line 602) | mmap_sink make_mmap_sink(const MappingToken& token, mmap_sink::size_ty...
function mmap_sink (line 609) | mmap_sink make_mmap_sink(const MappingToken& token, std::error_code& e...
type detail (line 671) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type detail (line 827) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type access_mode (line 1348) | enum class access_mode
function page_size (line 1361) | inline size_t page_size()
function make_offset_page_aligned (line 1381) | inline size_t make_offset_page_aligned(size_t offset) noexcept
class basic_shared_mmap (line 1432) | class basic_shared_mmap
method basic_shared_mmap (line 1453) | basic_shared_mmap() = default;
method basic_shared_mmap (line 1454) | basic_shared_mmap(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1455) | basic_shared_mmap& operator=(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1456) | basic_shared_mmap(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1457) | basic_shared_mmap& operator=(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1460) | basic_shared_mmap(mmap_type&& mmap)
method basic_shared_mmap (line 1465) | basic_shared_mmap& operator=(mmap_type&& mmap)
method basic_shared_mmap (line 1472) | basic_shared_mmap(std::shared_ptr<mmap_type> mmap) : pimpl_(std::mov...
method basic_shared_mmap (line 1475) | basic_shared_mmap& operator=(std::shared_ptr<mmap_type> mmap)
method basic_shared_mmap (line 1488) | basic_shared_mmap(const String& path, const size_type offset = 0, co...
method basic_shared_mmap (line 1500) | basic_shared_mmap(const handle_type handle, const size_type offset =...
method get_shared_ptr (line 1516) | std::shared_ptr<mmap_type> get_shared_ptr() { return pimpl_; }
method handle_type (line 1523) | handle_type file_handle() const noexcept
method handle_type (line 1528) | handle_type mapping_handle() const noexcept
method is_open (line 1534) | bool is_open() const noexcept { return pimpl_ && pimpl_->is_open(); }
method empty (line 1541) | bool empty() const noexcept { return !pimpl_ || pimpl_->empty(); }
method size_type (line 1549) | size_type size() const noexcept { return pimpl_ ? pimpl_->length() :...
method size_type (line 1550) | size_type length() const noexcept { return pimpl_ ? pimpl_->length()...
method size_type (line 1551) | size_type mapped_length() const noexcept
method pointer (line 1563) | pointer data() noexcept { return pimpl_->data(); }
method const_pointer (line 1564) | const_pointer data() const noexcept { return pimpl_ ? pimpl_->data()...
method iterator (line 1570) | iterator begin() noexcept { return pimpl_->begin(); }
method const_iterator (line 1571) | const_iterator begin() const noexcept { return pimpl_->begin(); }
method const_iterator (line 1572) | const_iterator cbegin() const noexcept { return pimpl_->cbegin(); }
method iterator (line 1581) | iterator end() noexcept { return pimpl_->end(); }
method const_iterator (line 1582) | const_iterator end() const noexcept { return pimpl_->end(); }
method const_iterator (line 1583) | const_iterator cend() const noexcept { return pimpl_->cend(); }
method reverse_iterator (line 1593) | reverse_iterator rbegin() noexcept { return pimpl_->rbegin(); }
method const_reverse_iterator (line 1594) | const_reverse_iterator rbegin() const noexcept { return pimpl_->rbeg...
method const_reverse_iterator (line 1595) | const_reverse_iterator crbegin() const noexcept { return pimpl_->crb...
method reverse_iterator (line 1604) | reverse_iterator rend() noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1605) | const_reverse_iterator rend() const noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1606) | const_reverse_iterator crend() const noexcept { return pimpl_->crend...
method reference (line 1613) | reference operator[](const size_type i) noexcept { return (*pimpl_)[...
method const_reference (line 1614) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 1637) | void map(const String& path, const size_type offset,
method map (line 1656) | void map(const String& path, std::error_code& error)
method map (line 1680) | void map(const handle_type handle, const size_type offset,
method map (line 1697) | void map(const handle_type handle, std::error_code& error)
method unmap (line 1711) | void unmap() { if(pimpl_) pimpl_->unmap(); }
method swap (line 1713) | void swap(basic_shared_mmap& other) { pimpl_.swap(other.pimpl_); }
method sync (line 1719) | void sync(std::error_code& error) { if(pimpl_) pimpl_->sync(error); }
method map_impl (line 1755) | void map_impl(const MappingToken& token, const size_type offset,
type mio (line 166) | namespace mio {
type access_mode (line 107) | enum class access_mode
function page_size (line 120) | inline size_t page_size()
function make_offset_page_aligned (line 140) | inline size_t make_offset_page_aligned(size_t offset) noexcept
type basic_mmap (line 183) | struct basic_mmap
method basic_mmap (line 234) | basic_mmap() = default;
method basic_mmap (line 243) | basic_mmap(const String& path, const size_type offset = 0, const siz...
method basic_mmap (line 255) | basic_mmap(const handle_type handle, const size_type offset = 0, con...
method basic_mmap (line 267) | basic_mmap(const basic_mmap&) = delete;
method basic_mmap (line 269) | basic_mmap& operator=(const basic_mmap&) = delete;
method handle_type (line 283) | handle_type file_handle() const noexcept { return file_handle_; }
method is_open (line 287) | bool is_open() const noexcept { return file_handle_ != invalid_handl...
method empty (line 294) | bool empty() const noexcept { return length() == 0; }
method size_type (line 305) | size_type size() const noexcept { return length(); }
method size_type (line 306) | size_type length() const noexcept { return length_; }
method size_type (line 307) | size_type mapped_length() const noexcept { return mapped_length_; }
method size_type (line 310) | size_type mapping_offset() const noexcept
method pointer (line 322) | pointer data() noexcept { return data_; }
method const_pointer (line 323) | const_pointer data() const noexcept { return data_; }
method iterator (line 332) | iterator begin() noexcept { return data(); }
method const_iterator (line 333) | const_iterator begin() const noexcept { return data(); }
method const_iterator (line 334) | const_iterator cbegin() const noexcept { return data(); }
method iterator (line 343) | iterator end() noexcept { return data() + length(); }
method const_iterator (line 344) | const_iterator end() const noexcept { return data() + length(); }
method const_iterator (line 345) | const_iterator cend() const noexcept { return data() + length(); }
method reverse_iterator (line 355) | reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
method const_reverse_iterator (line 356) | const_reverse_iterator rbegin() const noexcept
method const_reverse_iterator (line 358) | const_reverse_iterator crbegin() const noexcept
method reverse_iterator (line 368) | reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
method const_reverse_iterator (line 369) | const_reverse_iterator rend() const noexcept
method const_reverse_iterator (line 371) | const_reverse_iterator crend() const noexcept
method reference (line 379) | reference operator[](const size_type i) noexcept { return data_[i]; }
method const_reference (line 380) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 419) | void map(const String& path, std::error_code& error)
method map (line 457) | void map(const handle_type handle, std::error_code& error)
method pointer (line 489) | pointer get_mapping_start() noexcept
method const_pointer (line 494) | const_pointer get_mapping_start() const noexcept
function MMap (line 566) | MMap make_mmap(const MappingToken& token,
function mmap_source (line 582) | mmap_source make_mmap_source(const MappingToken& token, mmap_source::s...
function mmap_source (line 589) | mmap_source make_mmap_source(const MappingToken& token, std::error_cod...
function mmap_sink (line 602) | mmap_sink make_mmap_sink(const MappingToken& token, mmap_sink::size_ty...
function mmap_sink (line 609) | mmap_sink make_mmap_sink(const MappingToken& token, std::error_code& e...
type detail (line 671) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type detail (line 827) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type access_mode (line 1348) | enum class access_mode
function page_size (line 1361) | inline size_t page_size()
function make_offset_page_aligned (line 1381) | inline size_t make_offset_page_aligned(size_t offset) noexcept
class basic_shared_mmap (line 1432) | class basic_shared_mmap
method basic_shared_mmap (line 1453) | basic_shared_mmap() = default;
method basic_shared_mmap (line 1454) | basic_shared_mmap(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1455) | basic_shared_mmap& operator=(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1456) | basic_shared_mmap(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1457) | basic_shared_mmap& operator=(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1460) | basic_shared_mmap(mmap_type&& mmap)
method basic_shared_mmap (line 1465) | basic_shared_mmap& operator=(mmap_type&& mmap)
method basic_shared_mmap (line 1472) | basic_shared_mmap(std::shared_ptr<mmap_type> mmap) : pimpl_(std::mov...
method basic_shared_mmap (line 1475) | basic_shared_mmap& operator=(std::shared_ptr<mmap_type> mmap)
method basic_shared_mmap (line 1488) | basic_shared_mmap(const String& path, const size_type offset = 0, co...
method basic_shared_mmap (line 1500) | basic_shared_mmap(const handle_type handle, const size_type offset =...
method get_shared_ptr (line 1516) | std::shared_ptr<mmap_type> get_shared_ptr() { return pimpl_; }
method handle_type (line 1523) | handle_type file_handle() const noexcept
method handle_type (line 1528) | handle_type mapping_handle() const noexcept
method is_open (line 1534) | bool is_open() const noexcept { return pimpl_ && pimpl_->is_open(); }
method empty (line 1541) | bool empty() const noexcept { return !pimpl_ || pimpl_->empty(); }
method size_type (line 1549) | size_type size() const noexcept { return pimpl_ ? pimpl_->length() :...
method size_type (line 1550) | size_type length() const noexcept { return pimpl_ ? pimpl_->length()...
method size_type (line 1551) | size_type mapped_length() const noexcept
method pointer (line 1563) | pointer data() noexcept { return pimpl_->data(); }
method const_pointer (line 1564) | const_pointer data() const noexcept { return pimpl_ ? pimpl_->data()...
method iterator (line 1570) | iterator begin() noexcept { return pimpl_->begin(); }
method const_iterator (line 1571) | const_iterator begin() const noexcept { return pimpl_->begin(); }
method const_iterator (line 1572) | const_iterator cbegin() const noexcept { return pimpl_->cbegin(); }
method iterator (line 1581) | iterator end() noexcept { return pimpl_->end(); }
method const_iterator (line 1582) | const_iterator end() const noexcept { return pimpl_->end(); }
method const_iterator (line 1583) | const_iterator cend() const noexcept { return pimpl_->cend(); }
method reverse_iterator (line 1593) | reverse_iterator rbegin() noexcept { return pimpl_->rbegin(); }
method const_reverse_iterator (line 1594) | const_reverse_iterator rbegin() const noexcept { return pimpl_->rbeg...
method const_reverse_iterator (line 1595) | const_reverse_iterator crbegin() const noexcept { return pimpl_->crb...
method reverse_iterator (line 1604) | reverse_iterator rend() noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1605) | const_reverse_iterator rend() const noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1606) | const_reverse_iterator crend() const noexcept { return pimpl_->crend...
method reference (line 1613) | reference operator[](const size_type i) noexcept { return (*pimpl_)[...
method const_reference (line 1614) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 1637) | void map(const String& path, const size_type offset,
method map (line 1656) | void map(const String& path, std::error_code& error)
method map (line 1680) | void map(const handle_type handle, const size_type offset,
method map (line 1697) | void map(const handle_type handle, std::error_code& error)
method unmap (line 1711) | void unmap() { if(pimpl_) pimpl_->unmap(); }
method swap (line 1713) | void swap(basic_shared_mmap& other) { pimpl_.swap(other.pimpl_); }
method sync (line 1719) | void sync(std::error_code& error) { if(pimpl_) pimpl_->sync(error); }
method map_impl (line 1755) | void map_impl(const MappingToken& token, const size_type offset,
type mio (line 670) | namespace mio {
type access_mode (line 107) | enum class access_mode
function page_size (line 120) | inline size_t page_size()
function make_offset_page_aligned (line 140) | inline size_t make_offset_page_aligned(size_t offset) noexcept
type basic_mmap (line 183) | struct basic_mmap
method basic_mmap (line 234) | basic_mmap() = default;
method basic_mmap (line 243) | basic_mmap(const String& path, const size_type offset = 0, const siz...
method basic_mmap (line 255) | basic_mmap(const handle_type handle, const size_type offset = 0, con...
method basic_mmap (line 267) | basic_mmap(const basic_mmap&) = delete;
method basic_mmap (line 269) | basic_mmap& operator=(const basic_mmap&) = delete;
method handle_type (line 283) | handle_type file_handle() const noexcept { return file_handle_; }
method is_open (line 287) | bool is_open() const noexcept { return file_handle_ != invalid_handl...
method empty (line 294) | bool empty() const noexcept { return length() == 0; }
method size_type (line 305) | size_type size() const noexcept { return length(); }
method size_type (line 306) | size_type length() const noexcept { return length_; }
method size_type (line 307) | size_type mapped_length() const noexcept { return mapped_length_; }
method size_type (line 310) | size_type mapping_offset() const noexcept
method pointer (line 322) | pointer data() noexcept { return data_; }
method const_pointer (line 323) | const_pointer data() const noexcept { return data_; }
method iterator (line 332) | iterator begin() noexcept { return data(); }
method const_iterator (line 333) | const_iterator begin() const noexcept { return data(); }
method const_iterator (line 334) | const_iterator cbegin() const noexcept { return data(); }
method iterator (line 343) | iterator end() noexcept { return data() + length(); }
method const_iterator (line 344) | const_iterator end() const noexcept { return data() + length(); }
method const_iterator (line 345) | const_iterator cend() const noexcept { return data() + length(); }
method reverse_iterator (line 355) | reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
method const_reverse_iterator (line 356) | const_reverse_iterator rbegin() const noexcept
method const_reverse_iterator (line 358) | const_reverse_iterator crbegin() const noexcept
method reverse_iterator (line 368) | reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
method const_reverse_iterator (line 369) | const_reverse_iterator rend() const noexcept
method const_reverse_iterator (line 371) | const_reverse_iterator crend() const noexcept
method reference (line 379) | reference operator[](const size_type i) noexcept { return data_[i]; }
method const_reference (line 380) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 419) | void map(const String& path, std::error_code& error)
method map (line 457) | void map(const handle_type handle, std::error_code& error)
method pointer (line 489) | pointer get_mapping_start() noexcept
method const_pointer (line 494) | const_pointer get_mapping_start() const noexcept
function MMap (line 566) | MMap make_mmap(const MappingToken& token,
function mmap_source (line 582) | mmap_source make_mmap_source(const MappingToken& token, mmap_source::s...
function mmap_source (line 589) | mmap_source make_mmap_source(const MappingToken& token, std::error_cod...
function mmap_sink (line 602) | mmap_sink make_mmap_sink(const MappingToken& token, mmap_sink::size_ty...
function mmap_sink (line 609) | mmap_sink make_mmap_sink(const MappingToken& token, std::error_code& e...
type detail (line 671) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type detail (line 827) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type access_mode (line 1348) | enum class access_mode
function page_size (line 1361) | inline size_t page_size()
function make_offset_page_aligned (line 1381) | inline size_t make_offset_page_aligned(size_t offset) noexcept
class basic_shared_mmap (line 1432) | class basic_shared_mmap
method basic_shared_mmap (line 1453) | basic_shared_mmap() = default;
method basic_shared_mmap (line 1454) | basic_shared_mmap(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1455) | basic_shared_mmap& operator=(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1456) | basic_shared_mmap(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1457) | basic_shared_mmap& operator=(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1460) | basic_shared_mmap(mmap_type&& mmap)
method basic_shared_mmap (line 1465) | basic_shared_mmap& operator=(mmap_type&& mmap)
method basic_shared_mmap (line 1472) | basic_shared_mmap(std::shared_ptr<mmap_type> mmap) : pimpl_(std::mov...
method basic_shared_mmap (line 1475) | basic_shared_mmap& operator=(std::shared_ptr<mmap_type> mmap)
method basic_shared_mmap (line 1488) | basic_shared_mmap(const String& path, const size_type offset = 0, co...
method basic_shared_mmap (line 1500) | basic_shared_mmap(const handle_type handle, const size_type offset =...
method get_shared_ptr (line 1516) | std::shared_ptr<mmap_type> get_shared_ptr() { return pimpl_; }
method handle_type (line 1523) | handle_type file_handle() const noexcept
method handle_type (line 1528) | handle_type mapping_handle() const noexcept
method is_open (line 1534) | bool is_open() const noexcept { return pimpl_ && pimpl_->is_open(); }
method empty (line 1541) | bool empty() const noexcept { return !pimpl_ || pimpl_->empty(); }
method size_type (line 1549) | size_type size() const noexcept { return pimpl_ ? pimpl_->length() :...
method size_type (line 1550) | size_type length() const noexcept { return pimpl_ ? pimpl_->length()...
method size_type (line 1551) | size_type mapped_length() const noexcept
method pointer (line 1563) | pointer data() noexcept { return pimpl_->data(); }
method const_pointer (line 1564) | const_pointer data() const noexcept { return pimpl_ ? pimpl_->data()...
method iterator (line 1570) | iterator begin() noexcept { return pimpl_->begin(); }
method const_iterator (line 1571) | const_iterator begin() const noexcept { return pimpl_->begin(); }
method const_iterator (line 1572) | const_iterator cbegin() const noexcept { return pimpl_->cbegin(); }
method iterator (line 1581) | iterator end() noexcept { return pimpl_->end(); }
method const_iterator (line 1582) | const_iterator end() const noexcept { return pimpl_->end(); }
method const_iterator (line 1583) | const_iterator cend() const noexcept { return pimpl_->cend(); }
method reverse_iterator (line 1593) | reverse_iterator rbegin() noexcept { return pimpl_->rbegin(); }
method const_reverse_iterator (line 1594) | const_reverse_iterator rbegin() const noexcept { return pimpl_->rbeg...
method const_reverse_iterator (line 1595) | const_reverse_iterator crbegin() const noexcept { return pimpl_->crb...
method reverse_iterator (line 1604) | reverse_iterator rend() noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1605) | const_reverse_iterator rend() const noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1606) | const_reverse_iterator crend() const noexcept { return pimpl_->crend...
method reference (line 1613) | reference operator[](const size_type i) noexcept { return (*pimpl_)[...
method const_reference (line 1614) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 1637) | void map(const String& path, const size_type offset,
method map (line 1656) | void map(const String& path, std::error_code& error)
method map (line 1680) | void map(const handle_type handle, const size_type offset,
method map (line 1697) | void map(const handle_type handle, std::error_code& error)
method unmap (line 1711) | void unmap() { if(pimpl_) pimpl_->unmap(); }
method swap (line 1713) | void swap(basic_shared_mmap& other) { pimpl_.swap(other.pimpl_); }
method sync (line 1719) | void sync(std::error_code& error) { if(pimpl_) pimpl_->sync(error); }
method map_impl (line 1755) | void map_impl(const MappingToken& token, const size_type offset,
type mio (line 826) | namespace mio {
type access_mode (line 107) | enum class access_mode
function page_size (line 120) | inline size_t page_size()
function make_offset_page_aligned (line 140) | inline size_t make_offset_page_aligned(size_t offset) noexcept
type basic_mmap (line 183) | struct basic_mmap
method basic_mmap (line 234) | basic_mmap() = default;
method basic_mmap (line 243) | basic_mmap(const String& path, const size_type offset = 0, const siz...
method basic_mmap (line 255) | basic_mmap(const handle_type handle, const size_type offset = 0, con...
method basic_mmap (line 267) | basic_mmap(const basic_mmap&) = delete;
method basic_mmap (line 269) | basic_mmap& operator=(const basic_mmap&) = delete;
method handle_type (line 283) | handle_type file_handle() const noexcept { return file_handle_; }
method is_open (line 287) | bool is_open() const noexcept { return file_handle_ != invalid_handl...
method empty (line 294) | bool empty() const noexcept { return length() == 0; }
method size_type (line 305) | size_type size() const noexcept { return length(); }
method size_type (line 306) | size_type length() const noexcept { return length_; }
method size_type (line 307) | size_type mapped_length() const noexcept { return mapped_length_; }
method size_type (line 310) | size_type mapping_offset() const noexcept
method pointer (line 322) | pointer data() noexcept { return data_; }
method const_pointer (line 323) | const_pointer data() const noexcept { return data_; }
method iterator (line 332) | iterator begin() noexcept { return data(); }
method const_iterator (line 333) | const_iterator begin() const noexcept { return data(); }
method const_iterator (line 334) | const_iterator cbegin() const noexcept { return data(); }
method iterator (line 343) | iterator end() noexcept { return data() + length(); }
method const_iterator (line 344) | const_iterator end() const noexcept { return data() + length(); }
method const_iterator (line 345) | const_iterator cend() const noexcept { return data() + length(); }
method reverse_iterator (line 355) | reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
method const_reverse_iterator (line 356) | const_reverse_iterator rbegin() const noexcept
method const_reverse_iterator (line 358) | const_reverse_iterator crbegin() const noexcept
method reverse_iterator (line 368) | reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
method const_reverse_iterator (line 369) | const_reverse_iterator rend() const noexcept
method const_reverse_iterator (line 371) | const_reverse_iterator crend() const noexcept
method reference (line 379) | reference operator[](const size_type i) noexcept { return data_[i]; }
method const_reference (line 380) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 419) | void map(const String& path, std::error_code& error)
method map (line 457) | void map(const handle_type handle, std::error_code& error)
method pointer (line 489) | pointer get_mapping_start() noexcept
method const_pointer (line 494) | const_pointer get_mapping_start() const noexcept
function MMap (line 566) | MMap make_mmap(const MappingToken& token,
function mmap_source (line 582) | mmap_source make_mmap_source(const MappingToken& token, mmap_source::s...
function mmap_source (line 589) | mmap_source make_mmap_source(const MappingToken& token, std::error_cod...
function mmap_sink (line 602) | mmap_sink make_mmap_sink(const MappingToken& token, mmap_sink::size_ty...
function mmap_sink (line 609) | mmap_sink make_mmap_sink(const MappingToken& token, std::error_code& e...
type detail (line 671) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type detail (line 827) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type access_mode (line 1348) | enum class access_mode
function page_size (line 1361) | inline size_t page_size()
function make_offset_page_aligned (line 1381) | inline size_t make_offset_page_aligned(size_t offset) noexcept
class basic_shared_mmap (line 1432) | class basic_shared_mmap
method basic_shared_mmap (line 1453) | basic_shared_mmap() = default;
method basic_shared_mmap (line 1454) | basic_shared_mmap(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1455) | basic_shared_mmap& operator=(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1456) | basic_shared_mmap(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1457) | basic_shared_mmap& operator=(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1460) | basic_shared_mmap(mmap_type&& mmap)
method basic_shared_mmap (line 1465) | basic_shared_mmap& operator=(mmap_type&& mmap)
method basic_shared_mmap (line 1472) | basic_shared_mmap(std::shared_ptr<mmap_type> mmap) : pimpl_(std::mov...
method basic_shared_mmap (line 1475) | basic_shared_mmap& operator=(std::shared_ptr<mmap_type> mmap)
method basic_shared_mmap (line 1488) | basic_shared_mmap(const String& path, const size_type offset = 0, co...
method basic_shared_mmap (line 1500) | basic_shared_mmap(const handle_type handle, const size_type offset =...
method get_shared_ptr (line 1516) | std::shared_ptr<mmap_type> get_shared_ptr() { return pimpl_; }
method handle_type (line 1523) | handle_type file_handle() const noexcept
method handle_type (line 1528) | handle_type mapping_handle() const noexcept
method is_open (line 1534) | bool is_open() const noexcept { return pimpl_ && pimpl_->is_open(); }
method empty (line 1541) | bool empty() const noexcept { return !pimpl_ || pimpl_->empty(); }
method size_type (line 1549) | size_type size() const noexcept { return pimpl_ ? pimpl_->length() :...
method size_type (line 1550) | size_type length() const noexcept { return pimpl_ ? pimpl_->length()...
method size_type (line 1551) | size_type mapped_length() const noexcept
method pointer (line 1563) | pointer data() noexcept { return pimpl_->data(); }
method const_pointer (line 1564) | const_pointer data() const noexcept { return pimpl_ ? pimpl_->data()...
method iterator (line 1570) | iterator begin() noexcept { return pimpl_->begin(); }
method const_iterator (line 1571) | const_iterator begin() const noexcept { return pimpl_->begin(); }
method const_iterator (line 1572) | const_iterator cbegin() const noexcept { return pimpl_->cbegin(); }
method iterator (line 1581) | iterator end() noexcept { return pimpl_->end(); }
method const_iterator (line 1582) | const_iterator end() const noexcept { return pimpl_->end(); }
method const_iterator (line 1583) | const_iterator cend() const noexcept { return pimpl_->cend(); }
method reverse_iterator (line 1593) | reverse_iterator rbegin() noexcept { return pimpl_->rbegin(); }
method const_reverse_iterator (line 1594) | const_reverse_iterator rbegin() const noexcept { return pimpl_->rbeg...
method const_reverse_iterator (line 1595) | const_reverse_iterator crbegin() const noexcept { return pimpl_->crb...
method reverse_iterator (line 1604) | reverse_iterator rend() noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1605) | const_reverse_iterator rend() const noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1606) | const_reverse_iterator crend() const noexcept { return pimpl_->crend...
method reference (line 1613) | reference operator[](const size_type i) noexcept { return (*pimpl_)[...
method const_reference (line 1614) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 1637) | void map(const String& path, const size_type offset,
method map (line 1656) | void map(const String& path, std::error_code& error)
method map (line 1680) | void map(const handle_type handle, const size_type offset,
method map (line 1697) | void map(const handle_type handle, std::error_code& error)
method unmap (line 1711) | void unmap() { if(pimpl_) pimpl_->unmap(); }
method swap (line 1713) | void swap(basic_shared_mmap& other) { pimpl_.swap(other.pimpl_); }
method sync (line 1719) | void sync(std::error_code& error) { if(pimpl_) pimpl_->sync(error); }
method map_impl (line 1755) | void map_impl(const MappingToken& token, const size_type offset,
type mio (line 1342) | namespace mio {
type access_mode (line 107) | enum class access_mode
function page_size (line 120) | inline size_t page_size()
function make_offset_page_aligned (line 140) | inline size_t make_offset_page_aligned(size_t offset) noexcept
type basic_mmap (line 183) | struct basic_mmap
method basic_mmap (line 234) | basic_mmap() = default;
method basic_mmap (line 243) | basic_mmap(const String& path, const size_type offset = 0, const siz...
method basic_mmap (line 255) | basic_mmap(const handle_type handle, const size_type offset = 0, con...
method basic_mmap (line 267) | basic_mmap(const basic_mmap&) = delete;
method basic_mmap (line 269) | basic_mmap& operator=(const basic_mmap&) = delete;
method handle_type (line 283) | handle_type file_handle() const noexcept { return file_handle_; }
method is_open (line 287) | bool is_open() const noexcept { return file_handle_ != invalid_handl...
method empty (line 294) | bool empty() const noexcept { return length() == 0; }
method size_type (line 305) | size_type size() const noexcept { return length(); }
method size_type (line 306) | size_type length() const noexcept { return length_; }
method size_type (line 307) | size_type mapped_length() const noexcept { return mapped_length_; }
method size_type (line 310) | size_type mapping_offset() const noexcept
method pointer (line 322) | pointer data() noexcept { return data_; }
method const_pointer (line 323) | const_pointer data() const noexcept { return data_; }
method iterator (line 332) | iterator begin() noexcept { return data(); }
method const_iterator (line 333) | const_iterator begin() const noexcept { return data(); }
method const_iterator (line 334) | const_iterator cbegin() const noexcept { return data(); }
method iterator (line 343) | iterator end() noexcept { return data() + length(); }
method const_iterator (line 344) | const_iterator end() const noexcept { return data() + length(); }
method const_iterator (line 345) | const_iterator cend() const noexcept { return data() + length(); }
method reverse_iterator (line 355) | reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
method const_reverse_iterator (line 356) | const_reverse_iterator rbegin() const noexcept
method const_reverse_iterator (line 358) | const_reverse_iterator crbegin() const noexcept
method reverse_iterator (line 368) | reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
method const_reverse_iterator (line 369) | const_reverse_iterator rend() const noexcept
method const_reverse_iterator (line 371) | const_reverse_iterator crend() const noexcept
method reference (line 379) | reference operator[](const size_type i) noexcept { return data_[i]; }
method const_reference (line 380) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 419) | void map(const String& path, std::error_code& error)
method map (line 457) | void map(const handle_type handle, std::error_code& error)
method pointer (line 489) | pointer get_mapping_start() noexcept
method const_pointer (line 494) | const_pointer get_mapping_start() const noexcept
function MMap (line 566) | MMap make_mmap(const MappingToken& token,
function mmap_source (line 582) | mmap_source make_mmap_source(const MappingToken& token, mmap_source::s...
function mmap_source (line 589) | mmap_source make_mmap_source(const MappingToken& token, std::error_cod...
function mmap_sink (line 602) | mmap_sink make_mmap_sink(const MappingToken& token, mmap_sink::size_ty...
function mmap_sink (line 609) | mmap_sink make_mmap_sink(const MappingToken& token, std::error_code& e...
type detail (line 671) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type detail (line 827) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type access_mode (line 1348) | enum class access_mode
function page_size (line 1361) | inline size_t page_size()
function make_offset_page_aligned (line 1381) | inline size_t make_offset_page_aligned(size_t offset) noexcept
class basic_shared_mmap (line 1432) | class basic_shared_mmap
method basic_shared_mmap (line 1453) | basic_shared_mmap() = default;
method basic_shared_mmap (line 1454) | basic_shared_mmap(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1455) | basic_shared_mmap& operator=(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1456) | basic_shared_mmap(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1457) | basic_shared_mmap& operator=(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1460) | basic_shared_mmap(mmap_type&& mmap)
method basic_shared_mmap (line 1465) | basic_shared_mmap& operator=(mmap_type&& mmap)
method basic_shared_mmap (line 1472) | basic_shared_mmap(std::shared_ptr<mmap_type> mmap) : pimpl_(std::mov...
method basic_shared_mmap (line 1475) | basic_shared_mmap& operator=(std::shared_ptr<mmap_type> mmap)
method basic_shared_mmap (line 1488) | basic_shared_mmap(const String& path, const size_type offset = 0, co...
method basic_shared_mmap (line 1500) | basic_shared_mmap(const handle_type handle, const size_type offset =...
method get_shared_ptr (line 1516) | std::shared_ptr<mmap_type> get_shared_ptr() { return pimpl_; }
method handle_type (line 1523) | handle_type file_handle() const noexcept
method handle_type (line 1528) | handle_type mapping_handle() const noexcept
method is_open (line 1534) | bool is_open() const noexcept { return pimpl_ && pimpl_->is_open(); }
method empty (line 1541) | bool empty() const noexcept { return !pimpl_ || pimpl_->empty(); }
method size_type (line 1549) | size_type size() const noexcept { return pimpl_ ? pimpl_->length() :...
method size_type (line 1550) | size_type length() const noexcept { return pimpl_ ? pimpl_->length()...
method size_type (line 1551) | size_type mapped_length() const noexcept
method pointer (line 1563) | pointer data() noexcept { return pimpl_->data(); }
method const_pointer (line 1564) | const_pointer data() const noexcept { return pimpl_ ? pimpl_->data()...
method iterator (line 1570) | iterator begin() noexcept { return pimpl_->begin(); }
method const_iterator (line 1571) | const_iterator begin() const noexcept { return pimpl_->begin(); }
method const_iterator (line 1572) | const_iterator cbegin() const noexcept { return pimpl_->cbegin(); }
method iterator (line 1581) | iterator end() noexcept { return pimpl_->end(); }
method const_iterator (line 1582) | const_iterator end() const noexcept { return pimpl_->end(); }
method const_iterator (line 1583) | const_iterator cend() const noexcept { return pimpl_->cend(); }
method reverse_iterator (line 1593) | reverse_iterator rbegin() noexcept { return pimpl_->rbegin(); }
method const_reverse_iterator (line 1594) | const_reverse_iterator rbegin() const noexcept { return pimpl_->rbeg...
method const_reverse_iterator (line 1595) | const_reverse_iterator crbegin() const noexcept { return pimpl_->crb...
method reverse_iterator (line 1604) | reverse_iterator rend() noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1605) | const_reverse_iterator rend() const noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1606) | const_reverse_iterator crend() const noexcept { return pimpl_->crend...
method reference (line 1613) | reference operator[](const size_type i) noexcept { return (*pimpl_)[...
method const_reference (line 1614) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 1637) | void map(const String& path, const size_type offset,
method map (line 1656) | void map(const String& path, std::error_code& error)
method map (line 1680) | void map(const handle_type handle, const size_type offset,
method map (line 1697) | void map(const handle_type handle, std::error_code& error)
method unmap (line 1711) | void unmap() { if(pimpl_) pimpl_->unmap(); }
method swap (line 1713) | void swap(basic_shared_mmap& other) { pimpl_.swap(other.pimpl_); }
method sync (line 1719) | void sync(std::error_code& error) { if(pimpl_) pimpl_->sync(error); }
method map_impl (line 1755) | void map_impl(const MappingToken& token, const size_type offset,
type mio (line 1420) | namespace mio {
type access_mode (line 107) | enum class access_mode
function page_size (line 120) | inline size_t page_size()
function make_offset_page_aligned (line 140) | inline size_t make_offset_page_aligned(size_t offset) noexcept
type basic_mmap (line 183) | struct basic_mmap
method basic_mmap (line 234) | basic_mmap() = default;
method basic_mmap (line 243) | basic_mmap(const String& path, const size_type offset = 0, const siz...
method basic_mmap (line 255) | basic_mmap(const handle_type handle, const size_type offset = 0, con...
method basic_mmap (line 267) | basic_mmap(const basic_mmap&) = delete;
method basic_mmap (line 269) | basic_mmap& operator=(const basic_mmap&) = delete;
method handle_type (line 283) | handle_type file_handle() const noexcept { return file_handle_; }
method is_open (line 287) | bool is_open() const noexcept { return file_handle_ != invalid_handl...
method empty (line 294) | bool empty() const noexcept { return length() == 0; }
method size_type (line 305) | size_type size() const noexcept { return length(); }
method size_type (line 306) | size_type length() const noexcept { return length_; }
method size_type (line 307) | size_type mapped_length() const noexcept { return mapped_length_; }
method size_type (line 310) | size_type mapping_offset() const noexcept
method pointer (line 322) | pointer data() noexcept { return data_; }
method const_pointer (line 323) | const_pointer data() const noexcept { return data_; }
method iterator (line 332) | iterator begin() noexcept { return data(); }
method const_iterator (line 333) | const_iterator begin() const noexcept { return data(); }
method const_iterator (line 334) | const_iterator cbegin() const noexcept { return data(); }
method iterator (line 343) | iterator end() noexcept { return data() + length(); }
method const_iterator (line 344) | const_iterator end() const noexcept { return data() + length(); }
method const_iterator (line 345) | const_iterator cend() const noexcept { return data() + length(); }
method reverse_iterator (line 355) | reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
method const_reverse_iterator (line 356) | const_reverse_iterator rbegin() const noexcept
method const_reverse_iterator (line 358) | const_reverse_iterator crbegin() const noexcept
method reverse_iterator (line 368) | reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
method const_reverse_iterator (line 369) | const_reverse_iterator rend() const noexcept
method const_reverse_iterator (line 371) | const_reverse_iterator crend() const noexcept
method reference (line 379) | reference operator[](const size_type i) noexcept { return data_[i]; }
method const_reference (line 380) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 419) | void map(const String& path, std::error_code& error)
method map (line 457) | void map(const handle_type handle, std::error_code& error)
method pointer (line 489) | pointer get_mapping_start() noexcept
method const_pointer (line 494) | const_pointer get_mapping_start() const noexcept
function MMap (line 566) | MMap make_mmap(const MappingToken& token,
function mmap_source (line 582) | mmap_source make_mmap_source(const MappingToken& token, mmap_source::s...
function mmap_source (line 589) | mmap_source make_mmap_source(const MappingToken& token, std::error_cod...
function mmap_sink (line 602) | mmap_sink make_mmap_sink(const MappingToken& token, mmap_sink::size_ty...
function mmap_sink (line 609) | mmap_sink make_mmap_sink(const MappingToken& token, std::error_code& e...
type detail (line 671) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type detail (line 827) | namespace detail {
type char_type_helper (line 683) | struct char_type_helper {
type char_type (line 688) | struct char_type {
type char_type<char*> (line 694) | struct char_type<char*> {
type char_type<const char*> (line 699) | struct char_type<const char*> {
type char_type<char[N]> (line 704) | struct char_type<char[N]> {
type char_type<const char[N]> (line 709) | struct char_type<const char[N]> {
type char_type<wchar_t*> (line 715) | struct char_type<wchar_t*> {
type char_type<const wchar_t*> (line 720) | struct char_type<const wchar_t*> {
type char_type<wchar_t[N]> (line 725) | struct char_type<wchar_t[N]> {
type char_type<const wchar_t[N]> (line 730) | struct char_type<const wchar_t[N]> {
type is_c_str_helper (line 736) | struct is_c_str_helper
type is_c_str (line 754) | struct is_c_str
type is_c_wstr (line 761) | struct is_c_wstr
type is_c_str_or_c_wstr (line 768) | struct is_c_str_or_c_wstr
function empty (line 790) | bool empty(const String& path)
function empty (line 806) | bool empty(String path)
type win (line 830) | namespace win {
function DWORD (line 833) | inline DWORD int64_high(int64_t n) noexcept
function DWORD (line 839) | inline DWORD int64_low(int64_t n) noexcept
function file_handle_type (line 849) | file_handle_type open_file_helper(const String& path, const access...
function open_file_helper (line 861) | typename std::enable_if<
function last_error (line 882) | inline std::error_code last_error() noexcept
function file_handle_type (line 894) | file_handle_type open_file(const String& path, const access_mode mode,
function query_file_size (line 916) | inline size_t query_file_size(file_handle_type handle, std::error_co...
type mmap_context (line 938) | struct mmap_context
function mmap_context (line 948) | inline mmap_context memory_map(const file_handle_type file_handle, c...
type access_mode (line 1348) | enum class access_mode
function page_size (line 1361) | inline size_t page_size()
function make_offset_page_aligned (line 1381) | inline size_t make_offset_page_aligned(size_t offset) noexcept
class basic_shared_mmap (line 1432) | class basic_shared_mmap
method basic_shared_mmap (line 1453) | basic_shared_mmap() = default;
method basic_shared_mmap (line 1454) | basic_shared_mmap(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1455) | basic_shared_mmap& operator=(const basic_shared_mmap&) = default;
method basic_shared_mmap (line 1456) | basic_shared_mmap(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1457) | basic_shared_mmap& operator=(basic_shared_mmap&&) = default;
method basic_shared_mmap (line 1460) | basic_shared_mmap(mmap_type&& mmap)
method basic_shared_mmap (line 1465) | basic_shared_mmap& operator=(mmap_type&& mmap)
method basic_shared_mmap (line 1472) | basic_shared_mmap(std::shared_ptr<mmap_type> mmap) : pimpl_(std::mov...
method basic_shared_mmap (line 1475) | basic_shared_mmap& operator=(std::shared_ptr<mmap_type> mmap)
method basic_shared_mmap (line 1488) | basic_shared_mmap(const String& path, const size_type offset = 0, co...
method basic_shared_mmap (line 1500) | basic_shared_mmap(const handle_type handle, const size_type offset =...
method get_shared_ptr (line 1516) | std::shared_ptr<mmap_type> get_shared_ptr() { return pimpl_; }
method handle_type (line 1523) | handle_type file_handle() const noexcept
method handle_type (line 1528) | handle_type mapping_handle() const noexcept
method is_open (line 1534) | bool is_open() const noexcept { return pimpl_ && pimpl_->is_open(); }
method empty (line 1541) | bool empty() const noexcept { return !pimpl_ || pimpl_->empty(); }
method size_type (line 1549) | size_type size() const noexcept { return pimpl_ ? pimpl_->length() :...
method size_type (line 1550) | size_type length() const noexcept { return pimpl_ ? pimpl_->length()...
method size_type (line 1551) | size_type mapped_length() const noexcept
method pointer (line 1563) | pointer data() noexcept { return pimpl_->data(); }
method const_pointer (line 1564) | const_pointer data() const noexcept { return pimpl_ ? pimpl_->data()...
method iterator (line 1570) | iterator begin() noexcept { return pimpl_->begin(); }
method const_iterator (line 1571) | const_iterator begin() const noexcept { return pimpl_->begin(); }
method const_iterator (line 1572) | const_iterator cbegin() const noexcept { return pimpl_->cbegin(); }
method iterator (line 1581) | iterator end() noexcept { return pimpl_->end(); }
method const_iterator (line 1582) | const_iterator end() const noexcept { return pimpl_->end(); }
method const_iterator (line 1583) | const_iterator cend() const noexcept { return pimpl_->cend(); }
method reverse_iterator (line 1593) | reverse_iterator rbegin() noexcept { return pimpl_->rbegin(); }
method const_reverse_iterator (line 1594) | const_reverse_iterator rbegin() const noexcept { return pimpl_->rbeg...
method const_reverse_iterator (line 1595) | const_reverse_iterator crbegin() const noexcept { return pimpl_->crb...
method reverse_iterator (line 1604) | reverse_iterator rend() noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1605) | const_reverse_iterator rend() const noexcept { return pimpl_->rend(); }
method const_reverse_iterator (line 1606) | const_reverse_iterator crend() const noexcept { return pimpl_->crend...
method reference (line 1613) | reference operator[](const size_type i) noexcept { return (*pimpl_)[...
method const_reference (line 1614) | const_reference operator[](const size_type i) const noexcept { retur...
method map (line 1637) | void map(const String& path, const size_type offset,
method map (line 1656) | void map(const String& path, std::error_code& error)
method map (line 1680) | void map(const handle_type handle, const size_type offset,
method map (line 1697) | void map(const handle_type handle, std::error_code& error)
method unmap (line 1711) | void unmap() { if(pimpl_) pimpl_->unmap(); }
method swap (line 1713) | void swap(basic_shared_mmap& other) { pimpl_.swap(other.pimpl_); }
method sync (line 1719) | void sync(std::error_code& error) { if(pimpl_) pimpl_->sync(error); }
method map_impl (line 1755) | void map_impl(const MappingToken& token, const size_type offset,
type nonstd (line 1961) | namespace nonstd {
function to_string (line 1964) | std::basic_string<CharT, Traits, Allocator>
function to_string_view (line 1971) | std::basic_string_view<CharT, Traits>
type literals (line 1987) | inline namespace literals {
type string_view_literals (line 1988) | inline namespace string_view_literals {
type sv_lite (line 2249) | namespace sv_lite {
class basic_string_view (line 2256) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
class basic_string_view (line 2267) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
function nssv_constexpr (line 2761) | nssv_constexpr bool operator== (
function nssv_constexpr (line 2767) | nssv_constexpr bool operator!= (
function nssv_constexpr (line 2773) | nssv_constexpr bool operator< (
function nssv_constexpr (line 2779) | nssv_constexpr bool operator<= (
function nssv_constexpr (line 2785) | nssv_constexpr bool operator> (
function nssv_constexpr (line 2791) | nssv_constexpr bool operator>= (
class Traits (line 2813) | class Traits
function nssv_constexpr (line 2814) | nssv_constexpr bool operator==(
class Traits (line 2819) | class Traits
function nssv_constexpr (line 2820) | nssv_constexpr bool operator==(
class Traits (line 2827) | class Traits
function nssv_constexpr (line 2828) | nssv_constexpr bool operator!= (
class Traits (line 2833) | class Traits
function nssv_constexpr (line 2834) | nssv_constexpr bool operator!= (
class Traits (line 2841) | class Traits
function nssv_constexpr (line 2842) | nssv_constexpr bool operator< (
class Traits (line 2847) | class Traits
function nssv_constexpr (line 2848) | nssv_constexpr bool operator< (
class Traits (line 2855) | class Traits
function nssv_constexpr (line 2856) | nssv_constexpr bool operator<= (
class Traits (line 2861) | class Traits
function nssv_constexpr (line 2862) | nssv_constexpr bool operator<= (
class Traits (line 2869) | class Traits
function nssv_constexpr (line 2870) | nssv_constexpr bool operator> (
class Traits (line 2875) | class Traits
function nssv_constexpr (line 2876) | nssv_constexpr bool operator> (
class Traits (line 2883) | class Traits
function nssv_constexpr (line 2884) | nssv_constexpr bool operator>= (
class Traits (line 2889) | class Traits
function nssv_constexpr (line 2890) | nssv_constexpr bool operator>= (
type detail (line 2902) | namespace detail {
function write_padding (line 2905) | void write_padding( Stream & os, std::streamsize n )
function Stream (line 2912) | Stream & write_to_stream( Stream & os, View const & sv )
function to_string (line 3038) | std::basic_string<CharT, Traits, Allocator>
function to_string (line 3047) | std::basic_string<CharT, Traits>
function to_string (line 3054) | std::basic_string<CharT, Traits, Allocator>
function to_string_view (line 3063) | basic_string_view<CharT, Traits>
function nssv_inline_ns (line 2969) | nssv_inline_ns namespace literals {
type sv_lite (line 3031) | namespace sv_lite {
class basic_string_view (line 2256) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
class basic_string_view (line 2267) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
function nssv_constexpr (line 2761) | nssv_constexpr bool operator== (
function nssv_constexpr (line 2767) | nssv_constexpr bool operator!= (
function nssv_constexpr (line 2773) | nssv_constexpr bool operator< (
function nssv_constexpr (line 2779) | nssv_constexpr bool operator<= (
function nssv_constexpr (line 2785) | nssv_constexpr bool operator> (
function nssv_constexpr (line 2791) | nssv_constexpr bool operator>= (
class Traits (line 2813) | class Traits
function nssv_constexpr (line 2814) | nssv_constexpr bool operator==(
class Traits (line 2819) | class Traits
function nssv_constexpr (line 2820) | nssv_constexpr bool operator==(
class Traits (line 2827) | class Traits
function nssv_constexpr (line 2828) | nssv_constexpr bool operator!= (
class Traits (line 2833) | class Traits
function nssv_constexpr (line 2834) | nssv_constexpr bool operator!= (
class Traits (line 2841) | class Traits
function nssv_constexpr (line 2842) | nssv_constexpr bool operator< (
class Traits (line 2847) | class Traits
function nssv_constexpr (line 2848) | nssv_constexpr bool operator< (
class Traits (line 2855) | class Traits
function nssv_constexpr (line 2856) | nssv_constexpr bool operator<= (
class Traits (line 2861) | class Traits
function nssv_constexpr (line 2862) | nssv_constexpr bool operator<= (
class Traits (line 2869) | class Traits
function nssv_constexpr (line 2870) | nssv_constexpr bool operator> (
class Traits (line 2875) | class Traits
function nssv_constexpr (line 2876) | nssv_constexpr bool operator> (
class Traits (line 2883) | class Traits
function nssv_constexpr (line 2884) | nssv_constexpr bool operator>= (
class Traits (line 2889) | class Traits
function nssv_constexpr (line 2890) | nssv_constexpr bool operator>= (
type detail (line 2902) | namespace detail {
function write_padding (line 2905) | void write_padding( Stream & os, std::streamsize n )
function Stream (line 2912) | Stream & write_to_stream( Stream & os, View const & sv )
function to_string (line 3038) | std::basic_string<CharT, Traits, Allocator>
function to_string (line 3047) | std::basic_string<CharT, Traits>
function to_string (line 3054) | std::basic_string<CharT, Traits, Allocator>
function to_string_view (line 3063) | basic_string_view<CharT, Traits>
type nonstd (line 2019) | namespace nonstd {
function to_string (line 1964) | std::basic_string<CharT, Traits, Allocator>
function to_string_view (line 1971) | std::basic_string_view<CharT, Traits>
type literals (line 1987) | inline namespace literals {
type string_view_literals (line 1988) | inline namespace string_view_literals {
type sv_lite (line 2249) | namespace sv_lite {
class basic_string_view (line 2256) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
class basic_string_view (line 2267) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
function nssv_constexpr (line 2761) | nssv_constexpr bool operator== (
function nssv_constexpr (line 2767) | nssv_constexpr bool operator!= (
function nssv_constexpr (line 2773) | nssv_constexpr bool operator< (
function nssv_constexpr (line 2779) | nssv_constexpr bool operator<= (
function nssv_constexpr (line 2785) | nssv_constexpr bool operator> (
function nssv_constexpr (line 2791) | nssv_constexpr bool operator>= (
class Traits (line 2813) | class Traits
function nssv_constexpr (line 2814) | nssv_constexpr bool operator==(
class Traits (line 2819) | class Traits
function nssv_constexpr (line 2820) | nssv_constexpr bool operator==(
class Traits (line 2827) | class Traits
function nssv_constexpr (line 2828) | nssv_constexpr bool operator!= (
class Traits (line 2833) | class Traits
function nssv_constexpr (line 2834) | nssv_constexpr bool operator!= (
class Traits (line 2841) | class Traits
function nssv_constexpr (line 2842) | nssv_constexpr bool operator< (
class Traits (line 2847) | class Traits
function nssv_constexpr (line 2848) | nssv_constexpr bool operator< (
class Traits (line 2855) | class Traits
function nssv_constexpr (line 2856) | nssv_constexpr bool operator<= (
class Traits (line 2861) | class Traits
function nssv_constexpr (line 2862) | nssv_constexpr bool operator<= (
class Traits (line 2869) | class Traits
function nssv_constexpr (line 2870) | nssv_constexpr bool operator> (
class Traits (line 2875) | class Traits
function nssv_constexpr (line 2876) | nssv_constexpr bool operator> (
class Traits (line 2883) | class Traits
function nssv_constexpr (line 2884) | nssv_constexpr bool operator>= (
class Traits (line 2889) | class Traits
function nssv_constexpr (line 2890) | nssv_constexpr bool operator>= (
type detail (line 2902) | namespace detail {
function write_padding (line 2905) | void write_padding( Stream & os, std::streamsize n )
function Stream (line 2912) | Stream & write_to_stream( Stream & os, View const & sv )
function to_string (line 3038) | std::basic_string<CharT, Traits, Allocator>
function to_string (line 3047) | std::basic_string<CharT, Traits>
function to_string (line 3054) | std::basic_string<CharT, Traits, Allocator>
function to_string_view (line 3063) | basic_string_view<CharT, Traits>
function nssv_inline_ns (line 2969) | nssv_inline_ns namespace literals {
type sv_lite (line 3031) | namespace sv_lite {
class basic_string_view (line 2256) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
class basic_string_view (line 2267) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
function nssv_constexpr (line 2761) | nssv_constexpr bool operator== (
function nssv_constexpr (line 2767) | nssv_constexpr bool operator!= (
function nssv_constexpr (line 2773) | nssv_constexpr bool operator< (
function nssv_constexpr (line 2779) | nssv_constexpr bool operator<= (
function nssv_constexpr (line 2785) | nssv_constexpr bool operator> (
function nssv_constexpr (line 2791) | nssv_constexpr bool operator>= (
class Traits (line 2813) | class Traits
function nssv_constexpr (line 2814) | nssv_constexpr bool operator==(
class Traits (line 2819) | class Traits
function nssv_constexpr (line 2820) | nssv_constexpr bool operator==(
class Traits (line 2827) | class Traits
function nssv_constexpr (line 2828) | nssv_constexpr bool operator!= (
class Traits (line 2833) | class Traits
function nssv_constexpr (line 2834) | nssv_constexpr bool operator!= (
class Traits (line 2841) | class Traits
function nssv_constexpr (line 2842) | nssv_constexpr bool operator< (
class Traits (line 2847) | class Traits
function nssv_constexpr (line 2848) | nssv_constexpr bool operator< (
class Traits (line 2855) | class Traits
function nssv_constexpr (line 2856) | nssv_constexpr bool operator<= (
class Traits (line 2861) | class Traits
function nssv_constexpr (line 2862) | nssv_constexpr bool operator<= (
class Traits (line 2869) | class Traits
function nssv_constexpr (line 2870) | nssv_constexpr bool operator> (
class Traits (line 2875) | class Traits
function nssv_constexpr (line 2876) | nssv_constexpr bool operator> (
class Traits (line 2883) | class Traits
function nssv_constexpr (line 2884) | nssv_constexpr bool operator>= (
class Traits (line 2889) | class Traits
function nssv_constexpr (line 2890) | nssv_constexpr bool operator>= (
type detail (line 2902) | namespace detail {
function write_padding (line 2905) | void write_padding( Stream & os, std::streamsize n )
function Stream (line 2912) | Stream & write_to_stream( Stream & os, View const & sv )
function to_string (line 3038) | std::basic_string<CharT, Traits, Allocator>
function to_string (line 3047) | std::basic_string<CharT, Traits>
function to_string (line 3054) | std::basic_string<CharT, Traits, Allocator>
function to_string_view (line 3063) | basic_string_view<CharT, Traits>
type nonstd (line 2249) | namespace nonstd { namespace sv_lite {
function to_string (line 1964) | std::basic_string<CharT, Traits, Allocator>
function to_string_view (line 1971) | std::basic_string_view<CharT, Traits>
type literals (line 1987) | inline namespace literals {
type string_view_literals (line 1988) | inline namespace string_view_literals {
type sv_lite (line 2249) | namespace sv_lite {
class basic_string_view (line 2256) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
class basic_string_view (line 2267) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
function nssv_constexpr (line 2761) | nssv_constexpr bool operator== (
function nssv_constexpr (line 2767) | nssv_constexpr bool operator!= (
function nssv_constexpr (line 2773) | nssv_constexpr bool operator< (
function nssv_constexpr (line 2779) | nssv_constexpr bool operator<= (
function nssv_constexpr (line 2785) | nssv_constexpr bool operator> (
function nssv_constexpr (line 2791) | nssv_constexpr bool operator>= (
class Traits (line 2813) | class Traits
function nssv_constexpr (line 2814) | nssv_constexpr bool operator==(
class Traits (line 2819) | class Traits
function nssv_constexpr (line 2820) | nssv_constexpr bool operator==(
class Traits (line 2827) | class Traits
function nssv_constexpr (line 2828) | nssv_constexpr bool operator!= (
class Traits (line 2833) | class Traits
function nssv_constexpr (line 2834) | nssv_constexpr bool operator!= (
class Traits (line 2841) | class Traits
function nssv_constexpr (line 2842) | nssv_constexpr bool operator< (
class Traits (line 2847) | class Traits
function nssv_constexpr (line 2848) | nssv_constexpr bool operator< (
class Traits (line 2855) | class Traits
function nssv_constexpr (line 2856) | nssv_constexpr bool operator<= (
class Traits (line 2861) | class Traits
function nssv_constexpr (line 2862) | nssv_constexpr bool operator<= (
class Traits (line 2869) | class Traits
function nssv_constexpr (line 2870) | nssv_constexpr bool operator> (
class Traits (line 2875) | class Traits
function nssv_constexpr (line 2876) | nssv_constexpr bool operator> (
class Traits (line 2883) | class Traits
function nssv_constexpr (line 2884) | nssv_constexpr bool operator>= (
class Traits (line 2889) | class Traits
function nssv_constexpr (line 2890) | nssv_constexpr bool operator>= (
type detail (line 2902) | namespace detail {
function write_padding (line 2905) | void write_padding( Stream & os, std::streamsize n )
function Stream (line 2912) | Stream & write_to_stream( Stream & os, View const & sv )
function to_string (line 3038) | std::basic_string<CharT, Traits, Allocator>
function to_string (line 3047) | std::basic_string<CharT, Traits>
function to_string (line 3054) | std::basic_string<CharT, Traits, Allocator>
function to_string_view (line 3063) | basic_string_view<CharT, Traits>
function nssv_inline_ns (line 2969) | nssv_inline_ns namespace literals {
type sv_lite (line 3031) | namespace sv_lite {
class basic_string_view (line 2256) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos = size_type(-1) }
type not_in_view (line 2670) | struct not_in_view
method nssv_constexpr (line 2674) | nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {}
method nssv_constexpr (line 2676) | nssv_constexpr bool operator()( CharT c ) const
method nssv_constexpr (line 2682) | nssv_constexpr size_type to_pos( const_iterator it ) const
method nssv_constexpr (line 2687) | nssv_constexpr size_type to_pos( const_reverse_iterator it ) const
method data_at (line 2692) | data_at( size_type pos ) const
method basic_string_view (line 2709) | basic_string_view( std::basic_string<CharT, Traits, Allocator> con...
method to_string (line 2727) | std::basic_string<CharT, Traits, Allocator>
method to_string (line 2735) | std::basic_string<CharT, Traits>
method to_string (line 2742) | std::basic_string<CharT, Traits, Allocator>
class basic_string_view (line 2267) | class basic_string_view
method nssv_constexpr (line 2296) | nssv_constexpr basic_string_view( basic_string_view const & other ...
method begin (line 2329) | begin() const nssv_noexcept { return data_; }
method end (line 2330) | end() const nssv_noexcept { return data_ + size_; }
method cbegin (line 2332) | cbegin() const nssv_noexcept { return begin(); }
method cend (line 2333) | cend() const nssv_noexcept { return end(); }
method rbegin (line 2335) | rbegin() const nssv_noexcept { return const_reverse_iterator( end...
method rend (line 2336) | rend() const nssv_noexcept { return const_reverse_iterator( beg...
method crbegin (line 2338) | crbegin() const nssv_noexcept { return rbegin(); }
method crend (line 2339) | crend() const nssv_noexcept { return rend(); }
method nssv_constexpr (line 2343) | nssv_constexpr size_type size() const nssv_noexcept { return s...
method nssv_constexpr (line 2344) | nssv_constexpr size_type length() const nssv_noexcept { return s...
method nssv_constexpr (line 2345) | nssv_constexpr size_type max_size() const nssv_noexcept { return (...
method empty (line 2348) | bool empty() const nssv_noexcept
method at (line 2360) | at( size_type pos ) const
method front (line 2373) | front() const { return data_at( 0 ); }
method back (line 2374) | back() const { return data_at( size() - 1 ); }
method data (line 2376) | data() const nssv_noexcept { return data_; }
method nssv_constexpr14 (line 2380) | nssv_constexpr14 void remove_prefix( size_type n )
method nssv_constexpr14 (line 2387) | nssv_constexpr14 void remove_suffix( size_type n )
method nssv_constexpr14 (line 2393) | nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept
method size_type (line 2402) | size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const
method substr (line 2419) | substr( size_type pos = 0, size_type n = npos ) const
method nssv_constexpr14 (line 2434) | nssv_constexpr14 int compare( basic_string_view other ) const nssv...
method nssv_constexpr (line 2442) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2447) | nssv_constexpr int compare( size_type pos1, size_type n1, basic_st...
method nssv_constexpr (line 2452) | nssv_constexpr int compare( CharT const * s ) const // (4)
method nssv_constexpr (line 2457) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2462) | nssv_constexpr int compare( size_type pos1, size_type n1, CharT co...
method nssv_constexpr (line 2471) | nssv_constexpr bool starts_with( basic_string_view v ) const nssv_...
method nssv_constexpr (line 2476) | nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept //...
method nssv_constexpr (line 2481) | nssv_constexpr bool starts_with( CharT const * s ) const // (3)
method nssv_constexpr (line 2488) | nssv_constexpr bool ends_with( basic_string_view v ) const nssv_no...
method nssv_constexpr (line 2493) | nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2)
method nssv_constexpr (line 2498) | nssv_constexpr bool ends_with( CharT const * s ) const // (3)
method nssv_constexpr14 (line 2505) | nssv_constexpr14 size_type find( basic_string_view v, size_type po...
method nssv_constexpr14 (line 2513) | nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) cons...
method nssv_constexpr14 (line 2518) | nssv_constexpr14 size_type find( CharT const * s, size_type pos, s...
method nssv_constexpr14 (line 2523) | nssv_constexpr14 size_type find( CharT const * s, size_type pos = ...
method nssv_constexpr14 (line 2530) | nssv_constexpr14 size_type rfind( basic_string_view v, size_type p...
method nssv_constexpr14 (line 2544) | nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) ...
method nssv_constexpr14 (line 2549) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, ...
method nssv_constexpr14 (line 2554) | nssv_constexpr14 size_type rfind( CharT const * s, size_type pos =...
method nssv_constexpr (line 2561) | nssv_constexpr size_type find_first_of( basic_string_view v, size_...
method nssv_constexpr (line 2568) | nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0...
method nssv_constexpr (line 2573) | nssv_constexpr size_type find_first_of( CharT const * s, size_type...
method nssv_constexpr (line 2578) | nssv_constexpr size_type find_first_of( CharT const * s, size_typ...
method nssv_constexpr (line 2585) | nssv_constexpr size_type find_last_of( basic_string_view v, size_t...
method nssv_constexpr (line 2594) | nssv_constexpr size_type find_last_of( CharT c, size_type pos = np...
method nssv_constexpr (line 2599) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2604) | nssv_constexpr size_type find_last_of( CharT const * s, size_type ...
method nssv_constexpr (line 2611) | nssv_constexpr size_type find_first_not_of( basic_string_view v, s...
method nssv_constexpr (line 2618) | nssv_constexpr size_type find_first_not_of( CharT c, size_type pos...
method nssv_constexpr (line 2623) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2628) | nssv_constexpr size_type find_first_not_of( CharT const * s, size_...
method nssv_constexpr (line 2635) | nssv_constexpr size_type find_last_not_of( basic_string_view v, si...
method nssv_constexpr (line 2644) | nssv_constexpr size_type find_last_not_of( CharT c, size_type pos ...
method nssv_constexpr (line 2649) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
method nssv_constexpr (line 2654) | nssv_constexpr size_type find_last_not_of( CharT const * s, size_t...
type size_type (line 2664) | enum : size_type { npos
Condensed preview — 255 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,631K chars).
[
{
"path": ".clang-format",
"chars": 335,
"preview": "AccessModifierOffset: '-4'\nAllowShortFunctionsOnASingleLine: InlineOnly\nAllowShortIfStatementsOnASingleLine: Never\nBinPa"
},
{
"path": ".clang-tidy",
"chars": 422,
"preview": "Checks: > \n clang-diagnostic-*,\n clang-analyzer-*,\n modernize-*,\n bugprone-*,\n concurrency-*,\n cppcoreguidelines-*"
},
{
"path": ".github/workflows/CI.yml",
"chars": 3201,
"preview": "name: Continuous Integration\n\non:\n push:\n branches: [ \"master\" ]\n pull_request:\n branches: [ \"master\" ]\n\nenv:\n "
},
{
"path": ".gitignore",
"chars": 431,
"preview": "# Prerequisites\n*.d\n\n# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\n\n# Precompiled Headers\n*.gch\n*.pch\n\n# Compiled Dynamic"
},
{
"path": "CMakeLists.txt",
"chars": 7256,
"preview": "# Copyright (c) 2022, Fraunhofer IESE\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with"
},
{
"path": "CMakePresets.json",
"chars": 1460,
"preview": "{\n\t\"version\": 3,\n\t\"cmakeMinimumRequired\": {\n\t\t\"major\": 3,\n\t\t\"minor\": 14,\n\t\t\"patch\": 0\n\t},\n\t\"configurePresets\": [\n\t\t{\n\t\t\t"
},
{
"path": "LICENSE.txt",
"chars": 1675,
"preview": "Copyright (c) 2022, Technische Universität Kaiserslautern, Fraunhofer IESE\nAll rights reserved.\n\nThis software is releas"
},
{
"path": "README.md",
"chars": 16824,
"preview": "<img src=\"docs/images/logo_drampower_5_0.png\" alt=\"DRAMPower 5.0\" width=\"350\" style=\"float: left;\"/> \n\n# DRAM Power Mod"
},
{
"path": "benches/CMakeLists.txt",
"chars": 2711,
"preview": "# Copyright (c) 2024, RPTU Kaiserslautern-Landau\n# All rights reserved.\n#\n# Redistribution and use in source and binary "
},
{
"path": "benches/main.cpp",
"chars": 1822,
"preview": "/*\n * Copyright (c) 2023, RPTU Kaiserslautern-Landau\n * All rights reserved.\n *\n * Redistribution and use in source and "
},
{
"path": "benches/simulation.cpp",
"chars": 4799,
"preview": "/*\n * Copyright (c) 2023, RPTU Kaiserslautern-Landau\n * All rights reserved.\n *\n * Redistribution and use in source and "
},
{
"path": "cmake/build_source_group.cmake",
"chars": 452,
"preview": "###############################################\n### build_source_group ###\n########################"
},
{
"path": "cmake/diagnostics_print.cmake",
"chars": 878,
"preview": "###############################################\n### diagnostics_print ###\n########################"
},
{
"path": "cmake/enable_clang_format.cmake",
"chars": 322,
"preview": "###############################################\n### enable_clang_format ###\n########################"
},
{
"path": "cmake/enable_clang_tidy.cmake",
"chars": 753,
"preview": "###############################################\n### enable_clang_tidy ###\n########################"
},
{
"path": "cmake/enable_cppcheck.cmake",
"chars": 905,
"preview": "###############################################\n### enable_cppcheck ###\n########################"
},
{
"path": "lib/cli11/CMakeLists.txt",
"chars": 290,
"preview": "########################################\n### CLI11 ###\n######################################"
},
{
"path": "lib/spdlog/CMakeLists.txt",
"chars": 291,
"preview": "########################################\n### spdlog ###\n######################################"
},
{
"path": "src/DRAMPower/CMakeLists.txt",
"chars": 3821,
"preview": "########################################\n### DRAMPower ###\n######################################"
},
{
"path": "src/DRAMPower/DRAMPower/Exceptions.h",
"chars": 1105,
"preview": "#ifndef DRAMPOWER_EXCEPTIONS_H\n#define DRAMPOWER_EXCEPTIONS_H\n\n#include <exception>\n#include <string>\n\n\nnamespace DRAMPo"
},
{
"path": "src/DRAMPower/DRAMPower/Types.h",
"chars": 259,
"preview": "#ifndef DRAMPOWER_TYPES_H\n#define DRAMPOWER_TYPES_H\n\n#include <DRAMPower/util/cycle_stats.h>\n\n#include <stdint.h>\n\nnames"
},
{
"path": "src/DRAMPower/DRAMPower/command/CmdType.h",
"chars": 3250,
"preview": "#ifndef DRAMPOWER_COMMAND_CMDTYPE_H\n#define DRAMPOWER_COMMAND_CMDTYPE_H\n\n#include <iostream>\n#include <string>\n\nnamespac"
},
{
"path": "src/DRAMPower/DRAMPower/command/Command.cpp",
"chars": 1003,
"preview": "#include \"Command.h\"\n\nnamespace DRAMPower {\n\n TargetCoordinate::TargetCoordinate(std::size_t bank_id, std::size_t ban"
},
{
"path": "src/DRAMPower/DRAMPower/command/Command.h",
"chars": 1131,
"preview": "#ifndef DRAMPOWER_COMMAND_COMMAND_H\n#define DRAMPOWER_COMMAND_COMMAND_H\n\n#include <DRAMPower/Types.h>\n#include <DRAMPowe"
},
{
"path": "src/DRAMPower/DRAMPower/command/Pattern.cpp",
"chars": 10872,
"preview": "#include \"Pattern.h\"\n#include <limits>\n#include <cassert>\n#include <bitset>\n\nnamespace DRAMPower {\n\n PatternEncoderOv"
},
{
"path": "src/DRAMPower/DRAMPower/command/Pattern.h",
"chars": 3058,
"preview": "#ifndef DRAMPOWER_COMMAND_PATTERN_H\n#define DRAMPOWER_COMMAND_PATTERN_H\n\n#include <DRAMPower/command/Command.h>\n#include"
},
{
"path": "src/DRAMPower/DRAMPower/data/energy.cpp",
"chars": 2899,
"preview": "#include \"energy.h\"\n\nusing namespace DRAMPower;\n\ndouble energy_info_t::total() const\n{\n auto total = E_act\n + "
},
{
"path": "src/DRAMPower/DRAMPower/data/energy.h",
"chars": 3691,
"preview": "#ifndef DRAMPOWER_CALCULATION_ENERGY_H\n#define DRAMPOWER_CALCULATION_ENERGY_H\n\n#pragma once\n\n#include <vector>\n#include "
},
{
"path": "src/DRAMPower/DRAMPower/data/stats.h",
"chars": 8504,
"preview": "#ifndef DRAMPOWER_DATA_STATS_H\n#define DRAMPOWER_DATA_STATS_H\n\n#include <DRAMPower/util/bus.h>\n#include <DRAMPower/dram/"
},
{
"path": "src/DRAMPower/DRAMPower/dram/Bank.h",
"chars": 1691,
"preview": "#ifndef DRAMPOWER_DDR_BANK_H\n#define DRAMPOWER_DDR_BANK_H\n\n#include <DRAMPower/data/stats.h>\n#include <DRAMPower/Types.h"
},
{
"path": "src/DRAMPower/DRAMPower/dram/Interface.cpp",
"chars": 8727,
"preview": "#include \"Interface.h\"\n\nnamespace DRAMPower {\n\nusing namespace DRAMUtils::Config;\n\nvoid TogglingHandle::TogglingHandleLa"
},
{
"path": "src/DRAMPower/DRAMPower/dram/Interface.h",
"chars": 2988,
"preview": "#ifndef DRAMPOWER_DDR_INTERFACE_H\n#define DRAMPOWER_DDR_INTERFACE_H\n\n#pragma once \n\n#include <DRAMPower/Types.h>\n#includ"
},
{
"path": "src/DRAMPower/DRAMPower/dram/Rank.cpp",
"chars": 4346,
"preview": "#include \"Rank.h\"\n\n#include <algorithm>\n\nnamespace DRAMPower {\n\nRank::Rank(std::size_t numBanks)\n : banks(numBanks)\n{"
},
{
"path": "src/DRAMPower/DRAMPower/dram/Rank.h",
"chars": 1911,
"preview": "#ifndef DRAMPOWER_DDR_RANK_H\n#define DRAMPOWER_DDR_RANK_H\n\n#include <DRAMPower/util/command_counter.h>\n#include <DRAMPow"
},
{
"path": "src/DRAMPower/DRAMPower/dram/dram_base.h",
"chars": 4077,
"preview": "#ifndef DRAMPOWER_DRAM_DRAM_BASE_H\n#define DRAMPOWER_DRAM_DRAM_BASE_H\n\n#include <DRAMPower/command/Command.h>\n\n#include "
},
{
"path": "src/DRAMPower/DRAMPower/memspec/MemSpec.h",
"chars": 3494,
"preview": "/*\n * Copyright (c) 2015-2020, University of Kaiserslautern\n * Copyright (c) 2012-2021, Fraunhofer IESE\n * All rights re"
},
{
"path": "src/DRAMPower/DRAMPower/memspec/MemSpecDDR4.cpp",
"chars": 6411,
"preview": "/*\n * Copyright (c) 2019, University of Kaiserslautern\n * Copyright (c) 2012-2021, Fraunhofer IESE\n * All rights reserve"
},
{
"path": "src/DRAMPower/DRAMPower/memspec/MemSpecDDR4.h",
"chars": 4581,
"preview": "/*\n* Copyright (c) 2019, University of Kaiserslautern\n* Copyright (c) 2012-2021, Fraunhofer IESE\n* All rights reserved.\n"
},
{
"path": "src/DRAMPower/DRAMPower/memspec/MemSpecDDR5.cpp",
"chars": 4196,
"preview": "#include \"MemSpecDDR5.h\"\nusing namespace DRAMPower;\n\n\nMemSpecDDR5::MemSpecDDR5(const DRAMUtils::MemSpec::MemSpecDDR5 &me"
},
{
"path": "src/DRAMPower/DRAMPower/memspec/MemSpecDDR5.h",
"chars": 2673,
"preview": "#ifndef DRAMPOWER_MEMSPEC_MEMSPECDDR5_H\n#define DRAMPOWER_MEMSPEC_MEMSPECDDR5_H\n\n#include \"MemSpec.h\"\n\n#include <DRAMUti"
},
{
"path": "src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR4.cpp",
"chars": 7971,
"preview": "#include \"MemSpecLPDDR4.h\"\nusing namespace DRAMPower;\n\n\nMemSpecLPDDR4::MemSpecLPDDR4(const DRAMUtils::MemSpec::MemSpecLP"
},
{
"path": "src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR4.h",
"chars": 2571,
"preview": "#ifndef DRAMPOWER_MEMSPEC_MEMSPECLPDDR4_H\n#define DRAMPOWER_MEMSPEC_MEMSPECLPDDR4_H\n\n#include \"MemSpec.h\"\n\n#include <DRA"
},
{
"path": "src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR5.cpp",
"chars": 6252,
"preview": "#include \"DRAMPower/memspec/MemSpecLPDDR5.h\"\n\nusing namespace DRAMPower;\n\n\nMemSpecLPDDR5::MemSpecLPDDR5(const DRAMUtils:"
},
{
"path": "src/DRAMPower/DRAMPower/memspec/MemSpecLPDDR5.h",
"chars": 2956,
"preview": "#ifndef DRAMPOWER_MEMSPEC_MEMSPECLPDDR5_H\n#define DRAMPOWER_MEMSPEC_MEMSPECLPDDR5_H\n\n#include \"MemSpec.h\"\n#include <DRAM"
},
{
"path": "src/DRAMPower/DRAMPower/simconfig/simconfig.h",
"chars": 611,
"preview": "#ifndef DRAMPOWER_SIMCONFIG_SIMCONFIG_H\n#define DRAMPOWER_SIMCONFIG_SIMCONFIG_H\n\n#include \"DRAMUtils/util/json_utils.h\"\n"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/DDR4.cpp",
"chars": 2541,
"preview": "#include \"DDR4.h\"\n#include \"DRAMPower/Types.h\"\n#include \"DRAMPower/data/stats.h\"\n#include \"DRAMPower/memspec/MemSpecDDR4"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/DDR4.h",
"chars": 2718,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR4_DDR4_H\n#define DRAMPOWER_STANDARDS_DDR4_DDR4_H\n\n#include \"DRAMPower/util/cli_architectu"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/DDR4Core.cpp",
"chars": 15299,
"preview": "#include \"DDR4Core.h\"\n#include \"DRAMPower/Types.h\"\n#include \"DRAMPower/util/RegisterHelper.h\"\n#include <cstddef>\n\nnamesp"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/DDR4Core.h",
"chars": 3388,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR4_DDR4CORE_H\n#define DRAMPOWER_STANDARDS_DDR4_DDR4CORE_H\n\n#include \"DRAMPower/util/Deseri"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/DDR4Interface.cpp",
"chars": 15877,
"preview": "#include \"DDR4Interface.h\"\n#include \"DRAMPower/util/databus_types.h\"\n\nnamespace DRAMPower {\n\n static constexpr DRAMUt"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/DDR4Interface.h",
"chars": 3514,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR4_DDR4INTERFACE_H\n#define DRAMPOWER_STANDARDS_DDR4_DDR4INTERFACE_H\n\n#include \"DRAMPower/u"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/core_calculation_DDR4.cpp",
"chars": 6689,
"preview": "#include \"core_calculation_DDR4.h\"\n\nnamespace DRAMPower {\n\n Calculation_DDR4::Calculation_DDR4(const MemSpecDDR4 &mem"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/core_calculation_DDR4.h",
"chars": 1478,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR4_CALCULATION_DDR4_H\n#define DRAMPOWER_STANDARDS_DDR4_CALCULATION_DDR4_H\n\n#pragma once\n\n#"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/interface_calculation_DDR4.cpp",
"chars": 7264,
"preview": "#include \"DRAMPower/standards/ddr4/interface_calculation_DDR4.h\"\n#include \"DRAMPower/data/energy.h\"\n\nnamespace DRAMPower"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/interface_calculation_DDR4.h",
"chars": 1135,
"preview": "#ifndef STANDARDS_DDR4_INTERFACE_CALCULATION_DDR4_H\n#define STANDARDS_DDR4_INTERFACE_CALCULATION_DDR4_H\n\n\n#include \"DRAM"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr4/types.h",
"chars": 786,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR4_TYPES_H\n#define DRAMPOWER_STANDARDS_DDR4_TYPES_H\n\n#include <DRAMUtils/memspec/standards"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/DDR5.cpp",
"chars": 1837,
"preview": "#include \"DRAMPower/standards/ddr5/DDR5.h\"\n\n#include <iostream>\n\n#include \"DRAMPower/data/stats.h\"\n#include \"DRAMPower/m"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/DDR5.h",
"chars": 2506,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR5_DDR5_H\n#define DRAMPOWER_STANDARDS_DDR5_DDR5_H\n\n\n#include \"DRAMPower/util/cli_architect"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/DDR5Core.cpp",
"chars": 14871,
"preview": "#include \"DDR5Core.h\"\n#include \"DRAMPower/util/RegisterHelper.h\"\n\nnamespace DRAMPower {\n\nvoid DDR5Core::doCommand(const "
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/DDR5Core.h",
"chars": 3825,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR5_DDR5CORE_H\n#define DRAMPOWER_STANDARDS_DDR5_DDR5CORE_H\n\n#include \"DRAMPower/command/Com"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/DDR5Interface.cpp",
"chars": 10655,
"preview": "#include \"DDR5Interface.h\"\n#include \"DRAMPower/simconfig/simconfig.h\"\n\nnamespace DRAMPower {\n\nstatic constexpr DRAMUtils"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/DDR5Interface.h",
"chars": 2437,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR5_DDR5INTERFACE_H\n#define DRAMPOWER_STANDARDS_DDR5_DDR5INTERFACE_H\n\n#include \"DRAMPower/u"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/core_calculation_DDR5.cpp",
"chars": 7012,
"preview": "#include \"core_calculation_DDR5.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\nnamespace DRAMPower {\n\n Calculation_D"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/core_calculation_DDR5.h",
"chars": 1617,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR5_CALCULATION_DDR5_H\n#define DRAMPOWER_STANDARDS_DDR5_CALCULATION_DDR5_H\n\n#include \"DRAMP"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/interface_calculation_DDR5.cpp",
"chars": 4820,
"preview": "#include \"DRAMPower/standards/ddr5/interface_calculation_DDR5.h\"\n#include \"DRAMPower/data/energy.h\"\n\nnamespace DRAMPower"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/interface_calculation_DDR5.h",
"chars": 1115,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR5_INTERFACE_CALCULATION_DDR5_H\n#define DRAMPOWER_STANDARDS_DDR5_INTERFACE_CALCULATION_DDR"
},
{
"path": "src/DRAMPower/DRAMPower/standards/ddr5/types.h",
"chars": 786,
"preview": "#ifndef DRAMPOWER_STANDARDS_DDR5_TYPES_H\n#define DRAMPOWER_STANDARDS_DDR5_TYPES_H\n\n#include <DRAMUtils/memspec/standards"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4.cpp",
"chars": 2212,
"preview": "#include \"LPDDR4.h\"\n#include \"DRAMPower/data/stats.h\"\n\n#include <DRAMPower/command/Pattern.h>\n#include <DRAMPower/standa"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4.h",
"chars": 2634,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR4_LPDDR4_H\n#define DRAMPOWER_STANDARDS_LPDDR4_LPDDR4_H\n\n#include \"DRAMPower/util/cli_ar"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4Core.cpp",
"chars": 14240,
"preview": "#include \"LPDDR4Core.h\"\n#include \"DRAMPower/util/RegisterHelper.h\"\n\nnamespace DRAMPower {\n\nvoid LPDDR4Core::doCommand(co"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4Core.h",
"chars": 3670,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR4_LPDDR4CORE_H\n#define DRAMPOWER_STANDARDS_LPDDR4_LPDDR4CORE_H\n\n#include \"DRAMPower/uti"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4Interface.cpp",
"chars": 10009,
"preview": "#include \"LPDDR4Interface.h\"\n#include \"DRAMPower/command/CmdType.h\"\n#include \"DRAMPower/data/stats.h\"\n#include \"DRAMPowe"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/LPDDR4Interface.h",
"chars": 3119,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR4_LPDDR4INTERFACE_H\n#define DRAMPOWER_STANDARDS_LPDDR4_LPDDR4INTERFACE_H\n\n#include \"DRA"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/core_calculation_LPDDR4.cpp",
"chars": 6979,
"preview": "#include \"core_calculation_LPDDR4.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\nnamespace DRAMPower {\n\n Calcula"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/core_calculation_LPDDR4.h",
"chars": 1551,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR4_CALCULATION_LPDDR4_H\n#define DRAMPOWER_STANDARDS_LPDDR4_CALCULATION_LPDDR4_H\n\n#includ"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/interface_calculation_LPDDR4.cpp",
"chars": 5388,
"preview": "#include \"interface_calculation_LPDDR4.h\"\n\nnamespace DRAMPower {\n\nInterfaceCalculation_LPDDR4::InterfaceCalculation_LPDD"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/interface_calculation_LPDDR4.h",
"chars": 1224,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR4_INTERFACE_CALCULATION_LPDDR4_H\n#define DRAMPOWER_STANDARDS_LPDDR4_INTERFACE_CALCULATI"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr4/types.h",
"chars": 826,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR4_TYPES_H\n#define DRAMPOWER_STANDARDS_LPDDR4_TYPES_H\n\n#include <DRAMUtils/memspec/stand"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5.cpp",
"chars": 2208,
"preview": "#include \"LPDDR5.h\"\n#include \"DRAMPower/Types.h\"\n#include \"DRAMPower/data/stats.h\"\n\n#include <DRAMPower/command/Pattern."
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5.h",
"chars": 2631,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR5_LPDDR5_H\n#define DRAMPOWER_STANDARDS_LPDDR5_LPDDR5_H\n\n#include \"DRAMPower/util/cli_ar"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5Core.cpp",
"chars": 16095,
"preview": "#include \"LPDDR5Core.h\"\n#include \"DRAMPower/Exceptions.h\"\n#include \"DRAMPower/util/RegisterHelper.h\"\n\nnamespace DRAMPowe"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5Core.h",
"chars": 4056,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR5_LPDDR5CORE_H\n#define DRAMPOWER_STANDARDS_LPDDR5_LPDDR5CORE_H\n\n#include \"DRAMPower/uti"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5Interface.cpp",
"chars": 13680,
"preview": "#include \"LPDDR5Interface.h\"\n#include \"DRAMPower/Exceptions.h\"\n\nnamespace DRAMPower {\n\nstatic constexpr DRAMUtils::Confi"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/LPDDR5Interface.h",
"chars": 3294,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR5_LPDDR5INTERFACE_H\n#define DRAMPOWER_STANDARDS_LPDDR5_LPDDR5INTERFACE_H\n\n#include \"DRA"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/core_calculation_LPDDR5.cpp",
"chars": 8519,
"preview": "#include \"core_calculation_LPDDR5.h\"\n#include \"DRAMPower/data/stats.h\"\n\n#include <DRAMPower/standards/lpddr5/LPDDR5.h>\n\n"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/core_calculation_LPDDR5.h",
"chars": 1737,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR5_CALCULATION_LPDDR5_H\n#define DRAMPOWER_STANDARDS_LPDDR5_CALCULATION_LPDDR5_H\n\n#includ"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/interface_calculation_LPDDR5.cpp",
"chars": 5732,
"preview": "#include \"DRAMPower/standards/lpddr5/interface_calculation_LPDDR5.h\"\n#include \"DRAMPower/data/energy.h\"\n\nnamespace DRAMP"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/interface_calculation_LPDDR5.h",
"chars": 1237,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR5_INTERFACE_CALCULATION_LPDDR5_H\n#define DRAMPOWER_STANDARDS_LPDDR5_INTERFACE_CALCULATI"
},
{
"path": "src/DRAMPower/DRAMPower/standards/lpddr5/types.h",
"chars": 826,
"preview": "#ifndef DRAMPOWER_STANDARDS_LPDDR5_TYPES_H\n#define DRAMPOWER_STANDARDS_LPDDR5_TYPES_H\n\n#include <DRAMUtils/memspec/stand"
},
{
"path": "src/DRAMPower/DRAMPower/standards/test_accessor.h",
"chars": 1074,
"preview": "#ifndef DRAMPOWER_STANDARDS_TEST_ACCESSOR_H\n#define DRAMPOWER_STANDARDS_TEST_ACCESSOR_H\n\n#include \"DRAMPower/standards/d"
},
{
"path": "src/DRAMPower/DRAMPower/util/Deserialize.h",
"chars": 2217,
"preview": "/*\n * Copyright (c) 2023, RPTU Kaiserslautern-Landau\n * All rights reserved.\n *\n * Redistribution and use in source and "
},
{
"path": "src/DRAMPower/DRAMPower/util/ImplicitCommandHandler.h",
"chars": 3439,
"preview": "#ifndef DRAMPOWER_UTIL_IMPLICITCOMMANDHANDLER_H\n#define DRAMPOWER_UTIL_IMPLICITCOMMANDHANDLER_H\n\n#include <DRAMPower/Typ"
},
{
"path": "src/DRAMPower/DRAMPower/util/PatternHandler.h",
"chars": 3911,
"preview": "#ifndef DRAMPOWER_UTIL_PATTERNHANDLER_H\n#define DRAMPOWER_UTIL_PATTERNHANDLER_H\n\n#include <DRAMPower/command/Pattern.h>\n"
},
{
"path": "src/DRAMPower/DRAMPower/util/RegisterHelper.h",
"chars": 3424,
"preview": "#ifndef DRAMPOWER_UTIL_REGISTERHELPER_H\n#define DRAMPOWER_UTIL_REGISTERHELPER_H\n\n#include <vector>\n\n#include <DRAMPower/"
},
{
"path": "src/DRAMPower/DRAMPower/util/Router.h",
"chars": 1804,
"preview": "#ifndef DRAMPOWER_UTIL_ROUTER_H\n#define DRAMPOWER_UTIL_ROUTER_H\n\n#include <DRAMPower/command/Command.h>\n\n#include <optio"
},
{
"path": "src/DRAMPower/DRAMPower/util/Serialize.h",
"chars": 2193,
"preview": "/*\n * Copyright (c) 2023, RPTU Kaiserslautern-Landau\n * All rights reserved.\n *\n * Redistribution and use in source and "
},
{
"path": "src/DRAMPower/DRAMPower/util/binary_ops.h",
"chars": 1537,
"preview": "#ifndef DRAMPOWER_UTIL_BINARY_OPS_H\n#define DRAMPOWER_UTIL_BINARY_OPS_H\n\n#include <sstream>\n#include <bitset>\n\n#if defin"
},
{
"path": "src/DRAMPower/DRAMPower/util/burst_storage.h",
"chars": 13843,
"preview": "#ifndef DRAMPOWER_UTIL_BURST_STORAGE_H\n#define DRAMPOWER_UTIL_BURST_STORAGE_H\n\n#include \"DRAMUtils/util/types.h\"\n\n#inclu"
},
{
"path": "src/DRAMPower/DRAMPower/util/bus.cpp",
"chars": 0,
"preview": ""
},
{
"path": "src/DRAMPower/DRAMPower/util/bus.h",
"chars": 13066,
"preview": "#ifndef DRAMPOWER_UTIL_BUS_H\n#define DRAMPOWER_UTIL_BUS_H\n\n#include <DRAMPower/util/binary_ops.h>\n#include <DRAMPower/ut"
},
{
"path": "src/DRAMPower/DRAMPower/util/bus_types.h",
"chars": 2506,
"preview": "#ifndef DRAMPOWER_UTIL_BUS_TYPES\n#define DRAMPOWER_UTIL_BUS_TYPES\n\n#include <cstdint>\n\n#include <DRAMPower/util/Serializ"
},
{
"path": "src/DRAMPower/DRAMPower/util/cli_architecture_config.h",
"chars": 315,
"preview": "#ifndef DRAMPOWER_UTIL_CLI_ARCHITECTURE_CONFIG_H\n#define DRAMPOWER_UTIL_CLI_ARCHITECTURE_CONFIG_H\n\n#include <cstdint>\n\nn"
},
{
"path": "src/DRAMPower/DRAMPower/util/clock.h",
"chars": 2565,
"preview": "#ifndef DRAMPOWER_UTIL_CLOCK_H\n#define DRAMPOWER_UTIL_CLOCK_H\n\n#include <DRAMPower/Types.h>\n#include <DRAMPower/util/bus"
},
{
"path": "src/DRAMPower/DRAMPower/util/command_counter.h",
"chars": 1190,
"preview": "#ifndef DRAMPOWER_UTIL_COMMAND_COUNTER_H\n#define DRAMPOWER_UTIL_COMMAND_COUNTER_H\n\n#include <vector>\n#include <array>\n#i"
},
{
"path": "src/DRAMPower/DRAMPower/util/cycle_stats.h",
"chars": 2771,
"preview": "#ifndef DRAMPOWER_UTIL_CYCLE_STATS_H\n#define DRAMPOWER_UTIL_CYCLE_STATS_H\n\n#include <stdint.h>\n#include <optional>\n\n#inc"
},
{
"path": "src/DRAMPower/DRAMPower/util/databus.h",
"chars": 12721,
"preview": "#ifndef DRAMPOWER_UTIL_DATABUS\n#define DRAMPOWER_UTIL_DATABUS\n\n#include \"DRAMPower/Exceptions.h\"\n#include \"DRAMPower/uti"
},
{
"path": "src/DRAMPower/DRAMPower/util/databus_presets.h",
"chars": 1564,
"preview": "#ifndef DRAMPOWER_UTIL_DATABUS_PRESETS\n#define DRAMPOWER_UTIL_DATABUS_PRESETS\n\n#include \"DRAMPower/util/databus_types.h\""
},
{
"path": "src/DRAMPower/DRAMPower/util/databus_types.h",
"chars": 478,
"preview": "#ifndef DRAMPOWER_UTIL_DATABUS_TYPES\n#define DRAMPOWER_UTIL_DATABUS_TYPES\n\n#include <cstddef>\n\n#include <DRAMPower/util/"
},
{
"path": "src/DRAMPower/DRAMPower/util/dbi.h",
"chars": 20851,
"preview": "#ifndef DRAMPOWER_UTIL_DBI_H\n#define DRAMPOWER_UTIL_DBI_H\n\n#include \"DRAMPower/Types.h\"\n#include \"DRAMPower/util/pin_typ"
},
{
"path": "src/DRAMPower/DRAMPower/util/dbialgos.h",
"chars": 3292,
"preview": "#ifndef DRAMPOWER_UTIL_DBIALGOS_H\n#define DRAMPOWER_UTIL_DBIALGOS_H\n\n#include \"DRAMPower/util/dbihelpers.h\"\n#include \"DR"
},
{
"path": "src/DRAMPower/DRAMPower/util/dbihelpers.h",
"chars": 4297,
"preview": "#ifndef DRAMPOWER_UTIL_DBIHELPERS_H\n#define DRAMPOWER_UTIL_DBIHELPERS_H\n\n#include <type_traits>\n#include <bitset>\n#inclu"
},
{
"path": "src/DRAMPower/DRAMPower/util/dbitypes.h",
"chars": 1732,
"preview": "#ifndef DRAMPOWER_UTIL_DBI_TYPES_H\n#define DRAMPOWER_UTIL_DBI_TYPES_H\n\n#include <type_traits>\n#include <limits>\n#include"
},
{
"path": "src/DRAMPower/DRAMPower/util/dynamic_bitset.h",
"chars": 6715,
"preview": "#ifndef DRAMPOWER_UTIL_DYNAMIC_BITSET_H\n#define DRAMPOWER_UTIL_DYNAMIC_BITSET_H\n\n#include <DRAMPower/Types.h>\n\n#include "
},
{
"path": "src/DRAMPower/DRAMPower/util/extension_base.h",
"chars": 566,
"preview": "#ifndef DRAMPOWER_UTIL_EXTENSION_BASE\n#define DRAMPOWER_UTIL_EXTENSION_BASE\n\nnamespace DRAMPower::util::extension_manage"
},
{
"path": "src/DRAMPower/DRAMPower/util/extension_manager.h",
"chars": 7309,
"preview": "#ifndef DRAMPOWER_UTIL_EXTENSION_MANAGER\n#define DRAMPOWER_UTIL_EXTENSION_MANAGER\n\n#include \"DRAMPower/util/Serialize.h\""
},
{
"path": "src/DRAMPower/DRAMPower/util/extension_manager_static.h",
"chars": 5257,
"preview": "#ifndef DRAMPOWER_UTIL_EXTENSION_MANAGER_STATIC\n#define DRAMPOWER_UTIL_EXTENSION_MANAGER_STATIC\n\n#include <cstddef>\n#inc"
},
{
"path": "src/DRAMPower/DRAMPower/util/extensions.cpp",
"chars": 782,
"preview": "#include <DRAMPower/util/extensions.h>\n#include <DRAMPower/command/Command.h>\n\nnamespace DRAMPower::extensions {\n\nusing "
},
{
"path": "src/DRAMPower/DRAMPower/util/extensions.h",
"chars": 1556,
"preview": "#ifndef DRAMPOWER_UTIL_EXTENSIONS\n#define DRAMPOWER_UTIL_EXTENSIONS\n\n#include <DRAMPower/command/Command.h>\n#include <DR"
},
{
"path": "src/DRAMPower/DRAMPower/util/pending_stats.h",
"chars": 1869,
"preview": "#ifndef DRAMPOWER_UTIL_PENDING_STATS\n#define DRAMPOWER_UTIL_PENDING_STATS\n\n#include <DRAMPower/Types.h>\n#include <DRAMPo"
},
{
"path": "src/DRAMPower/DRAMPower/util/pin.h",
"chars": 8107,
"preview": "#ifndef DRAMPOWER_UTIL_PINH\n#define DRAMPOWER_UTIL_PINH\n\n#include <DRAMPower/util/burst_storage.h>\n#include <DRAMPower/T"
},
{
"path": "src/DRAMPower/DRAMPower/util/pin_types.h",
"chars": 225,
"preview": "#ifndef DRAMPOWER_UTIL_PIN_TYPES\n#define DRAMPOWER_UTIL_PIN_TYPES\n\nnamespace DRAMPower::util {\n\nenum class PinState\n{\n "
},
{
"path": "src/DRAMPower/DRAMPower/util/sub_bitset.h",
"chars": 4718,
"preview": "#ifndef DRAMPOWER_UTIL_SUB_BITSET\n#define DRAMPOWER_UTIL_SUB_BITSET\n\n#include <DRAMPower/Types.h>\n\n#include <bitset>\n#in"
},
{
"path": "src/cli/CMakeLists.txt",
"chars": 150,
"preview": "\nif (DRAMPOWER_BUILD_CLI)\n add_subdirectory(main)\nendif()\nif (DRAMPOWER_BUILD_CLI OR DRAMPOWER_BUILD_BENCHMARKS)\n "
},
{
"path": "src/cli/lib/CMakeLists.txt",
"chars": 711,
"preview": "###############################\n### cli_lib ###\n###############################\n\nfind_package(spdlog REQ"
},
{
"path": "src/cli/lib/DRAMPower/cli/config.h",
"chars": 437,
"preview": "#ifndef CLI_CONFIG_H\n#define CLI_CONFIG_H\n\n#include <DRAMUtils/util/json.h>\n#include <DRAMUtils/util/json_utils.h>\n\n#inc"
},
{
"path": "src/cli/lib/DRAMPower/cli/csv.hpp",
"chars": 285895,
"preview": "#pragma once\n/*\nCSV for C++, version 2.1.3\nhttps://github.com/vincentlaucsb/csv-parser\n\nMIT License\n\nCopyright (c) 2017-"
},
{
"path": "src/cli/lib/DRAMPower/cli/run.cpp",
"chars": 8996,
"preview": "#include \"run.hpp\"\n\n#include <memory>\n#include <vector>\n#include <fstream>\n#include <exception>\n#include <string>\n\n#incl"
},
{
"path": "src/cli/lib/DRAMPower/cli/run.hpp",
"chars": 1365,
"preview": "#ifndef LIB_DRAMPOWERCLI_RUN_H\n#define LIB_DRAMPOWERCLI_RUN_H\n\n#include <optional>\n#include <vector>\n#include <memory>\n#"
},
{
"path": "src/cli/lib/DRAMPower/cli/util.cpp",
"chars": 839,
"preview": "#include \"util.hpp\"\n\nnamespace DRAMPower::DRAMPowerCLI {\n\nstd::unique_ptr<uint8_t[]> util::hexStringToUint8Array(const c"
},
{
"path": "src/cli/lib/DRAMPower/cli/util.hpp",
"chars": 309,
"preview": "#ifndef UTIL_HPP\n#define UTIL_HPP\n\n\n#include <stdint.h>\n#include \"csv.hpp\"\n\nnamespace DRAMPower::DRAMPowerCLI::util {\n\n "
},
{
"path": "src/cli/main/CMakeLists.txt",
"chars": 595,
"preview": "###############################\n### cli ###\n###############################\n\nfind_package(spdlog REQ"
},
{
"path": "src/cli/main/main.cpp",
"chars": 2659,
"preview": "\n#include <stdint.h>\n#include <utility>\n#include <optional>\n#include <string_view>\n\n#include <DRAMPower/cli/run.hpp>\n#in"
},
{
"path": "src/cli/main/validators.cpp",
"chars": 5456,
"preview": "#include \"validators.h\"\n\n#include <string>\n#include <filesystem>\n#include <fstream>\n#include <optional>\n\nnamespace valid"
},
{
"path": "src/cli/main/validators.h",
"chars": 351,
"preview": "#ifndef CLI_VALIDATORS_H\n#define CLI_VALIDATORS_H\n\n#include <CLI/CLI.hpp>\n#include <stdint.h>\n\nnamespace validators\n{\n\n#"
},
{
"path": "tests/CMakeLists.txt",
"chars": 1019,
"preview": "include(GoogleTest)\n\noption(DRAMPOWER_USE_FETCH_CONTENT_GOOGLE_TEST \"Enable FetchContent to provide Google Test\" ${DRAMP"
},
{
"path": "tests/tests_drampower/CMakeLists.txt",
"chars": 4286,
"preview": "###############################################\n### tests_drampower ###\n########################"
},
{
"path": "tests/tests_drampower/base/test_ddr_base.cpp",
"chars": 3594,
"preview": "#include <algorithm>\n#include <gtest/gtest.h>\n\n#include \"DRAMPower/Types.h\"\n#include \"DRAMPower/command/Command.h\"\n\n#inc"
},
{
"path": "tests/tests_drampower/base/test_ddr_data.cpp",
"chars": 1423,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include \"DRAMPower/dram/dram_base.h\"\n\n#include <memor"
},
{
"path": "tests/tests_drampower/base/test_ddr_serialize.cpp",
"chars": 7675,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n#include \"DRAMPower/simconfig/simconfig.h\"\n#include \"DR"
},
{
"path": "tests/tests_drampower/base/test_pattern_pre_cycles.cpp",
"chars": 5064,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_multidevice_tests.cpp",
"chars": 5273,
"preview": "/* Note\nThis test is based on ddr4_test_pattern_4.cpp and assumes the correctness of the test.\n\nCalculation for 5 device"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_multirank_tests.cpp",
"chars": 3531,
"preview": "#include <gtest/gtest.h>\n\n#include <fstream>\n#include <memory>\n\n#include \"DRAMPower/command/Command.h\"\n#include \"DRAMPow"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_0.cpp",
"chars": 2606,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_1.cpp",
"chars": 3036,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_10.cpp",
"chars": 6659,
"preview": "#include <gtest/gtest.h>\n\n#include <DRAMPower/command/Command.h>\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n#include <D"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_11.cpp",
"chars": 4914,
"preview": "#include <gtest/gtest.h>\n\n#include <DRAMPower/command/Command.h>\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n#include <D"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_12.cpp",
"chars": 8385,
"preview": "#include <gtest/gtest.h>\n\n#include <DRAMPower/command/Command.h>\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n#include <D"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_13.cpp",
"chars": 5348,
"preview": "#include <gtest/gtest.h>\n\n#include <DRAMPower/command/Command.h>\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_14.cpp",
"chars": 5149,
"preview": "#include <gtest/gtest.h>\n\n#include <DRAMPower/command/Command.h>\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_15.cpp",
"chars": 14943,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_2.cpp",
"chars": 3041,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_3.cpp",
"chars": 3570,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_4.cpp",
"chars": 3701,
"preview": "#include <gtest/gtest.h>\n\n#include <DRAMPower/command/Command.h>\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_5.cpp",
"chars": 4032,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_6.cpp",
"chars": 4174,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_7.cpp",
"chars": 2892,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_8.cpp",
"chars": 3412,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR4/ddr4_test_pattern_9.cpp",
"chars": 3969,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr4/DDR4.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_multidevice_tests.cpp",
"chars": 5273,
"preview": "/* Note\nThis test is based on ddr5_test_pattern_4.cpp and assumes the correctness of the test.\n\nCalculation for 5 device"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_multirank_tests.cpp",
"chars": 4805,
"preview": "#include <gtest/gtest.h>\n\n#include <fstream>\n#include <memory>\n\n#include <DRAMPower/memspec/MemSpec.h>\n#include <DRAMUti"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_0.cpp",
"chars": 2527,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_1.cpp",
"chars": 3038,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_10.cpp",
"chars": 3994,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_11.cpp",
"chars": 4125,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_12.cpp",
"chars": 6500,
"preview": "#include <gtest/gtest.h>\n#include \"DRAMPower/command/Command.h\"\n#include <DRAMPower/standards/ddr5/DDR5.h>\n#include <DRA"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_13.cpp",
"chars": 4975,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n#include <D"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_14.cpp",
"chars": 8382,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n#include <D"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_15.cpp",
"chars": 5410,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_16.cpp",
"chars": 5865,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_17.cpp",
"chars": 5240,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_18.cpp",
"chars": 15016,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_2.cpp",
"chars": 3041,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_3.cpp",
"chars": 3571,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_4.cpp",
"chars": 3702,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_5.cpp",
"chars": 4032,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_6.cpp",
"chars": 4174,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_7.cpp",
"chars": 2891,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_8.cpp",
"chars": 3195,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/DDR5/ddr5_test_pattern_9.cpp",
"chars": 3951,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/ddr5/DDR5.h>\n\n#include <"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_multidevice_tests.cpp",
"chars": 5299,
"preview": "/* Note\nThis test is based on lpddr4_test_pattern_4.cpp and assumes the correctness of the test.\n\nCalculation for 5 devi"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_multirank_tests.cpp",
"chars": 4814,
"preview": "#include <gtest/gtest.h>\n\n#include <fstream>\n#include <memory>\n\n#include <DRAMPower/memspec/MemSpec.h>\n#include <DRAMUti"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_0.cpp",
"chars": 2567,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_1.cpp",
"chars": 3061,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_10.cpp",
"chars": 4234,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_11.cpp",
"chars": 6969,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n#includ"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_12.cpp",
"chars": 5275,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n#includ"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_13.cpp",
"chars": 9000,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n#includ"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_14.cpp",
"chars": 5861,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_15.cpp",
"chars": 5935,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_16.cpp",
"chars": 5648,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_17.cpp",
"chars": 15424,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_18.cpp",
"chars": 11227,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_2.cpp",
"chars": 3065,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_3.cpp",
"chars": 3594,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_4.cpp",
"chars": 3725,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_5.cpp",
"chars": 4172,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_6.cpp",
"chars": 4256,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_7.cpp",
"chars": 2917,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_8.cpp",
"chars": 3219,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
},
{
"path": "tests/tests_drampower/core/LPDDR4/lpddr4_test_pattern_9.cpp",
"chars": 3975,
"preview": "#include <gtest/gtest.h>\n\n#include \"DRAMPower/command/Command.h\"\n\n#include <DRAMPower/standards/lpddr4/LPDDR4.h>\n\n#inclu"
}
]
// ... and 55 more files (download for full content)
About this extraction
This page contains the full source code of the tukl-msd/DRAMPower GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 255 files (1.5 MB), approximately 455.2k tokens, and a symbol index with 1590 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.