mtkcpu icon indicating copy to clipboard operation
mtkcpu copied to clipboard

virtual memory: trap on invalid access

Open bieganski opened this issue 3 years ago • 0 comments

What happens?

Virtual memory system in mtkCPU is well-tested, but only for proper memory configuration. For error conditions only error register is written (no trap occurs at all):

self.error_code = Signal(Issue)
        def error(code: Issue):
            m.d.sync += self.error_code.eq(code)

content of error function should update PC with mtvec and change main FSM state to FETCH.

bieganski avatar Feb 26 '22 17:02 bieganski