add sanity asserts in regression #46

This commit is contained in:
Dolu1990 2018-12-08 14:10:18 +01:00
parent 9330945623
commit f121ce1ed5
1 changed files with 4 additions and 0 deletions

View File

@ -686,6 +686,10 @@ public:
ws->iBusAccessPatch(address,data,&error);
}
virtual bool dRead(int32_t address, int32_t size, uint32_t *data){
if(size < 1 || size > 4){
cout << "dRead size=" << size << endl;
fail();
}
if(address & (size-1) != 0) cout << "Ref did a unaligned read" << endl;
if((address & 0xF0000000) == 0xF0000000){
MemRead t = periphRead.front();