MATCH_CSRRSI;
}
+static uint32_t csrci(unsigned int csr, uint8_t imm) {
+ return (csr << 20) |
+ (bits(imm, 4, 0) << 15) |
+ MATCH_CSRRCI;
+}
+
static uint32_t csrr(unsigned int rd, unsigned int csr) {
return (csr << 20) | (rd << 7) | MATCH_CSRRS;
}
return send_packet("E30");
}
+ write_debug_ram(0, csrci(DCSR_ADDRESS, DCSR_HALT_MASK));
+ write_debug_ram(1, jal(0, (uint32_t) (DEBUG_ROM_RESUME - (DEBUG_RAM_START + 1*5))));
+ set_interrupt(0);
+
// TODO p->set_halted(false, HR_NONE);
// TODO running = true;
}
(state.dcsr.ebreaku << DCSR_EBREAKU_OFFSET) |
(state.dcsr.halt << DCSR_HALT_OFFSET) |
(state.dcsr.cause << DCSR_CAUSE_OFFSET);
- fprintf(stderr, "DCSR: 0x%x\n", value);
return value;
}
case DPC_ADDRESS: