1
0

fixed console i/o

This commit is contained in:
Rimas Avizienis
2011-11-30 22:51:59 -08:00
parent b2894671f6
commit da2fdf4f85
4 changed files with 12 additions and 7 deletions

View File

@ -57,6 +57,8 @@ class ioDpathPCR extends Bundle()
val ptbr_wen = Bool('output);
val irq_timer = Bool('output);
val irq_ipi = Bool('output);
val console_data = Bits(8, 'output);
val console_val = Bool('output);
}
class rocketDpathPCR extends Component
@ -101,6 +103,10 @@ class rocketDpathPCR extends Component
io.debug.error_mode := reg_error_mode;
io.r.data := rdata;
val console_wen = !io.exception && io.w.en && (io.w.addr === PCR_CONSOLE);
io.console_data := Mux(console_wen, io.w.data(7,0), Bits(0,8));
io.console_val := console_wen;
when (io.host.from_wen) {
reg_tohost <== Bits(0,32);
reg_fromhost <== io.host.from;