<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Nov 29, 2011, at 7:10 PM, Hal Finkel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><blockquote type="cite">From the perspective of the hazard recognizer, from what I can tell, the<br></blockquote>difference between the top-down and bottom-up modes are:<br><br>In top-down mode, the scheduling proceeds in the forward direction.<br>AdvanceCycle() may be used, RecedeCycle() is not used. EmitInstruction()<br>implies a cycle-count increment. In bottom-up mode, scheduling proceeds<br>in the backwards direction (last instruction first). AdvanceCycle() is<br>not used, RecedeCycle() is always used to decrement the current cycle<br>offset (EmitInstruction() does *not* imply a cycle-count decrement).<br><br>Is this right? Have I captured everything?</div></span></blockquote></div><br><div>ScoreboardHazardRecognizer::EmitInstruction checks the reservation table where cycle=0 corresponds to the first pipeline stage and cycle=n is the stage the occurs after n cycles in the itinerary. It doesn't care if we're scheduling top-down or bottom-up. For top-down, the reservation table models resources used by previous instructions, and for bottom-up it models the resources of subsequent instructions, but the EmitInstruction logic is the same either way. </div><div><br></div><div>AdvanceCycle is called by the current top-down scheduler (now postRA only) to shift the reservation table forward in time. The earliest pipeline stage is dropped.</div><div><br></div><div><div>RecedeCycle is called by the bottom-up scheduler (preRA) to shift the reservation table backward in time. The latest pipeline stage is dropped.</div></div><div><br></div><div>It's easier to think about hazards in a top-down scheduler.</div><div><br></div><div>-Andy</div><div><br></div></body></html>