Giter Site home page Giter Site logo

Comments (6)

KinzaQamar avatar KinzaQamar commented on May 22, 2024

Hi,
Try to follow the steps here:
https://fusesoc.readthedocs.io/en/stable/user/installation.html
Hope it resolves the issue

from serv.

gojimmypi avatar gojimmypi commented on May 22, 2024
  • edit: I mistakenly confused this with the Windows issue; I'll leave this comment here, but see below for my next comment regarding this issue and WSL.

Hi @KinzaQamar and thanks for your suggestions.

I tried the pip3 on the readthedocs link instead of the README file, but it appears python had already worked that out (I've since been trying to get this working).

C:\workspace\myfusesoc>pip3 install --upgrade --user fusesoc
Requirement already up-to-date: fusesoc in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (1.12.0)
Requirement already satisfied, skipping upgrade: pyparsing in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from fusesoc) (3.0.9)
Requirement already satisfied, skipping upgrade: pyyaml in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from fusesoc) (6.0)
Requirement already satisfied, skipping upgrade: simplesat>=0.8.0 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from fusesoc) (0.8.2)
Requirement already satisfied, skipping upgrade: edalize>=0.2.3 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from fusesoc) (0.4.0)
Requirement already satisfied, skipping upgrade: ipyxact>=0.2.3 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from fusesoc) (0.3.2)
Requirement already satisfied, skipping upgrade: attrs>=17.4.0 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from simplesat>=0.8.0->fusesoc) (21.4.0)
Requirement already satisfied, skipping upgrade: okonomiyaki>=0.16.6 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from simplesat>=0.8.0->fusesoc) (1.3.2)
Requirement already satisfied, skipping upgrade: six>=1.10.0 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from simplesat>=0.8.0->fusesoc) (1.16.0)
Requirement already satisfied, skipping upgrade: Jinja2>=3 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from edalize>=0.2.3->fusesoc) (3.1.2)
Requirement already satisfied, skipping upgrade: distro; python_version >= "3.8" in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc) (1.7.0)
Requirement already satisfied, skipping upgrade: zipfile2>=0.0.12 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc) (0.0.12)
Requirement already satisfied, skipping upgrade: jsonschema>=2.5.1 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc) (4.7.2)
Requirement already satisfied, skipping upgrade: MarkupSafe>=2.0 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from Jinja2>=3->edalize>=0.2.3->fusesoc) (2.1.1)
Requirement already satisfied, skipping upgrade: importlib-resources>=1.4.0; python_version < "3.9" in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from jsonschema>=2.5.1->okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc) (5.9.0)
Requirement already satisfied, skipping upgrade: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from jsonschema>=2.5.1->okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc) (0.18.1)
Requirement already satisfied, skipping upgrade: zipp>=3.1.0; python_version < "3.10" in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from importlib-resources>=1.4.0; python_version < "3.9"->jsonschema>=2.5.1->okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc) (3.8.1)
WARNING: You are using pip version 19.2.3, however version 22.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

It still might be a good idea to detect python versions more gracefully with pip vs pip3 ? Perhaps just update the README and/or refer to the readthedocs link.

The upgrade gave essentially the same output as above: pip3 install --upgrade fusesoc

The Windows instructions I assume are very similar, but still listed at a TODO on the readthedocs link:

image

from serv.

gojimmypi avatar gojimmypi commented on May 22, 2024

oops, I confused this WSL issue with my Windows issue so ignore this comment, but see next one.,

Here's the result in WSL, using pip3 resolves, but there's a new error:

$ pip3 install --upgrade --user fusesoc
Collecting fusesoc
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/69/65/e5902fea9bac81e56e4f5d81e4a2ba497244a160f3ffa7df59e7e1d3f030/fusesoc-1.12.0-py3-none-any.whl (63kB)
    100% |████████████████████████████████| 71kB 1.4MB/s
Collecting edalize>=0.2.3 (from fusesoc)
  Downloading https://files.pythonhosted.org/packages/ef/3a/ebaf6e01a797f0ac4896ec4b688b8b39ad22d7919b0d1470c60e591408ad/edalize-0.4.0.tar.gz (337kB)
    100% |████████████████████████████████| 337kB 1.8MB/s
Collecting ipyxact>=0.2.3 (from fusesoc)
  Downloading https://files.pythonhosted.org/packages/e6/4b/3e7485acab5b762f8b417db2fc890c12853a52bef4b278a33ef6919b4808/ipyxact-0.3.2.tar.gz (201kB)
    100% |████████████████████████████████| 204kB 2.5MB/s
Collecting simplesat>=0.8.0 (from fusesoc)
  Downloading https://files.pythonhosted.org/packages/1f/79/aca2b68a5fb5f2a3183bf2ac0f09fb05dc6b4ce859dc1aa52670c44866a8/simplesat-0.8.2-py2.py3-none-any.whl (246kB)
    100% |████████████████████████████████| 256kB 1.5MB/s
Collecting pyyaml (from fusesoc)
  Downloading https://files.pythonhosted.org/packages/b3/85/79b9e5b4e8d3c0ac657f4e8617713cca8408f6cdc65d2ee6554217cedff1/PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (603kB)
    100% |████████████████████████████████| 604kB 1.6MB/s
Collecting pyparsing (from fusesoc)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/6c/10/a7d0fa5baea8fe7b50f448ab742f26f52b80bfca85ac2be9d35cdd9a3246/pyparsing-3.0.9-py3-none-any.whl (98kB)
    100% |████████████████████████████████| 102kB 4.1MB/s
Collecting Jinja2>=3 (from edalize>=0.2.3->fusesoc)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/20/9a/e5d9ec41927401e41aea8af6d16e78b5e612bca4699d417f646a9610a076/Jinja2-3.0.3-py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 3.9MB/s
Collecting six>=1.10.0 (from simplesat>=0.8.0->fusesoc)
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting okonomiyaki>=0.16.6 (from simplesat>=0.8.0->fusesoc)
  Downloading https://files.pythonhosted.org/packages/81/df/1ec79aeb85dd3e6551bba3d7a2bfa8591e1bafc69e7d405fdf6132f65bf1/okonomiyaki-1.3.2-py3-none-any.whl (2.8MB)
    100% |████████████████████████████████| 2.8MB 434kB/s
Collecting attrs>=17.4.0 (from simplesat>=0.8.0->fusesoc)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/be/be/7abce643bfdf8ca01c48afa2ddf8308c2308b0c3b239a44e57d020afa0ef/attrs-21.4.0-py2.py3-none-any.whl (60kB)
    100% |████████████████████████████████| 61kB 2.5MB/s
Collecting MarkupSafe>=2.0 (from Jinja2>=3->edalize>=0.2.3->fusesoc)
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/fc/d6/57f9a97e56447a1e340f8574836d3b636e2c14de304943836bd645fa9c7e/MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting zipfile2>=0.0.12 (from okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc)
  Downloading https://files.pythonhosted.org/packages/60/ad/d6bc08f235b66c11bbb76df41b973ce93544a907cc0e23c726ea374eee79/zipfile2-0.0.12-py2.py3-none-any.whl (44kB)
    100% |████████████████████████████████| 51kB 1.5MB/s
Collecting jsonschema>=2.5.1 (from okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc)
  Downloading https://files.pythonhosted.org/packages/e0/d9/05587ac378b9fd2c352c6f024f13240168365bd753a7e8007522b7025267/jsonschema-4.0.0-py3-none-any.whl (69kB)
    100% |████████████████████████████████| 71kB 2.6MB/s
Collecting importlib-metadata; python_version < "3.8" (from jsonschema>=2.5.1->okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/a0/a1/b153a0a4caf7a7e3f15c2cd56c7702e2cf3d89b1b359d1f1c5e59d68f4ce/importlib_metadata-4.8.3-py3-none-any.whl
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 (from jsonschema>=2.5.1->okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc)
  Downloading https://files.pythonhosted.org/packages/6c/19/1af501f6f388a40ede6d0185ba481bdb18ffc99deab0dd0d092b173bc0f4/pyrsistent-0.18.0-cp36-cp36m-manylinux1_x86_64.whl (117kB)
    100% |████████████████████████████████| 122kB 2.0MB/s
Collecting typing-extensions>=3.6.4; python_version < "3.8" (from importlib-metadata; python_version < "3.8"->jsonschema>=2.5.1->okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/45/6b/44f7f8f1e110027cf88956b59f2fad776cca7e1704396d043f89effd3a0e/typing_extensions-4.1.1-py3-none-any.whl
Collecting zipp>=0.5 (from importlib-metadata; python_version < "3.8"->jsonschema>=2.5.1->okonomiyaki>=0.16.6->simplesat>=0.8.0->fusesoc)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/bd/df/d4a4974a3e3957fd1c1fa3082366d7fff6e428ddb55f074bf64876f8e8ad/zipp-3.6.0-py3-none-any.whl
Building wheels for collected packages: edalize, ipyxact
  Running setup.py bdist_wheel for edalize ... done
  Stored in directory: /home/gojimmypi/.cache/pip/wheels/eb/13/f0/616f11563663b3c48fd61abfc03acd9b6c92a1880076c41d00
  Running setup.py bdist_wheel for ipyxact ... done
  Stored in directory: /home/gojimmypi/.cache/pip/wheels/28/3d/e2/9d87f6119af6ca91e2aad9f8268e6459a9d357f771a22d81a4
Successfully built edalize ipyxact
Installing collected packages: MarkupSafe, Jinja2, edalize, pyyaml, ipyxact, six, zipfile2, typing-extensions, zipp, importlib-metadata, pyrsistent, attrs, jsonschema, okonomiyaki, simplesat, pyparsing, fusesoc
Successfully installed Jinja2-3.0.3 MarkupSafe-2.0.1 attrs-21.4.0 edalize-0.4.0 fusesoc-1.12.0 importlib-metadata-4.8.3 ipyxact-0.3.2 jsonschema-4.0.0 okonomiyaki-1.3.2 pyparsing-3.0.9 pyrsistent-0.18.0 pyyaml-6.0 simplesat-0.8.2 six-1.16.0 typing-extensions-4.1.1 zipfile2-0.0.12 zipp-3.6.0
gojimmypi:~/workspace/mywslfusesoc
$ fusesoc run --target=tinyfpga_bx servant
ERROR: 'servant' or any of its dependencies requires 'servant', but this core was not found
gojimmypi:~/workspace/mywslfusesoc
$ fusesoc run --target=verilator_tb servant --uart_baudrate=57600 --firmware=$SERV/sw/zephyr_hello.hex
ERROR: 'servant' or any of its dependencies requires 'servant', but this core was not found
gojimmypi:~/workspace/mywslfusesoc
$

it appears the libraries were not installed, so I added them:

gojimmypi:~/workspace/mywslfusesoc
$ fusesoc library list
Name : Location : Sync type : Sync URI : Auto sync
gojimmypi:~/workspace/mywslfusesoc
$ fusesoc library add fusesoc-cores https://github.com/fusesoc/fusesoc-cores
INFO: Cloning library into fusesoc_libraries/fusesoc-cores
Cloning into 'fusesoc_libraries/fusesoc-cores'...
remote: Enumerating objects: 678, done.
remote: Counting objects: 100% (101/101), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 678 (delta 94), reused 78 (delta 75), pack-reused 577
Receiving objects: 100% (678/678), 141.02 KiB | 8.29 MiB/s, done.
Resolving deltas: 100% (265/265), done.

but now getting this error:

gojimmypi:~/workspace/mywslfusesoc
$ fusesoc run --target=tinyfpga_bx servant
INFO: Preparing fusesoc:utils:generators:0.1.7
INFO: Downloading fusesoc/fusesoc-generators from github
INFO: Preparing ::serv:1.0.2
INFO: Downloading olofk/serv from github
INFO: Preparing ::servant:1.0.2-r1
INFO: Downloading olofk/serv from github
INFO: Generating ::servant-tinyfpga_bx_pll:1.0.2

F_PLLIN:    16.000 MHz (given)
F_PLLOUT:   32.000 MHz (requested)
F_PLLOUT:   32.000 MHz (achieved)

[ .. snip .. ]


25.3.5. Executing AST frontend in derive mode using pre-parsed AST for module `\servant_timer'.
Parameter \WIDTH = 32
Parameter \RESET_STRATEGY = 1296649801
Generating RTLIL representation for module `$paramod\servant_timer\WIDTH=32\RESET_STRATEGY=1296649801'.
Note: Assuming pure combinatorial block at ../src/servant_1.0.2-r1/servant/servant_timer.v:21.4-24.7 in
compliance with IEC 62142(E):2005 / IEEE Std. 1364.1(E):2002. Recommending
use of @* instead of @(...) for better match of synthesis and simulation.
Parameter \RESET_PC = 0
Parameter \WITH_CSR = 1

25.3.6. Executing AST frontend in derive mode using pre-parsed AST for module `\serv_rf_top'.
Parameter \RESET_PC = 0
Parameter \WITH_CSR = 1
Generating RTLIL representation for module `$paramod\serv_rf_top\RESET_PC=0\WITH_CSR=1'.
../src/servant_1.0.2-r1/servant/servant_timer.v:0: ERROR: Can't find object for defparam `RESET_STRATEGY`!
Makefile:8: recipe for target 'servant_1.0.2-r1.json' failed
make: *** [servant_1.0.2-r1.json] Error 1
ERROR: Failed to build ::servant:1.0.2-r1 : '['make']' exited with an error: 2
gojimmypi:~/workspace/mywslfusesoc
$

from serv.

gojimmypi avatar gojimmypi commented on May 22, 2024

update: SUCCESS~

I compared fusesoc library list on WSL to my Windows/DOS version.

Ran this: fusesoc library add servant https://github.com/olofk/serv

$ fusesoc library list
Name          : Location                        : Sync type : Sync URI                                 : Auto sync
fusesoc-cores : fusesoc_libraries/fusesoc-cores : git       : https://github.com/fusesoc/fusesoc-cores : y
gojimmypi:~/workspace/mywslfusesoc
$ fusesoc library add servant https://github.com/olofk/serv
INFO: Cloning library into fusesoc_libraries/servant
Cloning into 'fusesoc_libraries/servant'...
remote: Enumerating objects: 2471, done.
remote: Counting objects: 100% (583/583), done.
remote: Compressing objects: 100% (187/187), done.
remote: Total 2471 (delta 458), reused 417 (delta 393), pack-reused 1888
Receiving objects: 100% (2471/2471), 5.27 MiB | 8.05 MiB/s, done.
Resolving deltas: 100% (1585/1585), done.

and... TADA!

gojimmypi:~/workspace/mywslfusesoc
$ fusesoc run --target=tinyfpga_bx servant
INFO: Preparing fusesoc:utils:generators:0.1.7
INFO: Preparing ::serv:1.1.0
INFO: Preparing ::servant:1.1.0
INFO: Generating ::servant-tinyfpga_bx_pll:1.1.0

F_PLLIN:    16.000 MHz (given)
F_PLLOUT:   32.000 MHz (requested)
F_PLLOUT:   32.000 MHz (achieved)

FEEDBACK: SIMPLE
F_PFD:   16.000 MHz
F_VCO: 1024.000 MHz

[ .. snip .. ]

Info: Max delay posedge wb_clk_$glb_clk -> <async>: 4.05 ns

Info: Slack histogram:
Info:  legend: * represents 3 endpoint(s)
Info:          + represents [1,3) endpoint(s)
Info: [ 15256,  15948) |+
Info: [ 15948,  16640) |+
Info: [ 16640,  17332) |
Info: [ 17332,  18024) |************+
Info: [ 18024,  18716) |*************+
Info: [ 18716,  19408) |**+
Info: [ 19408,  20100) |**************+
Info: [ 20100,  20792) |*************+
Info: [ 20792,  21484) |*****+
Info: [ 21484,  22176) |******+
Info: [ 22176,  22868) |************+
Info: [ 22868,  23560) |******************************+
Info: [ 23560,  24252) |*******************************************************+
Info: [ 24252,  24944) |*********************************+
Info: [ 24944,  25636) |**************************+
Info: [ 25636,  26328) |*****************************************+
Info: [ 26328,  27020) |*****+
Info: [ 27020,  27712) |***********+
Info: [ 27712,  28404) |********************+
Info: [ 28404,  29096) |************************************************************
icepack servant_1.1.0.asc servant_1.1.0.bin
INFO: Running
gojimmypi:~/workspace/mywslfuseso

success!

from serv.

KinzaQamar avatar KinzaQamar commented on May 22, 2024

Awesome !

from serv.

olofk avatar olofk commented on May 22, 2024

Great to see you got it working. Thanks for the detailed reports of your struggles. Thought I had seen the last Python2 issue, but it seems python2 just refuses to die. You're probably right that it's better to explicitly mention pip3 over pip for systems that still use python2 as the default version.

The other error (ERROR: Can't find object for defparam RESET_STRATEGY!) has been fixed by adding a newer version of SERV (with the error fixed) to the fusesoc-cores library

from serv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.