1
0

make sure htif_emulator properly sets memory size

This commit is contained in:
Howard Mao
2015-09-15 10:29:45 -07:00
parent 56ecdff52d
commit 4496e8d4e2
2 changed files with 9 additions and 2 deletions

View File

@ -8,9 +8,10 @@
class htif_emulator_t : public htif_pthread_t
{
public:
htif_emulator_t(const std::vector<std::string>& args)
htif_emulator_t(uint32_t memsz_mb, const std::vector<std::string>& args)
: htif_pthread_t(args)
{
this->_memsz_mb = memsz_mb;
}
void set_clock_divisor(int divisor, int hold_cycles)
@ -23,6 +24,11 @@ class htif_emulator_t : public htif_pthread_t
set_clock_divisor(5, 2);
htif_pthread_t::start();
}
uint32_t mem_mb() { return _memsz_mb; }
private:
uint32_t _memsz_mb;
};
#endif