ascherer / mmix

MMIX 2009 – a RISC computer for the third millennium
http://www-cs-faculty.stanford.edu/~knuth/mmix.html
38 stars 6 forks source link

Desireable modernizations for mmix-pipe #19

Closed jwbrase closed 2 months ago

jwbrase commented 2 months ago

mmix-pipe has some microarchitectural limitations that limit its ability to model modern microarchitectures.

The most significant of these is the lack of any reservation stations/schedulers, which merges dispatch and issue and forces in-order issue, and I'm not aware of any current microarchitecture with in-order issue and out-of-order execution a la mmix-pipe. A simple solution might be to introduce a unified scheduler right after dispatch.

Another option that would give more flexibility to match the configurations of modern hardware would be to add means of specifying schedulers and assigning functional units to schedulers in mmix-config. I'm working on a proposed format for that.

Other issues include:

1) There is no BTB implemented, which exacerbates: 2) The entire front end being modeled as one pipeline stage feeding directly into the dispatch queue means that the dispatch queue gets flushed on every predicted branch. If the frontend were modeled as two stages, with separate fetch and dispatch queues, then the BHT could be read at the beginning of the second stage before putting instructions into the dispatch queue, meaning only the fetch queue would be flushed on a predicted branch resteer. 3) It might be desirable to include modern branch prediction algorithms such as TAGE.

I believe I've thought of a few other potential modernizations, but they slip my mind at the moment.

ascherer commented 2 months ago

Please consider these proposals for submission to MMIX home. There you'll find the “official” MMIX distribution and the feedback loop with the original author Don Knuth is much tighter.

My project almost exclusively addresses CWEB-related code improvements. Moreover, I'm totally unqualified to tinker with the inner workings of MMIX.