-
Notifications
You must be signed in to change notification settings - Fork 263
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
Add support for Vivado XSIM #209
Comments
Any update on this? Any help needed? |
@flamebut57 This issue has been dormant awaiting more interest. Maybe we're seeing that now? There were also some tool issues the last time we made some prototyping:
We can surely use some help. Interested? Finding out if these two issues remains would be a starting point. |
I just tested both issues with Vivado 2013.1, 2016.2 and 2017.2.
|
@flamebut57 Is this true with all the tested versions? I can't remember what version I used to test user defined resolved types but 2013.1 should have been available at the time. What did your type look like? Was it based on |
Hi! Any updates to this issue? |
There is no active work to add support for xsim. There have been some preliminary tests which shows it lacks enough VHDL support of even 93 standard to accept the VUnit code. Also it has a very sluggish startup time which would hinder fast feedback when running multiple small tests. The first issue can be worked arround in VUnit at least but takes effort which I am currently not willing to spend. If anyone in the community wants to give it a go fine by me. |
I am not very experienced in Python, but I am in VHDL. I have some time and I would like to look into this to see if I can make it work with XSIM. Where should I start from? Is there a branch of previous attempts? |
@pedronevestopic I pushed a branch with a work in progress implementation of Python-level support. I do not know how well it works any more. The major blocker is the lack of VHDL support in particular user defined resolved types. Those limitations could be worked around though. |
@pedronevestopic Were you able to make any progress on making the VHDL work in XSIM? |
I apologize as I have been very busy in the last year. I did throw together
a template to use Vivado Simulator for both Verilog and VHDL. I was
attempting to run the instance of Vivado in a VM and I am unsure if I was
running into memory issues but if I remember correctly it just hung
forever.
To clarify I believe the VHDL test stated that there was an unsupported
feature ( it was a compile order issue where it stated one file changed
after another compiled this may have changed in newer versions I tested on
2015.4 and 2016.4), while the Verilog test just hung forever.
I would be happy to share these templates and test cases that I added if
they are of interest or use to the community.
Let me know if there is any interest.
Thanks,
…On Tue, Feb 13, 2018 at 11:00 AM, jklapel ***@***.***> wrote:
@pedronevestopic <https://github.com/pedronevestopic> Were you able to
make any progress on making the VHDL work in XSIM?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#209 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AM4_JHx1VF6YLxy6zRws-9ijp9-PR_3Pks5tUdvHgaJpZM4K066i>
.
|
I am interested in xsim support, although from a purely (system)verilog perspective. Would 1f91ea0 be a good starting point should I have some spare time over? |
I’m sorry. I couldn’t do anything . I got a problem on my back and going to need a surgery. I haven’t been able to sit on a computer. If no one has spend any time when I’m recovered in some months , I’ll pick it up. |
@PetterssonMagnus The xsim branch contains a work in progress that you can experiment with |
@PetterssonMagnus I was able to take the xsim branch and get it working for VHDL testbenches at a very basic level with only a day or so of tinkering with it. Getting Verilog to work with xsim shouldn't be too much different I don't believe, though I haven't tried it. I ran into bigger issues with the custom resolved types in VHDL. (Take a look at the conversation I had with kraigher on February 13th on the Gitter chat.) I don't know how the Verilog side of VUnit works, but my understanding is that Xilinx doesn't have a lot of support SystemVerilog. |
Ok, I have been able to successfully get the example user_guide through xvlog thus creating libraries vunit_lib and lib. Subsequently xelab seems to lock up, neither finish executing nor providing me with any error messages.
... and then the fun ends ... id est nothing more happens. |
@PetterssonMagnus What happens if you setup the project from within XSIM? Does it fail? Does it give you more info? If not, I would start doing some divide an conquer |
Eventually I got verilog examples "uart" and "user_guide" to work in non-gui mode. Have not verified, but I doubt xsim supports verilog-ams. Created a fork: https://github.com/PetterssonMagnus/vunit/tree/xsim . |
@jklapel @kraigher @PetterssonMagnus I have pushed a VUnit version without custom types to a new branch. I'm keeping it on a branch because I need someone to test if Incisive still works. The |
@jklapel @kraigher @PetterssonMagnus I've merged the aforementioned branch to master now such that it doesn't use any custom resolved types. |
Hi, I rebased the xsim support on master and tested the SystemVerilog examples. I had to modify the code a bit to make it work on Linux. |
I'll test this. I think it's about time we get this going so any help is appreciated. @PetterssonMagnus Do you have any comments on the status of your work? |
Hm, this was a while ago. |
Hi! Is there any progress on this? What's the best way to test out what y'all have or help out? Still new to GitHub, but good at python / vhdl. Looks to my untrained eye that @haggaie and @PetterssonMagnus 's branches are identical, but both may have fallen somewhat behind the master. Is that accurate? Any thoughts on what needs to be done to get vhdl compiling? |
@ro-ca, I rebased their branch on top of master, so you can try it: https://github.com/1138-4EB/vunit/tree/petterssonmagnus-xsim |
@qarlosalberto what version of vivado does it require? When I run 2020.2 the verilog tests in verbose mode but the summary does not report any failed tests. Do I need any specific settings beside xport VUNIT_XSIM_PATH=<...>/Vivado/2020.2/bin/ ? |
Sorry, I haven't test it with Verilog. Only with VHDL. |
I am having problems with the mif files. When I run vunit/xsim it doesn't find the Memory Initialization Files of the external IPs. |
@qarlosalberto , I've created a pull request to your fork, adding an xelab_flags simulation option for xsim. I realize that the fork is a year behind, so I could make the effort to bring it up-to-date if anyone would benefit from it :) |
Cool, thanks! I'm working with an internal branch, I need to merge my changes and later I could add the xelab_flags. It would nice to bring it up-to-date the branch, I know some developers use it a lot. |
I have updated the branch, it includes:
And |
Thanks for merging, @qarlosalberto :) I've attempted to bring xsim_support up-to-date with vunit, pr here. It works with my tests, which are only using xsim and SystemVerilog. Do you have a chance to try it with your use cases? |
@LudvigVidlid @qarlosalberto Do you have a list of missing VHDL support in latest XSIM (2022.1). Have there been any relevant improvements? I have a person within Xilinx that I hope can bring our issues to the right people so I'd like current status from those having some experiences in this area. |
I've been working on getting 2022.1 working. Adding to qarlosalberto's work, I've been able to get the com library going as well as the axi stream modules. Generally it's been a process of swapping the linked lists in com to fixed size arrays. Ugly but works. If you want to take a look, my fork is here: |
I have created a fork from the master branch here: https://github.com/antho24/vunit I have pull in changes from qarlosalberto and kmtaylor latest work and merged with the master branch on VUnit/vunit. I also added support for running sim with verilog/systemverilog testbenches, including UVM (I have mainly tested with UVM testbench on Windows platform). Outstanding issue for my fork is all related to VHDL testbench. I couldn't run a successful VHDL testbench yet due to xsim elaboration failure on this specific error: [VRFC 10-932] initial value for constant declaration is not constant. Seem related to using impure function to set value for constant. Another problem is with using multiple generic value. I couldn't get subprocess to correctly parse testbench that have multiple generic parameters being set. If someone can help me fix that, it would be much appreciated. |
@antho24 I think that I know your problem with the generics. I have solved it creating a SV testbench wrapper. |
Hi @antho24 - I had that error (initial value for constant declaration is not constant) a lot. It appears to be a bug in xsim. In many cases I could fix it by swapping constants for integer literals like this: I also noticed on your branch that you've altered builins.py to use the full libraries. I'm afraid you won't have much luck with this, as 2022.1 is still missing many features and is quite buggy. |
@antho24 I think we had a similar problem with another simulator. We solved it by making a deferred constant (i.e. declaring the constant in the package header, and defining it in the package body). I'm not sure if that is applicable to your case? |
@antho24 This sounds familiar as well. We had issues getting xsim to work on command line on windows, and now do it differently between linux and windows. Maybe this would work for you? |
Vivado 2022.2 claim VHDL 2008 support in the release notes. Have anyone tested if that makes a difference? |
Unfortunately no, if I try and run vanilla vunit first thing I hit is: |
@kmtaylor In this case the constant is initialized by a function call and there is a rather long chain of things happening behind the scene. Do you have any idea about what it is in that function it dislikes? Or is it the fact that it is a function rather than a value or a simple expression? Or maybe it is because it is an impure function. Can it handle |
FTR:
|
@LarsAsplund I think it's really just broken, I work around it by using an integer literal in the initialisation function: |
Thanks for the link to the supported features list @umarcor, however I think there is a bit of disconnect between what Xilinx says is working, and what is really working. For example they say that protected types work in xsim, however I need to use a very ugly workaround here: |
Update to previous message: I made that workaround for Vivado 2022.1. I tried reverting that commit: |
@kmtaylor, there is an absolute disconnect (not a bit). Last time I checked, Xilinx would have issues with VHDL 1993 features, which are critical for VUnit to work. They can claim to support whatever they want, but they should prove it (there are plenty of public and open source tests that they can use). Meanwhile, it's marketing noise. With regard to VHDL 2008 features, it will be 2023 in a couple of weeks. They are still using My perception is that SV/UVM support is similar. Otherwise, I would expect Vivado to be listed in https://chipsalliance.github.io/sv-tests-results/. Nevertheless, Xilinx is not a software company. They traditionally recommended third-party tools for synthesis and simulation. That's why they've always had good integration with e.g. Mentor's synth and sim tools. The companies that take simulation and synthesis seriously do have decent VHDL (and SV) support. What Xilinx Overall, VHDL and SV are advanced and complex verification and hardware description languages. They are significantly more difficult to support than Verilog 2005. It's not something that can be done without a non-negligible budget. It needs to be in the priorities of the company. The priorities of Xilinx are legitimally somewhere else. Honestly, I believe we'd be better try get Xilinx to allow open source tools (GHDL, Verilator, Icarus Verilog, etc.) to use encrypted simulation models. It might sound crazy, because it might effectively invalidate the purpose of the encryption. Then, maybe the focus should be on them making the simulation models not encrypted. I find that more plausible in the next decade than them having acceptable VHDL support. Still, I do find very enriching that for 6 years, lots of users did not stop trying each new release of ISE/Vivado/XSIM and seeking workarounds. That's what open source is about. Should XSIM be open source, probably many of the features would be properly supported already. |
The 2022.2 release notes claim to add 08 support to the simulator, has anyone taken a look yet? https://www.xilinx.com/products/design-tools/vivado/vivado-whats-new.html |
Hi guys, did someone try with the latest version Vivado 2023.2 to simulate stuff? |
@nselvara No, there has been no efforts on this (that I'm aware of). Please give it a try and let us know if you managed to get something going. |
@LarsAsplund, ok I'll give it a shot in my free time and report back. |
I've been using 2023.2 for a few weeks now. Seems to be working fine for my purposes. 2023.1 had broken VCD export, so was unusable for me. So far I've not noticed any differences between 2022.2 and 2023.2. |
@kmtaylor, did you have to do any modifications and/or specify xsim path in order to work? |
Yep, I started with softwareradiosystems' branch above, and have since added workarounds to get the verification components to work. Since not everything is working, you need to make small changes to the test benches. You can get an idea of what works by running the axi_dma example. You'll first have to apply the attached patch, and then run:
My branch is here: |
@kmtaylor, thank you for your reply. I'll try to work from the |
We have started to do some work but we didn't have an issue for it so I'm creating one.
The text was updated successfully, but these errors were encountered: