[Libre-soc-isa] [Bug 686] create Power ISA test API

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Sep 10 23:16:12 BST 2021


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

--- Comment #33 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to klehman9 from comment #32)
> Good question.
> 
> I'm an encapsulation type guy.  With that said if made global, the class
> version of it would be basically free consisting of a line or two unless I'm
> oversimplifying things.  And would give a syntax choice as a bonus.

i was kinda thinking along the lines of __add__ and operator.add combined
with "reduce".

in other words

* a class member function (equivalent to __add__) which
  takes one other state that checks against another
  state

  (hell, it could even *be* __eq__ but we need some
   debug info raised, about where the error occurred,
   hmm, well there's nothing wrong with splitting
   out the comparison from the reporting i.e.
   calling dut.assertTrue(wasiteq) instead)

* a function which *calls* the class member function
  or just does

     for i in range(len(list)-1):
        testme = list[i] == list[i+1]
        dut.assertTrue(testme, a_report)

hmm, maybe not, because the report needs to include exactly
which reg and what itvwas compared against.

and, ah, the name of its type (back in the original
dict, "sim" or "hdl" or "microwatt" or "qemu")

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


More information about the Libre-SOC-ISA mailing list