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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Sep 25 16:30:52 BST 2021


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

--- Comment #73 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to klehman9 from comment #72)
> https://git.libre-soc.org/?p=soc.git;a=commit;
> h=f164672e4e03af1b63c51809f93bdc3d3be106ad
> 
> https://git.libre-soc.org/?p=soc.git;a=commit;
> h=d5d62c713b127cd17a99ba124bd7320ab98f46c8
> 
> https://git.libre-soc.org/?p=soc.git;a=commit;
> h=10447554acce69654f27c0c30d8d19e92669095d
> 
> wrapping (wrapped?) up changes over to HDLRunner

looks great - not quite.  next phase once everything
is "independent" (abstracted) is to remove all of
the "if self.run_hdl" and "if self.run_sim" and
to use those *once*...

like this:

   def run_all(self):
       list_of_things_to_sim = []
       if self.run_hdl:
           hdlrun = HDLRunner(....)
           list_of_things_to_sim.append(hdlrun)
       if self.run_sim:
           blah blah

then - and this should be obvious now - wherever
there is like this:

            if self.run_sim:
                simrun.setup_during_test() # TODO, some arguments?

            if self.run_hdl:
                yield from hdlrun.setup_during_test()

replace it with:

        for runner in list_of_things_to_sim:
            runner.blabhblah_functon_with_whatever_arguments

now, as you can see, from that example, those don't match up:
one's a yielder, the other isn't.

sooooo.....

back iiin.... StateRunner....

we need to do the same trick as before.

class StateRunner:

     def whatever_function_name(self, .....):
          if False:
               yield

and basically "normalise" the entire API

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


More information about the Libre-SOC-ISA mailing list