├── .gitignore ├── .gitmodules ├── DRAMSpec.pro ├── License ├── README.md ├── architecture_input ├── arch_dummy_input.json ├── arch_hynix_2012_1.2V_dummyless.json ├── arch_hynix_2014_1.2V_8Gb_HBM.json ├── arch_hynix_H5AN4G8NAFR_8x512Mb_x8.json ├── arch_samsung_2014_1.0V_8Gb.json ├── par3D_custom_8x4Gbit_32ch.json ├── par3D_custom_8x4Gbit_4ch.json ├── par3D_custom_8x8Gbit_32ch.json ├── par_ddr4_8G_512x16.json ├── parddr3.json ├── parddr3_2.json ├── parddr4++.json ├── parddr4+.json ├── parddr4.json ├── parhmc.json ├── parhmc_512RB.json └── test_architecture.json ├── buildDRAMSpec.sh ├── core ├── Bank.cpp ├── Bank.h ├── Channel.cpp ├── Channel.h ├── Current.cpp ├── Current.h ├── SubArray.cpp ├── SubArray.h ├── Tile.cpp ├── Tile.h ├── Timing.cpp └── Timing.h ├── expandedBoostUnits ├── BaseDimensions │ └── clock.h ├── BaseUnits │ └── clock.h ├── ConversionFactors.h ├── DerivedDimensions │ ├── capacitance_per_length.h │ ├── clock_frequency.h │ ├── clock_period.h │ ├── current_per_clock_frequency.h │ ├── current_per_information.h │ ├── per_temperature.h │ └── resistance_per_length.h ├── Units │ ├── capacitance_per_length.h │ ├── clock.h │ ├── clock_frequency.h │ ├── clock_period.h │ ├── current_per_clock_frequency.h │ ├── current_per_information.h │ ├── dramSpec_units.h │ ├── per_temperature.h │ ├── resistance_per_length.h │ ├── scaled_information_units.h │ └── scaled_si_units.h ├── dramSpecUnitsSystem.h └── expanded_make_system.hpp ├── main.cpp ├── misc ├── DRAMSpec2.pdf └── DRAMSpec2.png ├── parser ├── ArgumentsParser.cpp ├── ArgumentsParser.h ├── DramSpec.cpp ├── DramSpec.h ├── ResultParser.cpp ├── ResultParser.h ├── TechnologyValues.cpp └── TechnologyValues.h ├── runTests.sh ├── technology_input ├── tech_28nm_ddr4_8G_1024x16.json ├── tech_dummy_input.json ├── tech_hynix_2012_1.2V_dummyless.json ├── tech_hynix_2014_1.2V_8Gb_HBM.json ├── tech_hynix_H5AN4G8NAFR_8x512Mb_x8.json ├── tech_samsung_2014_1.0V_8Gb.json ├── techddr3_2x_bwl.json ├── techddr3_3x_bwl.json ├── techddr3_4x_bwl.json ├── techddr3_5x.json ├── techhmc_2x_bwl.json ├── techhmc_2x_bwl_long.json ├── techhmc_3x_bwl.json ├── techhmc_50.json ├── techhmc_5x.json └── test_technology.json ├── unit_tests ├── unitTestRunner.cpp └── unit_tests │ ├── ArgumentsParserTest.cpp │ ├── BankTest.cpp │ ├── ChannelTest.cpp │ ├── CurrentTest.cpp │ ├── DramSpecTest.cpp │ ├── SubArrayTest.cpp │ ├── TechnologyValuesTest.cpp │ ├── TileTest.cpp │ └── TimingTest.cpp └── utils ├── utils.cpp └── utils.h /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | .directory 3 | timingresult*.json 4 | timingnsresult*.json 5 | currentresult*.json 6 | results*.csv 7 | dctg 8 | results/ 9 | build/ 10 | dramspec 11 | .DS_Store 12 | *.pro.user* 13 | quickTests/ 14 | Makefile 15 | .qmake.stash 16 | dramspec_test_plugin_import.cpp 17 | dramspec_plugin_import.cpp 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "parser/rapidjson"] 2 | path = parser/rapidjson 3 | url = https://github.com/miloyip/rapidjson.git 4 | -------------------------------------------------------------------------------- /DRAMSpec.pro: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017, University of Kaiserslautern 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are 6 | # met: 7 | # 8 | # 1. Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # 15 | # 3. Neither the name of the copyright holder nor the names of its 16 | # contributors may be used to endorse or promote products derived from 17 | # this software without specific prior written permission. 18 | # 19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 | # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 23 | # OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 26 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 27 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | # 31 | # Authors: Matthias Jung, Andr'e Lucas Chinazzo 32 | 33 | CONFIG += c++11 34 | 35 | mac { 36 | CONFIG -= app_bundle 37 | INCLUDEPATH += /opt/boost/include 38 | } 39 | 40 | # Current version of Boost Library 41 | # Tested with Boost 1.58 up to 1.63 42 | # Please update this path to point to your newest Boost Library version 43 | INCLUDEPATH += /users/chinazzo/libs/boost_1_63_0 44 | 45 | #DRAMSpec License 46 | OTHER_FILES += License 47 | 48 | #DRAMSpec HEADERS 49 | HEADERS += core/SubArray.h 50 | HEADERS += core/Tile.h 51 | HEADERS += core/Bank.h 52 | HEADERS += core/Channel.h 53 | HEADERS += core/Timing.h 54 | HEADERS += core/Current.h 55 | 56 | HEADERS += utils/utils.h 57 | HEADERS += parser/ArgumentsParser.h 58 | HEADERS += parser/TechnologyValues.h 59 | HEADERS += parser/DramSpec.h 60 | 61 | # Expanded BOOST/UNITS 62 | HEADERS += expandedBoostUnits/BaseDimensions/clock.h 63 | 64 | HEADERS += expandedBoostUnits/BaseUnits/clock.h 65 | 66 | HEADERS += expandedBoostUnits/DerivedDimensions/capacitance_per_length.h 67 | HEADERS += expandedBoostUnits/DerivedDimensions/clock_frequency.h 68 | HEADERS += expandedBoostUnits/DerivedDimensions/clock_period.h 69 | HEADERS += expandedBoostUnits/DerivedDimensions/current_per_information.h 70 | HEADERS += expandedBoostUnits/DerivedDimensions/current_per_clock_frequency.h 71 | HEADERS += expandedBoostUnits/DerivedDimensions/per_temperature.h 72 | HEADERS += expandedBoostUnits/DerivedDimensions/resistance_per_length.h 73 | 74 | HEADERS += expandedBoostUnits/Units/dramSpec_units.h 75 | HEADERS += expandedBoostUnits/Units/capacitance_per_length.h 76 | HEADERS += expandedBoostUnits/Units/clock_frequency.h 77 | HEADERS += expandedBoostUnits/Units/clock_period.h 78 | HEADERS += expandedBoostUnits/Units/clock.h 79 | HEADERS += expandedBoostUnits/Units/current_per_information.h 80 | HEADERS += expandedBoostUnits/Units/current_per_clock_frequency.h 81 | HEADERS += expandedBoostUnits/Units/per_temperature.h 82 | HEADERS += expandedBoostUnits/Units/resistance_per_length.h 83 | HEADERS += expandedBoostUnits/Units/scaled_si_units.h 84 | HEADERS += expandedBoostUnits/Units/scaled_information_units.h 85 | 86 | HEADERS += expandedBoostUnits/expanded_make_system.hpp 87 | HEADERS += expandedBoostUnits/dramSpecUnitsSystem.h 88 | 89 | #DRAMSpec SOURCE files 90 | SOURCES += core/SubArray.cpp 91 | SOURCES += core/Tile.cpp 92 | SOURCES += core/Bank.cpp 93 | SOURCES += core/Channel.cpp 94 | SOURCES += core/Timing.cpp 95 | SOURCES += core/Current.cpp 96 | 97 | #DRAMSpec other source files 98 | SOURCES += utils/utils.cpp 99 | SOURCES += parser/ArgumentsParser.cpp 100 | SOURCES += parser/TechnologyValues.cpp 101 | SOURCES += parser/DramSpec.cpp 102 | 103 | #Choose output directories 104 | # and source files to be compiled 105 | # according to the compilation mode 106 | CONFIG(release, debug|release) { 107 | message(Release build!) #See messege at "General Messages" tab 108 | DESTDIR = build/release 109 | OBJECTS_DIR = build/release/.obj 110 | MOC_DIR = build/release/.moc 111 | RCC_DIR = build/release/.rcc 112 | UI_DIR = build/release/.ui 113 | 114 | QMAKE_CXXFLAGS += -Wextra -Wall 115 | 116 | SOURCES += main.cpp 117 | 118 | TARGET = dramspec 119 | } 120 | 121 | CONFIG(debug, debug|release) { 122 | message(Debug build!) #See messege at "General Messages" tab 123 | DESTDIR = build/debug 124 | OBJECTS_DIR = build/debug/.obj 125 | MOC_DIR = build/debug/.moc 126 | RCC_DIR = build/debug/.rcc 127 | UI_DIR = build/debug/.ui 128 | 129 | QMAKE_CXXFLAGS += -w 130 | 131 | #UNIT TEST using Boost/Test HEADERS and SOURCE files // Degub only 132 | SOURCES += unit_tests/unit_tests/ArgumentsParserTest.cpp 133 | SOURCES += unit_tests/unit_tests/TechnologyValuesTest.cpp 134 | SOURCES += unit_tests/unit_tests/SubArrayTest.cpp 135 | SOURCES += unit_tests/unit_tests/TileTest.cpp 136 | SOURCES += unit_tests/unit_tests/BankTest.cpp 137 | SOURCES += unit_tests/unit_tests/ChannelTest.cpp 138 | SOURCES += unit_tests/unit_tests/TimingTest.cpp 139 | SOURCES += unit_tests/unit_tests/CurrentTest.cpp 140 | #SOURCES += unit_tests/unit_tests/DramSpecTest.cpp 141 | 142 | SOURCES += unit_tests/unitTestRunner.cpp 143 | 144 | TARGET = dramspec_test 145 | 146 | } 147 | 148 | OTHER_FILES += technology_input/* 149 | OTHER_FILES += architecture_input/* 150 | OTHER_FILES += Makefile 151 | OTHER_FILES += README.md 152 | OTHER_FILES += IODescription.md 153 | OTHER_FILES += runTests.sh 154 | OTHER_FILES += buildDRAMSpec.sh 155 | OTHER_FILES += .gitignore 156 | 157 | -------------------------------------------------------------------------------- /License: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | -------------------------------------------------------------------------------- /architecture_input/arch_dummy_input.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "OFF", 5 | 6 | "ChannelSize[Gb]": 2028, 7 | 8 | "NumberOfBanksPerChannel[]":3264, 9 | "NumberOfHorizontalBanksPerChannel[]": 8054, 10 | "NumberOfVerticalBanksPerChannel[]": 2098, 11 | 12 | "CellsPerSubarrayRow[]": 5507, 13 | "RedundantCellsPerSubarrayRow[]": 7765, 14 | "CellsPerSubarrayColumn[]": 2941, 15 | "RedundantCellsPerSubarrayColumn[]": 7914, 16 | 17 | "Interface[bit]": 3554, 18 | "Prefetch[]": 8578, 19 | 20 | "Frequency[MHz]": 9664, 21 | "CoreFrequency[MHz]": 7546, 22 | 23 | "TilesPerBank[]" : 8259, 24 | 25 | "PageSize[KB]": 463, 26 | "PageSpanningFactor[]": 6401, 27 | "SubarrayToPageFactor[]": 4456, 28 | "BitlineArchitecture[-]": "2957", 29 | 30 | "RetentionTime[ms]" : 2242, 31 | "tREFI(base)[us]" : 4103, 32 | "RefreshMode[]":9263, 33 | 34 | "Temperature[C]": 963 35 | } 36 | -------------------------------------------------------------------------------- /architecture_input/arch_hynix_2012_1.2V_dummyless.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 4, 7 | 8 | "NumberOfBanksPerChannel[]":8, 9 | 10 | "CellsPerSubarrayRow[]": 1046, 11 | "RedundantCellsPerSubarrayRow[]": 22, 12 | "CellsPerSubarrayColumn[]": 1046, 13 | "RedundantCellsPerSubarrayColumn[]": 22, 14 | 15 | "Interface[bit]": 8, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 800, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 1, 22 | 23 | "PageSize[KB]": 2, 24 | "PageSpanningFactor[]": 1, 25 | "SubarrayToPageFactor[]": 1, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/arch_hynix_2014_1.2V_8Gb_HBM.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "ON", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 1, 7 | 8 | "NumberOfBanksPerChannel[]":8, 9 | "NumberOfHorizontalBanksPerChannel[]": 2, 10 | "NumberOfVerticalBanksPerChannel[]": 4, 11 | 12 | "CellsPerSubarrayRow[]": 1046, 13 | "RedundantCellsPerSubarrayRow[]": 22, 14 | "CellsPerSubarrayColumn[]": 524, 15 | "RedundantCellsPerSubarrayColumn[]": 12, 16 | 17 | "Interface[bit]": 128, 18 | "Prefetch[]": 8, 19 | 20 | "Frequency[MHz]": 800, 21 | "CoreFrequency[MHz]": 0, 22 | 23 | "TilesPerBank[]" : 2, 24 | 25 | "PageSize[KB]": 2, 26 | "PageSpanningFactor[]": 0.5, 27 | "SubarrayToPageFactor[]": 1, 28 | "BitlineArchitecture[-]": "OPEN", 29 | 30 | "RetentionTime[ms]" : 64, 31 | "tREFI(base)[us]" : 7.8, 32 | "RefreshMode[]":1, 33 | 34 | "Temperature[C]": 27 35 | 36 | } 37 | -------------------------------------------------------------------------------- /architecture_input/arch_hynix_H5AN4G8NAFR_8x512Mb_x8.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR4", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 4, 7 | 8 | "NumberOfBanksPerChannel[]":16, 9 | 10 | "CellsPerSubarrayRow[]": 1046, 11 | "RedundantCellsPerSubarrayRow[]": 22, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 8, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 800, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 2, 22 | 23 | "PageSize[KB]": 1, 24 | "PageSpanningFactor[]": 0.5, 25 | "SubarrayToPageFactor[]": 3, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 30 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/arch_samsung_2014_1.0V_8Gb.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "ON", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 1, 7 | 8 | "NumberOfBanksPerChannel[]":8, 9 | "NumberOfVerticalBanksPerChannel[]": 4, 10 | 11 | "CellsPerSubarrayRow[]": 1046, 12 | "RedundantCellsPerSubarrayRow[]": 22, 13 | "CellsPerSubarrayColumn[]": 1046, 14 | "RedundantCellsPerSubarrayColumn[]": 22, 15 | 16 | "Interface[bit]": 8, 17 | "Prefetch[]": 8, 18 | 19 | "Frequency[MHz]": 1066, 20 | "CoreFrequency[MHz]": 0, 21 | 22 | "TilesPerBank[]" : 2, 23 | 24 | "PageSize[KB]": 2, 25 | "PageSpanningFactor[]": 0.5, 26 | "SubarrayToPageFactor[]": 1, 27 | "BitlineArchitecture[-]": "OPEN", 28 | 29 | "RetentionTime[ms]" : 64, 30 | "tREFI(base)[us]" : 7.8, 31 | "RefreshMode[]":1, 32 | 33 | "Temperature[C]": 27 34 | 35 | } 36 | -------------------------------------------------------------------------------- /architecture_input/par3D_custom_8x4Gbit_32ch.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 4, 7 | 8 | "NumberOfBanksPerChannel[]":64, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 64, 16 | "Prefetch[]": 2, 17 | 18 | "Frequency[MHz]": 250, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 1, 22 | 23 | "PageSize[KB]": 1, 24 | "PageSpanningFactor[]": 1, 25 | "SubarrayToPageFactor[]": 2, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 32, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/par3D_custom_8x4Gbit_4ch.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 1, 7 | 8 | "NumberOfBanksPerChannel[]":8, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 48, 16 | "Prefetch[]": 4, 17 | 18 | "Frequency[MHz]": 400, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 2, 22 | 23 | "PageSize[KB]": 2.34375, 24 | "PageSpanningFactor[]": 0.5, 25 | "SubarrayToPageFactor[]": 2, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":0.25, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/par3D_custom_8x8Gbit_32ch.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 8, 7 | 8 | "NumberOfBanksPerChannel[]":16, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 64, 16 | "Prefetch[]": 2, 17 | 18 | "Frequency[MHz]": 250, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 1, 22 | 23 | "PageSize[KB]": 2, 24 | "PageSpanningFactor[]": 1, 25 | "SubarrayToPageFactor[]": 2, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 32, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | } 34 | -------------------------------------------------------------------------------- /architecture_input/par_ddr4_8G_512x16.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 8, 7 | 8 | "NumberOfBanksPerChannel[]":16, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 16, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 1200, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 2, 22 | 23 | "PageSize[KB]": 2, 24 | "PageSpanningFactor[]": 0.5, 25 | "SubarrayToPageFactor[]": 1, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":8, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/parddr3.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 4, 7 | 8 | "NumberOfBanksPerChannel[]":8, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 16, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 533, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 2, 22 | 23 | "PageSize[KB]": 2, 24 | "PageSpanningFactor[]": 0.5, 25 | "SubarrayToPageFactor[]": 2, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8125, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/parddr3_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 1, 7 | 8 | "NumberOfBanksPerChannel[]":8, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 16, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 1066, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 1, 22 | 23 | "PageSize[KB]": 2, 24 | "PageSpanningFactor[]": 1, 25 | "SubarrayToPageFactor[]": 2, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 32, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/parddr4++.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 4, 7 | 8 | "NumberOfBanksPerChannel[]":32, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 8, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 1350, 19 | "CoreFrequency[MHz]": 250, 20 | 21 | "TilesPerBank[]" : 2, 22 | 23 | "PageSize[KB]": 0.5, 24 | "PageSpanningFactor[]": 0.5, 25 | "SubarrayToPageFactor[]": 4, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/parddr4+.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 4, 7 | 8 | "NumberOfBanksPerChannel[]":16, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 8, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 1200, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 2, 22 | 23 | "PageSize[KB]": 0.5, 24 | "PageSpanningFactor[]": 0.5, 25 | "SubarrayToPageFactor[]": 6, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/parddr4.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 4, 7 | 8 | "NumberOfBanksPerChannel[]":16, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 8, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 1200, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 2, 22 | 23 | "PageSize[KB]": 1, 24 | "PageSpanningFactor[]": 0.5, 25 | "SubarrayToPageFactor[]": 3, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/parhmc.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "ON", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 1, 7 | 8 | "NumberOfBanksPerChannel[]":32, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 32, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 1250, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 2, 22 | 23 | "PageSize[KB]": 0.25, 24 | "PageSpanningFactor[]": 0.5, 25 | "SubarrayToPageFactor[]": 2, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/parhmc_512RB.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR", 3 | "3D[-]": "ON", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 4, 7 | 8 | "NumberOfBanksPerChannel[]":32, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 32, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 1250, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 1, 22 | 23 | "PageSize[KB]": 0.5, 24 | "PageSpanningFactor[]": 1, 25 | "SubarrayToPageFactor[]": 4, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 32, 29 | "tREFI(base)[us]" : 7.8, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | 34 | } 35 | -------------------------------------------------------------------------------- /architecture_input/test_architecture.json: -------------------------------------------------------------------------------- 1 | { 2 | "DRAMType[-]": "DDR3", 3 | "3D[-]": "OFF", 4 | "DLL[-]": "ON", 5 | 6 | "ChannelSize[Gb]": 1, 7 | 8 | "NumberOfBanksPerChannel[]":8, 9 | 10 | "CellsPerSubarrayRow[]": 524, 11 | "RedundantCellsPerSubarrayRow[]": 12, 12 | "CellsPerSubarrayColumn[]": 524, 13 | "RedundantCellsPerSubarrayColumn[]": 12, 14 | 15 | "Interface[bit]": 16, 16 | "Prefetch[]": 8, 17 | 18 | "Frequency[MHz]": 800, 19 | "CoreFrequency[MHz]": 0, 20 | 21 | "TilesPerBank[]" : 2, 22 | 23 | "PageSize[KB]": 2, 24 | "PageSpanningFactor[]": 0.5, 25 | "SubarrayToPageFactor[]": 1, 26 | "BitlineArchitecture[-]": "OPEN", 27 | 28 | "RetentionTime[ms]" : 64, 29 | "tREFI(base)[us]" : 7.8125, 30 | "RefreshMode[]":1, 31 | 32 | "Temperature[C]": 27 33 | } 34 | -------------------------------------------------------------------------------- /buildDRAMSpec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | STARTTIME=$(date +%s) 4 | 5 | script="`readlink -f "${BASH_SOURCE[0]}"`" 6 | CALLDIR="`dirname "$script"`"; 7 | cd ${CALLDIR}; 8 | 9 | qmake CONFIG+=release DRAMSpec.pro; 10 | echo "Compiling..."; 11 | make -s -j4; 12 | 13 | ENDTIME=$(date +%s) 14 | echo "Ready after $(($ENDTIME - $STARTTIME)) seconds!"; 15 | 16 | 17 | -------------------------------------------------------------------------------- /core/Bank.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #include "Bank.h" 42 | 43 | void 44 | Bank::bankInitialize() 45 | { 46 | bankStorage = 0*drs::bits; 47 | bankWidth = 0*drs::micrometers; 48 | bankHeight = 0*drs::micrometers; 49 | 50 | effectivePageStorage = 0*drs::bits; 51 | nBankLogicalRows = 0; 52 | nRowAddressLines = 0; 53 | nBankLogicalColumns = 0; 54 | nColumnAddressLines = 0; 55 | 56 | } 57 | 58 | void 59 | Bank::bankStorageCalc() 60 | { 61 | bankStorage = SCALE_QUANTITY(channelSize, drs::bit_unit) / nBanks; 62 | } 63 | 64 | void 65 | Bank::bankTilesPlacementAssess() 66 | { 67 | if ( isPowerOfTwo(nTilesPerBank) == false ) { 68 | std::string exceptionMsgThrown("[ERROR] "); 69 | exceptionMsgThrown.append("Total number of tiles per bank "); 70 | exceptionMsgThrown.append("must be a power of two."); 71 | throw exceptionMsgThrown; 72 | } 73 | 74 | // Defining default tiles placement on bank 75 | nVerticalTiles = pow(2, floor(log(nTilesPerBank)/log(4.0)) ); 76 | nHorizontalTiles = nTilesPerBank / nVerticalTiles; 77 | 78 | } 79 | 80 | void 81 | Bank::bankLenghtCalc() 82 | { 83 | bankWidth = nHorizontalTiles 84 | * (tileWidth + 1.0 * rowDecoderWidth); 85 | 86 | bankHeight = nVerticalTiles * tileHeight 87 | + 1.0 * colDecoderHeight; 88 | 89 | } 90 | 91 | void 92 | Bank::bankLogicAssess() 93 | { 94 | 95 | effectivePageStorage = (SCALE_QUANTITY(pageStorage, drs::bit_unit) 96 | * nTilesPerBank 97 | * pageSpanningFactor 98 | ); 99 | // Number of (addressable) rows in a bank 100 | nBankLogicalRows = bankStorage 101 | / effectivePageStorage; 102 | nRowAddressLines = ceil(log2(nBankLogicalRows)); 103 | 104 | // Number of (addressable) columns in a bank 105 | nBankLogicalColumns = effectivePageStorage / interface; 106 | nColumnAddressLines = ceil(log2(nBankLogicalColumns)); 107 | } 108 | 109 | void 110 | Bank::bankCompute() 111 | { 112 | bankStorageCalc(); 113 | try{ 114 | bankTilesPlacementAssess(); 115 | } catch(string exceptionMsgThrown) { 116 | throw exceptionMsgThrown; 117 | } 118 | bankLenghtCalc(); 119 | bankLogicAssess(); 120 | } 121 | -------------------------------------------------------------------------------- /core/Bank.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | #ifndef BANK_H 41 | #define BANK_H 42 | 43 | //This class repesents the fourth level of abstraction of the DRAM structure, 44 | //being the bank a grouping of tile. 45 | 46 | #include "Tile.h" 47 | 48 | namespace bu=boost::units; 49 | namespace si=boost::units::si; 50 | namespace inf=boost::units::information; 51 | namespace drs=boost::units::dramspec; 52 | 53 | class Bank : public Tile 54 | { 55 | public: 56 | Bank() : //Empty constructor for test proposes 57 | Tile() 58 | { 59 | bankInitialize(); 60 | } 61 | 62 | Bank(const std::string& technologyFileName, 63 | const std::string& architectureFileName): 64 | Tile(technologyFileName, architectureFileName) 65 | { 66 | bankInitialize(); 67 | bankCompute(); 68 | } 69 | 70 | // Size in number of bits of a single bank 71 | bu::quantity bankStorage; 72 | 73 | // Tiles placement on bank 74 | double nVerticalTiles; 75 | double nHorizontalTiles; 76 | 77 | // Width in micrometer of a single bank 78 | bu::quantity bankWidth; 79 | // Height in micrometer of a single bank 80 | bu::quantity bankHeight; 81 | 82 | // Total page size accounting all tiles 83 | bu::quantity effectivePageStorage; 84 | double nBankLogicalRows; 85 | double nRowAddressLines; 86 | double nBankLogicalColumns; 87 | double nColumnAddressLines; 88 | 89 | void bankInitialize(); 90 | 91 | void bankCompute(); 92 | void bankStorageCalc(); 93 | void bankTilesPlacementAssess(); 94 | void bankLenghtCalc(); 95 | void bankLogicAssess(); 96 | 97 | }; 98 | 99 | #endif // BANK_H 100 | -------------------------------------------------------------------------------- /core/Channel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #include "Channel.h" 42 | 43 | void 44 | Channel::channelInitialize() 45 | { 46 | channelStorage = 0*drs::gibibit; 47 | channelWidth = 0*drs::micrometer; 48 | channelHeight = 0*drs::micrometer; 49 | channelArea = 0*drs::square_millimeter; 50 | } 51 | 52 | void 53 | Channel::channelStorageCalc() 54 | { 55 | channelStorage = channelSize; 56 | } 57 | 58 | void 59 | Channel::channelBanksPlacementAssess() 60 | { 61 | if ( isPowerOfTwo(nBanks) == false ) { 62 | std::string exceptionMsgThrown("[ERROR] "); 63 | exceptionMsgThrown.append("Total number of banks "); 64 | exceptionMsgThrown.append("must be a power of two."); 65 | throw exceptionMsgThrown; 66 | } 67 | 68 | // Defining default bank placement on channel, 69 | // executed when the number of banks in neither direction is defined 70 | // in the input file 71 | if ( nHorizontalBanks == INVALID_VALUE 72 | && nVerticalBanks == INVALID_VALUE ) 73 | { 74 | nVerticalBanks = pow(2, floor(log(nBanks)/log(4.0)) ); 75 | nHorizontalBanks = nBanks / nVerticalBanks; 76 | } 77 | 78 | // If one direction only is defined 79 | // define the other one. 80 | else if ( nHorizontalBanks == INVALID_VALUE ) 81 | { 82 | if ( isPowerOfTwo(nVerticalBanks) == false 83 | || nVerticalBanks > nBanks ) { 84 | std::string exceptionMsgThrown("[ERROR] "); 85 | exceptionMsgThrown.append("Number of banks in either direction "); 86 | exceptionMsgThrown.append("must be a power of two and "); 87 | exceptionMsgThrown.append("less than or equal to the "); 88 | exceptionMsgThrown.append("total number of banks."); 89 | throw exceptionMsgThrown; 90 | } 91 | 92 | nHorizontalBanks = nBanks / nVerticalBanks; 93 | } 94 | else if ( nVerticalBanks == INVALID_VALUE ) 95 | { 96 | if ( isPowerOfTwo(nHorizontalBanks) == false 97 | || nVerticalBanks > nBanks ) { 98 | std::string exceptionMsgThrown("[ERROR] "); 99 | exceptionMsgThrown.append("Number of banks in either direction "); 100 | exceptionMsgThrown.append("must be a power of two and "); 101 | exceptionMsgThrown.append("less than or equal to the "); 102 | exceptionMsgThrown.append("total number of banks."); 103 | throw exceptionMsgThrown; 104 | } 105 | 106 | nVerticalBanks = nBanks / nHorizontalBanks ; 107 | } 108 | 109 | // If number of banks in both directions is defined 110 | // make sure it matched with the defined total number of banks 111 | else if ( nBanks != nHorizontalBanks * nVerticalBanks ) { 112 | std::string exceptionMsgThrown("[ERROR] "); 113 | exceptionMsgThrown.append("Total number of banks does not match with "); 114 | exceptionMsgThrown.append("the number of banks in both directions."); 115 | throw exceptionMsgThrown; 116 | } 117 | } 118 | 119 | void 120 | Channel::channelLenghtCalc() 121 | { 122 | channelWidth = nHorizontalBanks * bankWidth; 123 | 124 | channelHeight = nVerticalBanks * bankHeight 125 | + 1.0 * DQDriverHeight; 126 | // Add TSV area if is 3D design 127 | if ( is3D ) { 128 | channelHeight = channelHeight + 1.0 * TSVHeight; 129 | } 130 | } 131 | 132 | 133 | void 134 | Channel::channelAreaCalc() 135 | { 136 | channelArea = SCALE_QUANTITY(channelWidth, drs::millimeter_unit) 137 | * SCALE_QUANTITY(channelHeight, drs::millimeter_unit); 138 | } 139 | 140 | void 141 | Channel::channelCompute() 142 | { 143 | channelStorageCalc(); 144 | 145 | try { 146 | channelBanksPlacementAssess(); 147 | channelLenghtCalc(); 148 | }catch (string exceptionMsgThrown){ 149 | throw exceptionMsgThrown; 150 | } 151 | 152 | channelAreaCalc(); 153 | } 154 | -------------------------------------------------------------------------------- /core/Channel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef CHANNEL_H 42 | #define CHANNEL_H 43 | 44 | //This class repesents the fifth level of abstraction of the DRAM structure, 45 | //being the channel a grouping of banks. 46 | 47 | #include "Bank.h" 48 | 49 | namespace bu=boost::units; 50 | namespace si=boost::units::si; 51 | namespace inf=boost::units::information; 52 | namespace drs=boost::units::dramspec; 53 | 54 | class Channel : public Bank 55 | { 56 | public: 57 | Channel() : //Empty constructor for test proposes 58 | Bank() 59 | { 60 | channelInitialize(); 61 | } 62 | 63 | Channel(const string& technologyFileName, 64 | const string& architectureFileName) : 65 | Bank(technologyFileName, architectureFileName) 66 | { 67 | channelInitialize(); 68 | channelCompute(); 69 | } 70 | 71 | // Size in number of bits of the channel 72 | bu::quantity channelStorage; 73 | 74 | // Width in micrometer of the channel 75 | bu::quantity channelWidth; 76 | // Height in micrometer of the channel 77 | bu::quantity channelHeight; 78 | 79 | // Area in micrometer squared of the channel 80 | bu::quantity channelArea; 81 | 82 | void channelInitialize(); 83 | 84 | void channelStorageCalc(); 85 | 86 | void channelBanksPlacementAssess(); 87 | 88 | void channelLenghtCalc(); 89 | 90 | void channelAreaCalc(); 91 | 92 | void channelCompute(); 93 | 94 | }; 95 | 96 | #endif // CHANNEL_H 97 | -------------------------------------------------------------------------------- /core/Current.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | // In this class the current (power) specification of DRAMs is done. 42 | // The class uses already initialized timings to do the calculations. 43 | 44 | #ifndef CURRENT_H 45 | #define CURRENT_H 46 | 47 | #include "Timing.h" 48 | 49 | class Current : public Timing 50 | { 51 | public: 52 | Current() : //Empty constructor for test proposes 53 | Timing() 54 | { 55 | currentInitialize(); 56 | } 57 | 58 | Current(const string& technologyFileName, 59 | const string& architectureFileName, 60 | const bool IOTerminationCurrentFlag) : 61 | Timing(technologyFileName, architectureFileName) 62 | { 63 | currentInitialize(); 64 | includeIOTerminationCurrent = IOTerminationCurrentFlag; 65 | try { 66 | currentCompute(); 67 | }catch (string exceptionMsgThrown){ 68 | throw exceptionMsgThrown; 69 | } 70 | } 71 | 72 | // !! Hard-coded values converted to variables !! 73 | double IDD2nPercentageIfNotDll; 74 | bu::quantity activeBankLeakage; 75 | bu::quantity SSAActiveTime; 76 | bu::quantity bitProCSL; 77 | 78 | // Intermediate values added as variables for code cleanness 79 | double nActiveSubarrays; 80 | double nLocalBitlines; 81 | bu::quantity IDD3nOneACTBank; 82 | bu::quantity IPP3nOneACTBank; 83 | bu::quantity rowAddrsLinesCharge; 84 | bu::quantity IDD0TotalCharge; 85 | bu::quantity IPP0TotalCharge; 86 | bu::quantity effectiveTrc; 87 | bu::quantity IDD0ChargingCurrent; 88 | bu::quantity IPP0ChargingCurrent; 89 | bu::quantity IDD1TotalCharge; 90 | bu::quantity IDD1ChargingCurrent; 91 | bu::quantity colAddrsLinesCharge; 92 | bu::quantity IDD4TotalCharge; 93 | bu::quantity ioTermRdCurrent; 94 | bu::quantity IDD4ChargingCurrent; 95 | bu::quantity ioTermWrCurrent; 96 | bu::quantity iDDRefreshCharge; 97 | bu::quantity iPPRefreshCharge; 98 | bu::quantity effectiveTrfc; 99 | bu::quantity IDD5bChargingCurrent; 100 | bu::quantity IPP5bChargingCurrent; 101 | 102 | // Main variables 103 | bu::quantity IDD0; 104 | bu::quantity IPP0; 105 | bu::quantity IDD1; 106 | bu::quantity IPP1; 107 | bu::quantity IDD4R; 108 | bu::quantity IDD4W; 109 | bu::quantity IDD2n; 110 | //Rho parameter - refer to: 111 | // Jung, M. et al, "A New BankSensitive DRAMPower Model for Efficient 112 | // Design Space Exploration", 2016 113 | double rho; 114 | bu::quantity IDD3n; 115 | bu::quantity IPP3n; 116 | bu::quantity IDD5b; 117 | bu::quantity IPP5b; 118 | 119 | bu::quantity masterWordlineCharge; 120 | bu::quantity localWordlineCharge; 121 | bu::quantity localBitlineCharge; 122 | bu::quantity nLDQs; 123 | bu::quantity SSACharge; 124 | double nCSLs; 125 | bu::quantity CSLCharge; 126 | bu::quantity masterDatalineCharge; 127 | bu::quantity DQWireCharge; 128 | bu::quantity readingCharge; 129 | bu::quantity IddOcdRcv; 130 | 131 | bool includeIOTerminationCurrent; 132 | 133 | void currentInitialize(); 134 | 135 | //function for calculation of IDD2N 136 | void IDD2NCalc(); 137 | 138 | //function for calculation of IDD3N and IPP3N 139 | void IXX3NCalc(); 140 | 141 | //function for calculation of IDD0 and IPP0 142 | void IXX0Calc(); 143 | 144 | //function for calculation of IDD1 and IPP1 145 | void IXX1Calc(); 146 | 147 | //function for calculation of IDD4R 148 | void IDD4RCalc(); 149 | 150 | //function for calculation of IDD4W 151 | void IDD4WCalc(); 152 | 153 | //function for calculation of IDD5B and IPP3B 154 | void IXX5BCalc(); 155 | 156 | void currentCompute(); 157 | 158 | //function for printing Currents 159 | void printCurrent(); 160 | 161 | }; 162 | #endif 163 | -------------------------------------------------------------------------------- /core/SubArray.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #include "SubArray.h" 42 | 43 | namespace si=boost::units::si; 44 | namespace drs=boost::units::dramspec; 45 | 46 | void 47 | SubArray::subArrayInitialize() 48 | { 49 | subArrayRowStorage = 0*drs::bits; 50 | subArrayWidth = 0*drs::micrometers; 51 | subArrayHeight = 0*drs::micrometers; 52 | } 53 | 54 | void 55 | SubArray::subArrayStorageCalc() 56 | { 57 | subArrayRowStorage = (cellsPerLWL - cellsPerLWLRedundancy) 58 | * drs::bits; 59 | 60 | subArrayColumnStorage = (cellsPerLBL - cellsPerLBLRedundancy) 61 | * drs::bits; 62 | 63 | subArrayStorage = subArrayRowStorage * subArrayColumnStorage 64 | / drs::bits; 65 | } 66 | 67 | void 68 | SubArray::subArrayLengthCalc() 69 | { 70 | subArrayWidth = cellsPerLWL * cellWidth + LWLDriverWidth; 71 | 72 | subArrayHeight = cellsPerLBL * cellHeight + BLSenseAmpHeight; 73 | } 74 | 75 | void 76 | SubArray::subArrayCompute() 77 | { 78 | try { 79 | subArrayStorageCalc(); 80 | }catch (std::string exceptionMsgThrown){ 81 | throw exceptionMsgThrown; 82 | } 83 | subArrayLengthCalc(); 84 | } 85 | 86 | void 87 | SubArray::driverUpdate() 88 | { 89 | 90 | // TODO: CHANGE FOR A ABSOLUTE VALUE 91 | // OR SLOPE 92 | // AND USER CHOOSE ONE OR THE OTHER 93 | 94 | 95 | // The value for global ( master ) wordline driver resistance is 96 | // give for a page size of 2 kB.If the page size becomes 97 | // smaller we will need a to drive less => bigger resistance 98 | // and if the page size gets 99 | if ( pageStorage < 2*drs::kibibytes ) { 100 | GWLDriverResistance = GWLDriverResistance + 200*drs::ohm; 101 | } 102 | else if ( pageStorage == 2*drs::kibibytes ) { 103 | GWLDriverResistance = GWLDriverResistance; 104 | } 105 | else if( pageStorage == 4*drs::kibibytes ) { 106 | GWLDriverResistance = GWLDriverResistance - 200*drs::ohm; 107 | } 108 | else if( pageStorage == 8*drs::kibibytes ) { 109 | GWLDriverResistance = GWLDriverResistance - 300*drs::ohm; 110 | } 111 | else { 112 | GWLDriverResistance = GWLDriverResistance - 400*drs::ohm; 113 | } 114 | 115 | if(subArrayRowStorage < 256*drs::bits ) { 116 | LWLDriverResistance = LWLDriverResistance + 200*drs::ohms; 117 | WRDriverResistance = WRDriverResistance + 200*drs::ohms; 118 | } 119 | else if(subArrayRowStorage < 512*drs::bits ) { 120 | LWLDriverResistance = LWLDriverResistance + 100*drs::ohms; 121 | WRDriverResistance = WRDriverResistance + 100*drs::ohms; 122 | } 123 | else if(subArrayRowStorage < 1024*drs::bits ) { 124 | LWLDriverResistance = LWLDriverResistance; 125 | WRDriverResistance = WRDriverResistance; 126 | } 127 | else if(subArrayRowStorage < 1025*drs::bits ) { 128 | LWLDriverResistance = LWLDriverResistance - 100*drs::ohms; 129 | WRDriverResistance = WRDriverResistance - 100*drs::ohms; 130 | 131 | } else { 132 | LWLDriverResistance = LWLDriverResistance - 200*drs::ohms; 133 | WRDriverResistance = WRDriverResistance - 200*drs::ohms; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /core/SubArray.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef SUBARRAY_H 42 | #define SUBARRAY_H 43 | 44 | //This class presents the second level of abstraction of the DRAM structure, 45 | //of the DRAM which is a subarray. 46 | 47 | #include "../parser/TechnologyValues.h" 48 | 49 | namespace bu=boost::units; 50 | namespace si=boost::units::si; 51 | namespace inf=boost::units::information; 52 | namespace drs=boost::units::dramspec; 53 | 54 | class SubArray : public TechnologyValues 55 | { 56 | public: 57 | SubArray() : //Empty constructor for test proposes 58 | TechnologyValues() 59 | { 60 | subArrayInitialize(); 61 | } 62 | 63 | SubArray(const string& technologyFileName, 64 | const string& architectureFileName) : 65 | TechnologyValues(technologyFileName, architectureFileName) 66 | { 67 | subArrayInitialize(); 68 | try { 69 | subArrayCompute(); 70 | }catch (string exceptionMsgThrown){ 71 | throw exceptionMsgThrown; 72 | } 73 | driverUpdate(); 74 | } 75 | 76 | // Size in number of bits of a single subarray 77 | bu::quantity subArrayStorage; 78 | 79 | // Size in number of bits of a single physical row of a subarray 80 | bu::quantity subArrayRowStorage; 81 | 82 | // Size in number of bits of a single column physical of a subarray 83 | bu::quantity subArrayColumnStorage; 84 | 85 | //the width of the subarray which should be calculated 86 | bu::quantity subArrayWidth; 87 | 88 | //the height of the subarray which should be calculated 89 | bu::quantity subArrayHeight; 90 | 91 | void subArrayInitialize(); 92 | 93 | void subArrayStorageCalc(); 94 | 95 | void subArrayLengthCalc(); 96 | 97 | void subArrayCompute(); 98 | 99 | void driverUpdate(); 100 | }; 101 | #endif//SUBARRAY_H 102 | -------------------------------------------------------------------------------- /core/Tile.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #include "Tile.h" 42 | 43 | void 44 | Tile::tileInitialize() 45 | { 46 | tileStorage = 0*drs::bits; 47 | tileWidth = 0*drs::micrometers; 48 | tileHeight = 0*drs::micrometers; 49 | 50 | nSubArraysPerArrayBlock = 0; 51 | nArrayBlocksPerTile = 0; 52 | 53 | } 54 | 55 | void 56 | Tile::tileStorageCalc() 57 | { 58 | bu::quantity bankStorage(channelSize/nBanks); 59 | 60 | tileStorage = bankStorage/nTilesPerBank; 61 | 62 | } 63 | 64 | void 65 | Tile::checkTileDataConsistency() 66 | { 67 | // Check input consistency with respect to tilesPerBank & pageSpanningFactor 68 | if ( nTilesPerBank == 1.0 ) { 69 | if ( pageSpanningFactor != 1.0 ) 70 | { 71 | std::string exceptionMsgThrown("[ERROR] "); 72 | exceptionMsgThrown.append("If architecture has "); 73 | exceptionMsgThrown.append("1 tile per bank, "); 74 | exceptionMsgThrown.append("the page spanning factor "); 75 | exceptionMsgThrown.append("across the tile must be 1."); 76 | throw exceptionMsgThrown; 77 | } 78 | } 79 | 80 | else if ( nTilesPerBank == 2.0 ) { 81 | if ( pageSpanningFactor != 1.0 82 | && pageSpanningFactor != 0.5 83 | ) 84 | { 85 | std::string exceptionMsgThrown("[ERROR] "); 86 | exceptionMsgThrown.append("If architecture has "); 87 | exceptionMsgThrown.append("2 tile per bank, "); 88 | exceptionMsgThrown.append("the page spanning factor "); 89 | exceptionMsgThrown.append("across the tile must be 1 or 0.5."); 90 | throw exceptionMsgThrown; 91 | } 92 | } 93 | 94 | else if ( nTilesPerBank == 4.0 ) { 95 | if ( pageSpanningFactor != 1 96 | && pageSpanningFactor != 0.5 97 | && pageSpanningFactor != 0.25 ) 98 | { 99 | std::string exceptionMsgThrown("[ERROR] "); 100 | exceptionMsgThrown.append("If architecture has "); 101 | exceptionMsgThrown.append("4 tile per bank, "); 102 | exceptionMsgThrown.append("the page spanning factor "); 103 | exceptionMsgThrown.append("across the tile must be 1, 0.5 or 0.25."); 104 | throw exceptionMsgThrown; 105 | } 106 | } 107 | 108 | else { 109 | std::string exceptionMsgThrown("[ERROR] "); 110 | exceptionMsgThrown.append("Architecture must have "); 111 | exceptionMsgThrown.append("1, 2 or 4 tile per bank."); 112 | throw exceptionMsgThrown; 113 | } 114 | } 115 | 116 | void 117 | Tile::tileLenghtCalc() 118 | { 119 | nSubArraysPerArrayBlock = ceil( 120 | SCALE_QUANTITY(pageStorage, drs::bit_unit) 121 | * pageSpanningFactor 122 | * subArrayToPageFactor 123 | / subArrayRowStorage 124 | ); 125 | 126 | tileWidth = nSubArraysPerArrayBlock * subArrayWidth 127 | + 1.0 * LWLDriverWidth; 128 | 129 | 130 | if ( BLArchitecture == "OPEN" ) { 131 | nArrayBlocksPerTile = ceil(tileStorage 132 | / subArrayStorage 133 | / nSubArraysPerArrayBlock 134 | + 1 // Dummy row of subarrays 135 | // for BL capacitance matching 136 | ); 137 | 138 | tileHeight = nArrayBlocksPerTile * subArrayHeight 139 | - 1.0 * BLSenseAmpHeight 140 | + 1.0 * colDecoderHeight; 141 | 142 | } 143 | 144 | else if ( BLArchitecture == "FOLDED" ) { 145 | nArrayBlocksPerTile = ceil(tileStorage 146 | / subArrayStorage 147 | / nSubArraysPerArrayBlock 148 | ); 149 | 150 | tileHeight = nArrayBlocksPerTile * subArrayHeight 151 | + 1.0 * BLSenseAmpHeight 152 | + 1.0 * colDecoderHeight; 153 | } 154 | 155 | else { 156 | std::string exceptionMsgThrown("[ERROR] "); 157 | exceptionMsgThrown.append("Bitline architecture must be "); 158 | exceptionMsgThrown.append("either \'OPEN\' or \'FOLDED\'."); 159 | throw exceptionMsgThrown; 160 | } 161 | 162 | } 163 | 164 | void 165 | Tile::tileCompute() 166 | { 167 | tileStorageCalc(); 168 | 169 | try { 170 | checkTileDataConsistency(); 171 | tileLenghtCalc(); 172 | }catch (std::string exceptionMsgThrown){ 173 | throw exceptionMsgThrown; 174 | } 175 | 176 | } 177 | 178 | -------------------------------------------------------------------------------- /core/Tile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef TILE_H 42 | #define TILE_H 43 | 44 | //This class repesents the third level of abstraction of the DRAM structure, 45 | //being the tile a grouping of subarrays which are a grouping of cells. 46 | 47 | #include "SubArray.h" 48 | 49 | namespace bu=boost::units; 50 | namespace si=boost::units::si; 51 | namespace inf=boost::units::information; 52 | namespace drs=boost::units::dramspec; 53 | 54 | class Tile : public SubArray 55 | { 56 | public: 57 | Tile() : //Empty constructor for test proposes 58 | SubArray() 59 | { 60 | tileInitialize(); 61 | } 62 | 63 | Tile(const string& technologyFileName, 64 | const string& architectureFileName): 65 | SubArray(technologyFileName, architectureFileName) 66 | { 67 | tileInitialize(); 68 | try { 69 | tileCompute(); 70 | }catch (string exceptionMsgThrown){ 71 | throw exceptionMsgThrown; 72 | } 73 | } 74 | 75 | // Size in number of bits of a single tile 76 | bu::quantity tileStorage; 77 | 78 | // Width in micrometer of a single tile 79 | bu::quantity tileWidth; 80 | // Height in micrometer of a single tile 81 | bu::quantity tileHeight; 82 | 83 | // Number of subarrays per tile in the wordline direction 84 | double nSubArraysPerArrayBlock; 85 | // Number of subarrays per tile in the bitline direction 86 | double nArrayBlocksPerTile; 87 | 88 | void tileInitialize(); 89 | 90 | void tileStorageCalc(); 91 | 92 | void checkTileDataConsistency(); 93 | void tileLenghtCalc(); 94 | 95 | void tileCompute(); 96 | 97 | }; 98 | 99 | #endif // TILE_H 100 | -------------------------------------------------------------------------------- /core/Timing.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | //In this class the timing specification of DRAMs is done 42 | //The class uses an initialized DRAM Channel to compute the timing specification 43 | 44 | #ifndef TIMING_H 45 | #define TIMING_H 46 | 47 | #include "Channel.h" 48 | 49 | namespace bu=boost::units; 50 | namespace si=boost::units::si; 51 | namespace inf=boost::units::information; 52 | namespace drs=boost::units::dramspec; 53 | 54 | class Timing : public Channel 55 | { 56 | public: 57 | Timing() : //Empty constructor for test proposes 58 | Channel() 59 | { 60 | timingInitialize(); 61 | } 62 | 63 | Timing(const string& technologyFileName, 64 | const string& architectureFileName) : 65 | Channel(technologyFileName, architectureFileName) 66 | { 67 | timingInitialize(); 68 | try { 69 | timingCompute(); 70 | }catch (string exceptionMsgThrown){ 71 | throw exceptionMsgThrown; 72 | } 73 | } 74 | 75 | //Delay of cell 76 | bu::quantity cellDelay; 77 | 78 | //Resistance of local wordline 79 | bu::quantity localWordlineResistance; 80 | //Capacitace of local wordline 81 | bu::quantity localWordlineCapacitance; 82 | //Delay of local wordline 83 | bu::quantity localWordlineDelay; 84 | 85 | //Resistance of local bitline 86 | bu::quantity localBitlineResistance; 87 | //Capacitace of local bitline 88 | bu::quantity localBitlineCapacitance; 89 | //Delay of local bitline 90 | bu::quantity localBitlineDelay; 91 | 92 | //Resistance of global wordline 93 | bu::quantity globalWordlineResistance; 94 | //Capacitace of global wordline 95 | bu::quantity globalWordlineCapacitance; 96 | //Delay through global wordline driver and wiring 97 | bu::quantity globalWordlineDelay; 98 | 99 | //t_rcd: ACT to internal read or write delay time 100 | bu::quantity trcd; 101 | 102 | //Delay of the cell for 99% (recharge) 103 | bu::quantity cellDelay99p; 104 | 105 | //Delay of the bitline for 99% (recharge) 106 | bu::quantity localBitlineDelay99p; 107 | 108 | //Delay for internal ACT cmd to effective refresh of the cell 109 | bu::quantity ACTtoRefreshCellDelay; 110 | 111 | //Resistance of CSL wire 112 | bu::quantity CSLResistance; 113 | //Capacitace of CSL wire 114 | bu::quantity CSLCapacitance; 115 | //Delay through CSL driver and wiring 116 | bu::quantity tcsl; 117 | 118 | //Resistance of global dataline wire 119 | bu::quantity globalDatalineResistance; 120 | //Capacitace of global dataline wire 121 | bu::quantity globalDatalineCapacitance; 122 | //Delay through global dataline driver and wiring 123 | bu::quantity tgdl; 124 | 125 | //DQ wire length 126 | bu::quantity DQWireLength; 127 | //Resistance of DQ wire 128 | bu::quantity DQWireResistance; 129 | //Capacitace of DQ wire 130 | bu::quantity DQWireCapacitance; 131 | //Delay through DQ driver and wiring 132 | bu::quantity tdq; 133 | 134 | 135 | //tcl = tcas - Column Access Strobe delay 136 | bu::quantity tcas; 137 | 138 | //trl = tcas + tal - Read (Latency) delay 139 | bu::quantity trl; 140 | 141 | //trtp - Read to Precharge delay 142 | bu::quantity trtp; 143 | 144 | //tccd - Column-to-Column delay 145 | bu::quantity tccd; 146 | 147 | 148 | //tras - Row Access Strobe delay 149 | bu::quantity tras; 150 | 151 | //twr - Write Recovery delay 152 | bu::quantity twr; 153 | 154 | //trp - Row Precharge delay 155 | bu::quantity trp; 156 | 157 | //trc - Row Cycle delay 158 | bu::quantity trc; 159 | 160 | //tck - One clock cycle time 161 | bu::quantity tck; 162 | 163 | //tck - One core clock cycle time 164 | bu::quantity tckCore; 165 | 166 | //trefI - Refresh Interval delay 167 | bu::quantity trefI; 168 | 169 | //Number of rows refreshed per auto-refresh command (total, not per bank) 170 | double nRowsRefreshedPerARCmd; 171 | 172 | //trfc - Refresh Cycle delay 173 | bu::quantity trfc; 174 | 175 | //Maximum core frequency 176 | bu::quantity maxCoreFreq; 177 | 178 | //Ratio between bus and core frequencies 179 | double clockFactor; 180 | 181 | //Clock period 182 | bu::quantity clkPeriod; 183 | //Core clock period 184 | bu::quantity coreClkPeriod; 185 | 186 | //trcd in number of clocks 187 | bu::quantity trcd_clk; 188 | //tcas in number of clocks 189 | bu::quantity tcas_clk; 190 | //tcas in number of core clocks 191 | bu::quantity tcas_coreClk; 192 | //tras in number of clocks 193 | bu::quantity tras_clk; 194 | //trp in number of clocks 195 | bu::quantity trp_clk; 196 | //trc in number of clocks 197 | bu::quantity trc_clk; 198 | //trl in number of clocks 199 | bu::quantity trl_clk; 200 | //trl in number of core clocks 201 | bu::quantity trl_coreClk; 202 | //twl in number of clocks 203 | bu::quantity twl_clk; 204 | //trtp in number of clocks 205 | bu::quantity trtp_clk; 206 | //tccd in number of clocks 207 | bu::quantity tccd_clk; 208 | //tccd in number of core clocks 209 | bu::quantity tccd_coreClk; 210 | //twr in number of clocks 211 | bu::quantity twr_clk; 212 | //trfc in number of clocks 213 | bu::quantity trfc_clk; 214 | //trefI in number of clocks 215 | bu::quantity trefI_clk; 216 | 217 | void timingInitialize(); 218 | 219 | void trcdCalc(); 220 | 221 | void trasCalc(); 222 | 223 | void trpCalc(); 224 | 225 | void trcCalc(); 226 | 227 | void tckCalc(); 228 | 229 | void trfcCalc(); 230 | 231 | void trefICalc(); 232 | 233 | void clkTiming(); 234 | 235 | void timingCompute(); 236 | 237 | void printTimings(); 238 | }; 239 | 240 | #endif 241 | -------------------------------------------------------------------------------- /expandedBoostUnits/BaseDimensions/clock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CLOCK_BASE_DIMENSION_H 42 | #define DRAMSPEC_CLOCK_BASE_DIMENSION_H 43 | 44 | #include 45 | #include 46 | 47 | namespace boost { 48 | 49 | namespace units { 50 | 51 | /// base dimension of number of clocks 52 | struct clock_base_dimension : 53 | boost::units::base_dimension 54 | { }; 55 | 56 | } // namespace units 57 | 58 | } // namespace boost 59 | 60 | #if BOOST_UNITS_HAS_BOOST_TYPEOF 61 | 62 | #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() 63 | 64 | BOOST_TYPEOF_REGISTER_TYPE(boost::units::clock_base_dimension) 65 | 66 | #endif 67 | 68 | namespace boost { 69 | 70 | namespace units { 71 | 72 | /// dimension of number of clocks (#) 73 | typedef clock_base_dimension::dimension_type clock_dimension; 74 | 75 | } // namespace units 76 | 77 | } // namespace boost 78 | 79 | #endif // DRAMSPEC_CLOCK_BASE_DIMENSION_H 80 | -------------------------------------------------------------------------------- /expandedBoostUnits/BaseUnits/clock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CLOCK_BASE_UNIT_H 42 | #define DRAMSPEC_CLOCK_BASE_UNIT_H 43 | 44 | #include 45 | 46 | #include 47 | #include 48 | #include "../BaseDimensions/clock.h" 49 | 50 | namespace boost { 51 | 52 | namespace units { 53 | 54 | namespace dramspec { 55 | 56 | struct clock_base_unit : public base_unit 57 | { 58 | static std::string name() { return("clock"); } 59 | static std::string symbol() { return("clock"); } 60 | }; 61 | 62 | } // namespace dramspec 63 | 64 | } // namespace units 65 | 66 | } // namespace boost 67 | 68 | #if BOOST_UNITS_HAS_BOOST_TYPEOF 69 | 70 | #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() 71 | 72 | BOOST_TYPEOF_REGISTER_TYPE(boost::units::dramspec::clock_base_unit) 73 | 74 | #endif 75 | 76 | #endif // DRAMSPEC_CLOCK_BASE_UNIT_H 77 | -------------------------------------------------------------------------------- /expandedBoostUnits/ConversionFactors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, Matthias Jung, Christian Weis, Kamal Haddad 33 | */ 34 | 35 | //This class presents the main key technology points used by this tool. 36 | //The values are read from a json file 37 | #ifndef VARIABLEPREFIXES_H 38 | #define VARIABLEPREFIXES_H 39 | 40 | 41 | #endif //VARIABLEPREFIXES_H 42 | -------------------------------------------------------------------------------- /expandedBoostUnits/DerivedDimensions/capacitance_per_length.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CAPACITANCE_PER_LENGTH_DERIVED_DIMENSION_H 42 | #define DRAMSPEC_CAPACITANCE_PER_LENGTH_DERIVED_DIMENSION_H 43 | 44 | #include 45 | 46 | #include 47 | #include 48 | #include 49 | #include 50 | 51 | namespace boost { 52 | 53 | namespace units { 54 | 55 | /// derived dimension for capacitance per length: L^-3 M^-1 T^4 I^2 56 | typedef derived_dimension::type capacitance_per_length_dimension; 60 | 61 | } // namespace units 62 | 63 | } // namespace boost 64 | 65 | #endif // DRAMSPEC_CAPACITANCE_PER_LENGTH_DERIVED_DIMENSION_H 66 | -------------------------------------------------------------------------------- /expandedBoostUnits/DerivedDimensions/clock_frequency.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CLOCK_FREQUENCY_DERIVED_DIMENSION_H 42 | #define DRAMSPEC_CLOCK_FREQUENCY_DERIVED_DIMENSION_H 43 | 44 | #include 45 | 46 | #include 47 | #include "../BaseDimensions/clock.h" 48 | 49 | namespace boost { 50 | 51 | namespace units { 52 | 53 | /// derived dimension for clock per time: CLOCK^1 T^-1 54 | typedef derived_dimension::type clock_frequency_dimension; 56 | 57 | } // namespace units 58 | 59 | } // namespace boost 60 | 61 | #endif // DRAMSPEC_CLOCK_FREQUENCY_DERIVED_DIMENSION_H 62 | -------------------------------------------------------------------------------- /expandedBoostUnits/DerivedDimensions/clock_period.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CLOCK_PERIOD_DERIVED_DIMENSION_H 42 | #define DRAMSPEC_CLOCK_PERIOD_DERIVED_DIMENSION_H 43 | 44 | #include 45 | 46 | #include 47 | #include "../BaseDimensions/clock.h" 48 | 49 | namespace boost { 50 | 51 | namespace units { 52 | 53 | /// derived dimension for time per clock: T^1 CLOCK^-1 54 | typedef derived_dimension::type clock_period_dimension; 56 | 57 | } // namespace units 58 | 59 | } // namespace boost 60 | 61 | #endif // DRAMSPEC_CLOCK_PERIOD_DERIVED_DIMENSION_H 62 | -------------------------------------------------------------------------------- /expandedBoostUnits/DerivedDimensions/current_per_clock_frequency.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CURRENT_PER_CLOCK_FREQUENCY_DERIVED_DIMENSION_H 42 | #define DRAMSPEC_CURRENT_PER_CLOCK_FREQUENCY_DERIVED_DIMENSION_H 43 | 44 | #include 45 | 46 | #include 47 | #include "../BaseDimensions/clock.h" 48 | #include 49 | 50 | namespace boost { 51 | 52 | namespace units { 53 | 54 | /// derived dimension for resistance per length: I^1 CLK^-1 T^1 55 | typedef derived_dimension::type current_per_clock_frequency_dimension; 58 | 59 | } // namespace units 60 | 61 | } // namespace boost 62 | 63 | #endif // DRAMSPEC_CURRENT_PER_CLOCK_FREQUENCY_DERIVED_DIMENSION_H 64 | -------------------------------------------------------------------------------- /expandedBoostUnits/DerivedDimensions/current_per_information.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CURRENT_PER_INFORMATION_DERIVED_DIMENSION_H 42 | #define DRAMSPEC_CURRENT_PER_INFORMATION_DERIVED_DIMENSION_H 43 | 44 | #include 45 | 46 | #include 47 | #include 48 | 49 | namespace boost { 50 | 51 | namespace units { 52 | 53 | /// derived dimension for current per information 54 | /// I^1 INF^-1 55 | typedef derived_dimension::type 57 | current_per_information_dimension; 58 | 59 | } // namespace units 60 | 61 | } // namespace boost 62 | 63 | #endif // DRAMSPEC_CURRENT_PER_INFORMATION_DERIVED_DIMENSION_H 64 | -------------------------------------------------------------------------------- /expandedBoostUnits/DerivedDimensions/per_temperature.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_PER_TEMPERATURE_DERIVED_DIMENSION_H 42 | #define DRAMSPEC_PER_TEMPERATURE_DERIVED_DIMENSION_H 43 | 44 | #include 45 | 46 | #include 47 | 48 | namespace boost { 49 | 50 | namespace units { 51 | 52 | /// derived dimension for "per temperature" 53 | /// TEMP^-1 54 | typedef derived_dimension::type 55 | per_temperature_dimension; 56 | 57 | } // namespace units 58 | 59 | } // namespace boost 60 | 61 | #endif // DRAMSPEC_PER_TEMPERATURE_DERIVED_DIMENSION_H 62 | -------------------------------------------------------------------------------- /expandedBoostUnits/DerivedDimensions/resistance_per_length.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_RESISTANCE_PER_LENGTH_DERIVED_DIMENSION_H 42 | #define DRAMSPEC_RESISTANCE_PER_LENGTH_DERIVED_DIMENSION_H 43 | 44 | #include 45 | 46 | #include 47 | #include 48 | #include 49 | #include 50 | 51 | namespace boost { 52 | 53 | namespace units { 54 | 55 | /// derived dimension for resistance per length: L^1 M^1 T^-3 I^-2 56 | typedef derived_dimension::type resistance_per_length_dimension; 60 | 61 | } // namespace units 62 | 63 | } // namespace boost 64 | 65 | #endif // DRAMSPEC_RESISTANCE_PER_LENGTH_DERIVED_DIMENSION_H 66 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/capacitance_per_length.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CAPACITANCE_PER_LENGHT_UNIT_H 42 | #define DRAMSPEC_CAPACITANCE_PER_LENGHT_UNIT_H 43 | 44 | #include "../dramSpecUnitsSystem.h" 45 | #include "../DerivedDimensions/capacitance_per_length.h" 46 | #include 47 | 48 | namespace boost { 49 | 50 | namespace units { 51 | 52 | namespace dramspec { 53 | 54 | typedef unit capacitance_per_length; 55 | 56 | BOOST_UNITS_STATIC_CONSTANT(farad_per_meter,capacitance_per_length); 57 | BOOST_UNITS_STATIC_CONSTANT(farads_per_meter,capacitance_per_length); 58 | 59 | // femtofarad / millimeter = picofarad / meter 60 | typedef make_scaled_unit>>::type femtofarad_per_millimeter_unit; 61 | BOOST_UNITS_STATIC_CONSTANT(femtofarad_per_millimeter,femtofarad_per_millimeter_unit); 62 | BOOST_UNITS_STATIC_CONSTANT(femtofarads_per_millimeter,femtofarad_per_millimeter_unit); 63 | 64 | // nanofarad / millimeter = microfarad / meter 65 | typedef make_scaled_unit>>::type nanofarad_per_millimeter_unit; 66 | BOOST_UNITS_STATIC_CONSTANT(nanofarad_per_millimeter,nanofarad_per_millimeter_unit); 67 | BOOST_UNITS_STATIC_CONSTANT(nanofarads_per_millimeter,nanofarad_per_millimeter_unit); 68 | 69 | // nanofarad / micrometer = millifarad / meter 70 | typedef make_scaled_unit>>::type nanofarad_per_micrometer_unit; 71 | BOOST_UNITS_STATIC_CONSTANT(nanofarad_per_micrometer,nanofarad_per_micrometer_unit); 72 | BOOST_UNITS_STATIC_CONSTANT(nanofarads_per_micrometer,nanofarad_per_micrometer_unit); 73 | 74 | } // namespace dramspec 75 | 76 | } // namespace units 77 | 78 | } // namespace boost 79 | 80 | #endif // DRAMSPEC_CAPACITANCE_PER_LENGHT_UNIT_H 81 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/clock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CLOCK_UNIT_H 42 | #define DRAMSPEC_CLOCK_UNIT_H 43 | 44 | #include "../dramSpecUnitsSystem.h" 45 | 46 | #include "../BaseDimensions/clock.h" 47 | 48 | namespace boost { 49 | 50 | namespace units { 51 | 52 | namespace dramspec { 53 | 54 | typedef unit clock_unit; 55 | 56 | BOOST_UNITS_STATIC_CONSTANT(clock,clock_unit); 57 | BOOST_UNITS_STATIC_CONSTANT(clocks,clock_unit); 58 | 59 | 60 | } // namespace dramspec 61 | 62 | inline std::string name_string(const reduce_unit::type&) { return "clock"; } 63 | inline std::string symbol_string(const reduce_unit::type&) { return "clock"; } 64 | 65 | } // namespace units 66 | 67 | } // namespace boost 68 | 69 | #endif // DRAMSPEC_CLOCK_UNIT_H 70 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/clock_frequency.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CLOCK_FREQUENCY_UNIT_H 42 | #define DRAMSPEC_CLOCK_FREQUENCY_UNIT_H 43 | 44 | #include "../dramSpecUnitsSystem.h" 45 | #include "../DerivedDimensions/clock_frequency.h" 46 | 47 | #include 48 | #include 49 | #include 50 | 51 | namespace boost { 52 | 53 | namespace units { 54 | 55 | namespace dramspec { 56 | 57 | typedef unit clock_frequency_unit; 58 | 59 | BOOST_UNITS_STATIC_CONSTANT(clock_per_second,clock_frequency_unit); 60 | BOOST_UNITS_STATIC_CONSTANT(clocks_per_second,clock_frequency_unit); 61 | BOOST_UNITS_STATIC_CONSTANT(clock_hertz,clock_frequency_unit); 62 | 63 | typedef make_scaled_unit>>::type megahertz_clock_unit; 64 | BOOST_UNITS_STATIC_CONSTANT(megahertz_clock,megahertz_clock_unit); 65 | typedef make_scaled_unit>>::type gigahertz_clock_unit; 66 | BOOST_UNITS_STATIC_CONSTANT(gigahertz_clock,gigahertz_clock_unit); 67 | 68 | } // namespace dramspec 69 | 70 | inline std::string name_string(const reduce_unit::type&) { return "clock/second"; } 71 | inline std::string symbol_string(const reduce_unit::type&) { return "clock/s"; } 72 | 73 | } // namespace units 74 | 75 | } // namespace boost 76 | 77 | #endif // DRAMSPEC_CLOCK_FREQUENCY_UNIT_H 78 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/clock_period.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CLOCK_PERIOD_UNIT_H 42 | #define DRAMSPEC_CLOCK_PERIOD_UNIT_H 43 | 44 | #include "../dramSpecUnitsSystem.h" 45 | #include "../DerivedDimensions/clock_period.h" 46 | 47 | #include 48 | #include 49 | #include 50 | 51 | namespace boost { 52 | 53 | namespace units { 54 | 55 | namespace dramspec { 56 | 57 | typedef unit clock_period_unit; 58 | 59 | BOOST_UNITS_STATIC_CONSTANT(second_per_clock,clock_period_unit); 60 | BOOST_UNITS_STATIC_CONSTANT(seconds_per_clock,clock_period_unit); 61 | 62 | typedef make_scaled_unit>>::type microsecond_per_clock_unit; 63 | BOOST_UNITS_STATIC_CONSTANT(microsecond_per_clock,microsecond_per_clock_unit); 64 | BOOST_UNITS_STATIC_CONSTANT(microseconds_per_clock,microsecond_per_clock_unit); 65 | typedef make_scaled_unit>>::type nanosecond_per_clock_unit; 66 | BOOST_UNITS_STATIC_CONSTANT(nanosecond_per_clock,nanosecond_per_clock_unit); 67 | BOOST_UNITS_STATIC_CONSTANT(nanoseconds_per_clock,nanosecond_per_clock_unit); 68 | 69 | } // namespace dramspec 70 | 71 | inline std::string name_string(const reduce_unit::type&) { return "second/clock"; } 72 | inline std::string symbol_string(const reduce_unit::type&) { return "s/clock"; } 73 | 74 | } // namespace units 75 | 76 | } // namespace boost 77 | 78 | #endif // DRAMSPEC_CLOCK_PERIOD_UNIT_H 79 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/current_per_clock_frequency.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CURRENT_PER_CLOCK_FREQUENCY_UNIT_H 42 | #define DRAMSPEC_CURRENT_PER_CLOCK_FREQUENCY_UNIT_H 43 | 44 | #include "../dramSpecUnitsSystem.h" 45 | #include "../DerivedDimensions/current_per_clock_frequency.h" 46 | 47 | namespace boost { 48 | 49 | namespace units { 50 | 51 | namespace dramspec { 52 | 53 | typedef unit current_per_clock_frequency; 54 | 55 | BOOST_UNITS_STATIC_CONSTANT(ampere_per_clock_hertz,current_per_clock_frequency); 56 | BOOST_UNITS_STATIC_CONSTANT(amperes_per_clock_hertz,current_per_clock_frequency); 57 | 58 | // milliampere / (megahertz clock) = nanoampere / (hertz clock) 59 | typedef make_scaled_unit>>::type milliampere_per_megahertz_clock_unit; 60 | BOOST_UNITS_STATIC_CONSTANT(milliampere_per_megahertz_clock,milliampere_per_megahertz_clock_unit); 61 | BOOST_UNITS_STATIC_CONSTANT(milliamperes_per_megahertz_clock,milliampere_per_megahertz_clock_unit); 62 | 63 | // microampere / (megahertz clock) = picoampere / (hertz clock) 64 | typedef make_scaled_unit>>::type microampere_per_megahertz_clock_unit; 65 | BOOST_UNITS_STATIC_CONSTANT(microampere_per_megahertz_clock,microampere_per_megahertz_clock_unit); 66 | BOOST_UNITS_STATIC_CONSTANT(microamperes_per_megahertz_clock,microampere_per_megahertz_clock_unit); 67 | 68 | } // namespace dramspec 69 | 70 | } // namespace units 71 | 72 | } // namespace boost 73 | 74 | #endif // DRAMSPEC_CURRENT_PER_CLOCK_FREQUENCY_UNIT_H 75 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/current_per_information.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_CURRENT_PER_INFORMATION_UNIT_H 42 | #define DRAMSPEC_CURRENT_PER_INFORMATION_UNIT_H 43 | 44 | #include "../dramSpecUnitsSystem.h" 45 | 46 | #include "../DerivedDimensions/current_per_information.h" 47 | 48 | #include 49 | #include 50 | 51 | namespace boost { 52 | 53 | namespace units { 54 | 55 | namespace dramspec { 56 | 57 | typedef unit ampere_per_bit_unit; 58 | BOOST_UNITS_STATIC_CONSTANT(ampere_per_bit,ampere_per_bit_unit); 59 | BOOST_UNITS_STATIC_CONSTANT(amperes_per_bit,ampere_per_bit_unit); 60 | typedef make_scaled_unit>>::type milliampere_per_bit_unit; 61 | BOOST_UNITS_STATIC_CONSTANT(milliampere_per_bit,milliampere_per_bit_unit); 62 | BOOST_UNITS_STATIC_CONSTANT(milliamperes_per_bit,milliampere_per_bit_unit); 63 | typedef make_scaled_unit>>::type microampere_per_bit_unit; 64 | BOOST_UNITS_STATIC_CONSTANT(microampere_per_bit,microampere_per_bit_unit); 65 | BOOST_UNITS_STATIC_CONSTANT(microamperes_per_bit,microampere_per_bit_unit); 66 | 67 | typedef unit ampere_per_byte_unit; 68 | BOOST_UNITS_STATIC_CONSTANT(ampere_per_byte,ampere_per_byte_unit); 69 | BOOST_UNITS_STATIC_CONSTANT(amperes_per_byte,ampere_per_byte_unit); 70 | typedef make_scaled_unit>>::type milliampere_per_byte_unit; 71 | BOOST_UNITS_STATIC_CONSTANT(milliampere_per_byte,milliampere_per_byte_unit); 72 | BOOST_UNITS_STATIC_CONSTANT(milliamperes_per_byte,milliampere_per_byte_unit); 73 | typedef make_scaled_unit>>::type microampere_per_byte_unit; 74 | BOOST_UNITS_STATIC_CONSTANT(microampere_per_byte,microampere_per_byte_unit); 75 | BOOST_UNITS_STATIC_CONSTANT(microamperes_per_byte,microampere_per_byte_unit); 76 | 77 | typedef make_scaled_unit>>::type milliampere_per_kibibyte_unit; 78 | BOOST_UNITS_STATIC_CONSTANT(milliampere_per_kibibyte, milliampere_per_kibibyte_unit); 79 | BOOST_UNITS_STATIC_CONSTANT(milliamperes_per_kibibyte, milliampere_per_kibibyte_unit); 80 | 81 | } // namespace dramspec 82 | 83 | inline std::string name_string(const reduce_unit::type&) { return "milliampere/kibibyte"; } 84 | inline std::string symbol_string(const reduce_unit::type&) { return "mA/kB"; } 85 | 86 | } // namespace units 87 | 88 | } // namespace boost 89 | 90 | #endif // DRAMSPEC_CURRENT_PER_INFORMATION_UNIT_H 91 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/dramSpec_units.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_UNITS_H 42 | #define DRAMSPEC_UNITS_H 43 | 44 | //#include "bank.h" 45 | //#include "capacitance_per_bank.h" 46 | //#include "capacitance_per_cell.h" 47 | #include "capacitance_per_length.h" 48 | //#include "capacitance_per_subarray.h" 49 | //#include "capacitance_per_tile.h" 50 | //#include "cell_per_subarray.h" 51 | //#include "cell.h" 52 | #include "clock_frequency.h" 53 | #include "clock_period.h" 54 | #include "clock.h" 55 | //#include "current_page_per_information.h" 56 | #include "current_per_information.h" 57 | #include "current_per_clock_frequency.h" 58 | //#include "information_per_bank.h" 59 | //#include "information_per_cell.h" 60 | //#include "information_per_page.h" 61 | //#include "information_per_subarray.h" 62 | //#include "information_per_tile.h" 63 | //#include "length_per_bank.h" 64 | //#include "length_per_cell.h" 65 | //#include "length_per_subarray.h" 66 | //#include "length_per_tile.h" 67 | //#include "page_per_tile.h" 68 | //#include "page.h" 69 | #include "per_temperature.h" 70 | //#include "resistance_per_bank.h" 71 | //#include "resistance_per_cell.h" 72 | #include "resistance_per_length.h" 73 | //#include "resistance_per_subarray.h" 74 | //#include "resistance_per_tile.h" 75 | //#include "subarray_per_tile.h" 76 | //#include "subarray.h" 77 | //#include "tile_per_bank.h" 78 | //#include "tile.h" 79 | #include "scaled_si_units.h" 80 | #include "scaled_information_units.h" 81 | #include 82 | 83 | #endif // DRAMSPEC_UNITS_H 84 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/per_temperature.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_PER_TEMPERATURE_UNIT_H 42 | #define DRAMSPEC_PER_TEMPERATURE_UNIT_H 43 | 44 | #include "../dramSpecUnitsSystem.h" 45 | #include "../DerivedDimensions/per_temperature.h" 46 | 47 | namespace boost { 48 | 49 | namespace units { 50 | 51 | namespace dramspec { 52 | 53 | typedef unit per_temperature_unit; 54 | 55 | BOOST_UNITS_STATIC_CONSTANT(eerged,per_temperature_unit); 56 | BOOST_UNITS_STATIC_CONSTANT(eergeds,per_temperature_unit); 57 | 58 | } // namespace dramspec 59 | 60 | } // namespace units 61 | 62 | } // namespace boost 63 | 64 | 65 | #endif // DRAMSPEC_PER_TEMPERATURE_UNIT_H 66 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/resistance_per_length.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_RESISTANCE_PER_LENGTH_UNIT_H 42 | #define DRAMSPEC_RESISTANCE_PER_LENGTH_UNIT_H 43 | 44 | #include "../dramSpecUnitsSystem.h" 45 | #include "../DerivedDimensions/resistance_per_length.h" 46 | 47 | namespace boost { 48 | 49 | namespace units { 50 | 51 | namespace dramspec { 52 | 53 | typedef unit resistance_per_length; 54 | 55 | BOOST_UNITS_STATIC_CONSTANT(ohm_per_meter,resistance_per_length); 56 | BOOST_UNITS_STATIC_CONSTANT(ohms_per_meter,resistance_per_length); 57 | 58 | // ohm / millimeter = kiloohm / meter 59 | typedef make_scaled_unit>>::type ohm_per_millimeter_unit; 60 | BOOST_UNITS_STATIC_CONSTANT(ohm_per_millimeter,ohm_per_millimeter_unit); 61 | BOOST_UNITS_STATIC_CONSTANT(ohms_per_millimeter,ohm_per_millimeter_unit); 62 | 63 | } // namespace dramspec 64 | 65 | } // namespace units 66 | 67 | } // namespace boost 68 | 69 | #endif // DRAMSPEC_RESISTANCE_PER_LENGTH_UNIT_H 70 | -------------------------------------------------------------------------------- /expandedBoostUnits/Units/scaled_information_units.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_SCALED_INFORMATION_UNITS 42 | #define DRAMSPEC_SCALED_INFORMATION_UNITS 43 | 44 | #include 45 | #include 46 | #include 47 | #include 48 | 49 | #include 50 | #include 51 | #include 52 | 53 | namespace boost { 54 | 55 | namespace units { 56 | 57 | namespace dramspec { 58 | 59 | typedef make_scaled_unit>>::type bit_unit; 60 | BOOST_UNITS_STATIC_CONSTANT(bit,bit_unit); 61 | BOOST_UNITS_STATIC_CONSTANT(bits,bit_unit); 62 | typedef make_scaled_unit>>::type kibibit_unit; 63 | BOOST_UNITS_STATIC_CONSTANT(kibibit,kibibit_unit); 64 | BOOST_UNITS_STATIC_CONSTANT(kibibits,kibibit_unit); 65 | typedef make_scaled_unit>>::type gibibit_unit; 66 | BOOST_UNITS_STATIC_CONSTANT(gibibit,gibibit_unit); 67 | BOOST_UNITS_STATIC_CONSTANT(gibibits,gibibit_unit); 68 | 69 | typedef make_scaled_unit>>::type byte_unit; 70 | BOOST_UNITS_STATIC_CONSTANT(byte,byte_unit); 71 | BOOST_UNITS_STATIC_CONSTANT(bytes,byte_unit); 72 | typedef make_scaled_unit>>::type kibibyte_unit; 73 | BOOST_UNITS_STATIC_CONSTANT(kibibyte,kibibyte_unit); 74 | BOOST_UNITS_STATIC_CONSTANT(kibibytes,kibibyte_unit); 75 | typedef make_scaled_unit>>::type gibibyte_unit; 76 | BOOST_UNITS_STATIC_CONSTANT(gibibyte,gibibyte_unit); 77 | BOOST_UNITS_STATIC_CONSTANT(gibibytes,gibibyte_unit); 78 | 79 | } // namespace dramspec 80 | 81 | } // namespace units 82 | 83 | } // namespace boost 84 | 85 | #endif // DRAMSPEC_SCALED_INFORMATION_UNITS 86 | -------------------------------------------------------------------------------- /expandedBoostUnits/dramSpecUnitsSystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_UNITS_SYSTEM_H 42 | #define DRAMSPEC_UNITS_SYSTEM_H 43 | 44 | #include 45 | #include 46 | #include "expanded_make_system.hpp" 47 | 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | 56 | #include "BaseUnits/clock.h" 57 | //#include "BaseUnits/cell.h" 58 | //#include "BaseUnits/subarray.h" 59 | //#include "BaseUnits/tile.h" 60 | //#include "BaseUnits/bank.h" 61 | //#include "BaseUnits/page.h" 62 | 63 | // Conversion between SCALED UNITS 64 | // 'from' is a quantity, 65 | // while 'to' is a unit dimension 66 | #define SCALE_QUANTITY(from, to) \ 67 | (static_cast> (from)) 68 | 69 | // Macro to round up quantities at a given decimal place 70 | #define ROUND_UP(number, nDecimalPlaces) \ 71 | ( ceil( pow(10, nDecimalPlaces) * number) / pow(10,nDecimalPlaces) ) 72 | 73 | namespace boost { 74 | 75 | namespace units { 76 | 77 | namespace dramspec { 78 | 79 | /// placeholder class defining dramspec unit system 80 | /// with information base unit being bit 81 | typedef make_system::type system_bit; 88 | 89 | /// placeholder class defining dramspec unit system 90 | /// with information base unit being Byte 91 | typedef make_system::type system_byte; 98 | 99 | } // namespace dramspec 100 | 101 | } // namespace units 102 | 103 | } // namespace boost 104 | 105 | #endif // DRAMSPEC_UNITS_SYSTEM_H 106 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | #include "parser/DramSpec.h" 41 | 42 | int main(int argc, char** argv) 43 | { 44 | DRAMSpec * dramSpec; 45 | 46 | try { 47 | dramSpec = new DRAMSpec(argc, argv); 48 | std::cout << dramSpec->output.str(); 49 | } catch(string exceptionMsgThrown) { 50 | std::cerr << exceptionMsgThrown; 51 | return -1; 52 | } 53 | 54 | return 0; 55 | } 56 | -------------------------------------------------------------------------------- /misc/DRAMSpec2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tukl-msd/DRAMSpec/6ed3a1098b3a83955883c8ccd813127cf6315c56/misc/DRAMSpec2.pdf -------------------------------------------------------------------------------- /misc/DRAMSpec2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tukl-msd/DRAMSpec/6ed3a1098b3a83955883c8ccd813127cf6315c56/misc/DRAMSpec2.png -------------------------------------------------------------------------------- /parser/ArgumentsParser.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #include "ArgumentsParser.h" 42 | 43 | using namespace std; 44 | 45 | ArgumentsParser::ArgumentsParser(int argc, char** argv) 46 | { 47 | cpargc = argc; 48 | for ( int it = 0; it < argc; it++ ) { 49 | cpargv.push_back((string)argv[it]); 50 | } 51 | argvID = 1; 52 | nConfigurations = 0; 53 | IOTerminationCurrentFlag = false; 54 | printInternalTimings = false; 55 | } 56 | 57 | void ArgumentsParser::runArgParser() 58 | { 59 | if ( argvID >= cpargc ) { 60 | // Help run (no arguments) 61 | if ( cpargc == 1 ) { 62 | helpStrStream << helpMessage; 63 | } 64 | // Or end of parsing 65 | return; 66 | } 67 | 68 | // Help run (by argument) 69 | if ( cpargv[argvID] == "-h" ) { 70 | helpStrStream << helpMessage; 71 | } 72 | 73 | // Normal run 74 | if( cpargv[argvID] == "-t") { 75 | argvID++; 76 | if(!getTechFileName()) { 77 | string exceptionMsgThrown("[ERROR] "); 78 | exceptionMsgThrown.append("Unexpected argument \'"); 79 | exceptionMsgThrown.append(cpargv[argvID]); 80 | exceptionMsgThrown.append("\'\n"); 81 | exceptionMsgThrown.append(helpMessage); 82 | throw exceptionMsgThrown; 83 | } 84 | } 85 | else if( cpargv[argvID] == "-p") { 86 | argvID++; 87 | if(!getArchFileName()) { 88 | string exceptionMsgThrown("[ERROR] "); 89 | exceptionMsgThrown.append("Unexpected argument \'"); 90 | exceptionMsgThrown.append(cpargv[argvID]); 91 | exceptionMsgThrown.append("\'\n"); 92 | exceptionMsgThrown.append(helpMessage); 93 | throw exceptionMsgThrown; 94 | } 95 | } 96 | else if( cpargv[argvID] == "-term") { 97 | IOTerminationCurrentFlag = true; 98 | argvID++; 99 | runArgParser(); 100 | } 101 | else if( cpargv[argvID] == "-internaltimings") { 102 | printInternalTimings = true; 103 | argvID++; 104 | runArgParser(); 105 | } 106 | else { 107 | string exceptionMsgThrown("[ERROR] "); 108 | exceptionMsgThrown.append("Unexpected argument \'"); 109 | exceptionMsgThrown.append(cpargv[argvID]); 110 | exceptionMsgThrown.append("\'\n"); 111 | exceptionMsgThrown.append(helpMessage); 112 | throw exceptionMsgThrown; 113 | } 114 | 115 | if( technologyFileName.size() == architectureFileName.size() ) 116 | { 117 | nConfigurations = technologyFileName.size(); 118 | } 119 | else 120 | { 121 | string exceptionMsgThrown("[ERROR] "); 122 | exceptionMsgThrown.append("Number of technology files ("); 123 | exceptionMsgThrown.append(to_string(technologyFileName.size())); 124 | exceptionMsgThrown.append(") is different from "); 125 | exceptionMsgThrown.append("the number of archtecture files ("); 126 | exceptionMsgThrown.append(to_string(architectureFileName.size())); 127 | exceptionMsgThrown.append("). Could not proceed."); 128 | throw exceptionMsgThrown; 129 | } 130 | 131 | if ( nConfigurations == 0 ) 132 | { 133 | string exceptionMsgThrown("[ERROR] "); 134 | exceptionMsgThrown.append("No technology nor architecture "); 135 | exceptionMsgThrown.append("file provided!\n"); 136 | exceptionMsgThrown.append(helpMessage); 137 | throw exceptionMsgThrown; 138 | 139 | } 140 | 141 | } 142 | 143 | 144 | bool ArgumentsParser::getTechFileName() 145 | { 146 | while (argvID < cpargc) { 147 | 148 | if( cpargv[argvID] == "-p") { 149 | argvID++; 150 | if(!getArchFileName()) { return false; } 151 | } 152 | else if( cpargv[argvID] == "-term") { 153 | IOTerminationCurrentFlag = true; 154 | argvID++; 155 | if(!getTechFileName()) { return false; } 156 | } 157 | else if( cpargv[argvID] == "-internaltimings") { 158 | printInternalTimings = true; 159 | argvID++; 160 | if(!getTechFileName()) { return false; } 161 | } 162 | else if (cpargv[argvID][0] == '-') { 163 | return false; 164 | } 165 | else { 166 | technologyFileName.push_back(cpargv[argvID]); 167 | argvID++; 168 | if(!getTechFileName()) { return false; } 169 | } 170 | 171 | argvID++; 172 | } 173 | 174 | return true; 175 | } 176 | 177 | bool ArgumentsParser::getArchFileName() 178 | { 179 | while (argvID < cpargc) { 180 | 181 | if( cpargv[argvID] == "-t") { 182 | argvID++; 183 | if(!getTechFileName()) { return false; } 184 | } 185 | else if( cpargv[argvID] == "-term") { 186 | IOTerminationCurrentFlag = true; 187 | argvID++; 188 | if(!getArchFileName()) { return false; } 189 | } 190 | else if( cpargv[argvID] == "-internaltimings") { 191 | printInternalTimings = true; 192 | argvID++; 193 | if(!getArchFileName()) { return false; } 194 | } 195 | else if (cpargv[argvID][0] == '-') { 196 | return false; 197 | } 198 | else { 199 | architectureFileName.push_back(cpargv[argvID]); 200 | argvID++; 201 | if(!getArchFileName()) { return false; } 202 | } 203 | 204 | argvID++; 205 | } 206 | 207 | return true; 208 | } 209 | -------------------------------------------------------------------------------- /parser/ArgumentsParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | #ifndef ARGUMENTSPARSER_H 41 | #define ARGUMENTSPARSER_H 42 | 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | 49 | using namespace std; 50 | 51 | class ArgumentsParser { 52 | public: 53 | ArgumentsParser(int argc, char** argv); 54 | 55 | vector technologyFileName; 56 | vector architectureFileName; 57 | unsigned int nConfigurations; 58 | bool IOTerminationCurrentFlag; 59 | bool printInternalTimings; 60 | 61 | ostringstream helpStrStream; 62 | const char* helpMessage = 63 | " Mandatory:\n" 64 | " -t " 65 | "(Specify which technology description file should be used.)\n" 66 | " -p " 67 | "(Specify which architecture description file should be used.)\n" 68 | " Optional:\n" 69 | " -term " 70 | "(Include IO termination currents for read and write operations.)\n" 71 | " -internaltimings " 72 | "(Enable print out of internal timings.)\n" 73 | "For more information, see README.md.\n"; 74 | 75 | void runArgParser(); 76 | 77 | private: 78 | int cpargc; 79 | vector cpargv; 80 | int argvID; 81 | 82 | bool getTechFileName(); 83 | bool getArchFileName(); 84 | 85 | }; 86 | 87 | #endif // ARGUMENTSPARSER_H 88 | -------------------------------------------------------------------------------- /parser/DramSpec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef DRAMSPEC_H 42 | #define DRAMSPEC_H 43 | 44 | #include "ArgumentsParser.h" 45 | #include "../core/Current.h" 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | 57 | #include "rapidjson/include/rapidjson/document.h" 58 | #include "rapidjson/include/rapidjson/prettywriter.h" 59 | #include "rapidjson/include/rapidjson/stringbuffer.h" 60 | 61 | using namespace std; 62 | 63 | // Very specific macro to be used inside arrangeOutput() function 64 | #define BUILD_LINE(label, value) \ 65 | setw(lineWidth) \ 66 | << left << label \ 67 | << separator \ 68 | << right << value \ 69 | << endl \ 70 | 71 | class DRAMSpec 72 | { 73 | public: 74 | DRAMSpec(int argc, char** argv); 75 | 76 | void jsonOutputWrite(int dramConfigID); 77 | string arrangeOutput(const string isCsv); 78 | 79 | void runDramSpec(int argc, char** argv); 80 | 81 | ArgumentsParser * arg; 82 | Current * dram; 83 | ostringstream output; 84 | }; 85 | 86 | #endif // DRAMSPEC_H 87 | -------------------------------------------------------------------------------- /parser/ResultParser.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, Matthias Jung, Christian Weis, Kamal Haddad 33 | */ 34 | 35 | #include "DramSpec.h" 36 | #include 37 | #include 38 | #include 39 | #include 40 | //function for writing results in json 41 | void 42 | DRAMSpec::jsonOutputWrite(int dramConfigID) 43 | { 44 | //parsing the timing results in ns 45 | rapidjson::Document timingnsdoc; 46 | timingnsdoc.SetObject(); 47 | 48 | //parsing of trcd 49 | timingnsdoc.AddMember("trcd", dram->trcd , timingnsdoc.GetAllocator()); 50 | 51 | //parsing of tcl ( tcl = tcas ) 52 | timingnsdoc.AddMember("tcl", dram->tcas , timingnsdoc.GetAllocator()); 53 | 54 | //parsing of tras 55 | timingnsdoc.AddMember("tras", dram->tras , timingnsdoc.GetAllocator()); 56 | 57 | //parsing of trp 58 | timingnsdoc.AddMember("trp", dram->trp , timingnsdoc.GetAllocator()); 59 | 60 | //parsing of trc 61 | timingnsdoc.AddMember("trc", dram->trc , timingnsdoc.GetAllocator()); 62 | 63 | // Don't have those 64 | // //parsing of trl 65 | // timingnsdoc.AddMember("trl", dram->trl , timingnsdoc.GetAllocator()); 66 | 67 | // //parsing of twl 68 | // timingnsdoc.AddMember("twl", dram->twl , timingnsdoc.GetAllocator()); 69 | 70 | //parsing of trtp 71 | timingnsdoc.AddMember("trtp", dram->trtp , timingnsdoc.GetAllocator()); 72 | 73 | //parsing of tccd 74 | timingnsdoc.AddMember("tccd", dram->tccd , timingnsdoc.GetAllocator()); 75 | 76 | //parsing of twr 77 | timingnsdoc.AddMember("twr", dram->twr , timingnsdoc.GetAllocator()); 78 | 79 | //parsing of trfc 80 | timingnsdoc.AddMember("trfc", dram->trfc , timingnsdoc.GetAllocator()); 81 | 82 | //parsing of tref1 83 | timingnsdoc.AddMember("tref1", dram->tref1 , timingnsdoc.GetAllocator()); 84 | 85 | // Convert JSON document to string 86 | rapidjson::GenericStringBuffer< rapidjson::UTF8<> > timingnsbuffer; 87 | rapidjson::Writer< rapidjson::GenericStringBuffer< 88 | rapidjson::UTF8<> > > timingnswriter(timingnsbuffer); 89 | timingnsdoc.Accept(timingnswriter); 90 | const char* timingnsstr = timingnsbuffer.GetString(); 91 | 92 | //open a file 93 | std::stringstream timingnsresstr; 94 | timingnsresstr << std::string("timingnsresult_") 95 | << dramConfigID 96 | << std::string(".json"); 97 | std::ofstream timingnsresultfile(timingnsresstr.str().c_str()); 98 | timingnsresultfile << timingnsstr; 99 | timingnsresultfile.close(); 100 | 101 | //parsing the timing results in clock cycles 102 | rapidjson::Document timingdoc; 103 | timingdoc.SetObject(); 104 | 105 | //parsing of frequency 106 | timingdoc.AddMember("Frequency", dram->dramFreq, timingdoc.GetAllocator()); 107 | 108 | //parsing of trcd in cc ( clock cycles ) 109 | timingdoc.AddMember("trcd_cc", dram->trcd_clk , timingdoc.GetAllocator()); 110 | 111 | //parsing of tcl in cc ( tcl = tcas ) 112 | timingdoc.AddMember("tcl_cc", dram->tcas_clk , timingdoc.GetAllocator()); 113 | 114 | //parsing of tras in cc 115 | timingdoc.AddMember("tras_cc", dram->tras_clk , timingdoc.GetAllocator()); 116 | 117 | //parsing of trp in cc 118 | timingdoc.AddMember("trp_cc", dram->trp_clk , timingdoc.GetAllocator()); 119 | 120 | //parsing of trc in cc 121 | timingdoc.AddMember("trc_cc", dram->trc_clk , timingdoc.GetAllocator()); 122 | 123 | //parsing of trl in cc 124 | timingdoc.AddMember("trl_cc", dram->trl_clk , timingdoc.GetAllocator()); 125 | 126 | //parsing of twl in cc 127 | timingdoc.AddMember("twl_cc", dram->twl_clk , timingdoc.GetAllocator()); 128 | 129 | //parsing of trtp in cc 130 | timingdoc.AddMember("trtp_cc", dram->trtp_clk , timingdoc.GetAllocator()); 131 | 132 | //parsing of tccd in cc 133 | timingdoc.AddMember("tccd_cc", dram->tccd_clk , timingdoc.GetAllocator()); 134 | 135 | //parsing of twr in cc 136 | timingdoc.AddMember("twr_cc", dram->twr_clk , timingdoc.GetAllocator()); 137 | 138 | //parsing of trfc in cc 139 | timingdoc.AddMember("trfc_cc", dram->trfc_clk , timingdoc.GetAllocator()); 140 | 141 | //parsing of tref1 in cc 142 | timingdoc.AddMember("tref1_cc", dram->tref1_clk , timingdoc.GetAllocator()); 143 | 144 | // Convert JSON document to string 145 | rapidjson::GenericStringBuffer< rapidjson::UTF8<> > timingbuffer; 146 | rapidjson::Writer< rapidjson::GenericStringBuffer< 147 | rapidjson::UTF8<> > > timingwriter(timingbuffer); 148 | timingdoc.Accept(timingwriter); 149 | const char* timingstr = timingbuffer.GetString(); 150 | 151 | //Placing timing results (in clock cycles) in different files according to file number 152 | std::stringstream timingresstr; 153 | timingresstr << std::string("timingresult_") 154 | << dramConfigID 155 | << std::string(".json"); 156 | std::ofstream timingresultfile(timingresstr.str().c_str()); 157 | timingresultfile << timingstr; 158 | timingresultfile.close(); 159 | 160 | //parsing the currents 161 | rapidjson::Document currentdoc; 162 | currentdoc.SetObject(); 163 | 164 | //parsing of IDD0 165 | currentdoc.AddMember("IDD0", dram->IDD0 , currentdoc.GetAllocator()); 166 | 167 | //parsing of IDD1 168 | currentdoc.AddMember("IDD1", dram->IDD1 , currentdoc.GetAllocator()); 169 | 170 | //parsing of IDD4R 171 | currentdoc.AddMember("IDD4R", dram->IDD4R , currentdoc.GetAllocator()); 172 | 173 | //parsing of IDD4W 174 | currentdoc.AddMember("IDD4W", dram->IDD4W , currentdoc.GetAllocator()); 175 | 176 | //parsing of IDD2n 177 | currentdoc.AddMember("IDD2n", dram->IDD2n , currentdoc.GetAllocator()); 178 | 179 | //parsing of IDD3n 180 | currentdoc.AddMember("IDD3n", dram->IDD3n , currentdoc.GetAllocator()); 181 | 182 | //parsing of IDD5 183 | currentdoc.AddMember("IDD5", dram->IDD5 , currentdoc.GetAllocator()); 184 | 185 | //convert JSON document to string 186 | rapidjson::GenericStringBuffer< rapidjson::UTF8<> > currentbuffer; 187 | rapidjson::Writer< rapidjson::GenericStringBuffer 188 | < rapidjson::UTF8<> > > currentwriter(currentbuffer); 189 | currentdoc.Accept(currentwriter); 190 | const char* currentstr = currentbuffer.GetString(); 191 | 192 | //Placing current results in different files according to file number 193 | std::stringstream currentresstr; 194 | currentresstr << std::string("currentresult_") 195 | << dramConfigID 196 | << std::string(".json"); 197 | std::ofstream currentresultfile(currentresstr.str().c_str()); 198 | currentresultfile << currentstr; 199 | currentresultfile.close(); 200 | } 201 | -------------------------------------------------------------------------------- /parser/ResultParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, Matthias Jung, Christian Weis, Kamal Haddad 33 | */ 34 | 35 | // this class is used to parse the results of timing and 36 | // current into json files 37 | #ifndef RESULTPARSER_H 38 | #define RESULTPARSER_H 39 | #include "rapidjson/include/rapidjson/document.h" 40 | #include "rapidjson/include/rapidjson/prettywriter.h" 41 | #include "rapidjson/include/rapidjson/stringbuffer.h" 42 | #include "../core/Current.h" 43 | #include 44 | #include 45 | class ResultParser 46 | { 47 | public: 48 | ResultParser(Timing T , Current I): t(NULL), i(NULL) 49 | { 50 | t=&T; 51 | i=&I; 52 | } 53 | void 54 | jsonwriter(int filenumber); 55 | private: 56 | //object which contains results of timing 57 | Timing* t; 58 | //object which contains results of currents 59 | Current* i; 60 | }; 61 | #endif 62 | -------------------------------------------------------------------------------- /runTests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | script="`readlink -f "${BASH_SOURCE[0]}"`" 4 | CALLDIR="`dirname "$script"`"; 5 | cd ${CALLDIR}; 6 | 7 | qmake CONFIG+=debug DRAMSpec.pro; 8 | echo "Compiling..."; 9 | make -s -j4; 10 | 11 | echo "Testing..."; 12 | ./build/debug/dramspec_test; 13 | -------------------------------------------------------------------------------- /technology_input/tech_28nm_ddr4_8G_1024x16.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 28, 3 | 4 | "Vdd[V]": 1.2, 5 | "Vpp[V]": 2.5, 6 | 7 | "WireResistance[Ohm/mm]": 25, 8 | "WireCapacitance[fF/mm]" : 150, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.066 , 13 | "CellHeight[um]": 0.08 , 14 | "CellsPerSubarrayRow[]": 1046, 15 | "RedundantCellsPerSubarrayRow[]": 22, 16 | "CellsPerSubarrayColumn[]": 1046, 17 | "RedundantCellsPerSubarrayColumn[]": 22, 18 | 19 | "BitlineCapacitancePerCell[aF]": 50, 20 | "BitlineResistancePerCell[Ohm]": 40, 21 | 22 | "WordlineCapacitancePerCell[aF]": 70, 23 | "WordlineResistancePerCell[Ohm]": 40, 24 | 25 | "PrimarySenseAmpHeight[um]": 10, 26 | 27 | "LocalWordlineDriverWitdh[um]": 5, 28 | "LocalWordlineDriverResistance[Ohm]" : 500, 29 | 30 | "RowDecoderWidth[um]": 125, 31 | "GlobalWordlineDriverResistance[Ohm]" : 200, 32 | 33 | "SecondarySenseAmpCurrent[uA]": 200, 34 | "WriteDriverResistance[Ohm]" : 300 , 35 | 36 | "ColumnDecoderHeight[um]": 125, 37 | "CSLDriverResistance[Ohm]" : 300, 38 | "CSLLoadCapacitance[fF]": 8, 39 | "GlobalDataLineDriverResistance[Ohm]" : 300, 40 | 41 | "DQDriverHeight[um]": 225, 42 | "DQtoTSVWireLength[um]": 200, 43 | "DQDriverResistance[Ohm]" : 250, 44 | 45 | 46 | "IDD2NFreqSlope[mA/MHz]": 0.015, 47 | "IDD2NTempAlpha[mA]": 0.6775, 48 | "IDD2NTempBeta[C^-1]": 0.04467, 49 | "IDD2NRefTemp[C]": 25, 50 | "IDD2NOffset[mA]": 6.75, 51 | "OCDCurrentSlope[uA/MHz]": 4.22, 52 | 53 | "FullySharedResourcesCurrent[mA]": 2, 54 | "SemiSharedResourcesCurrent[mA]": 0.5, 55 | "nBanksPerSemiSharedResource[]": 2, 56 | 57 | "TSVHeight[um]":0, 58 | 59 | "AdditionalTRLLatency[cc]" : 0, 60 | 61 | "DriverEnableDelay[ns]": 0.6, 62 | "InOutSSADelay[ns]": 2, 63 | "CommandDecoderDelay[ns]": 2, 64 | "IODelay[ns]": 1, 65 | "SSAPrechargeDelay[ns]": 1, 66 | "tWRMargin[ns]": 1, 67 | "EqualizerDelay[ns]": 1 68 | 69 | } 70 | -------------------------------------------------------------------------------- /technology_input/tech_dummy_input.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 3946, 3 | 4 | "Vpp[V]": 1189, 5 | "Vdd[V]": 3374, 6 | 7 | "WireResistance[Ohm/mm]": 8638, 8 | "WireCapacitance[fF/mm]" : 2179, 9 | 10 | "CellCapacitance[fF]": 3944, 11 | "CellResistance[KOhm]": 2287, 12 | "CellWidth[um]": 1070, 13 | "CellHeight[um]": 885, 14 | 15 | "BitlineCapacitancePerCell[aF]": 8281, 16 | "BitlineResistancePerCell[Ohm]": 7024, 17 | 18 | "WordlineCapacitancePerCell[aF]": 6381, 19 | "WordlineResistancePerCell[Ohm]": 8543, 20 | 21 | "PrimarySenseAmpHeight[um]": 4104, 22 | 23 | "LocalWordlineDriverWitdh[um]": 8791, 24 | "LocalWordlineDriverResistance[Ohm]" : 5222, 25 | 26 | "RowDecoderWidth[um]": 5812, 27 | "GlobalWordlineDriverResistance[Ohm]": 4405, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 1877, 30 | "WriteDriverResistance[Ohm]" : 5931, 31 | 32 | "ColumnDecoderHeight[um]": 7970, 33 | "CSLDriverResistance[Ohm]" : 9601, 34 | "CSLLoadCapacitance[fF]": 2056, 35 | "GlobalDataLineDriverResistance[Ohm]" : 5885, 36 | 37 | "DQDriverHeight[um]": 5457, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 9240, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 483, 42 | "IDD2NTempAlpha[mA]": 1833, 43 | "IDD2NTempBeta[C^-1]": 5108, 44 | "IDD2NRefTemp[C]": 3901, 45 | "IDD2NOffset[mA]": 8513, 46 | "OCDCurrentSlope[uA/MHz]": 4560, 47 | 48 | "FullySharedResourcesCurrent[mA]": 1621, 49 | "SemiSharedResourcesCurrent[mA]": 2780, 50 | "nBanksPerSemiSharedResource[]": 7115, 51 | 52 | "TSVHeight[um]": 9483, 53 | 54 | "AdditionalTRLLatency[cc]" : 9541, 55 | 56 | "DriverEnableDelay[ns]": 5654, 57 | "InOutSSADelay[ns]": 8, 58 | "CommandDecoderDelay[ns]": 9212, 59 | "IODelay[ns]": 9769, 60 | "SSAPrechargeDelay[ns]": 1540, 61 | "tWRMargin[ns]": 2126, 62 | "EqualizerDelay[ns]": 1103 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/tech_hynix_2012_1.2V_dummyless.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 23, 3 | 4 | "Vpp[V]": 2.5, 5 | "Vdd[V]": 1.2, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 150, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.066 , 13 | "CellHeight[um]": 0.08 , 14 | 15 | "BitlineCapacitancePerCell[aF]": 50, 16 | "BitlineResistancePerCell[Ohm]": 35, 17 | 18 | "WordlineCapacitancePerCell[aF]": 60, 19 | "WordlineResistancePerCell[Ohm]": 25, 20 | 21 | "PrimarySenseAmpHeight[um]": 10, 22 | 23 | "LocalWordlineDriverWitdh[um]": 5, 24 | "LocalWordlineDriverResistance[Ohm]" : 500, 25 | 26 | "SecondarySenseAmpCurrent[uA]": 200, 27 | "GlobalWordlineDriverResistance[Ohm]": 200, 28 | 29 | "RowDecoderWidth[um]": 53.5, 30 | "WriteDriverResistance[Ohm]" : 300 , 31 | 32 | "ColumnDecoderHeight[um]": 250, 33 | "CSLDriverResistance[Ohm]" : 170, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 300, 36 | 37 | "DQDriverHeight[um]": 100, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 250, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.015, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 6.75, 46 | "OCDCurrentSlope[uA/MHz]": 4.221, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/tech_hynix_2014_1.2V_8Gb_HBM.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 29, 3 | 4 | "Vpp[V]": 2.5, 5 | "Vdd[V]": 1.2, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 150, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.085, 13 | "CellHeight[um]": 0.045, 14 | 15 | "BitlineCapacitancePerCell[aF]": 50, 16 | "BitlineResistancePerCell[Ohm]": 35, 17 | 18 | "WordlineCapacitancePerCell[aF]": 60, 19 | "WordlineResistancePerCell[Ohm]": 25, 20 | 21 | "PrimarySenseAmpHeight[um]": 10, 22 | 23 | "LocalWordlineDriverWitdh[um]": 5, 24 | "LocalWordlineDriverResistance[Ohm]" : 500, 25 | 26 | "SecondarySenseAmpCurrent[uA]": 200, 27 | "GlobalWordlineDriverResistance[Ohm]": 200, 28 | 29 | "RowDecoderWidth[um]": 53.5, 30 | "WriteDriverResistance[Ohm]" : 300 , 31 | 32 | "ColumnDecoderHeight[um]": 250, 33 | "CSLDriverResistance[Ohm]" : 170, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 300, 36 | 37 | "DQDriverHeight[um]": 205, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 250, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.015, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 6.75, 46 | "OCDCurrentSlope[uA/MHz]": 4.221, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 896, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/tech_hynix_H5AN4G8NAFR_8x512Mb_x8.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 22, 3 | 4 | "Vdd[V]": 1.2, 5 | "Vpp[V]": 2.5, 6 | 7 | "WireResistance[Ohm/mm]": 25, 8 | "WireCapacitance[fF/mm]" : 150, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.066 , 13 | "CellHeight[um]": 0.08 , 14 | 15 | "BitlineCapacitancePerCell[aF]": 50, 16 | "BitlineResistancePerCell[Ohm]": 40, 17 | 18 | "WordlineCapacitancePerCell[aF]": 70, 19 | "WordlineResistancePerCell[Ohm]": 40, 20 | 21 | "PrimarySenseAmpHeight[um]": 10, 22 | 23 | "LocalWordlineDriverWitdh[um]": 5, 24 | "LocalWordlineDriverResistance[Ohm]" : 500, 25 | 26 | "RowDecoderWidth[um]": 125, 27 | "GlobalWordlineDriverResistance[Ohm]" : 200, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 200, 30 | "WriteDriverResistance[Ohm]" : 300 , 31 | 32 | "ColumnDecoderHeight[um]": 125, 33 | "CSLDriverResistance[Ohm]" : 300, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 300, 36 | 37 | "DQDriverHeight[um]": 225, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 250, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.011255, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 4.8296, 46 | "OCDCurrentSlope[uA/MHz]": 4.22, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.25, 50 | "nBanksPerSemiSharedResource[]": 8, 51 | 52 | "TSVHeight[um]":0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/tech_samsung_2014_1.0V_8Gb.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 29, 3 | 4 | "Vpp[V]": 2.5, 5 | "Vdd[V]": 1.2, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 150, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.0832 , 13 | "CellHeight[um]": 0.1 , 14 | 15 | "BitlineCapacitancePerCell[aF]": 50, 16 | "BitlineResistancePerCell[Ohm]": 35, 17 | 18 | "WordlineCapacitancePerCell[aF]": 60, 19 | "WordlineResistancePerCell[Ohm]": 25, 20 | 21 | "PrimarySenseAmpHeight[um]": 12.6, 22 | 23 | "LocalWordlineDriverWitdh[um]": 6.3, 24 | "LocalWordlineDriverResistance[Ohm]" : 500, 25 | 26 | "RowDecoderWidth[um]": 53.5, 27 | "GlobalWordlineDriverResistance[Ohm]": 200, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 200, 30 | "WriteDriverResistance[Ohm]" : 300 , 31 | 32 | "ColumnDecoderHeight[um]": 250, 33 | "CSLDriverResistance[Ohm]" : 170, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 300, 36 | 37 | "DQDriverHeight[um]": 102, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 250, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.015, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 6.75, 46 | "OCDCurrentSlope[uA/MHz]": 4.221, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 900, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/techddr3_2x_bwl.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 22, 3 | 4 | "Vpp[V]": 2.6, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 368, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.066 , 13 | "CellHeight[um]": 0.114 , 14 | 15 | "BitlineCapacitancePerCell[aF]": 94, 16 | "BitlineResistancePerCell[Ohm]": 60, 17 | 18 | "WordlineCapacitancePerCell[aF]": 114, 19 | "WordlineResistancePerCell[Ohm]": 40, 20 | 21 | "PrimarySenseAmpHeight[um]": 13, 22 | 23 | "LocalWordlineDriverWitdh[um]": 6, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 200, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 500, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.015, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 6.75, 46 | "OCDCurrentSlope[uA/MHz]": 4.221, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/techddr3_3x_bwl.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 36, 3 | 4 | "Vpp[V]": 2.6, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 368, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.072 , 13 | "CellHeight[um]": 0.131 , 14 | 15 | "BitlineCapacitancePerCell[aF]": 81, 16 | "BitlineResistancePerCell[Ohm]": 70, 17 | 18 | "WordlineCapacitancePerCell[aF]": 91, 19 | "WordlineResistancePerCell[Ohm]": 54, 20 | 21 | "PrimarySenseAmpHeight[um]": 16, 22 | 23 | "LocalWordlineDriverWitdh[um]": 7, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 220, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 500, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.018, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 8, 46 | "OCDCurrentSlope[uA/MHz]": 4.503, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/techddr3_4x_bwl.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 46, 3 | 4 | "Vpp[V]": 2.8, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 382, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.096 , 13 | "CellHeight[um]": 0.132, 14 | 15 | "BitlineCapacitancePerCell[aF]": 99, 16 | "BitlineResistancePerCell[Ohm]": 69, 17 | 18 | "WordlineCapacitancePerCell[aF]": 76 , 19 | "WordlineResistancePerCell[Ohm]": 24, 20 | 21 | "PrimarySenseAmpHeight[um]": 18, 22 | 23 | "LocalWordlineDriverWitdh[um]": 8, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 240, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 500, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.02, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 11, 46 | "OCDCurrentSlope[uA/MHz]": 4.69, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/techddr3_5x.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 58, 3 | 4 | "Vpp[V]": 2.8, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 382, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.12 , 13 | "CellHeight[um]": 0.18, 14 | 15 | "BitlineCapacitancePerCell[aF]": 160, 16 | "BitlineResistancePerCell[Ohm]": 36, 17 | 18 | "WordlineCapacitancePerCell[aF]": 150 , 19 | "WordlineResistancePerCell[Ohm]": 46, 20 | 21 | "PrimarySenseAmpHeight[um]": 20, 22 | 23 | "LocalWordlineDriverWitdh[um]": 9, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 300, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 500, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.025, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 17, 46 | "OCDCurrentSlope[uA/MHz]": 5.629, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]":0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/techhmc_2x_bwl.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 22, 3 | 4 | "Vpp[V]": 2.6, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 368, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.066 , 13 | "CellHeight[um]": 0.114 , 14 | 15 | "BitlineCapacitancePerCell[aF]": 94, 16 | "BitlineResistancePerCell[Ohm]": 60, 17 | 18 | "WordlineCapacitancePerCell[aF]": 114, 19 | "WordlineResistancePerCell[Ohm]": 40, 20 | 21 | "PrimarySenseAmpHeight[um]": 13, 22 | 23 | "LocalWordlineDriverWitdh[um]": 6, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 200, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 500, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.015, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 6.75, 46 | "OCDCurrentSlope[uA/MHz]": 0.8443, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/techhmc_2x_bwl_long.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 22, 3 | 4 | "Vpp[V]": 2.6, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 368, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.066 , 13 | "CellHeight[um]": 0.114 , 14 | 15 | "BitlineCapacitancePerCell[aF]": 94, 16 | "BitlineResistancePerCell[Ohm]": 60, 17 | 18 | "WordlineCapacitancePerCell[aF]": 114, 19 | "WordlineResistancePerCell[Ohm]": 40, 20 | 21 | "PrimarySenseAmpHeight[um]": 13, 22 | 23 | "LocalWordlineDriverWitdh[um]": 6, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 200, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 500, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.015, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 6.75, 46 | "OCDCurrentSlope[uA/MHz]": 0.8443, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/techhmc_3x_bwl.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 36, 3 | 4 | "Vpp[V]": 2.6, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 368, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.072 , 13 | "CellHeight[um]": 0.131 , 14 | 15 | "BitlineCapacitancePerCell[aF]": 81, 16 | "BitlineResistancePerCell[Ohm]": 70, 17 | 18 | "WordlineCapacitancePerCell[aF]": 91, 19 | "WordlineResistancePerCell[Ohm]": 54, 20 | 21 | "PrimarySenseAmpHeight[um]": 16, 22 | 23 | "LocalWordlineDriverWitdh[um]": 7, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 220, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 500, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.022, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 8.6, 46 | "OCDCurrentSlope[uA/MHz]": 1.088, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/techhmc_50.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 50, 3 | 4 | "Vpp[V]": 2.8, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 120, 8 | "WireCapacitance[fF/mm]" : 300, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.110 , 13 | "CellHeight[um]": 0.165, 14 | 15 | "BitlineCapacitancePerCell[aF]": 130, 16 | "BitlineResistancePerCell[Ohm]": 28, 17 | 18 | "WordlineCapacitancePerCell[aF]": 180, 19 | "WordlineResistancePerCell[Ohm]": 65, 20 | 21 | "PrimarySenseAmpHeight[um]": 20, 22 | 23 | "LocalWordlineDriverWitdh[um]": 9, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 300, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 500, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.018, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 11, 46 | "OCDCurrentSlope[uA/MHz]": 1.1257, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /technology_input/techhmc_5x.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 58, 3 | 4 | "Vpp[V]": 2.8, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 160, 8 | "WireCapacitance[fF/mm]" : 340, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.12 , 13 | "CellHeight[um]": 0.18, 14 | 15 | "BitlineCapacitancePerCell[aF]": 130, 16 | "BitlineResistancePerCell[Ohm]": 28, 17 | 18 | "WordlineCapacitancePerCell[aF]": 180, 19 | "WordlineResistancePerCell[Ohm]": 65, 20 | 21 | "PrimarySenseAmpHeight[um]": 20, 22 | 23 | "LocalWordlineDriverWitdh[um]": 9, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 300, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 500, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.02, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 12, 46 | "OCDCurrentSlope[uA/MHz]": 1.1257, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 0, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /technology_input/test_technology.json: -------------------------------------------------------------------------------- 1 | { 2 | "TechnologyNode[nm]": 58, 3 | 4 | "Vpp[V]": 2.8, 5 | "Vdd[V]": 1.1, 6 | 7 | "WireResistance[Ohm/mm]": 100, 8 | "WireCapacitance[fF/mm]" : 382, 9 | 10 | "CellCapacitance[fF]": 20, 11 | "CellResistance[KOhm]": 20, 12 | "CellWidth[um]": 0.12 , 13 | "CellHeight[um]": 0.18, 14 | 15 | "BitlineCapacitancePerCell[aF]": 160, 16 | "BitlineResistancePerCell[Ohm]": 36, 17 | 18 | "WordlineCapacitancePerCell[aF]": 150 , 19 | "WordlineResistancePerCell[Ohm]": 46, 20 | 21 | "PrimarySenseAmpHeight[um]": 20, 22 | 23 | "LocalWordlineDriverWitdh[um]": 9, 24 | "LocalWordlineDriverResistance[Ohm]" : 1000, 25 | 26 | "RowDecoderWidth[um]": 240, 27 | "GlobalWordlineDriverResistance[Ohm]": 400, 28 | 29 | "SecondarySenseAmpCurrent[uA]": 300, 30 | "WriteDriverResistance[Ohm]" : 600 , 31 | 32 | "ColumnDecoderHeight[um]": 200, 33 | "CSLDriverResistance[Ohm]" : 600, 34 | "CSLLoadCapacitance[fF]": 8, 35 | "GlobalDataLineDriverResistance[Ohm]" : 600, 36 | 37 | "DQDriverHeight[um]": 250, 38 | "DQtoTSVWireLength[um]": 200, 39 | "DQDriverResistance[Ohm]" : 500, 40 | 41 | "IDD2NFreqSlope[mA/MHz]": 0.025, 42 | "IDD2NTempAlpha[mA]": 0.6775, 43 | "IDD2NTempBeta[C^-1]": 0.04467, 44 | "IDD2NRefTemp[C]": 25, 45 | "IDD2NOffset[mA]": 17, 46 | "OCDCurrentSlope[uA/MHz]": 5.629, 47 | 48 | "FullySharedResourcesCurrent[mA]": 2, 49 | "SemiSharedResourcesCurrent[mA]": 0.5, 50 | "nBanksPerSemiSharedResource[]": 2, 51 | 52 | "TSVHeight[um]": 0, 53 | 54 | "AdditionalTRLLatency[cc]" : 1, 55 | 56 | "DriverEnableDelay[ns]": 0.6, 57 | "InOutSSADelay[ns]": 2, 58 | "CommandDecoderDelay[ns]": 2, 59 | "IODelay[ns]": 1, 60 | "SSAPrechargeDelay[ns]": 1, 61 | "tWRMargin[ns]": 1, 62 | "EqualizerDelay[ns]": 1 63 | 64 | } 65 | -------------------------------------------------------------------------------- /unit_tests/unitTestRunner.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #define BOOST_TEST_MODULE testDRAMSpec 42 | #include 43 | 44 | #include "unit_tests/ArgumentsParserTest.cpp" 45 | #include "unit_tests/TechnologyValuesTest.cpp" 46 | #include "unit_tests/SubArrayTest.cpp" 47 | #include "unit_tests/TileTest.cpp" 48 | #include "unit_tests/BankTest.cpp" 49 | #include "unit_tests/ChannelTest.cpp" 50 | #include "unit_tests/TimingTest.cpp" 51 | #include "unit_tests/CurrentTest.cpp" 52 | -------------------------------------------------------------------------------- /unit_tests/unit_tests/BankTest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef BANKTEST_CPP 42 | #define BANKTEST_CPP 43 | 44 | #include 45 | 46 | #include "../../core/Bank.h" 47 | 48 | BOOST_AUTO_TEST_SUITE( testBank ) 49 | 50 | BOOST_AUTO_TEST_CASE( checkBank_real_input ) 51 | { 52 | int sim_argc = 5; 53 | char* sim_argv[] = {"./executable", 54 | "-t", 55 | "technology_input/test_technology.json", 56 | "-p", 57 | "architecture_input/test_architecture.json"}; 58 | 59 | ArgumentsParser inputFileName(sim_argc, sim_argv); 60 | 61 | string exceptionMsg("Empty"); 62 | try { 63 | inputFileName.runArgParser(); 64 | }catch (string exceptionMsgThrown){ 65 | exceptionMsg = exceptionMsgThrown; 66 | } 67 | string expectedMsg("Empty"); 68 | if ( exceptionMsg != expectedMsg ) { 69 | BOOST_FAIL( exceptionMsg ); 70 | } 71 | 72 | Bank bank; 73 | try { 74 | bank = Bank(inputFileName.technologyFileName[0], 75 | inputFileName.architectureFileName[0]); 76 | }catch (string exceptionMsgThrown){ 77 | exceptionMsg = exceptionMsgThrown; 78 | } 79 | expectedMsg = string("Empty"); 80 | if ( exceptionMsg != expectedMsg ) { 81 | BOOST_FAIL( exceptionMsg ); 82 | } 83 | 84 | 85 | BOOST_CHECK_MESSAGE( bank.bankStorage == 134217728*drs::bits, 86 | "Bank storage size different from the expected." 87 | << "\nExpected: " << 134217728*drs::bits 88 | << "\nGot: " << bank.bankStorage); 89 | 90 | BOOST_CHECK_MESSAGE( ceil(bank.bankWidth) == 2799*drs::micrometer, 91 | "Width of bank different from the expected." 92 | << "\nExpected: " << 2799*drs::micrometer 93 | << "\nGot: " << ceil(bank.bankWidth)); 94 | 95 | BOOST_CHECK_MESSAGE( ceil(bank.bankHeight) == 2324*drs::micrometer, 96 | "Height of bank different from the expected." 97 | << "\nExpected: " << 2324*drs::micrometer 98 | << "\nGot: " << ceil(bank.bankHeight)); 99 | 100 | BOOST_CHECK_MESSAGE( bank.nBankLogicalRows == 8192, 101 | "Number logical rows in a bank" 102 | << "different from the expected." 103 | << "\nExpected: " << 8192 104 | << "\nGot: " << bank.nBankLogicalRows); 105 | 106 | BOOST_CHECK_MESSAGE( bank.nRowAddressLines == 13, 107 | "Number of lines for row addressing " 108 | << "different from the expected." 109 | << "\nExpected: " << 13 110 | << "\nGot: " << bank.nRowAddressLines); 111 | 112 | BOOST_CHECK_MESSAGE( bank.nBankLogicalColumns == 1024, 113 | "Number logical columns in a bank" 114 | << "different from the expected." 115 | << "\nExpected: " << 1024 116 | << "\nGot: " << bank.nBankLogicalColumns); 117 | 118 | BOOST_CHECK_MESSAGE( bank.nColumnAddressLines == 10, 119 | "Number of lines for column addressing " 120 | << "different from the expected." 121 | << "\nExpected: " << 10 122 | << "\nGot: " << bank.nColumnAddressLines); 123 | 124 | } 125 | 126 | BOOST_AUTO_TEST_CASE( checkBank_dummy_input ) 127 | { 128 | int sim_argc = 5; 129 | char* sim_argv[] = {"./executable", 130 | "-t", 131 | "technology_input/tech_dummy_input.json", 132 | "-p", 133 | "architecture_input/arch_dummy_input.json"}; 134 | 135 | ArgumentsParser inputFileName(sim_argc, sim_argv); 136 | 137 | string exceptionMsg("Empty"); 138 | try { 139 | inputFileName.runArgParser(); 140 | }catch (string exceptionMsgThrown){ 141 | exceptionMsg = exceptionMsgThrown; 142 | } 143 | string expectedMsg("Empty"); 144 | if ( exceptionMsg != expectedMsg ) { 145 | BOOST_FAIL( exceptionMsg ); 146 | } 147 | 148 | Bank bank; 149 | try { 150 | bank = Bank(inputFileName.technologyFileName[0], 151 | inputFileName.architectureFileName[0]); 152 | }catch (string exceptionMsgThrown){ 153 | exceptionMsg = exceptionMsgThrown; 154 | } 155 | expectedMsg = "[ERROR] Architecture must have "; 156 | expectedMsg.append("1, 2 or 4 tile per bank."); 157 | BOOST_CHECK_MESSAGE( exceptionMsg == expectedMsg, 158 | "Error message different from what was expected." 159 | << "\nExpected: " << expectedMsg 160 | << "\nGot: " << exceptionMsg); 161 | 162 | } 163 | 164 | BOOST_AUTO_TEST_CASE( checkBank_different_tile_configs ) 165 | { 166 | int sim_argc = 5; 167 | char* sim_argv[] = {"./executable", 168 | "-t", 169 | "technology_input/test_technology.json", 170 | "-p", 171 | "architecture_input/test_architecture.json"}; 172 | 173 | ArgumentsParser inputFileName(sim_argc, sim_argv); 174 | 175 | string exceptionMsg("Empty"); 176 | try { 177 | inputFileName.runArgParser(); 178 | }catch (string exceptionMsgThrown){ 179 | exceptionMsg = exceptionMsgThrown; 180 | } 181 | string expectedMsg("Empty"); 182 | if ( exceptionMsg != expectedMsg ) { 183 | BOOST_FAIL( exceptionMsg ); 184 | } 185 | 186 | Bank bank; 187 | try { 188 | bank = Bank(inputFileName.technologyFileName[0], 189 | inputFileName.architectureFileName[0]); 190 | }catch (string exceptionMsgThrown){ 191 | exceptionMsg = exceptionMsgThrown; 192 | } 193 | expectedMsg = string("Empty"); 194 | if ( exceptionMsg != expectedMsg ) { 195 | BOOST_FAIL( exceptionMsg ); 196 | } 197 | 198 | 199 | bank.nTilesPerBank = 1.0; 200 | bank.pageSpanningFactor = 1; 201 | try { 202 | bank.tileCompute(); 203 | }catch (string exceptionMsgThrown){ 204 | cerr << exceptionMsgThrown << endl; 205 | } 206 | bank.bankCompute(); 207 | 208 | BOOST_CHECK_MESSAGE( bank.bankStorage == 134217728*drs::bits, 209 | "Bank storage size different from the expected." 210 | << "\nExpected: " << 134217728*drs::bits 211 | << "\nGot: " << bank.bankStorage); 212 | 213 | BOOST_CHECK_MESSAGE( ceil(bank.bankWidth) == 2550*drs::micrometer, 214 | "Width of bank different from the expected." 215 | << "\nExpected: " << 2550*drs::micrometer 216 | << "\nGot: " << ceil(bank.bankWidth)); 217 | 218 | BOOST_CHECK_MESSAGE( ceil(bank.bankHeight) == 2324*drs::micrometer, 219 | "Height of bank different from the expected." 220 | << "\nExpected: " << 2324*drs::micrometer 221 | << "\nGot: " << ceil(bank.bankHeight)); 222 | 223 | bank.nTilesPerBank = 2.0; 224 | bank.pageSpanningFactor = 1; 225 | try { 226 | bank.tileCompute(); 227 | }catch (string exceptionMsgThrown){ 228 | cerr << exceptionMsgThrown << endl; 229 | } 230 | bank.bankCompute(); 231 | 232 | BOOST_CHECK_MESSAGE( bank.bankStorage == 134217728*drs::bits, 233 | "Bank storage size different from the expected." 234 | << "\nExpected: " << 134217728*drs::bits 235 | << "\nGot: " << bank.bankStorage); 236 | 237 | BOOST_CHECK_MESSAGE( ceil(bank.bankWidth) == 5099*drs::micrometer, 238 | "Width of bank different from the expected." 239 | << "\nExpected: " << 5099*drs::micrometer 240 | << "\nGot: " << ceil(bank.bankWidth)); 241 | 242 | BOOST_CHECK_MESSAGE( ceil(bank.bankHeight) == 1409*drs::micrometer, 243 | "Height of bank different from the expected." 244 | << "\nExpected: " << 1409*drs::micrometer 245 | << "\nGot: " << ceil(bank.bankHeight)); 246 | 247 | bank.nTilesPerBank = 4.0; 248 | bank.pageSpanningFactor = 1; 249 | try { 250 | bank.tileCompute(); 251 | }catch (string exceptionMsgThrown){ 252 | cerr << exceptionMsgThrown << endl; 253 | } 254 | bank.bankCompute(); 255 | 256 | BOOST_CHECK_MESSAGE( bank.bankStorage == 134217728*drs::bits, 257 | "Bank storage size different from the expected." 258 | << "\nExpected: " << 134217728*drs::bits 259 | << "\nGot: " << bank.bankStorage); 260 | 261 | BOOST_CHECK_MESSAGE( ceil(bank.bankWidth) == 5099*drs::micrometer, 262 | "Width of bank different from the expected." 263 | << "\nExpected: " << 5099*drs::micrometer 264 | << "\nGot: " << ceil(bank.bankWidth)); 265 | 266 | BOOST_CHECK_MESSAGE( ceil(bank.bankHeight) == 1704*drs::micrometer, 267 | "Height of bank different from the expected." 268 | << "\nExpected: " << 1704*drs::micrometer 269 | << "\nGot: " << ceil(bank.bankHeight)); 270 | } 271 | 272 | BOOST_AUTO_TEST_SUITE_END() 273 | 274 | #endif // BANKTEST_CPP 275 | -------------------------------------------------------------------------------- /unit_tests/unit_tests/DramSpecTest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tukl-msd/DRAMSpec/6ed3a1098b3a83955883c8ccd813127cf6315c56/unit_tests/unit_tests/DramSpecTest.cpp -------------------------------------------------------------------------------- /utils/utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #include "utils.h" 42 | #include 43 | #include 44 | #include 45 | 46 | bool isInteger( double dn ) 47 | { 48 | double intpart; 49 | return ( modf(dn, &intpart) == 0 ); 50 | } 51 | 52 | bool isPowerOfTwo( double dn ) 53 | { 54 | unsigned int n = (unsigned int) dn; 55 | 56 | return ( (n & (n - 1)) == 0 ); 57 | } 58 | 59 | double timeToPercentage(double percentage) 60 | { 61 | // Compute the amount of time an exponetial signal, 62 | // of type V(t) = 1 - exp( - t/tau ) 63 | // takes to reach a given percentage of the final value. 64 | // The returned amount is given in terms of number of tau's. 65 | return -log(1.0 - percentage/100.0); 66 | } 67 | -------------------------------------------------------------------------------- /utils/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, University of Kaiserslautern 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 24 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * Authors: Omar Naji, 33 | * Matthias Jung, 34 | * Christian Weis, 35 | * Kamal Haddad, 36 | * Andre Lucas Chinazzo 37 | */ 38 | 39 | 40 | 41 | #ifndef UTILS_H 42 | #define UTILS_H 43 | 44 | #include 45 | 46 | #define INVALID_VALUE std::numeric_limits::max() 47 | 48 | bool isInteger( double dn ); 49 | bool isPowerOfTwo( double n ); 50 | 51 | double timeToPercentage(double percentage); 52 | #define PRINT_VAR(varName) \ 53 | do{std::cout << #varName " = " << varName << std::endl;} while(false) 54 | 55 | #endif // UTILS_H 56 | --------------------------------------------------------------------------------