Giter VIP home page Giter VIP logo

Comments (18)

FrancescoConti avatar FrancescoConti commented on August 23, 2024

Hi @lstrz, ModelSim/QuestaSim is Mentor's version (i.e. the original one). As far as I know Altera's one is licensed from Mentor (https://www.altera.com/products/design-software/model---simulation/modelsim-altera-software.html) -- unfortunately I have no idea why this is missing vopt. I guess ModelSim-Altera is meant to be used in a fairly constrained setup and does not support well our flow.

The explicit optimization step can be bypassed, however, so what you can try to do is launch directly vsim (jumping the make opt stage), but you will have to edit the sim/tcl_files/run.tcl file and the ones called by it to add all the libraries explicitly like is done in the sim/tcl_files/rtl_vopt.tcl. Let us know if you manage to solve the issue or you need further help.

from pulpissimo.

lstrz avatar lstrz commented on August 23, 2024

I've been looking at Mentor's ModelSim for a while now, but have failed to find a Linux download. Nowhere on their webpage do they say anything about Linux, and all the downloads I could find are .exes for Windows. Could you, please, verify the version that you have available, if you're running it on Linux?

from pulpissimo.

FrancescoConti avatar FrancescoConti commented on August 23, 2024

To be honest, I have never run Mentor ModelSim/QuestaSim on Windows and was unaware that it existed. ModelSim/QuestaSim is a standard (and rather expensive) EDA package and I have run it on RHEL / CentOS 6 and 7, as well as on Ubuntu 16.04. In fact we do not support Windows at all for PULPino/PULPissimo/OPENPULP.

If you are unavailable to get access to Mentor ModelSim/QuestaSim via a corporate or academic network, it's probably best to try and adapt the scripts following the second part of my previous comment. Let me know if I can provide further help with that.

Edit: I'm currently running on QuestaSim 10.5c.

from pulpissimo.

boehmerst avatar boehmerst commented on August 23, 2024

Hi @lstrz I managed to get pulpissimo running with Altera/Intel Modelsim 10.6c Starter on Ubuntu 16.04. There are some workarounds required as Ubuntu is not supported officially. Intructions can be found here: https://lvoudouris.com/installing-xilinx-vivado-2016-4-and-intel-modelsim-starter-edition-16-1-on-64-bit-ubuntu-16-10/

To get it working I had to hack the flow as @FrancescoConti explained. Additionally to the libraries to be added, the top-level testbench has to be changed from vopt_tb to tb_pulp in run.tcl. Finally I had to hack the plp_rtl_runner.py in the SDK because Altera Starter is available as 32 Bit version only. After that I successfully run the Hello World example for both the pulpissimo and the pulp platform.

Modelsim Altera Starter is limited in features e.g. no vopt, 10.000 lines of code, 3.000 instances, 32 Bit only. That is why simulation performance is extremely low. Actually, it is not useable for designs as complex as pulpissimo.

Unfortunately the accelerator/hwme example fails! I nailed down the root cause to an incorrect bit with of the hwpe_stream_fifo. For whatever reason the parameter assignment of 68 Bit does not propagate down the hierachy and the actual instance i_fifo in file hwpe_stream_tcdm_fifo_store.sv is falling back to the parameter default which is 32 Bit. This seems to be a Modelsim issue as the code looks straight forward to me. Forcing this parameter with the deprecated defparam syntax fixes the issue. Also working around the generate statement up in the hierarchy in hwpe_stream_sink.sv fixes the issue. Both are dirty hacks I would not suggest to introduce. It might be the case that there are similar issues with other IPs also. So I do not trust the Modelsim Altera Starter / Ubuntu 16.04 flow. I wonder if anyone has experienced similar with the Altera/Intel Modelsim FPGA Edition or Modelsim DE or even QuestaSim respectively.

My goal is to get pulpissimo working with the verilator compiler which is painful as verilator is very pedantic. A lot of the IPs cause compilation errors. @FrancescoConti, do you have any plans to support verilator in future? I think there are a lot of open source enthusiasts (including me) which do not have access to expensive tooling.

from pulpissimo.

FrancescoConti avatar FrancescoConti commented on August 23, 2024

@boehmerst regarding the hwme test -- that's interesting, because the same thing happened to me with the same FIFO at a certain point (on an internal version of the platform). You actually made me remember the fix was never backported here, even if it is present in the multi-core pulp. The fix is not related to the test or the hwpe-stream, but to the optimization of parameters. It is there also in QuestaSim.

For reference, here is the explanation (I will commit the fix now to pulpissimo):

This commit fixes the incorrect optimization of some modules.
HWPEs appearsnot to work because several parameters in
submodules are not bound correctly (the default value is used instead).
This causes subtle problems in simulation. Moreover, it appears the
vopted version is not actually being used.

The fix follows what is done in OPENPULP by using vopt on the entire
design (including the testbench), but leaving the parameters in the
top-level tb floating.

Thanks 🥇👍

Regarding your second question: I am not sure that we ever have the "bandwidth" to do a proper porting to Verilator, and keep it working, but if you want I think you can open a Verilator-related issue in PULPissimo and post a few of the errors you are getting. This should at least significantly reduce the pain, and you can also contribute fixes back so that we can start integrating them.

from pulpissimo.

FrancescoConti avatar FrancescoConti commented on August 23, 2024

@boehmerst I have to correct myself: the fix is already in PULPissimo, but by using the "hack" above to get PULPissimo to work in Altera ModelSim, the parameters are not propagated correctly (essentially the same that happened before -floatparameters was added in the other case I mentioned).

So I think for now the only thing to do is keep using the two dirty hacks you mentioned :(

from pulpissimo.

boehmerst avatar boehmerst commented on August 23, 2024

@FrancescoConti, Thanks for your feedback! Curious issue, in fact all modules (from the stream IP) I instantiated (just for debugging) at the same hierarchical level of the suspect FIFO showed the same incorrect behavior whereas a simple clock_divider from common_cells worked as expected.

I will keep on debugging the Verilator errors. For now most are straight forward (usually issues with blocking vs non-blocking assignments to the same variable when using structs). But there are a lot of those. This is a known Verilator limitation which is unlikely to be fixed soon. They are easy to work around, however there is a certain risk to break things and there are not many module level test benches. The hwme is the first IP I got "verilator clean" and I will port the accelerator example to a simple module test bench next. In case I get things up and running I will be happy to contribute back!

from pulpissimo.

lstrz avatar lstrz commented on August 23, 2024

My university does have a license for Questa/ModelSim. Indeed, the non-free version includes vopt. That has solved all my issues. Before @boehmerst's input, I did not know for sure whether the free version is supposed to include vopt. Thanks for input everyone!

Might not hurt to mention this in the readme.

from pulpissimo.

FrancescoConti avatar FrancescoConti commented on August 23, 2024

@lstrz I just made the README.md more precise on this point. Thansk for the input from all of you!

from pulpissimo.

Vaktor777 avatar Vaktor777 commented on August 23, 2024

Hi, @boehmerst , @FrancescoConti
could you show me your run.tcl file? I have some troubles to work around vopt flow optimization. How do you include libraries?
Thanks.

from pulpissimo.

boehmerst avatar boehmerst commented on August 23, 2024

Hi @Vaktor777,

sorry for replying late. Unfortunatelly I discontinued to work with pulpissimo. I simply included all the compiled libraries using the "-L libname" option. Also the name of the testbecnh (tb_pulp) need to be changed.

Hope this helps!

from pulpissimo.

Vaktor777 avatar Vaktor777 commented on August 23, 2024

Hi @boehmerst

Thanks for the reply, I did it, it works fine

from pulpissimo.

FrancescoConti avatar FrancescoConti commented on August 23, 2024

Hi @Vaktor777 , can you push the changes that you made to a branch/fork? I think it would be nice to merge them in.

from pulpissimo.

Vaktor777 avatar Vaktor777 commented on August 23, 2024

Hi @FrancescoConti , yes i can push commit with run.tcl, but plp_rtl_runner.py is from pulp-sdk.

from pulpissimo.

FrancescoConti avatar FrancescoConti commented on August 23, 2024

Just fork both projects and submit a Pull Request named "ModelSim for Altera" (assigned to me).

from pulpissimo.

Vaktor777 avatar Vaktor777 commented on August 23, 2024

@FrancescoConti
i cant assign to you, but i did pull requests to pulpissimo and runner repository named "ModelSim for Altera"

from pulpissimo.

Alessandro0110 avatar Alessandro0110 commented on August 23, 2024

Hello @lstrz your university has the Mentor version of Modelsim or the Altera version of Modelsim?

from pulpissimo.

lstrz avatar lstrz commented on August 23, 2024

The Mentor version.

from pulpissimo.

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.