[Libre-soc-dev] Back from vacation and question about documenting litex

Cole Poirier colepoirier at gmail.com
Mon Sep 7 02:14:57 BST 2020


On Sun, Sep 6, 2020 at 5:30 PM Luke Kenneth Casson Leighton
<lkcl at lkcl.net> wrote:
>
> On Mon, Sep 7, 2020 at 12:52 AM Cole Poirier <colepoirier at gmail.com> wrote:
> > On that note, do we have the litex simulation and testing instructions
> > on the wiki?
>
> not at all.  because nobody's asked until now.
>
> > If so can you please link me to the page? If not, I'd
> > like to take on the task of documenting that this week
>
> should be real simple.
>
> 1) install litex
> 2) run sim.py
>
> > along with the
> > microwatt spr vhdl additions (I think I'm almost done),
>
> i rewrote it.  check the bugreport.

That would be the diff of the diff right? I've commented to this
effect on the bug report... I think we are in sync there now :)

> > and
> > icache.vhdl (almost done this as well). Is there a bug report for this
> > already?
>
> yes.  search "i-cache".
>
> > or should I create one?

Ah sorry!! I was writing too stream-of-consciousness and thus it came
across as if I was asking about the icache bug report. I actually
created that bug report a few days ago per our conversation on monday
or tuesday, I forget which.

Let me rephrase my original question:

On that note, do we have the litex simulation and testing instructions
on the wiki? If so can you please link me to the page? If not, I'd
like to take on the task of documenting that this week. Is there a bug
report for this
already? or should I create one?

I tried following your directions from above:

> should be real simple.
>
> 1) install litex
> 2) run sim.py

But I get an error related to not finding the microwatt test .bin,
therefore I think it would be worthwhile for me to document the full
process on the wiki. I'm assuming it involves running the microwatt
setup steps, which I think are just 'make' and following their
instructions for installing micropython?

Full python error output:
```
Traceback (most recent call last):
  File "src/soc/litex/florent/sim.py", line 462, in <module>
    main()
  File "src/soc/litex/florent/sim.py", line 451, in main
    soc = LibreSoCSim(cpu=args.cpu, debug=args.debug)
  File "src/soc/litex/florent/sim.py", line 81, in __init__
    ram_init = get_mem_data(ram_fname, "little")
  File "/home/colepoirier/src/litex/litex/soc/integration/common.py",
line 39, in get_mem_data
    data_size = max(int(base, 16) + os.path.getsize(filename), data_size)
  File "/usr/lib/python3.7/genericpath.py", line 50, in getsize
    return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory:
'/home/colepoirier/src/microwatt/tests/decrementer/decrementer.bin'
```

Do you think it would be worthwhile for me to document the full
process on the wiki? As of right now we don't document microwatt as a
dependency on the HDL_workflow page where we do document the rest i.e.
pia, nmigen-soc, etc.

Finally, per your direction to ask my question from bug 231 was not
related to bug 231 question here on the mailing list instead of adding
chatter to the very specific technical bug report:

```https://bugs.libre-soc.org/show_bug.cgi?id=231#c8
> Lauri is correct in that we need at least binutils support (gnu as) for SV
> even to begin to start that assessment.  or at the very least a really bad
> hack which pre-processes assembler
>
> that in turn means that we need realistically to do the SV-i-fication of
> POWER9 before being able to start this work in earnest.

With you. I mentioned that lu_zero at gentoo is working on a lot of
media/video encoding stuff and specifically working on the power side
as well, with a good amount of work on - if I'm not misremembering -
binutils for power!! I'm planning on reaching out to him this week.
Should I send my draft email seeking technical and correctness input
on what I've written to the libre-soc-dev or libre-soc-org mailing
list?
```

Cole



More information about the Libre-soc-dev mailing list