diff options
| author | Robert Norton | 2016-07-26 13:56:57 +0100 |
|---|---|---|
| committer | Robert Norton | 2016-07-26 13:56:57 +0100 |
| commit | 81fc54b2ee0bd955aaa3ad9ea0e97e1eb02983e2 (patch) | |
| tree | bcecdad403bc04dd87a7cf3f7effff28ebfc5632 /mips/mips_wrappers.sail | |
| parent | 210ef800f9a0c43933d683adcd3a923d4d5005f3 (diff) | |
Add minimal support for emulated Altera JTAG UART.
Diffstat (limited to 'mips/mips_wrappers.sail')
| -rw-r--r-- | mips/mips_wrappers.sail | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mips/mips_wrappers.sail b/mips/mips_wrappers.sail index e8b17a29..03d03cec 100644 --- a/mips/mips_wrappers.sail +++ b/mips/mips_wrappers.sail @@ -35,7 +35,15 @@ (* mips_wrappers.sail: wrappers functions and hooks for CHERI extensibility (mostly identity functions here) *) -function unit effect {wmem} MEMw_wrapper(addr, size, data) = MEMw(addr, size, data) +function unit effect {wmem} MEMw_wrapper(addr, size, data) = + if (addr == 0x000000007f000000) then + { + UART_WDATA := data[31..24]; + UART_WRITTEN := 1; + } + else + MEMw(addr, size, data) + function bool effect {wmem} MEMw_conditional_wrapper(addr, size, data) = MEMw_conditional(addr, size, data) |
