Path: utzoo!utgpu!water!watmath!clyde!rutgers!mailrus!umix!husc6!hao!ames!amdcad!philip From: philip@amdcad.AMD.COM (Philip Freidin) Newsgroups: comp.arch Subject: Re: Cycle stretching Message-ID: <20409@amdcad.AMD.COM> Date: 16 Feb 88 19:00:11 GMT References: <844@daisy.UUCP> Reply-To: philip@amdcad.UUCP (Philip Freidin) Organization: Advanced Micro Devices Lines: 47 In article <844@daisy.UUCP> david@daisy.UUCP (David Schachter) writes: > >Here is a dumb question. Say I have a CPU where 99 percent of the instructions >take, say, one clock. The remaining instructions need just a little longer-- >one clock plus a few nanoseconds. Why not stretch the clock a bit when exec- >uting those instructions, instead of wasting most of a second clock period? > > -- David Schachter > This is not a dumb question, because I have the answer! The technique you describe is a common one, and has been dealt with many times in various ways in different implementations of assorted architectures. The ratio of quick versus not so quick instructions though is not 99:1, but more in the 50:50 region (give or take 20%). The quick instructions are the logical ops, because there is no interbit communications. The not so quick are the primitive arith ops such as add, inc, sub, dec, etc, because the inter bit communications slow things down (the carry chain). Longer instructions use multiple cycles (and in some systems, a mix of long and short cycle instruc- tions). SALES MODE ON :-) The implementation of this variable period clock can be done with the AMD AM2925 clock generator chip. It is specifically designed to do exactly what you asked about. In a micro- programmed system, each micro cycle execution duration is a function of what the critical path will be for the specified opperation. This is known at assembly time of the microcode. An extra field is added to the microcode, which controls the Am2925, and thus sets the duration of the clock for that microcycle. The chip has a 3 bit control field, so it can generate 8 different clock periods. With wait states, this can be extended. SALES MODE OFF :-) :-) (double smily because I prefer to be out of sales mode) Philip Freidin @ AMD SUNYVALE on {favorite path!amdcad!philip) Section Manager of Product Planning for Microprogrammable Processors (you know.... all that 2900 stuff...) "We Plan Products; not lunches" (a quote from a group that has been standing around for an hour trying to decide where to go for lunch)