[Libre-soc-bugs] [Bug 523] demo program needed showing register dependencies

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Nov 12 12:19:01 GMT 2020


https://bugs.libre-soc.org/show_bug.cgi?id=523

--- Comment #20 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #19)
> (In reply to Luke Kenneth Casson Leighton from comment #17)
> > the purpose of this bugreport was to aid and assist in evaluating register
> > allocation strategies, saving considerable time in the hand-writing (4+
> > hours) of markdown tables through writing extremely rapid prototype and
> > throw-away one-off python code.
> 
> Ok, I had missed that the whole point was to have throw-away code. 

the purpose is to help speed up the discussion surrounding reg-renaming.
something that takes 10 days to write has in no way speded up the
discussion or allowed us to assess and test alternative strategies on a
one-day cycle.

the moment that code-reuse and additional purposes (such as full 
hardware-level pipeline simulation) is involved, the complexity of the
resultant code jumps massively, and as such can no longer be considered
useful as "documentation".


> I think
> you are greatly underestimating the complexity of code required to generate
> those markdown tables currently on the wiki, I'd estimate something around
> 2-5k lines of python would have been required. 

to do a full hardware-level pipeline simulation?  most likely yes.

to do something that only tracks dependencies and does not even store,
process, or compute the operands?  i would be extremely surprised. i was
expecting to literally use a dictionary for the rename table, a list
for pipelines using push and pop.  reformat the instruction "assembly"
so that it takes 2-3 lines to "process" and so on, but is still
human-readable.

... but this is literally the first time that estimates of time taken
(based on LoC) is being discussed!

this should have been discussed *around comment 3*.

we could then have gone, "hmmm that's not worth it let's just carry on
doing the hand-drawn tables" or "hmm are we sure about that, let's maybe
take the risk".

and made that decision *together*


> It currently has 2.2k lines
> of C++ (counting files in c-src but not c-src/c++), and it implements the
> simulator, fetch pipeline, register renamer (I started with that model since
> I understand it better), and 5 instructions (addi, bdnz, ldu, mtctr, and
> std).
> 
> > the idea to develop near-gate-level simulations far beyond cycle-accurate
> > simulations is a hundred to a thousand times longer development time than
> > the expected scope of this bugreport, and cannot be considered
> > "documentation"
> 
> I agree that a simulator would probably not be documentation, however, the
> additional code required beyond the code needed to generate those markdown
> tables is not very much, I'd estimate 1.5-2x as much code (if implementing
> just the same instructions). Therefore, I decided to write the code in such
> a way that it is feasible to extend later.

which you're only just now mentioning, which means it wasn't discussed
or agreed.

it may be a good idea... but it needed to be discussed.

> > consequently i am closing it and returning the budget back to the parent
> > "Documentation" bugreport.
> 
> Fine by me, we can figure that out later, if we decide that the code is
> useful for documentation, or other stuff.

at 2,500 lines and in c++ it puts it far beyond the reach of even an
above-average 15 to 17-year-old student owning a raspberry pi, and many
Computer Science undergraduates would struggle as well.

anything under the "Documentation" budget *has to itself actually be
documentation*.

again - you went ahead *without discussing it*, and that's really the
key message here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list