Giter VIP home page Giter VIP logo

Comments (10)

cmarqu avatar cmarqu commented on July 23, 2024

Pinging @julian-becker who added the VUnit support.

from edalize.

julian-becker avatar julian-becker commented on July 23, 2024

When I did the original implementation, I was developing against vunit 4.2.0. Since then, it seems there have been some subtle changes to this API. The changes in #88 should fix this, but unfortunately break compatibility for vunit 4.2.0...

from edalize.

olofk avatar olofk commented on July 23, 2024

@kraigher @LarsAsplund Do you have any comments on this? Did the API change in a backwards-incompatible way or is there a way to support both older and newer VUnit?

from edalize.

kraigher avatar kraigher commented on July 23, 2024

The Public API has always been str. Internally we switched to an object to get a better implementation of some rules based on the standard. In 4.2.0 there was a bug where the Public API accepted the VHDLStandard object which it should not have. In 4.3.0 we fixed this http://vunit.github.io/release_notes.html

So in summay VHDLStandard is a private class that should thus never appear on the public api

from edalize.

olofk avatar olofk commented on July 23, 2024

Cool. Thanks @kraigher for clearing that up. @krishnan-gopal, @julian-becker is there anything we can do in the Edalize backend to use the public API instead? I haven't had time to look at the implementation myself unfortunately

from edalize.

olofk avatar olofk commented on July 23, 2024

Or is #88 the correct fix that will work on all versions except for 4.2.0?

from edalize.

kraigher avatar kraigher commented on July 23, 2024

Well 4.2.0 could be considered broken so maybe you do not need to support it. Also I would recommend always using the public api since that is the only thing we care about being stable.

from edalize.

julian-becker avatar julian-becker commented on July 23, 2024

Thanks @kraigher, for the additional support on this issue!
My observation is that on both vunit_hdl 4.2.0 and 4.1.0, I get the following error when using the vhdl_standard argument as string:

Compiling into lib:       ..\src\vunit_examples-vhdl_run_0\test_control.vhd                                                   Traceback (most 
recent call last):
File "c:\progs\python37\lib\site-packages\vunit\ui.py", line 838, in main
    all_ok = self._main(post_run)
File "c:\progs\python37\lib\site-packages\vunit\ui.py", line 880, in _main
    return self._main_compile_only()
File "c:\progs\python37\lib\site-packages\vunit\ui.py", line 1012, in _main_compile_only
    self._compile(simulator_if)
File "c:\progs\python37\lib\site-packages\vunit\ui.py", line 1044, in _compile
    printer=self._printer)
File "c:\progs\python37\lib\site-packages\vunit\simulator_interface.py", line 172, in compile_project
    self.compile_source_files(project, printer, continue_on_error)
File "c:\progs\python37\lib\site-packages\vunit\simulator_interface.py", line 244, in compile_source_files
    if self.__compile_source_file(source_file, printer):
File "c:\progs\python37\lib\site-packages\vunit\simulator_interface.py", line 189, in __compile_source_file
    command = self.compile_source_file_command(source_file)
File "c:\progs\python37\lib\site-packages\vunit\modelsim_interface.py", line 138, in compile_source_file_command
    return self.compile_vhdl_file_command(source_file)
File "c:\progs\python37\lib\site-packages\vunit\modelsim_interface.py", line 162, in compile_vhdl_file_command
    + [self._std_str(source_file.get_vhdl_standard()), '-work', source_file.library.name, source_file.name])
File "c:\progs\python37\lib\site-packages\vunit\modelsim_interface.py", line 151, in _std_str
    if vhdl_standard <= VHDL.STD_2008:
File "c:\progs\python37\lib\functools.py", line 105, in _ge_from_lt
    op_result = self.__lt__(other)
File "c:\progs\python37\lib\site-packages\vunit\vhdl_standard.py", line 39, in __lt__
    return int(self._standard) < int(other._standard)  # pylint: disable=protected-access
AttributeError: 'str' object has no attribute '_standard'
ERROR: Failed to build vunit:examples-vhdl:run:0 : 'c:\progs\python37\python.exe' exited with an error code

With 4.3.0, 4.0.0 and 3.9.0, the string version works just fine, and I think we should probably stick with it as it is the proper API usage and since - as you said - 4.2 could be considered broken in this respect.

from edalize.

olofk avatar olofk commented on July 23, 2024

I decided to pull in #88 by @julian-becker which hopefully should fix this issue. @krishnan-gopal can you confirm this works for you and close the issue if it does?

from edalize.

krishnan-gopal avatar krishnan-gopal commented on July 23, 2024

Ok, i just tested this now and it works. Thanks a lot.

from edalize.

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.