4 ms·
Speaking of registers and CPUs, the PDP-10 was interesting (at least, the KA10 model...not sure if the KI10 or KL10 also did this). The architecture included 1
by tzs 7y ago
Speaking of registers and CPUs, the PDP-10 was interesting (at least, the KA10 model...not sure if the KI10 or KL10 also did this).
The architecture included 16 general purpose registers, which were addressed using the same address space used for main memory. Word addresses 0-15 referred to registers, and addresses 16+ referred to core.
The interesting part is that the registers were actually optional! If you wanted to save a little money, at the cost of some execution time, you could order your PDP-10 without registers. Because the registers and memory use the same address space, everything still worked with the first 16 words of core taking the place of the registers.
If you ordered your PDP-10 with the registers, they would in effect replace the first 16 words of memory.
Main memory was magnetic core and the optional registers was semiconductor memory, which were much faster than core.
Since the registers and memory shared address space, it turned out that you could execute code from the registers. You could often gain quite a bit of speed in a program by having it copy the code for its inner loops into the registers and running from them.
- andrewflnr 7y agoThat's actually pretty cool. It seems like you could transparently change the number of registers to whatever would fit in your particular model of chip, 0 to 16 to a kilobyte or more. Is there a reason you wouldn't use such a design for a chip today?
- muricula 7y agoMemory mapped registers are still a thing today. Here's arm documentation describing memory mapped debug registers for Cortex-R chips: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0460d/Cegejeeb.html http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.... Even the intel XAPIC (interrupt controller) has a mode which basically uses memory mapped registers for configuring interrupts. The trick with executing hot loops in registers definitely wouldn't work today, and in some microprocessors the merely reading registers can change the state of external devices.
- nimish 7y agoThis makes the register keyword in c make a lot more sense
- aidenn0 7y agoSome embedded chips do a similar trick, where they have zero-wait-state SRAM for faster operations. In MIPS, this will even be mapped to address zero, so you can use the zero-register for addressing it.