I always keep 4 independent address spaces :
- Program memory (read only, high bandwidth)
- Data memory (read and write, as well as scrambled access orders)
- I/O and Special registers (serialising, one access at a time)
- Registers (can sustain multiple simultaneous reads & writes)
Each is optimised for a specific purpose and things get nasty when they are mixed.
- mix data and program memory, and you get a lot of security troubles.
- mix data and special memory-mapped registers, and you kill your system that must recognise IO regions and addresses, as well as ordering and write-through/writeback/grouped/caching attributes
- mix data ram and registers and it becomes ridiculously slow (TI tried this last with the TMS9900 and you see what happened)
- ... you get the idea.
...
Update 20240625:
That was a starting point. I now consider it "bad" to mix que control/return stack with the data space, and the latter is split in private and public areas.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.