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 | e24e3cd4d296599b9ef1b705846b1c868148b0fd (patch) | |
tree | 25646d98b4bfcf4b9a664eabfc2651c481984c1d /inc/utils.h | |
parent | 357e7fb37caf58cdfcdf85f7553db9378ff16e0c (diff) | |
parent | fde996690d77b81e445450671a0723f837de4eb3 (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 */ |