Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-spam!sri-unix!hplabs!decwrl!pyramid!oliveb!intelca!mipos3!cpocd2!howard From: howard@cpocd2.UUCP Newsgroups: comp.arch Subject: Re: RISC register windows Message-ID: <451@cpocd2.UUCP> Date: Wed, 25-Feb-87 20:14:18 EST Article-I.D.: cpocd2.451 Posted: Wed Feb 25 20:14:18 1987 Date-Received: Sat, 28-Feb-87 04:19:16 EST References: <1881@homxc.UUCP> <898@moscom.UUCP> <476@mntgfx.MENTOR.COM> <430@cpocd2.UUCP> <1093@uwmacc.UUCP> <443@cpocd2.UUCP> <5746@amdahl.26 Feb 87 01:14:18 GMT Reply-To: howard@cpocd2.UUCP (Howard A. Landman) Organization: Intel Corp. ASIC Services Organization, Chandler AZ Lines: 47 In article <1335@Shasta.STANFORD.EDU> andy@Shasta.UUCP (Andy Freeman) writes: >The sliding register window had an area for parameters passed >to the procedure, locals, and parameters passed to other procedures. >There were also a set of global registers. > >One argument for fixed window sizes is that register access >shouldn't require an addition. Bit-wise or is one thing (or the >register number with the current base to determine the register); >addition is an expensive operation to put on the register access >data path. This basically restricts window sizes to powers of two. Actually we didn't even use bitwise manipulation, we just built double decoders for the overlapped registers so that two addresses would both activate the same register. You can easily see this in the chip photos, in the upper left, as light and dark bands in the regfile decoder. In retrospect I'm not sure that was the best method. Dave Johannsen once suggested to me an alternate window structure in which the overlap could be implemented with a "normal" RAM and only 2 extra gates! >Then again, I seem to remember that the window size wasn't a power >of two on the Berkeley RISC, which surprised me. Maybe I'm wrong. You are. In RISC-I, say, in each window you have 6 "high" and 6 "low" registers which overlap with the next window, 10 "local" ones which don't, and 10 "global" ones which are the same in all windows. That adds up to 32. However, the 10 global registers only exist in one place, not in each window, so each window has 22 registers which are non-global; this may be where you got your non-power-of-2-idea. On the other hand, adding an extra window costs 16 registers, because either the high or the low (I forget which) already exist in the previous window, so we're back to a power of 2 again. The numbers in RISC-II are different, but could be plugged into the preceding paragraph without making it untrue (I think). Let H = # of high registers, M = # of local registers, L = # of low registers, G = # of global registers, R = # of registers seen in each window, W = # of windows, P = # of physical registers. The following must hold for 2 or more windows, assuming circular overflow (top-window high = bottom-window low): H = L R = H + M + L + G P = W*(M+L) + G -- Howard A. Landman ...!intelca!mipos3!cpocd2!howard