Coder Social home page Coder Social logo

cmu-safari / ramulator2 Goto Github PK

View Code? Open in Web Editor NEW
207.0 13.0 50.0 691 KB

Ramulator 2.0 is a modern, modular, extensible, and fast cycle-accurate DRAM simulator. It provides support for agile implementation and evaluation of new memory system designs (e.g., new DRAM standards, emerging RowHammer mitigation techniques). Described in our paper https://people.inf.ethz.ch/omutlu/pub/Ramulator2_arxiv23.pdf

Home Page: https://arxiv.org/abs/2308.11030

License: MIT License

CMake 0.68% Python 2.82% Jupyter Notebook 11.27% C++ 73.09% C 0.03% Shell 0.14% Verilog 0.08% SystemVerilog 11.69% Stata 0.20%
dram memory simulation

ramulator2's Introduction

Ramulator V2.0a

Introduction

Ramulator 2.0 is a modern, modular, and extensible cycle-accurate DRAM simulator. It is the successor of Ramulator 1.0 [Kim+, CAL'16], achieving both fast simulation speed and ease of extension. The goal of Ramulator 2.0 is to enable rapid and agile implementation and evaluation of design changes in the memory controller and DRAM to meet the increasing research effort in improving the performance, security, and reliability of memory systems. Ramulator 2.0 abstracts and models key components in a DRAM-based memory system and their interactions into shared interfaces and independent implementations, enabling easy modification and extension of the modeled functions of the memory controller and DRAM.

This Github repository contains the public version of Ramulator 2.0. From time to time, we will synchronize improvements of the code framework, additional functionalities, bug fixes, etc. from our internal version. Ramulator 2.0 is in its early stage and welcomes your contribution as well as new ideas and implementations in the memory system!

Currently, Ramulator 2.0 provides the DRAM models for the following standards:

  • DDR3, DDR4, DDR5
  • LPDDR5
  • GDDR6
  • HBM(2), HBM3

Ramulator 2.0 also provides implementations for the following RowHammer mitigation techniques:

A quick glance at Ramulator 2.0's other key features:

  • Modular and extensible software architecture: Ramulator 2.0 provides an explicit separation of implementations from interfaces. Therefore new ideas can be implemented without intrusive changes.
  • Self-registering factory for interface and implementation classes: Ramulator 2.0 automatically constructs the correct class of objects by their names as you specify in the configuration. Do not worry about boilerplate code!
  • YAML-based configuration file: Ramulator 2.0 is configured via human-readable and machine-friendly configuration files. Sweeping parameters is as easy as editing a Python dictionary!

The initial release of Ramulator 2.0 is described in the following paper:

Haocong Luo, Yahya Can Tugrul, F. Nisa Bostancı, Ataberk Olgun, A. Giray Yaglıkcı, and Onur Mutlu, "Ramulator 2.0: A Modern, Modular, and Extensible DRAM Simulator," arXiv, 2023.

If you use Ramulator 2.0 in your work, please use the following citation:

@misc{luo2023ramulator2,
  title={{Ramulator 2.0: A Modern, Modular, and Extensible DRAM Simulator}}, 
  author={Haocong Luo and Yahya Can Tu\u{g}rul and F. Nisa Bostancı and Ataberk Olgun and A. Giray Ya\u{g}l{\i}k\c{c}{\i} and and Onur Mutlu},
  year={2023},
  archivePrefix={arXiv},
  primaryClass={cs.AR}
}

Using Ramulator 2.0

Dependencies

Ramulator uses some C++20 features to achieve both high runtime performance and modularity and extensibility. Therefore, a C++20-capable compiler is needed to build Ramulator 2.0. We have tested and verified Ramulator 2.0 with the following compilers:

  • g++-12
  • clang++-15

Ramulator 2.0 uses the following external libraries. The build system (CMake) will automatically download and configure these dependencies.

Getting Started

Clone the repository

  $ git clone https://github.com/CMU-SAFARI/ramulator2

Configure the project and build the executable

  $ mkdir build
  $ cd build
  $ cmake ..
  $ make -j
  $ cp ./ramulator2 ../ramulator2
  $ cd ..

This should produce a ramulator2 executable that you can execute standalone and a libramulator.so dynamic library that can be used as a memory system library by other simulators.

Running Ramulator 2.0 in Standalone Mode

Ramulator 2.0 comes with two independent simulation frontends: A memory-trace parser and a simplistic out-of-order core model that can accept instruction traces. To start a simulation with these frontends, just run the Ramulator 2.0 executable with the path to the configuration file specified through the -f argument

  $ ./ramulator2 -f ./example_config.yaml

To support easy automation of experiments (e.g., evaluate many different traces and sweep parameters), Ramulator 2.0 can accept the configurations as a string dump of the YAML document, which is usually produced by a scripting language that can easily parse and manipulate YAML documents (e.g., python). We provide an example python snippet to demonstrate an experiment of sweeping the nRCD timing constraint:

import os
import yaml  # YAML parsing provided with the PyYAML package

baseline_config_file = "./example_config.yaml"
nRCD_list = [10, 15, 20, 25]

base_config = None
with open(base_config_file, 'r') as f:
  base_config = yaml.safe_load(f)

for nRCD in nRCD_list:
  config["MemorySystem"]["DRAM"]["timing"]["nRCD"] = nRCD
  cmds = ["./ramulator2", str(config)]
  # Run the command with e.g., os.system(), subprocess.run(), ...

Using Ramulator 2.0 as a Library (gem5 Example)

Ramulator 2.0 packs all the interfaces and implementations into a dynamic library (libramulator.so). This can be used as a memory system library providing extensible cycle-accurate DRAM simulation to another simulator. We use gem5 as an example to show how to use Ramulator 2.0 as a library. We have tested and verified the integration of Ramulator 2.0 into gem5 as a library.

  1. Clone Ramulator 2.0 into gem5/ext/ramulator2/ directory.
  2. Build Ramulator 2.0. You should have libramulator.so at gem5/ext/ramulator2/ramulator2/libramulator.so
  3. Create a file SConscript at gem5/ext/ramulator2/, with the following contents to add Ramulator 2.0 to gem5's build system
import os

Import('env')

if not os.path.exists(Dir('.').srcnode().abspath + '/ramulator2'):
  env['HAVE_RAMULATOR2'] = False
  Return()

env['HAVE_RAMULATOR2'] = True
ramulator2_path = os.path.join(Dir('#').abspath, 'ext/ramulator2/ramulator2/')
env.Prepend(CPPPATH=Dir('.').srcnode())
env.Append(
  LIBS=['ramulator'],
  LIBPATH=[ramulator2_path],
  RPATH=[ramulator2_path],
  CPPPATH=[
  ramulator2_path+'/src/', 
  ramulator2_path+'/ext/spdlog/include',
  ramulator2_path+'/ext/yaml-cpp/include'
])
  1. Put the Ramulator2 wrapper code to gem5/src/mem/
  2. Add the code to gem5/src/mem/SConscript to register the Ramulator2 SimObjects to gem5
if env['HAVE_RAMULATOR2']:
  SimObject('Ramulator2.py', sim_objects=['Ramulator2'])
  Source('ramulator2.cc')
  DebugFlag("Ramulator2")
  1. Create the Ramulator2 SimObject as the memory controller and specify the path to the Ramulator 2.0 configuration file in your gem5 configuration script, e.g.,
import m5
from m5.objects import *

system = System()
system.mem_ctrl = Ramulator2()
system.mem_ctrl.config_path = "<path-to-config>.yaml" # Don't forget to specify GEM5 as the implementation of the frontend interface!

# Continue your configuration of gem5 ...

General Instructions for Writing Your Own Wrapper of Ramulator 2.0 for Another (including Your Own) Simulator

We describe the key steps and cover the key interfaces involved in using Ramulator 2.0 as a library for your own simulator.

  1. Add Ramulator 2.0's key header files to your build system:
  • ramulator2/src/base/base.h
  • ramulator2/src/base/request.h
  • ramulator2/src/base/config.h
  • ramulator2/src/frontend/frontend.h
  • ramulator2/src/memory_system/memory_system.h
  1. Parse the YAML configuration for Ramulator 2.0 and instantiate the interfaces of the two top-level components, e.g.,
// MyWrapper.h
std::string config_path;
Ramulator::IFrontEnd* ramulator2_frontend;
Ramulator::IMemorySystem* ramulator2_memorysystem;

// MyWrapper.cpp
YAML::Node config = Ramulator::Config::parse_config_file(config_path, {});
ramulator2_frontend = Ramulator::Factory::create_frontend(config);
ramulator2_memorysystem = Ramulator::Factory::create_memory_system(config);

ramulator2_frontend->connect_memory_system(ramulator2_memorysystem);
ramulator2_memorysystem->connect_frontend(ramulator2_frontend);
  1. Communicate the necessary memory system information from Ramulator 2.0 to your system (e.g., memory system clock):
float memory_tCK = ramulator2_memorysystem->get_tCK();
  1. Send the memory requests from your simulator to Ramulator 2.0, with the correspoding callbacks that should be executed when the request is "completed" by Ramulator 2.0, e.g.,
if (is_read_request) {
  enqueue_success = ramulator2_frontend->
    receive_external_requests(0, memory_address, context_id, 
    [this](Ramulator::Request& req) {
      // your read request callback 
    });

  if (enqueue_success) {
    // What happens if the memory request is accepted by Ramulator 2.0
  } else {
    // What happens if the memory request is rejected by Ramulator 2.0 (e.g., request queue full)
  }
}
  1. Find a proper time and place to call the epilogue functions of Ramulator 2.0 when your simulator has finished execution, e.g.,
void my_simulator_finish() {
  ramulator2_frontend->finalize();
  ramulator2_memorysystem->finalize();
}

Extending Ramulator 2.0

Directory Structure

Ramulator 2.0

ext                     # External libraries
src                     # Source code of Ramulator 2.0
└ <component1>          # Collection of the source code of all interfaces and implementations related to the component
  └ impl                # Collection of the source code of all implementations of the component
    └ com_impl.cpp      # Source file of a specific implementation
  └ com_interface.h     # Header file that defines an interface
  └ CMakeList.txt       # Component-level CMake configuration
└ ...                    
└ CMakeList.txt         # Top-level CMake configuration of all Ramulator 2.0's source files
CMakeList.txt           # Project-level CMake configuration

Interface and Implementation

To achieve high modularity and extensibility, Ramulator 2.0 models the components in the memory system using two concepts, Interfaces and Implementations:

  • An interface is a high-level abstraction of the common high-level functionality of a component as seen by other components in the system. It is an abstract C++ class defined in a .h header file, that provides its functionalities through virtual functions.
  • An implementation is a concrete realization of an interface that models the actual behavior of the object. It is usually a C++ class that inherits from the interface class it is implementing that provides implementations of the interface's virtual functions.

An example interface class looks like this:

// example_interface.h
#ifndef     RAMULATOR_EXAMPLE_INTERFACE_H
#define     RAMULATOR_EXAMPLE_INTERFACE_H

// Defines fundamental data structures and types of Ramulator 2.0. Must include for all interfaces.
#include "base/base.h"  

namespace Ramulator {
class ExampleIfce {
  // One-liner macro to register this "ExampleIfce" interface with the name "ExampleInterface" to Ramulator 2.0.
  RAMULATOR_REGISTER_INTERFACE(ExampleIfce, "ExampleInterface", "An example of an interface class.")
  public:
    // Model common behaviors of the interface with virtual functions 
    virtual void foo() = 0;
};
}        // namespace Ramulator

#endif   // RAMULATOR_EXAMPLE_INTERFACE_H

An example implementation that implements the above interface looks like this

// example_impl.cpp
#include <iostream>

// An implementation should always include the header of the interface that it is implementating
#include "example_interface.h"

namespace Ramulator {
// An implementation class should always inherit from *both* the interface it is implementating, and the "Implementation" base class
class ExampleImpl : public ExampleIfce, public Implementation  {
  // One-liner macro to register and bind this "ExampleImpl" implementation with the name "ExampleImplementation" to the "ExampleIfce" interface.
  RAMULATOR_REGISTER_IMPLEMENTATION(ExampleIfce, ExampleImpl, "ExampleImplementation", "An example of an implementation class.")
  public:
    // Implements concrete behavior
    virtual void foo() override {
      std::cout << "Bar!" << std::endl;
    };
};
}      // namespace Ramulator

Adding an Implementation to an Existing Interface

Let us consider an example of adding an implementation "MyImpl" for the interface "MyIfce", defined in my_ifce.h, that belongs to a component "my_comp".

  1. Create a new .cpp file under my_comp/impl/ that contains the source code for the implementation. Say this file is "my_impl.cpp". The directory structure for my_comp will look like this:
my_comp                     
  └ impl
    └ my_impl.cpp      
  └ my_interface.h     
  └ CMakeList.txt       
  1. Provide the concrete class definition for MyImpl in my_impl.cpp, following the structure explained above. It is important to do the following two things when defining your class:
    • Make sure you inherit from both the interface class that you are implementing and the Implementation base class
    • Make sure to include the macro RAMULATOR_REGISTER_IMPLEMENTATION(...) inside your implementation class definition. You should always specify which interface class your class is implementing and the stringified name of your implementation class in the macro. Assume you have the following registration macro for the interface class
class MyIfce {
  RAMULATOR_REGISTER_INTERFACE(MyIfce, "MyInterfaceName", "An example of my interface class.")
}

and the following for the implementation class

class MyImpl : public MyIfce, public Implementation {
  RAMULATOR_REGISTER_IMPLEMENTATION(MyIfce, MyImpl, "MyImplName", "An example of my implementation class.")
}

If everything is correct, Ramulator 2.0 will be able to automatically construct a pointer of type MyIfce*, pointing to an object of type MyImpl, when it sees the following in the YAML configuration file:

MyInterfaceName:
  impl: MyImplName
  1. Finally, add impl/my_impl.cpp to target_sources in CMakeList.txt so that CMake knows about the newly added source file.

Adding a New Interface (or New Component)

The process is similar to that of adding a new implementation, but you will need to create the interface and add them to CMakeList.txt under the corresponding component directory. If you add a new component (i.e., create a new directory under src/) you will need to add this new directory to the CMakeList.txt file under src/, i.e.,

add_subdirectory(my_comp)

Verifying Ramulator 2.0's Memory Controller and DRAM Model

We use the Verilog model from Micron to verify that the DRAM commands issued by Ramulator 2.0 do not cause timing or state transition violations.

  1. Generate the instruction traces
cd verilog_verification
cd traces
python3 tracegen.py --type SimpleO3 --pattern {stream,random} --num-insts ${NUM_INSTS} --output ${TRACE_FILE} --distance ${MEMREQ_INTENSITY}
  1. Collect the DRAM command trace (with addresses and time stamps) from the simulations
cd ..
./ramulator2 -f ./verification-config.yaml
  1. Configure the Verilog model to match the configuration used by Ramulator 2.0:
  • DRAM Organization: "DDR4_8G_X8"
  • DRAM Frequency: "DDR4_2400"
  • Number of Ranks: 2

We provide the already configured Verilog files in verilog_verification/sources/.

  1. Convert the DRAM Command Trace to fit the testbench of the Verilog model. We provide a script verilog_verification/trace_converter.py to do so.
python3 trace_converter.py DDR4_8G_X8 2 DDR4_2400
  1. Then you can just start your Verilog simulator (e.g., ModelSim) and check for violations. We provide a script to parse the simulation output and check for errors verilog_verification/trace_verifier.py
python3 trace_verifier.py <trace_filepath> <output_filepath>

Reproducing the Results in our Ramulator 2.0 paper

Simulation Performance Comparison with Other Simulators

We put all scripts and configurations in perf_comparison/

  1. Get simulators from their respective sources and put their source code at perf_comparison/simulators/
cd perf_comparison
mkdir simulators
cd simulators
git clone https://github.com/umd-memsys/DRAMSim2.git    # DRAMSim2
git clone https://github.com/umd-memsys/DRAMsim3        # DRAMSim3
wget http://www.cs.utah.edu/~rajeev/usimm-v1.3.tar.gz   # USIMM v1.3
tar xvzf ./usimm-v1.3.tar.gz
git clone https://github.com/CMU-SAFARI/ramulator.git   # Ramulator 1.0
mv ramulator ramulatorv1
git clone https://github.com/CMU-SAFARI/ramulator2.git  # Ramulator 2.0
mv ramulator2 ramulatorv2
  1. Apply patches to DRAMSim2, DRAMSim3, and USIMM to remove some of their hardcoded system configurations and unify the termination criteria of all simulators for a fair comparison. We do not change the core modeling and simulation code of these simulators.
cd DRAMSim2
git apply ../../DRAMSim2-patch.patch
cd ..
cd DRAMsim3
git apply ../../DRAMsim3-patch.patch
cd ..
  1. Build all simulators
cd ..
./build_simulators.sh
  1. Generate traces
cd traces
./gen_all_traces.sh
  1. Run the simulators with comparable system and DRAM configurations at perf_comparison/configs/ and record runtimes
python3 perf_comparison.py

Cross-Sectional Study of Various RowHammer Mitigation Techniques

We put all scripts and configurations in rh_study/

  1. Get the instruction traces from SPEC 2006 and 2017
cd rh_study
wget <download_link>  # We host the traces here https://drive.google.com/file/d/1CvAenRZQmmM6s55ptG0-XyeLjhMVovTx/view?usp=drive_link
tar xvzf ./cputraces.tar.gz
  1. Generate workloads from trace combinations
python3 get_trace_combinations.py
  1. Run the single-core and multi-core simulations (assuming using slurm, if not, please change line 68 of run_singlecore.py and line 73 of run_multicore.py to fit your job scheduler)
python3 run_singlecore.py
python3 run_multicore.py
  1. Execute the notebook plot.ipynb to plot the results

ramulator2's People

Contributors

agyaglikci avatar cyyself avatar kirbyydoge avatar olgunataberk avatar omutlu avatar richardluo79 avatar sangjae4309 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ramulator2's Issues

typo in README

Create a file Sonscript at gem5/ext/ramulator2/, with the following contents to add Ramulator 2.0 to gem5's build system

Name Sonscript should be SConscript

Calculate BW from the stats

Hi,

1- I am trying to understand the stats of ramulator2, to estimate the total BW of the running trace in SimpleO3 mode.
Could you please give some hints on that?
("total_num_read_requests + total_num_write_requests")*(tx_bytes)/(??)

2- I expected to see the same value for "total_num_read_requests + total_num_write_requests" and "llc_write_misses +llc_read_misses" but it seems they are not the same, so I wonder why not?
Are the llc_req and mem_req in the same size (tx_bytes)?

3- these two stats "memory_access_cycles_recorded_core_0" and "cycles_recorded_core_0" are unclear.
4- "memory_access_cycles_recorded_core_0" is not only related to the memory_access delay, as in some cases with the same number of memory requests (total_num_read_requests + total_num_write_requests), but with a different number of "num_expected_insts", the "memory_access_cycles_recorded_core_0" will not remain the same!

Thanks,

error in state update of LPDDR5

void set_actions() {
m_actions.resize(m_levels.size(), std::vector<ActionFunc_t<Node>>(m_commands.size()));
// Rank Actions
m_actions[m_levels["rank"]][m_commands["PREA"]] = Lambdas::Action::Rank::PREab<LPDDR5>;
m_actions[m_levels["rank"]][m_commands["CASRD"]] = [] (Node* node, int cmd, int target_id, Clk_t clk) {
node->m_final_synced_cycle = clk + m_timings["nCL"] + m_timings["nBL16"] + 1;
};
m_actions[m_levels["rank"]][m_commands["CASWR"]] = [] (Node* node, int cmd, int target_id, Clk_t clk) {
node->m_final_synced_cycle = clk + m_timings["nCWL"] + m_timings["nBL16"] + 1;
};
m_actions[m_levels["rank"]][m_commands["RD16"]] = [] (Node* node, int cmd, int target_id, Clk_t clk) {
node->m_final_synced_cycle = clk + m_timings["nCL"] + m_timings["nBL16"];
};
m_actions[m_levels["rank"]][m_commands["WR16"]] = [] (Node* node, int cmd, int target_id, Clk_t clk) {
node->m_final_synced_cycle = clk + m_timings["nCWL"] + m_timings["nBL16"];
};
// Bank actions
m_actions[m_levels["bank"]][m_commands["ACT-1"]] = [] (Node* node, int cmd, int target_id, Clk_t clk) {
node->m_state = m_states["Pre-Opened"];
node->m_row_state[target_id] = m_states["Pre-Opened"];
};
m_actions[m_levels["bank"]][m_commands["ACT-2"]] = Lambdas::Action::Bank::ACT<LPDDR5>;
m_actions[m_levels["bank"]][m_commands["PRE"]] = Lambdas::Action::Bank::PRE<LPDDR5>;
m_actions[m_levels["bank"]][m_commands["RD16A"]] = Lambdas::Action::Bank::PRE<LPDDR5>;
m_actions[m_levels["bank"]][m_commands["WR16A"]] = Lambdas::Action::Bank::PRE<LPDDR5>;
};

In command such as CASRD, CASWR, RD16, and WR16, the m_final_synced_cycle should be updated with m_timing_vals, not m_timing. Current codes result in issuing WCK2CK command per every RD or WR request.

The code should be

node->m_final_synced_cycle = clk + node->m_spec->m_timing_vals("nCL") + node->m_spec->m_timing_vals("nBL16") + 1;

Verifying Ramulator 2.0's Memory Controller and DRAM Model

Hi,

I am trying to verify the ramulator memory controller and DRAM model as explained in the README.
I am using ncsim (ncverilog) as a simulator - ddr4_verilog_models/protected_ncverilog-

I modified these files "tb.sv" and also "subtest.vh" in the ddr4_verilog_models, to support the ramulator configuration. These changes were necessary to align the simulation with Ramulator's configuration.

When I use the default period setting (where default_period(nominal_ts) = TS_1250, corresponding to a data rate of 1600) in the "subtest.vh" file, I can successfully run the Ramulator traces generated with DDR4-2400. However, when I adjust the period and set it to TS_833, I encounter a VIOLATION ERROR.

For example, one of the errors I encounter is:

tb.golden_model.always_diff_ck.if_diff_ck:VIOLATION: cmdRD BG:0 B:0 A:2 (BL:4 WL:10 RL:12) @2820.0 ns Required:
tWTR_L (CWL + BL/2 + tWTRc_L) - 4 clocks.

Or:
tb.golden_model.VerifyMR:ERROR:SPEC_VIOLATION tWR/tRTP tWR spec:19 loaded:14 tRTP spec:5831 loaded:5831 @2137.5 ns

I'm wondering if you could provide an example of a trace file that you generated with Ramulator and ran on the DRAM model without encountering any violations.
Furthermore, I would appreciate more detailed guidance on how to modify "tb.sv" and "subtest.vh" within the ddr4_verilog_models to match the Ramulator DDR configuration and run simulations without errors.

SimpleO3 front end show significant Cache bandwidth bound when doing sequential memory access test.

Dear Author,
While conducting a single core sequential memory read-only test on LPDDR5 6400, I noticed that the system bandwidth is constrained by cache performance with all default settings, rather than by the DRAM. Only when I modify the Cache latency to 1, I can find the effect of different memory bandwidth configurations. I want to know why it happens since it is not likely to be cache bound in the real system to do such a test.

Issues related to the output of simulation results

Hi!

Compared to the ramulator v1, the stat report output at the terminal lacks many parameter indicators, such as bandwidth, read/write latency, etc. Is it possible to add more simulation information and output the report to a user defiend file. I will be approciate it!

Writing Your Own Wrapper of Ramulator 2.0 for my own Simulator

I am trying to do step 4 under 'Writing Your Own Wrapper of Ramulator 2.0 for my own Simulator' in readme file, to send the memory requests from my simulator to Ramulator 2.0.
Inside frontend.h file, ("virtual bool receive_external_requests(int req_type_id, Addr_t addr, int source_id, std::function<void(Request&)> callback) { return false; }"), it returns false and hence the memory requests are not sent properly to the ramulator.
Do I have to modify any files of the ramulator code base? Or do I have to make 2 separate files of MyWrapper.h and MyWrappr.cpp?

Inquiries about HBM2/3 configuration

Hi!
I am using ramulator2 for DRAM simulation. When I tested the HBM, I noticed that the bandwidth seemed to be lower than expected.
For 5,000,000 requests generated in perf_comparison, the HBM memory system takes 5390135 cycles to process the requests, which translates to a bandwidth of 5e6 * 64 / 2**30 / (5390135 / 1e9) = 55GB/s.
I'm wondering if there's a problem with the configuration of HBM in my yaml file, or if there's a problem with the understanding elsewhere.
Thank you very much for your help.

ramulatorv2.yaml:

Frontend:
  impl: LoadStoreTrace
  path: ./traces/stream_5M_R8W2_ramulatorv2.trace
  clock_ratio: 10

  Translation:
    impl: NoTranslation
    max_addr: 2147483648
              

MemorySystem:
  impl: GenericDRAM
  clock_ratio: 1
  DRAM:
    impl: HBM3
    org:
      preset: HBM3_4Gb
      channel: 8
    timing:
      preset: HBM3_2Gbps

  Controller:
    impl: Generic
    Scheduler:
      impl: FRFCFS
    RefreshManager:
      impl: AllBank
    plugins:

  AddrMapper:
    impl: RoBaRaCoCh

output:

[Ramulator::LoadStoreTrace] [info] Loaded 5000000 lines.
Frontend:
  impl: LoadStoreTrace

MemorySystem:
  impl: GenericDRAM
  total_num_other_requests: 0
  total_num_write_requests: 1000170
  total_num_read_requests: 3999830
  memory_system_cycles: 5390135
  DRAM:
    impl: HBM3
  AddrMapper:
    impl: RoBaRaCoCh
  Controller:
    impl: Generic

run ramulator2 with drampower enable and see the power/energy results

Hi,

I noticed that you've integrated DRAMPower into Ramulator2, which is a great addition to ramulator2.
However, I'm unsure about how to enable and run Ramulator with DRAMPower. Could you please provide more detailed instructions in the README on how to enable power metrics in the results?"

Regards,
Saeideh

run dram trace on ramulator2

Hello,

I cannot find any traces or relevant configurations for running DRAM traces on Ramulator2. I'm curious about whether Ramulator2 still supports DRAM mode, and if not, whether all components related to DRAM trace support have been removed, or if there's a possibility to modify and reinstate this option in Ramulator2.

Thank you in advance!

DDR5 RFM is not specified

Hi everyone

I modified the 'example_config.yaml' file to run DDR5, but when I try to run it, I encounter the following error message:

terminate called after throwing an instance of 'Ramulator::ConfigurationError' what(): ParamGroup "RFM" is not specified for implementation "DDR5". Aborted (core dumped)

How can I resolve this issue?

Thanks.

missing stats

Hi,

Maybe this is a dumb question but I didn't see any output file or statistics after running the example yaml. I installed ramulator in Linux and ran the example config in the standalone mode. Am I missing something? Thnaks

Ly

"HBM3 has an issue with independent operation of pseudochannels."

There is an issue with independent operation of HBM3 Pseudochannels. In order to achieve true independent operation, different Pseudochannels should be able to have different commands even within the same clock cycle. However, the current code has a problem where there needs to be a minimum difference of 1 clock cycle.

uint not a type

Expected Behavior

Compile using cmake and g++13

Current Behavior

Failed to compile; error given:

ramulator2/src/frontend/frontend.h:21:5: error: 'uint' does not name a type; did you mean 'int'?
   21 |     uint m_clock_ratio = 1;
ramulator2/src/memory_system/memory_system.h:22:5: error: 'uint' does not name a type; did you mean 'int'?
   22 |     uint m_clock_ratio = 1;

Possible Solution

Replacing 'uint' with unsigned int fixed the issue.

Steps to Reproduce

Clone and run...
$ mkdir build
$ cd build
$ cmake ..
$ make -j

Environment

M2 Macbook Air
macOS Sonoma 14.1.1
gcc 13.2.0
Target: aarch64-apple-darwin22

We believe this is a definition that may cause LPDDR5 spec illegal with respect to CAS Sync. How about a new definition at the rank level?

      m_preqs[m_levels["bank"]][m_commands["RD16"]] = [] (Node* node, int cmd, int target_id, Clk_t clk) {
        switch (node->m_state) {
          case m_states["Closed"]: return m_commands["ACT-1"];
          case m_states["Pre-Opened"]: return m_commands["ACT-2"];
          case m_states["Opened"]: {
            if (node->m_row_state.find(target_id) != node->m_row_state.end()) {
              Node* rank = node->m_parent_node->m_parent_node;
              if (rank->m_final_synced_cycle < clk) {
                return m_commands["CASRD"];  // CASRD
              } else {
                return cmd;``

The JEDEC specification requires RD to appear in the cycle(+1) immediately following CASRD and WR in the cycle(+1) immediately following CASWR, but the above definition does not result in that.

What about the idea of adding a new definition at the rank level to put CASRD+RD, CASWR+WR in the m_preqs queue?

Incorrect Constructor Usage in twice.cpp

TwiCeEntry struct has only one constructor, the default constructor, which takes no arguments. So, the line should have been curly brackets to specify list initialization.

m_twice_table[flat_bank_id].insert(std::make_pair(row_id, TwiCeEntry(1, 0)));

diff --git a/src/dram_controller/impl/plugin/twice.cpp b/src/dram_controller/impl/plugin/twice.cpp
index a59f7a5..75fa8ed 100644
--- a/src/dram_controller/impl/plugin/twice.cpp
+++ b/src/dram_controller/impl/plugin/twice.cpp
@@ -129,8 +129,8 @@ class TWiCeIdeal : public IControllerPlugin, public Implementation {
 
           if (m_twice_table[flat_bank_id].find(row_id) == m_twice_table[flat_bank_id].end()){
             // If row is not in the table, insert it
-            m_twice_table[flat_bank_id].insert(std::make_pair(row_id, TwiCeEntry(1, 0)));
-            
+            m_twice_table[flat_bank_id].insert(std::make_pair(row_id, TwiCeEntry{1, 0}));
+
             if (m_is_debug) {
               std::cout << "TWiCeIdeal: Inserted row " << row_id << " into bank " << flat_bank_id << std::endl;
             }

The error:

/ramulator2/src/dram_controller/impl/plugin/twice.cpp:18:12: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
    struct TwiCeEntry {
           ^
/ramulator2/src/dram_controller/impl/plugin/twice.cpp:18:12: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
/ramulator2/src/dram_controller/impl/plugin/twice.cpp:18:12: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/build.make:202: src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/twice.cpp.o] Error 1

Installation Error, Cannot build the ramulator2 correctly

I got some error while executing the make -j after building the ramulator2 in the build folder, the following the the execution log
root@DESKTOP-0DMQINA:~/user/MCS-FINAL-PROJECT/ramulator2/build# make -j
[ 4%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/binary.cpp.o
[ 4%] Building CXX object src/frontend/CMakeFiles/ramulator-frontend.dir/impl/memory_trace/loadstore_trace.cpp.o
[ 6%] Building CXX object src/addr_mapper/CMakeFiles/ramulator-addrmapper.dir/impl/rit.cpp.o
[ 7%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/dummy_controller.cpp.o
[ 10%] Building CXX object src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/simpleO3/simpleO3.cpp.o
[ 10%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/generic_dram_controller.cpp.o
[ 11%] Building CXX object src/translation/CMakeFiles/ramulator-translation.dir/impl/no_translation.cpp.o
[ 12%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/stdout_sinks.cpp.o
[ 13%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/spdlog.cpp.o
[ 17%] Building CXX object src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/simpleO3/llc.cpp.o
[ 18%] Building CXX object src/base/CMakeFiles/ramulator-base.dir/utils.cpp.o
[ 18%] Building CXX object src/base/CMakeFiles/ramulator-base.dir/logging.cpp.o
[ 18%] Building CXX object src/test/CMakeFiles/ramulator-test.dir/test_impl.cpp.o
[ 19%] Building CXX object src/memory_system/CMakeFiles/ramulator-memorysystem.dir/impl/bh_DRAM_system.cpp.o
[ 19%] Building CXX object src/base/CMakeFiles/ramulator-base.dir/config.cpp.o
[ 20%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/file_sinks.cpp.o
[ 21%] Building CXX object src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/simpleO3/core.cpp.o
[ 25%] Building CXX object src/frontend/CMakeFiles/ramulator-frontend.dir/impl/memory_trace/readwrite_trace.cpp.o
[ 25%] Building CXX object src/base/CMakeFiles/ramulator-base.dir/factory.cpp.o
[ 26%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/color_sinks.cpp.o
[ 26%] Building CXX object src/dram/CMakeFiles/ramulator-dram.dir/impl/DDR3.cpp.o
[ 26%] Building CXX object src/addr_mapper/CMakeFiles/ramulator-addrmapper.dir/impl/linear_mappers.cpp.o
[ 25%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/bh_dram_controller.cpp.o
[ 28%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/async.cpp.o
[ 28%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/convert.cpp.o
[ 29%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/directives.cpp.o
[ 31%] Building CXX object src/translation/CMakeFiles/ramulator-translation.dir/impl/random_translation.cpp.o
[ 32%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/depthguard.cpp.o
[ 34%] Building CXX object src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/bhO3/bhcore.cpp.o
[ 35%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/scheduler/bh_scheduler.cpp.o
[ 36%] Building CXX object src/memory_system/CMakeFiles/ramulator-memorysystem.dir/impl/generic_DRAM_system.cpp.o
[ 38%] Building CXX object src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/bhO3/bhllc.cpp.o
[ 38%] Building CXX object src/dram/CMakeFiles/ramulator-dram.dir/impl/DDR4.cpp.o
[ 39%] Building CXX object src/frontend/CMakeFiles/ramulator-frontend.dir/impl/external_wrapper/gem5_frontend.cpp.o
[ 40%] Building CXX object src/dram/CMakeFiles/ramulator-dram.dir/impl/DDR4-VRR.cpp.o
[ 40%] Building CXX object src/memory_system/CMakeFiles/ramulator-memorysystem.dir/impl/dummy_memory_system.cpp.o
[ 42%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/scheduler/blocking_scheduler.cpp.o
[ 43%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/scheduler/generic_scheduler.cpp.o
[ 44%] Building CXX object src/base/CMakeFiles/ramulator-base.dir/stats.cpp.o
[ 45%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/emit.cpp.o
[ 46%] Building CXX object src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/simpleO3/trace.cpp.o
[ 50%] Building CXX object src/base/CMakeFiles/ramulator-base.dir/request.cpp.o
[ 51%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/emitfromevents.cpp.o
[ 51%] Building CXX object src/dram/CMakeFiles/ramulator-dram.dir/impl/LPDDR5.cpp.o
[ 53%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/bundled_fmtlib_format.cpp.o
[ 53%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/cfg.cpp.o
[ 54%] Building CXX object src/dram/CMakeFiles/ramulator-dram.dir/impl/HBM.cpp.o
[ 56%] Building CXX object src/dram/CMakeFiles/ramulator-dram.dir/impl/DDR5.cpp.o
[ 56%] Building CXX object src/dram/CMakeFiles/ramulator-dram.dir/impl/HBM2.cpp.o
[ 57%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/emitter.cpp.o
[ 59%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/refresh/all_bank_refresh.cpp.o
[ 60%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/emitterstate.cpp.o
[ 60%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/trace_recorder.cpp.o
[ 64%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/emitterutils.cpp.o
[ 64%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/cmd_counter.cpp.o
[ 64%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/exceptions.cpp.o
[ 61%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/exp.cpp.o
[ 65%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/graphene.cpp.o
[ 68%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/oracle_rh.cpp.o
[ 70%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/memory.cpp.o
[ 70%] Building CXX object src/dram/CMakeFiles/ramulator-dram.dir/impl/HBM3.cpp.o
[ 70%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/para.cpp.o
[ 71%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/twice.cpp.o
[ 72%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/node.cpp.o
[ 75%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/rrs.cpp.o
[ 76%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/node_data.cpp.o
[ 76%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/nodeevents.cpp.o
[ 77%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/null.cpp.o
[ 78%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/hydra.cpp.o
[ 79%] Building CXX object src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/blockhammer/blockhammer.cpp.o
[ 82%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/nodebuilder.cpp.o
[ 84%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/parser.cpp.o
[ 84%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/ostream_wrapper.cpp.o
[ 84%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/parse.cpp.o
[ 85%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/regex_yaml.cpp.o
[ 86%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/scanner.cpp.o
[ 87%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/scanscalar.cpp.o
[ 88%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/scantag.cpp.o
[ 89%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/scantoken.cpp.o
[ 90%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/simplekey.cpp.o
[ 92%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/stream.cpp.o
[ 93%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/singledocparser.cpp.o
[ 94%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/tag.cpp.o
[ 95%] Linking CXX static library libyaml-cpp.a
[ 95%] Built target yaml-cpp
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/build.make:286: src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/blockhammer/blockhammer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/memory_system/CMakeFiles/ramulator-memorysystem.dir/build.make:104: src/memory_system/CMakeFiles/ramulator-memorysystem.dir/impl/generic_DRAM_system.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
^[^[c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/build.make:104: src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/generic_dram_controller.cpp.o] Error 1
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/dram/CMakeFiles/ramulator-dram.dir/build.make:132: src/dram/CMakeFiles/ramulator-dram.dir/impl/LPDDR5.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/build.make:244: src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/twice.cpp.o] Error 1
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/build.make:272: src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/rrs.cpp.o] Error 1
[ 96%] Linking CXX static library libspdlog.a
[ 96%] Built target spdlog
[ 96%] Built target ramulator-test
[ 96%] Built target ramulator-translation
make[1]: *** [CMakeFiles/Makefile2:1272: src/memory_system/CMakeFiles/ramulator-memorysystem.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1350: src/dram_controller/CMakeFiles/ramulator-controller.dir/all] Error 2
[ 96%] Built target ramulator-addrmapper
[ 96%] Built target ramulator-frontend
[ 96%] Built target ramulator-base
make[1]: *** [CMakeFiles/Makefile2:1324: src/dram/CMakeFiles/ramulator-dram.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

I have already installed the needed dependency listed in the README.md, the following is the dependency I used.
g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
clang ++ Ubuntu clang version 15.0.7

Installation issues

Hi, I am trying to install the software as described in the README. But I run into the error below when running make -j:

/Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR4-VRR.cpp:453:51: note: in instantiation of template type alias 'PreqFunc_t' requested here
      m_preqs.resize(m_levels.size(), std::vector<PreqFunc_t<Node>>(m_commands.size()));
                                                  ^
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/para.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/impl/LPDDR5.cpp:1:
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/dram.h:11:
/Users/rajathsalegame/rds/ramulator2/src/dram/node.h:219:1: warning: ISO C++ specifies that qualified reference to 'Node' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Winjected-class-name]
using RowhitFunc_t = std::function<bool(typename T::Node* node, int cmd, int target_id, Clk_t clk)>;
^
/Users/rajathsalegame/rds/ramulator2/src/dram/impl/LPDDR5.cpp:510:54: note: in instantiation of template type alias 'RowhitFunc_t' requested here
      m_rowopens.resize(m_levels.size(), std::vector<RowhitFunc_t<Node>>(m_commands.size()));
                                                     ^
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/impl/HBM3.cpp:1:
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/dram.h:11:
/Users/rajathsalegame/rds/ramulator2/src/dram/node.h:217:1: warning: ISO C++ specifies that qualified reference to 'Node' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Winjected-class-name]
using PreqFunc_t   = std::function<int (typename T::Node* node, int cmd, int target_id, Clk_t clk)>;
^
/Users/rajathsalegame/rds/ramulator2/src/dram/impl/HBM3.cpp:386:51: note: in instantiation of template type alias 'PreqFunc_t' requested here
      m_preqs.resize(m_levels.size(), std::vector<PreqFunc_t<Node>>(m_commands.size()));
                                                  ^
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR5.cpp:1:
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/dram.h:11:
/Users/rajathsalegame/rds/ramulator2/src/dram/node.h:217:1: warning: ISO C++ specifies that qualified reference to 'Node' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Winjected-class-name]
using PreqFunc_t   = std::function<int (typename T::Node* node, int cmd, int target_id, Clk_t clk)>;
^
/Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR5.cpp:474:51: note: in instantiation of template type alias 'PreqFunc_t' requested here
      m_preqs.resize(m_levels.size(), std::vector<PreqFunc_t<Node>>(m_commands.size()));
                                                  ^
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR4-VRR.cpp:1:
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/dram.h:11:
/Users/rajathsalegame/rds/ramulator2/src/dram/node.h:219:1: warning: ISO C++ specifies that qualified reference to 'Node' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Winjected-class-name]
using RowhitFunc_t = std::function<bool(typename T::Node* node, int cmd, int target_id, Clk_t clk)>;
^
/Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR4-VRR.cpp:466:53: note: in instantiation of template type alias 'RowhitFunc_t' requested here
      m_rowhits.resize(m_levels.size(), std::vector<RowhitFunc_t<Node>>(m_commands.size()));
                                                    ^
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/impl/HBM3.cpp:1:
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/dram.h:11:
/Users/rajathsalegame/rds/ramulator2/src/dram/node.h:219:1: warning: ISO C++ specifies that qualified reference to 'Node' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Winjected-class-name]
using RowhitFunc_t = std::function<bool(typename T::Node* node, int cmd, int target_id, Clk_t clk)>;
^
/Users/rajathsalegame/rds/ramulator2/src/dram/impl/HBM3.cpp:398:53: note: in instantiation of template type alias 'RowhitFunc_t' requested here
      m_rowhits.resize(m_levels.size(), std::vector<RowhitFunc_t<Node>>(m_commands.size()));
                                                    ^
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/impl/HBM3.cpp:1:
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/dram.h:11:
/Users/rajathsalegame/rds/ramulator2/src/dram/node.h:219:1: warning: ISO C++ specifies that qualified reference to 'Node' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Winjected-class-name]
using RowhitFunc_t = std::function<bool(typename T::Node* node, int cmd, int target_id, Clk_t clk)>;
^
/Users/rajathsalegame/rds/ramulator2/src/dram/impl/HBM3.cpp:406:54: note: in instantiation of template type alias 'RowhitFunc_t' requested here
      m_rowopens.resize(m_levels.size(), std::vector<RowhitFunc_t<Node>>(m_commands.size()));
                                                     ^
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR5.cpp:1:
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/dram.h:11:
/Users/rajathsalegame/rds/ramulator2/src/dram/node.h:219:1: warning: ISO C++ specifies that qualified reference to 'Node' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Winjected-class-name]
using RowhitFunc_t = std::function<bool(typename T::Node* node, int cmd, int target_id, Clk_t clk)>;
^
/Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR5.cpp:492:53: note: in instantiation of template type alias 'RowhitFunc_t' requested here
      m_rowhits.resize(m_levels.size(), std::vector<RowhitFunc_t<Node>>(m_commands.size()));
                                                    ^
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR4-VRR.cpp:1:
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/dram.h:11:
/Users/rajathsalegame/rds/ramulator2/src/dram/node.h:219:1: warning: ISO C++ specifies that qualified reference to 'Node' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Winjected-class-name]
using RowhitFunc_t = std::function<bool(typename T::Node* node, int cmd, int target_id, Clk_t clk)>;
^
/Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR4-VRR.cpp:474:54: note: in instantiation of template type alias 'RowhitFunc_t' requested here
      m_rowopens.resize(m_levels.size(), std::vector<RowhitFunc_t<Node>>(m_commands.size()));
                                                     ^
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR5.cpp:1:
In file included from /Users/rajathsalegame/rds/ramulator2/src/dram/dram.h:11:
/Users/rajathsalegame/rds/ramulator2/src/dram/node.h:219:1: warning: ISO C++ specifies that qualified reference to 'Node' is a constructor name rather than a type in this context, despite preceding 'typename' keyword [-Winjected-class-name]
using RowhitFunc_t = std::function<bool(typename T::Node* node, int cmd, int target_id, Clk_t clk)>;
^
/Users/rajathsalegame/rds/ramulator2/src/dram/impl/DDR5.cpp:500:54: note: in instantiation of template type alias 'RowhitFunc_t' requested here
      m_rowopens.resize(m_levels.size(), std::vector<RowhitFunc_t<Node>>(m_commands.size()));
                                                     ^
1 error generated.
make[2]: *** [src/memory_system/CMakeFiles/ramulator-memorysystem.dir/impl/dummy_memory_system.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [src/memory_system/CMakeFiles/ramulator-memorysystem.dir/impl/generic_DRAM_system.cpp.o] Error 1
[ 96%] Linking CXX static library libspdlog.a
[ 96%] Built target spdlog
1 error generated.
make[2]: *** [src/test/CMakeFiles/ramulator-test.dir/test_impl.cpp.o] Error 1
make[1]: *** [src/test/CMakeFiles/ramulator-test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [src/translation/CMakeFiles/ramulator-translation.dir/impl/no_translation.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [src/frontend/CMakeFiles/ramulator-frontend.dir/impl/memory_trace/loadstore_trace.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [src/base/CMakeFiles/ramulator-base.dir/factory.cpp.o] Error 1
1 warning and 1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/refresh/all_bank_refresh.cpp.o] Error 1
1 error generated.
make[2]: *** [src/frontend/CMakeFiles/ramulator-frontend.dir/impl/memory_trace/readwrite_trace.cpp.o] Error 1
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/scheduler/generic_scheduler.cpp.o] Error 1
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/scheduler/blocking_scheduler.cpp.o] Error 1
1 error generated.
make[2]: *** [src/frontend/CMakeFiles/ramulator-frontend.dir/impl/external_wrapper/gem5_frontend.cpp.o] Error 1
1 error generated.
make[2]: *** [src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/simpleO3/core.cpp.o] Error 1
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/dummy_controller.cpp.o] Error 1
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/scheduler/bh_scheduler.cpp.o] Error 1
1 error generated.
1 error generated.
make[2]: *** [src/addr_mapper/CMakeFiles/ramulator-addrmapper.dir/impl/linear_mappers.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/generic_dram_controller.cpp.o] Error 1
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/trace_recorder.cpp.o] Error 1
1 error generated.
make[2]: *** [src/memory_system/CMakeFiles/ramulator-memorysystem.dir/impl/bh_DRAM_system.cpp.o] Error 1
make[1]: *** [src/memory_system/CMakeFiles/ramulator-memorysystem.dir/all] Error 2
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/twice.cpp.o] Error 1
1 error generated.
1 error generated.
1 error generated.
1 warning and 1 error generated.
1 error generated.
make[2]: *** [src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/simpleO3/llc.cpp.o] Error 1
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/graphene.cpp.o] Error 1
make[2]: *** [src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/bhO3/bhcore.cpp.o] Error 1
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/blockhammer/blockhammer.cpp.o] Error 1
1 error generated.
1 error generated.
make[2]: *** [src/addr_mapper/CMakeFiles/ramulator-addrmapper.dir/impl/rit.cpp.o] Error 1
1 error generated.
make[1]: *** [src/addr_mapper/CMakeFiles/ramulator-addrmapper.dir/all] Error 2
make[2]: *** [src/translation/CMakeFiles/ramulator-translation.dir/impl/random_translation.cpp.o] Error 1
make[2]: *** [src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/bhO3/bhllc.cpp.o] Error 1
make[1]: *** [src/translation/CMakeFiles/ramulator-translation.dir/all] Error 2
make[2]: *** [src/frontend/CMakeFiles/ramulator-frontend.dir/impl/processor/simpleO3/simpleO3.cpp.o] Error 1
make[1]: *** [src/frontend/CMakeFiles/ramulator-frontend.dir/all] Error 2
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/oracle_rh.cpp.o] Error 1
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/cmd_counter.cpp.o] Error 1
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/rrs.cpp.o] Error 1
1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/plugin/hydra.cpp.o] Error 1
1 error generated.
make[2]: *** [src/base/CMakeFiles/ramulator-base.dir/config.cpp.o] Error 1
1 warning and 1 error generated.
make[2]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/impl/bh_dram_controller.cpp.o] Error 1
make[1]: *** [src/dram_controller/CMakeFiles/ramulator-controller.dir/all] Error 2
make[1]: *** [src/base/CMakeFiles/ramulator-base.dir/all] Error 2
8 warnings and 1 error generated.
8 warnings and 1 error generated.
make[2]: *** [src/dram/CMakeFiles/ramulator-dram.dir/impl/HBM2.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/dram/CMakeFiles/ramulator-dram.dir/impl/DDR5.cpp.o] Error 1
8 warnings and 1 error generated.
make[2]: *** [src/dram/CMakeFiles/ramulator-dram.dir/impl/DDR4-VRR.cpp.o] Error 1
8 warnings and 1 error generated.
make[2]: *** [src/dram/CMakeFiles/ramulator-dram.dir/impl/DDR4.cpp.o] Error 1
8 warnings and 1 error generated.
8 warnings and 1 error generated.
make[2]: *** [src/dram/CMakeFiles/ramulator-dram.dir/impl/HBM.cpp.o] Error 1
make[2]: *** [src/dram/CMakeFiles/ramulator-dram.dir/impl/DDR3.cpp.o] Error 1
8 warnings and 1 error generated.
make[2]: *** [src/dram/CMakeFiles/ramulator-dram.dir/impl/HBM3.cpp.o] Error 1
8 warnings and 1 error generated.
make[2]: *** [src/dram/CMakeFiles/ramulator-dram.dir/impl/LPDDR5.cpp.o] Error 1
make[1]: *** [src/dram/CMakeFiles/ramulator-dram.dir/all] Error 2
make: *** [all] Error 2

Details on how to intergrate ramulator2.0 to gem5

In the README document, the fourth step in the instructions for integrating emulator2.0 into gem5 mentions "Put the Ramulator2 wrapper code to gem5/src/mem/", but the only relevant code found in the source code is "src/frontend/impl/external_wrapper/gim5_frontend. cpp", and this code seems incomplete.
And the fifth step also mentioned the need to register "Ramulator2. py" as the SimObject of Gem5, but there is no reference to Ramulator2. py in the source code.
May I ask if anyone can provide references for ramulator2. cc, ramulator2. hh, and Ramulator.py? I would greatly appreciate it!

Missing gen_all_traces.sh script

I hope this message finds you well. I have been exploring ramulator2 repository and found the README instructions to be very informative. However, I encountered an issue when attempting to follow the steps mentioned in the README.

Specifically, in the section related to the "traces" directory, it is mentioned to run the command ./gen_all_traces.sh However, upon closer inspection, I noticed that the gen_all_traces.sh"script is missing from the repository.
As a result, I'm unable to proceed with generating the traces as described in the README.

Could someone kindly provide more information about the missing script or suggest an alternative approach to generating the traces?

Error when integrating to gem5

Hi,
I followed the steps to integrate ramulator2 to gem5. I got following errors when I try to build the gem5:

src/mem/ramulator2.cc:5:10: fatal error: debug/Ramulator2.hh: No such file or directory 5 | #include "debug/Ramulator2.hh" | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. scons: *** [build/X86/mem/ramulator2.do] Error 1 scons: building terminated because of errors.

comparing ramulator1 and ramualtor2 with the same configs

Hi,

I am trying to run the same trace using ramualtor1 and ramualtor2, but even by using the same config files as you provided in the "perf_comparison" folder,
https://github.com/CMU-SAFARI/ramulator2/tree/main/perf_comparison/configs

The final results (such as memory_system_cycle) are not exactly the same for both of the simulations; however, they are very close.
I expected to see exactly the same final results for both ramualtor1 and ramualtor2, as they implement the same memory with almost the same configuration. I wonder if there is any change in the implementation that may lead to different results.

I'm curious to know if you've observed similar outcomes in your experiments. I've noticed that the reference paper only provides a comparison of "simulation time" without any reference to the final results achieved by different simulators.

Thanks!
Saeideh

GenericDRAMController seems does not support write transaction

I tried to use ramulator2 to test DDR write performance. A simple code is shown above:

#include <memory_system/memory_system.h>
#include <frontend/frontend.h>
#include <base/config.h>
#include <dram/dram.h>
#include <cstdio>

Ramulator::IFrontEnd* ramulator2_frontend;
Ramulator::IMemorySystem* ramulator2_memorysystem;

long long call_back_count = 0;
long long enq_count = 0;

int main(int argc, char *argv[]) {
    assert(argc >= 3);
    int offset = atoi(argv[1]);
    int type = atoi(argv[2]);
    printf("offset=%d\n", offset);
    YAML::Node config = Ramulator::Config::parse_config_file("./config.yaml", {});
    ramulator2_frontend = Ramulator::Factory::create_frontend(config);
    ramulator2_memorysystem = Ramulator::Factory::create_memory_system(config);

    ramulator2_frontend->connect_memory_system(ramulator2_memorysystem);
    ramulator2_memorysystem->connect_frontend(ramulator2_frontend);

    unsigned long addr = 0;
    
    for (int i=0;i<1000000;i++) { // 1M cycles
        if (i + 1000 < 1000000) {
            bool ok = ramulator2_frontend->receive_external_requests(type, addr, 0, [](Ramulator::Request& req) {
                call_back_count ++;
            });
            if (ok) {
                enq_count ++;
                addr += offset;
            }
        }
        ramulator2_frontend->tick();
        ramulator2_memorysystem->tick();
    }

    printf("%lld %lld\n", enq_count, call_back_count);
    return 0;
}

A simple YAML file is shown above:

Frontend:
  impl: GEM5
  clock_ratio: 1

MemorySystem:
  impl: GenericDRAM
  clock_ratio: 1

  DRAM:
    impl: DDR4
    org:
      preset: DDR4_8Gb_x8
      channel: 1
      rank: 2
    timing:
      preset: DDR4_3200AA
  Controller:
    impl: Generic
    Scheduler:
      impl: FRFCFS
    RefreshManager:
      impl: AllBank
    plugins:

  AddrMapper:
    impl: MOP4CLXOR

If I specify the type to 1, the request type is Ramulator::Request::Type::Write. I will never get a request callback.

My running result:

➜  ramulator-test ./a.out 64 0 # Read
offset=64
235030 235030
➜  ramulator-test ./a.out 64 1 # Write
offset=64
235275 0

After investigating the code, I found that the GenericDRAMController does not support write transactions and leaves the TODO in the code generic_dram_controller.cpp#L123.

if (req_it->type_id == Request::Type::Read) {
  req_it->depart = m_clk + m_dram->m_read_latency;
  pending.push_back(*req_it);
} else if (req_it->type_id == Request::Type::Write) {
  // TODO: Add code to update statistics
}

If I copy the two lines of code from the read transaction processing to the write transaction processing and then recompile the ramultor2, I will get the callback from the write transaction but use the read latency for write transactions.

Is it my fault for misusing the ramulator2, or is the write transaction not supported now?

Zsim Integration

Hello,

Is there a pre exsisting wrapper for Zsim? I am trying to create a wrapper for Zsim to use ramulator2 in integration with Zsim but finding it a little difficult while following the steps on the read me.

Inquiry about LPDDR5 Timing Parameters

Hi
I hope you're doing well. I'm working with Ramulator2 and I'm looking for information on the source of LPDDR5 timing parameters. Could you point me to the data source or relevant documentation for LPDDR5 timings?
Thanks for your time and assistance. Appreciate your work on the project.

Stuck at 93%

Hi everyone,
I followed the instruction and typed 'make -j', the system stucked at 93%

"[ 93%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/tag.cpp.o"

Then the system dumped and nothing was installed.

Does anyone can give me an idea? Thanks a lot.

Updated: I ran the program on virtual tools and the version of Ubuntu is 22.04. I extended the memory size and it stucked at 95%.

[ 93%] Building CXX object _deps/yaml-cpp-build/CMakeFiles/yaml-cpp.dir/src/tag.cpp.o
In file included from /usr/include/c++/12/ios:40,
from /usr/include/c++/12/istream:38,
from /usr/include/c++/12/sstream:38,
from /home/merlin/ramulator2/ext/yaml-cpp/src/singledocparser.cpp:3:
In static member function ‘static constexpr std::char_traits::char_type* std::char_traits::copy(char_type*, const char_type*, std::size_t)’,
inlined from ‘static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’ at /usr/include/c++/12/bits/basic_string.h:431:21,
inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’ at /usr/include/c++/12/bits/basic_string.tcc:532:22,
inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’ at /usr/include/c++/12/bits/basic_string.h:1655:19,
inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’ at /usr/include/c++/12/bits/basic_string.h:823:28,
inlined from ‘void YAML::SingleDocParser::HandleNode(YAML::EventHandler&)’ at /home/merlin/ramulator2/ext/yaml-cpp/src/singledocparser.cpp:95:61:
/usr/include/c++/12/bits/char_traits.h:435:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Wrestrict]
435 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~

[ 95%] Linking CXX static library libyaml-cpp.a
[ 95%] Built target yaml-cpp

fatal error: ranges: No such file or directory

Hi,

When I ran the 'make -j' command, it reports error "fatal error: ranges: No such file or directory
9 | #include
| ^~~~~~~~
compilation terminated."

Do you have any idea about it?
Thank you.

Question about clock ratio

Dear all,
In the standalone mode, there is a parameter called clock ratio. I want to know whether it uses the clock of memory or memory controller.

For example, if the CPU frequency is 2.8GHz, and I use DDR%-5600. If it is the clock of the memory it should be 1:1. If it is the clock of memory controller, the ratio should be 2:1, let us say the clock frequency of memory controller is 1.4GHz.

LPDDR5 doesn't compile

I added LPDDR5.cpp to the dram CMakeLists and now run into compiler errors. Is this a known issue? I assume so because it seems intentionally left off of the source files.

In file included from /ramulator/src/dram/dram.h:10,
                 from /ramulator/src/dram/impl/LPDDR5.cpp:1:
/ramulator/src/dram/spec.h: In lambda function:
/ramulator/src/dram/impl/LPDDR5.cpp:414:78:   in ‘constexpr’ expansion of ‘Ramulator::LPDDR5::m_timings.Ramulator::ImplDef<21>::operator[](std::basic_string_view<char>(((const char*)"nBL")))’
/ramulator/src/dram/spec.h:157:7: error: expression ‘<throw-expression>’ is not a constant expression
  157 |       throw "NON EXISTENT NAME";
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
/ramulator/src/dram/spec.h: In lambda function:
/ramulator/src/dram/impl/LPDDR5.cpp:417:79:   in ‘constexpr’ expansion of ‘Ramulator::LPDDR5::m_timings.Ramulator::ImplDef<21>::operator[](std::basic_string_view<char>(((const char*)"nBL")))’
/ramulator/src/dram/spec.h:157:7: error: expression ‘<throw-expression>’ is not a constant expression
/ramulator/src/dram/spec.h: In lambda function:
/ramulator/src/dram/impl/LPDDR5.cpp:420:78:   in ‘constexpr’ expansion of ‘Ramulator::LPDDR5::m_timings.Ramulator::ImplDef<21>::operator[](std::basic_string_view<char>(((const char*)"nBL")))’
/ramulator/src/dram/spec.h:157:7: error: expression ‘<throw-expression>’ is not a constant expression
/ramulator/src/dram/spec.h: In lambda function:
/ramulator/src/dram/impl/LPDDR5.cpp:423:79:   in ‘constexpr’ expansion of ‘Ramulator::LPDDR5::m_timings.Ramulator::ImplDef<21>::operator[](std::basic_string_view<char>(((const char*)"nBL")))’
/ramulator/src/dram/spec.h:157:7: error: expression ‘<throw-expression>’ is not a constant expression
/ramulator/src/dram/impl/LPDDR5.cpp: In lambda function:
/ramulator/src/dram/impl/LPDDR5.cpp:427:25: error: ‘T’ has not been declared
  427 |         node->m_state = T::m_states["Pre-Opened"];
      |                         ^
/ramulator/src/dram/impl/LPDDR5.cpp:428:40: error: ‘T’ has not been declared
  428 |         node->m_row_state[target_id] = T::m_states["Pre-Opened"];
      |                                        ^
/ramulator/src/dram/impl/LPDDR5.cpp: In lambda function:
/ramulator/src/dram/impl/LPDDR5.cpp:445:16: error: ‘T’ has not been declared
  445 |           case T::m_states["Closed"]: return T::m_commands["ACT-1"];
      |                ^
/ramulator/src/dram/impl/LPDDR5.cpp:445:46: error: ‘T’ has not been declared
  445 |           case T::m_states["Closed"]: return T::m_commands["ACT-1"];
      |                                              ^
/ramulator/src/dram/impl/LPDDR5.cpp:446:16: error: ‘T’ has not been declared
  446 |           case T::m_states["Pre-Opened"]: return T::m_commands["ACT-2"];
      |                ^
/ramulator/src/dram/impl/LPDDR5.cpp:446:50: error: ‘T’ has not been declared
  446 |           case T::m_states["Pre-Opened"]: return T::m_commands["ACT-2"];
      |                                                  ^
/ramulator/src/dram/impl/LPDDR5.cpp:447:16: error: ‘T’ has not been declared
  447 |           case T::m_states["Opened"]: {
      |                ^
/ramulator/src/dram/impl/LPDDR5.cpp:451:24: error: ‘T’ has not been declared
  451 |                 return T::m_commands["CASRD"];
      |                        ^
/ramulator/src/dram/impl/LPDDR5.cpp:456:22: error: ‘T’ has not been declared
  456 |               return T::m_commands["PRE"];
      |                      ^
/ramulator/src/dram/impl/LPDDR5.cpp: In lambda function:
/ramulator/src/dram/impl/LPDDR5.cpp:467:16: error: ‘T’ has not been declared
  467 |           case T::m_states["Closed"]: return T::m_commands["ACT-1"];
      |                ^
/ramulator/src/dram/impl/LPDDR5.cpp:467:46: error: ‘T’ has not been declared
  467 |           case T::m_states["Closed"]: return T::m_commands["ACT-1"];
      |                                              ^
/ramulator/src/dram/impl/LPDDR5.cpp:468:16: error: ‘T’ has not been declared
  468 |           case T::m_states["Pre-Opened"]: return T::m_commands["ACT-2"];
      |                ^
/ramulator/src/dram/impl/LPDDR5.cpp:468:50: error: ‘T’ has not been declared
  468 |           case T::m_states["Pre-Opened"]: return T::m_commands["ACT-2"];
      |                                                  ^
/ramulator/src/dram/impl/LPDDR5.cpp:469:16: error: ‘T’ has not been declared
  469 |           case T::m_states["Opened"]: {
      |                ^
/ramulator/src/dram/impl/LPDDR5.cpp:473:24: error: ‘T’ has not been declared
  473 |                 return T::m_commands["CASWR"];
      |                        ^
/ramulator/src/dram/impl/LPDDR5.cpp:478:22: error: ‘T’ has not been declared
  478 |               return T::m_commands["PRE"];
      |        

LPDDR5 bandwidth not matching expectations

I am having two issues when using LPDDR5 with an external simulator:

  • Sequential and Random streams give the same bandwidth (expect random to be ~2/3; DDR4 works correctly)
  • Bandwidth is much greater than what I expect. How big are the data chunks for each callback from
    ramulator2_frontend->receive_external_requests()?

Compilation Error due to ranges library

Hello All

I am using cmake version 3.16.3. While executing make -j in ramulator2/build, I am getting the following error due to ranges library:

Screenshot 2023-08-30 152959

Would be grateful for any help in this regard.

Best Regards
Upasna

DDR5 yaml configuration

Hi all!

I would like to use ramulator2 to test DDR5, but I couldn't find any yaml config file on the repo.
Initially, I modified the example provided ([example_config.yaml](https://github.com/CMU-SAFARI/ramulator2/blob/main/example_config.yaml)), putting org.preset = DDR5_8Gb_x16 and timing.preset = DDR5_3200AN. This doesn't work as (afaiu) the configuration should include additional parameters that aren't available (group RFM). Could you point me towards a configuration file or some documentation?

Thanks!

Gem5 ARM full-system error

I replaced the memory config line of code in the starter full-system simulation for ARM with the code specified in the readme but get the following error:

src/mem/physical.cc:108: fatal: fatal condition addrMap.insert(m->getAddrRange(), m) == addrMap.end() occurred: Memory address range for system.realview.bootmem is overlapping

I was wondering if y'all knew why Gem5 is throwing this error with Ramulator 2 and/or have the Ramulator2 config and the Gem5 options that y'all used to verify that your code works?

Thanks :)

Row policy support

Hi,

I've noticed that ramulator 1.0 has a dedicated RowPolicy class and speculatively issues PRE commands in the controller tick method. This part seems missing in ramulator 2.0. Does ramulator 2.0 support or plan to support other row policies, e.g., closed and timeout? Thanks!

Potential Incorrect Density Setting in HBM2/3 Implementation

Encountered an error when running the 8Gb HBM2 and 3 configurations, as depicted in the screenshot:

Screenshot 2023-11-14 at 9 38 05 AM

Upon inspecting the implementation, I found

{"HBM3_8Gb", {6<<10, 128, {1, 2, 4, 4, 1<<15, 1<<6}}},

{"HBM2_8Gb", {6<<10, 128, {1, 2, 4, 4, 1<<15, 1<<6}}},

It seems the density should be 8<<10 instead of 6<<10?

I have tested other versions of HBM2/3, and they appear to be functioning correctly.

Invalid Condition in BH controller

This section of code seems weird to me: (from bh_controller)

      if (!request_found) {
        // 2.2.1    We first check the priority buffer to prioritize e.g., maintenance requests
        if (m_priority_buffer.size() != 0) {
          req_buffer = &m_priority_buffer;
          req_it = m_priority_buffer.begin();
          req_it->command = m_dram->get_preq_command(req_it->final_command, req_it->addr_vec);
          
          request_found = m_dram->check_ready(req_it->command, req_it->addr_vec);
          if (!request_found & m_priority_buffer.size() != 0) {
            return false;
          }

        if (!request_found){
           ...

        }

the last condition is a bitwise operation of the request found boolean and the size of the priority buffer which does not change from the previous condition. what is the reason behind this bitwise operation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.