cachesim
A cache simulator
common.h
Go to the documentation of this file.
00001 /* -*- mode:c; coding: utf-8 -*- */
00002 
00008 #ifndef COMMON_H_INCLUDED
00009 #define COMMON_H_INCLUDED
00010 
00012 typedef int memaddr_t;
00013 
00017 typedef struct MemoryCell
00018 {
00019     unsigned char value; 
00020     unsigned char flags; 
00021 } MemoryCell;
00022 
00024 enum
00025 {
00026     KiB = 1024,
00027     MiB = 1024 * 1024,
00028     GiB = 1024 * 1024 * 1024
00029 };
00030 
00031 enum
00032 {
00033     MAX_ADDRESS = GiB 
00034 };
00035 
00036 
00045 char *make_param_name(char *buf, int size, const char *prefix, const char *name);
00046 
00052 void error_undefined(const char *func, const char *param);
00053 
00059 void error_invalid(const char *func, const char *param);
00060 
00061 #endif
00062 
00063 /*
00064  * Local variables:
00065  *  c-basic-offset: 4
00066  * End:
00067  */