diff options
author | bd <bdunahu@operationnull.com> | 2025-03-10 22:07:36 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-10 22:07:36 -0400 |
commit | 85078b99e4cf652fcbd5f4d36b061674a2fe8aa6 (patch) | |
tree | 1e3097ec91c7fcd7fc9d00f912b46814900201f0 /src/cli | |
parent | 25d6d41af95cc2a2db3ba2651e5d784413c7058f (diff) |
overload << operator for dram
Diffstat (limited to 'src/cli')
-rw-r--r-- | src/cli/cli.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cli/cli.cc b/src/cli/cli.cc index 2126798..e968a42 100644 --- a/src/cli/cli.cc +++ b/src/cli/cli.cc @@ -5,6 +5,8 @@ #include "response.h" #include <stdio.h> +static Logger *global_log = Logger::getInstance(); + Cli::Cli() { this->initialize(); @@ -83,10 +85,9 @@ void Cli::help() "specified address. Accessor must be one of: \"MEM\", \"FETCH\", " "\"L1CACHE\".\n" << " c - manually advances the clock\n" + << " f - advances the clock until one operation reports completion\n" << " r - side door function that resets the memory configuration and " "cycles\n" - << " u <address> <data> - side door function that updates " - "the memory at the specified address with data provided\n" << " p <storage-level> <base> <lines> - side door function that peeks " "the current status of the entire memory subsystem\n" << " h - Prints this help text\n" @@ -129,7 +130,8 @@ void Cli::peek(int level) if (c) { std::cout << *c; } else { - std::cout << "dram"; + std::cout << *dynamic_cast<Dram *>(curr); + ; } } @@ -173,7 +175,7 @@ void Cli::run() void Cli::initialize() { Logger *global_log = Logger::getInstance(); - global_log->log(INFO, "Resetting memory configuration.\n"); + global_log->log(INFO, "Resetting memory configuration."); if (this->cache == nullptr) delete this->cache; Dram *d = new Dram(MEM_SIZE, MEM_DELAY); |