diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-03-11 11:28:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-11 11:28:25 -0400 |
commit | 33c7c78b1c65c375d0291fd435e02ddc9d35681b (patch) | |
tree | 25646d98b4bfcf4b9a664eabfc2651c481984c1d /inc/utils.h | |
parent | 66edce63597093cf5f3afa5b577fd9e3ecae0ef6 (diff) | |
parent | 202f9a05d449ddc1160584c4e8a87f397f248e94 (diff) |
Merge pull request #23 from bdunahu/bdunahu
Memory simulator CLI function implementation
Diffstat (limited to 'inc/utils.h')
-rw-r--r-- | inc/utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/inc/utils.h b/inc/utils.h index e258ed8..71e515b 100644 --- a/inc/utils.h +++ b/inc/utils.h @@ -1,5 +1,6 @@ #ifndef UTILS_H #define UTILS_H +#include <string> /** * Parse an address into a tag, index into the cache table, and a line @@ -11,4 +12,12 @@ */ void get_bit_fields(int address, int *tag, int *index, int *offset); +/** + * Formats a string using snprintf. + * @param an object that represents the format string + * @param arguments to be formatted + * @return a string object holding the formatted result + */ +const std::string string_format(const char *const zcFormat, ...); + #endif /* UTILS_H_INCLUDED */ |