-
Notifications
You must be signed in to change notification settings - Fork 0
Hbm components #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aakahlow
wants to merge
14
commits into
develop
Choose a base branch
from
hbm-components
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Hbm components #15
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
74d7f21
components: Add hbm components
aakahlow eb853b6
configs: add config scripts to test hbm components
aakahlow bc47031
mem: increase max routing table size for sanity check
aakahlow dc7eac4
mem: increase clk frq to get more bw out of xbar
aakahlow 3464d06
components: fix size of hbm channel
aakahlow 590b241
components: update hbm pseduo channel interface
aakahlow de0cfa2
components: add modified hbm components for better random traffic perf
aakahlow 551894f
mem: adding run script and plot files
mbabaie caf5b71
mem: updated plots and results
mbabaie afbe685
mem: stat for cmd bus util
aakahlow dc493da
mem: replace simSec by simTick
aakahlow 044cb08
mem: temp commit
aakahlow e47a320
mem: adding an HBM2 interface (in progress)
aakahlow dccd154
mem: updates in HBM2 interface
aakahlow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
|
|
||
| from gem5.components.memory import DualChannelDDR4_2400 | ||
| from gem5.components.memory import SingleChannelDDR3_1600 | ||
| from gem5.components.memory import SingleChannelDDR4_2400 | ||
| from gem5.components.memory import SingleChannelLPDDR3_1600 | ||
| from gem5.components.memory import SingleChannelHBM | ||
| from gem5.components.memory import SingleChannelHBM_DDR3 | ||
| from gem5.components.memory import SingleChannelHBMPseudo | ||
| from gem5.components.memory import HBM2Stack | ||
| from gem5.components.memory import HBM2Stackv2 | ||
|
|
||
| def GetMemClass(simulator, mem_type): | ||
| return MemInfoDict[simulator][mem_type] | ||
|
|
||
| MemInfoDict = { | ||
| 'gem5' : { | ||
| 'ddr3' : SingleChannelDDR3_1600, | ||
| 'ddr4' : SingleChannelDDR4_2400, | ||
| 'lpddr3' : SingleChannelLPDDR3_1600, | ||
| 'hbm' : SingleChannelHBM, | ||
| 'hbm_pseudo' : SingleChannelHBMPseudo, | ||
| 'hbm_from_ddr3' : SingleChannelHBM_DDR3, | ||
| 'hbm_stack' : HBM2Stack, | ||
| 'hbm_stack_v2' : HBM2Stackv2 | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| # Copyright (c) 2021 The Regents of the University of California | ||
| # All rights reserved. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions are | ||
| # met: redistributions of source code must retain the above copyright | ||
| # notice, this list of conditions and the following disclaimer; | ||
| # redistributions in binary form must reproduce the above copyright | ||
| # notice, this list of conditions and the following disclaimer in the | ||
| # documentation and/or other materials provided with the distribution; | ||
| # neither the name of the copyright holders nor the names of its | ||
| # contributors may be used to endorse or promote products derived from | ||
| # this software without specific prior written permission. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
| import m5 | ||
| import sys | ||
| import argparse | ||
|
|
||
| from m5.objects import * | ||
|
|
||
| from m5.util import fatal | ||
| from m5.objects import Root | ||
| from mem_info import GetMemClass | ||
|
|
||
| from gem5.components.boards.test_board import TestBoard | ||
| from gem5.components.cachehierarchies.classic.no_cache import NoCache | ||
| from gem5.components.processors.linear_generator import LinearGenerator | ||
| from gem5.components.processors.random_generator import RandomGenerator | ||
|
|
||
| parser = argparse.ArgumentParser() | ||
| parser.add_argument("mem_type", type=str, help="type of memory to simulate") | ||
| parser.add_argument( | ||
| "simulator", type=str, help="the simulator to use for memory" | ||
| ) | ||
| parser.add_argument("mode", type=str, help="type of traffic to use") | ||
| parser.add_argument( | ||
| "duration", | ||
| type=str, | ||
| help="duration for which the synthetic traffic will be generated", | ||
| ) | ||
| parser.add_argument( | ||
| "rate", | ||
| type=str, | ||
| help="the rate at which the synthetic traffic will be generated", | ||
| ) | ||
| parser.add_argument( | ||
| "rd_perc", | ||
| type=int, | ||
| help="specifies the percentage of read request in the generated traffic", | ||
| ) | ||
|
|
||
| args = parser.parse_args() | ||
|
|
||
| args.rate = args.rate + "GB/s" | ||
|
|
||
| memory_class = GetMemClass(args.simulator, args.mem_type) | ||
| memory = memory_class() | ||
|
|
||
| cache_hierarchy = NoCache() | ||
|
|
||
| #range=AddrRange('8GB') | ||
|
|
||
| mem_range = AddrRange(memory.get_size()) | ||
|
|
||
| min_addr = mem_range.start | ||
| max_addr = mem_range.end | ||
|
|
||
| if args.mode == "linear": | ||
| generator = LinearGenerator( | ||
| num_cores=1, | ||
| duration=args.duration, | ||
| rate=args.rate, | ||
| min_addr=min_addr, | ||
| max_addr=max_addr, | ||
| rd_perc=args.rd_perc, | ||
| ) | ||
| elif args.mode == "random": | ||
| generator = RandomGenerator( | ||
| num_cores=1, | ||
| duration=args.duration, | ||
| rate=args.rate, | ||
| min_addr=min_addr, | ||
| max_addr=max_addr, | ||
| rd_perc=args.rd_perc, | ||
| ) | ||
| else: | ||
| fatal("Generator type not supported") | ||
|
|
||
| motherboard = TestBoard( | ||
| clk_freq="4GHz", | ||
| processor=generator, | ||
| memory=memory, | ||
| cache_hierarchy=cache_hierarchy, | ||
| ) | ||
| #motherboard.connect_things() | ||
|
|
||
| root = Root(full_system=False, system=motherboard) | ||
| m5.instantiate() | ||
| generator.start_traffic() | ||
| print("Beginning simulation!") | ||
| exit_event = m5.simulate() | ||
| print("Exiting @ tick %i because %s" % (m5.curTick(), exit_event.getCause())) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,8 @@ | |
| from .dram_interfaces.hbm import HBM_1000_4H_1x128 | ||
| from .dram_interfaces.lpddr3 import LPDDR3_1600_1x32 | ||
| from .dram_interfaces.ddr3 import DDR3_1600_8x8, DDR3_2133_8x8 | ||
|
|
||
| from .dram_interfaces.hbm import HBM_FROM_DDR3 | ||
| from .dram_interfaces.hbm import HBM_1000_4H_1x64_pseudo | ||
|
|
||
| def SingleChannelDDR3_1600( | ||
| size: Optional[str] = None, | ||
|
|
@@ -95,3 +96,27 @@ def SingleChannelHBM( | |
| 64, | ||
| size=size | ||
| ) | ||
|
|
||
| def SingleChannelHBM_DDR3( | ||
| size: Optional[str] = None, | ||
| ) -> AbstractMemorySystem: | ||
| if not size: | ||
| size = "4GiB" | ||
| return ChanneledMemory( | ||
| HBM_FROM_DDR3, | ||
| 1, | ||
| 64, | ||
| size=size | ||
| ) | ||
|
|
||
| def SingleChannelHBMPseudo( | ||
| size: Optional[str] = None, | ||
| ) -> AbstractMemorySystem: | ||
| if not size: | ||
| size = "256MiB" | ||
| return ChanneledMemory( | ||
| HBM_1000_4H_1x64_pseudo, | ||
| 1, | ||
| 64, | ||
| size=size | ||
| ) | ||
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline at end of file :)