[libre-riscv-dev] Scoreboard Tests
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Sun Jun 7 03:21:38 BST 2020
On Sunday, June 7, 2020, Yehowshua <yimmanuel3 at gatech.edu> wrote:
> Wrapping my head around the scoreboard.
it's... very few gates, with a lot of pieces to understand. Thornton
highlighted that paradox in his book.
the code on its own it is inadviseable to focus on without having
*significant* amounts of uninterrupted time to pay attention to it.
in total it literally took 5-6 months to get first the knowledge, then do a
first draft, then find the bugs (in Mitch's book chapters - that was month
3), then implement instructions, and add the advanced feature such as
branch speculation thru shadowing.
load/store was then another month. the multi-signal capability, another
month.
https://git.libre-soc.org/?p=soc.git;a=tree;f=src/soc/scoreboard;h=
> 5a0cc5e1d9bc2061c2a0eaa8d8b55f72af4c508f;hb=HEAD <
> https://git.libre-soc.org/?p=soc.git;a=tree;f=src/soc/scoreboard;h=
> 5a0cc5e1d9bc2061c2a0eaa8d8b55f72af4c508f;hb=HEAD>
>
> Do we have tests?
each python file has a unit test that in the simple modules i did not
maintain (cookie cut code). the more complex ones, i did: it would be
absolutely flat-out an impossible task without them.
the primary method however was extreme close and careful examination of the
gtkwave timing traces, the yosys graphviz diagrams compared against Mitch's
book chapters, Thornton's original book, and the redrawn diagrams, which
are documented at the 6600scoreboard page
https://libre-soc.org/3d_gpu/architecture/6600scoreboard/
i recommend ignoring anything to do with LDST address matching, initially,
as they are derivatives of the Reg / FU DMs.
at some point i will draw out the Tomasulo algorithm and a series of
transformations like a stop-motion cartoon of drawings, and do a video that
shows how to get to 6600 from Tomasulo.
you really need to grasp and trust the algorithm first. looking at the code
itself, alone, will not help with that, very much. running each module, to
get it to generate an ILANG file which you then examine in yosys with "show
top" you will find much more productive because it is far closer to Mitch
and Thornton's gate-level diagrams.
but even then, *only* when you have a strong grasp of the actual
algorithm. as you're keenly aware by now, the academic literature will
only deeply mislead and misinform you in that regard.
l.
--
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
More information about the libre-riscv-dev
mailing list