Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does fusesoc work on Windows? (regular DOS, not WSL) #84

Open
gojimmypi opened this issue Jul 23, 2022 · 1 comment
Open

Does fusesoc work on Windows? (regular DOS, not WSL) #84

gojimmypi opened this issue Jul 23, 2022 · 1 comment

Comments

@gojimmypi
Copy link
Contributor

As noted in #83 I had some problems installing fusesoc in WSL due to a default python version issue.

I next tried to use Windows. I don't have Verilator installed, as apparently only Linux versions on supported per the install guide. So, perhaps the first error (below) for fusesoc run --target=lint serv is expected, although the error presented does not appear to be related to Verilator.

Does Verilator generate the verilator_tb file? I also saw another error for fusesoc run (see below).

Granted, the instructions state: 'If Verilator is installed, we can use that as a linter to check the SERV source code` - but is that for only that particular linting step, or all steps?

C:\workspace\myfusesoc> pip install fusesoc
Requirement already satisfied: fusesoc in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (1.12.0)
Requirement already satisfied: 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: pyparsing in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from fusesoc) (3.0.9)
Requirement already satisfied: 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: 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: pyyaml in c:\users\gojimmypi\appdata\local\programs\python\python38-32\lib\site-packages (from fusesoc) (6.0)
Requirement already satisfied: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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.

C:\workspace\myfusesoc> fusesoc library add fusesoc_cores https://github.com/fusesoc/fusesoc-cores
←[1;37mINFO: Cloning library into fusesoc_libraries\fusesoc_cores←[0m
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.
Receiving objects:  88% (597/678)used 78 (delta 75), pack-reused 577
Receiving objects: 100% (678/678), 141.02 KiB | 2.76 MiB/s, done.
Resolving deltas: 100% (265/265), done.

C:\workspace\myfusesoc>fusesoc library add serv https://github.com/olofk/serv
←[1;37mINFO: Cloning library into fusesoc_libraries\serv←[0m
Cloning into 'fusesoc_libraries\serv'...
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 | 9.01 MiB/s, done.
Resolving deltas: 100% (1585/1585), done.

C:\workspace\myfusesoc>fusesoc run --target=lint serv
←[1;37mINFO: Preparing ::serv:1.1.0←[0m
←[1;37mINFO: Setting up project←[0m

←[1;37mINFO: Building simulation model←[0m
verilator -f serv_1.1.0.vc -Wall
process_begin: CreateProcess(NULL, verilator -f serv_1.1.0.vc -Wall, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:16: Vserv_rf_top.mk] Error 2
←[1;31mERROR: Failed to build ::serv:1.1.0 : '['make', 'Vserv_rf_top.mk']' exited with an error: 2←[0m

C:\workspace\myfusesoc>verilator
'verilator' is not recognized as an internal or external command,
operable program or batch file.

C:\workspace\myfusesoc>fusesoc run --target=verilator_tb servant --uart_baudrate=57600 --firmware=$SERV/sw/zephyr_hello.hex
←[1;37mINFO: Preparing ::serv:1.1.0←[0m
←[1;37mINFO: Preparing ::servant:1.1.0←[0m
←[1;37mINFO: Setting up project←[0m

←[1;37mINFO: Building simulation model←[0m
verilator -f servant_1.1.0.vc --trace
process_begin: CreateProcess(NULL, verilator -f servant_1.1.0.vc --trace, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:16: Vservant_sim.mk] Error 2
←[1;31mERROR: Failed to build ::servant:1.1.0 : '['make']' exited with an error: 2←[0m

@olofk
Copy link
Owner

olofk commented Jul 24, 2022

It is expected that the command fails for both the lint and the verilator_tb targets since they both use verilator, and it looks like that's what happens in both cases with CreateProcess(..., verilator, ...) failing. It would be nice to fail in a more obvious way, but that's actually a bit tricky to implement because FuseSoC is designed so that you can do the setup step on one computer and then run the actual tool flow on another, so there are very legit cases where FuseSoC won't be able to find the tools until it actually tries to invoke them.

If you have some other simulator installed (e.g. modelsim, icarus, vcs, xsim...) , you can still run simulations using the sim target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants