From 28a2788e2c59357d9269e558b0bd45db3241c42d Mon Sep 17 00:00:00 2001 From: bd Date: Sat, 12 Apr 2025 00:44:29 -0400 Subject: Rewrite utils functions as macros --- inc/dram.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'inc/dram.h') diff --git a/inc/dram.h b/inc/dram.h index c6c3159..140cbb1 100644 --- a/inc/dram.h +++ b/inc/dram.h @@ -52,6 +52,13 @@ class Dram : public Storage */ int is_access_cleared(void *id); + /** + * Given `address`, returns the line and word it is in. + * @param an address + * @param the line (row) `address` is in + * @param the word (column) `address` corresponds to + */ + void get_memory_index(int address, int &line, int &word); }; #endif /* DRAM_H_INCLUDED */ -- cgit v1.2.3