add destructor for clean exit
This commit is contained in:
parent
1babf6cb88
commit
1bb3200eb6
|
@ -39,6 +39,8 @@ public:
|
|||
Memory(sc_module_name name, string filename);
|
||||
Memory(sc_module_name name, bool use_file);
|
||||
|
||||
~Memory(void);
|
||||
|
||||
/**
|
||||
* @brief Returns Program Counter read from hexfile
|
||||
* @return Initial PC
|
||||
|
|
|
@ -31,6 +31,11 @@ Memory::Memory(sc_module_name name, bool use_file): sc_module(name)
|
|||
//memset(mem, 0, SIZE*sizeof(uint8_t));
|
||||
}
|
||||
|
||||
|
||||
Memory::~Memory() {
|
||||
delete mem;
|
||||
}
|
||||
|
||||
uint32_t Memory::getPCfromHEX() {
|
||||
return program_counter;
|
||||
|
||||
|
|
Loading…
Reference in New Issue