[Libre-soc-dev] LibreSOC Implementation on arty7 fpga dev boards.

lkcl luke.leighton at gmail.com
Wed Oct 6 14:42:44 BST 2021


On Wed, Oct 6, 2021 at 2:23 PM varun mohan <varunmadhavam at gmail.com> wrote:
>
> > https://github.com/litex-hub/litex-boards/commits/master/litex_boards/platforms/digilent_arty.py
>
> > then view history.
>
> > find date and commit.  then git log and find diff.  pipe to file then run through patch command.
>
> If you have time, can you elaborate a bit or point to the right resources. The mentioned steps are pretty new to me.

sure.

ok, so it's a chain, and you just have to be ultra-patient and track
things through, one step at a time, making "logical deductions" and
reasonable rational assumptions along the way.  and not getting
totally irritated at the litex coding style which is a _major_
impediment.  sigh.

first, click on the hashes.  a3f4798 and 8a3caca

that way, you can see evidence they simply did a name-change in the
first, and in the second just added PMOD IO (which you can probably do
without).

https://github.com/litex-hub/litex-boards/commit/8a3cacae32fbffa007608101335a26a63006eecb#diff-a13e5f6983fc23e87318e928cc435a0b5fa89e5b3485e3af0d91c986363ede35

so, with no *actual* changes, there, you can logically deduce that
using "arty" is perfectly fine.  dont worry about PMOD IO, you don't
need it straight away.

next, we have to work out how - and when - the heck
"toolchain=symbiflow" was added.

so, first track it down.

this is, unfortunately, where litex's coding style really pisses me
off.  you *cannot* rely on the "import" list because it's using
wildcards.

sigh.

fortunately: at the top, they did "from litex_boards.platforms import
arty" then arty.Platform receives the "toolchain" argument:
https://github.com/litex-hub/litex-boards/blob/f0a629774a8652e732eecbf90d5ba16614a970b5/litex_boards/targets/digilent_arty.py#L64

so, next we jump to litex_boards.platforms to find "arty", only to
find that it doesn't exist.
https://github.com/litex-hub/litex-boards/tree/master/litex_boards/platforms

sigh.

however, digilent_arty.py *does* exist and has a class Platform at line 337:
https://github.com/litex-hub/litex-boards/blob/f0a629774a8652e732eecbf90d5ba16614a970b5/litex_boards/platforms/digilent_arty.py#L337

that's inheriting from XilinxPlatform.  again *very* luckily, right at
the top: "from litex.build.xilinx import XilinxPlatform"

so now we jump to _litex_ - not litex-boards - _litex_, and go look
there.  the __init__.py is where the litex/build/xilinx imports from:
https://github.com/enjoy-digital/litex/blob/master/litex/build/xilinx/__init__.py

so that in turn (line 1) imports XilinxPlatform... which... ah HA!
https://github.com/enjoy-digital/litex/blob/f03a15820b34d75b627a31a647be5afef3fcfd6c/litex/build/xilinx/platform.py#L27

ta-daaaa, symbiflow.

*now* we can go back through the history... *of xlilinx platform.py*
.... and find out the last commit.

https://github.com/enjoy-digital/litex/commits/master/litex/build/xilinx/platform.py

hooraaay, Jun 1 2020

https://github.com/enjoy-digital/litex/commit/bd702397d1439887bdb49ea6b71da2bcaa90a506#diff-e9b6d6860d2a0596083659d4e282e40dbadd126bae721a0eaaf7d0cbbf49c271

now, because those commit checksums i gave Las (and you should now
have) are *AFTER* that
date, you should in fact have that commit, which adds symbiflow
support, already.

now, in *combination* with the fact that the arty.py files are "just a
rename" (except for the PMOD IO which you don't need), we may
reasonably and logically deduce that you should in fact just be able
to use "import ..... arty" in place of "import .... digilent_arty".

does that sound reasonable?

l.



More information about the Libre-soc-dev mailing list