Skip to content

Add memory mapper.

Byron Lathi requested to merge mmu into master

Based on the 74ls610 but with some slight changes.

The memory mapper works by having a 16x12 ram array. The top 4 bits of the address are used to index into this array, and the resulting word replaces those top 4 bits. In this way, a 16 bit address is replaced with a 24 bit address.

As of now there is no way to write 12 bit values though, so currently we are using 20 bit addresses.

There is a chip select line that allows you to write into the ram array, and another chip select that allows you to write to the control word. Currently the control word is just a single bit, the enable bit.

When not enabled, the 4 index bits are passed straight through, and the higher bits of the address are replaced with 0, a sort of identity map. Once enabled, it operates as described above.

Since the bottom 12 bits are left unchanged, the page size is 4kb.

There are no protections so far, but might be added later, as well as the ability to actually use all 12 bits.

Merge request reports