fixed several bugs and refactor memory access

This commit is contained in:
Blaise Tine
2022-02-04 17:50:19 -05:00
parent cf2a0a5f39
commit 5fbace9fa0
13 changed files with 483 additions and 578 deletions

View File

@@ -47,7 +47,8 @@ void Warp::eval(pipeline_trace_t *trace) {
/* Fetch and decode. */
uint32_t instr_code = core_->icache_read(PC_, sizeof(uint32_t));
uint32_t instr_code = 0;
core_->icache_read(&instr_code, PC_, sizeof(uint32_t));
auto instr = core_->decoder().decode(instr_code);
if (!instr) {
std::cout << std::hex << "Error: invalid instruction 0x" << instr_code << ", at PC=" << PC_ << std::endl;