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

Release cocotb 1.4.0 #1942

Closed
5 tasks done
imphil opened this issue Jun 23, 2020 · 21 comments
Closed
5 tasks done

Release cocotb 1.4.0 #1942

imphil opened this issue Jun 23, 2020 · 21 comments
Assignees
Milestone

Comments

@imphil
Copy link
Member

imphil commented Jun 23, 2020

Milestone: https://github.com/cocotb/cocotb/milestone/11

Release process checklist:

  • Close all issues blocking the milestone
  • Prepare release announcement email
  • Tag a release
  • Test release build on PyPi
  • Send out announcement to mailing list
@imphil imphil added this to the 1.4 milestone Jun 23, 2020
@imphil imphil self-assigned this Jun 23, 2020
@cmarqu
Copy link
Contributor

cmarqu commented Jun 23, 2020

As a reminder, you once created https://github.com/cocotb/cocotb/wiki/Release-Process :)

@ktbarrett
Copy link
Member

ktbarrett commented Jun 23, 2020

Task list for myself related to this

  • Test with Questa 10.5a (earliest version that runs on RHEL7)
  • Test with Questa 10.7c
  • Test with Questa 2019.2 (has had issues recently)
  • Test with Questa 2020.1 (has had issues recently)
  • Compare GHDL results between 1.3 and 1.4rc1 for additional regressions
  • Check tarball
    • packaged examples run
    • essential non-runnable files exist

Results

Looks like GHDL did regress between 1.3.1 and 1.4. I will look into it more later.
Running the packaged examples works with Icarus, Questa, GHDL (almost, the mean example is broken), Verilator (almost, dff example hangs, mean example won't compile).

@elgorwi
Copy link
Contributor

elgorwi commented Jun 24, 2020

Task list for myself related to this

* [x]  Test with Questa 10.5a (earliest version that runs on RHEL7)

* [x]  Test with Questa 10.7c

* [x]  Test with Questa 2019.2 (has had issues recently)

* [x]  Test with Questa 2020.1 (has had issues recently)

* [x]  Compare GHDL results between 1.3 and 1.4rc1 for additional regressions

* [x]  Check tarball
  
  * packaged examples run
  * essential non-runnable files exist

Results

Looks like GHDL did regress between 1.3.1 and 1.4. I will look into it more later.
Running the packaged examples works with Icarus, Questa, GHDL (almost, the mean example is broken), Verilator (almost, dff example hangs, mean example won't compile).

Running the DFF example with Verilator is very slow (48s on my system). Changing the clock frequency from us to ns or alternatively changing the time precision to ns in dff.v will speed this up considerably.
Running the mean example with Verilator is only matter of merging #1901.
Support for arrays is required (ghdl/ghdl#1249) to run the mean example with GHDL.

@eric-wieser
Copy link
Member

I note that the PyPI build of 1.4.0 does not contain a wheel. I assume this is a deliberate choice?

@ktbarrett
Copy link
Member

ktbarrett commented Jun 24, 2020

@elgorwi The failure for the mean example with GHDL I'm seeing isn't related to arrays sim.log.

@eric-wieser
Copy link
Member

Looks like it's about support for accessing parameters?

AttributeError: mean contains no object named DATA_WIDTH

@ktbarrett
Copy link
Member

AFAIK GHDL doesn't have issues accessing constants that aren't complex records or arrays.

@mciepluc
Copy link
Contributor

Great work guys, I tested quite advanced stuff (+cocotb-test and GUI mode ):

  • tested with Questa 2020.2
  • tested with Xcelium 19.09.10
  • tested with Icarus (bare installation from sources)

@marlonjames
Copy link
Contributor

@ktbarrett Accessing constants in GHDL wasn't added until ghdl/ghdl#1297, which isn't in any released version.

@ktbarrett
Copy link
Member

It would be awful nice to start tracking the limitations of all these simulators and what's missing for full support.

@ktbarrett
Copy link
Member

@garmin-mjames So I updated my ghdl install and still no luck, it fails for the same reasons.

@marlonjames
Copy link
Contributor

@ktbarrett can you run GHDL with --vpi-trace? That should give some better information.

@cmarqu
Copy link
Contributor

cmarqu commented Jun 25, 2020

@ktbarrett can you run GHDL with --vpi-trace? That should give some better information.

Maybe also use --trace-signals as in
#875 (comment)

@ktbarrett
Copy link
Member

> ghdl --version
GHDL 1.0-dev (v0.37.0-769-g18a71a43) [Dunoon edition]
 Compiled with GNAT Version: 9.3.0
 mcode code generator
Written by Tristan Gingold.

Copyright (C) 2003 - 2020 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> env SIM_ARGS="--trace-signals --vpi-trace" make SIM=ghdl TOPLEVEL_LANG=vhdl
...

sim.log

@marlonjames
Copy link
Contributor

@ktbarrett
Line 63 in the log calls vpi_free_object on the DATA_WIDTH handle. BUS_WIDTH is not freed. Running with COCOTB_LOG_LEVEL=DEBUG should give more relevant log messages from GPI code.

@ktbarrett
Copy link
Member

ktbarrett commented Jun 30, 2020

@garmin-mjames Nice catch. With COCOTB_LOG_LEVEL=DEBUG.

The relevant bit:

     0.00ns DEBUG    cocotb.gpi                                GpiCommon.cpp:301  in __gpi_get_handle_by_name        Searching for DATA_WIDTH
 vpi_get_time (0000000000000000, {mtype=vpiSimTime}) = 0ms
     0.00ns DEBUG    cocotb.gpi                                GpiCommon.cpp:312  in __gpi_get_handle_by_name        Checking if DATA_WIDTH is native through implementation VPI
 vpi_handle_by_name ("mean.DATA_WIDTH", 0000000000000000) = 0000557BA17CC850
 vpi_get (vpiType, 0000557BA17CC850) = 7
 vpi_get (vpiType, 0000557BA17CC850) = 7
 vpi_get_str (vpiType, 0000557BA17CC850) = "???"
 vpi_get_time (0000000000000000, {mtype=vpiSimTime}) = 0ms
     0.00ns DEBUG    cocotb.gpi                                  VpiImpl.cpp:235  in create_gpi_obj_from_handle      VPI: Not able to map type ???(7) to object.
 vpi_free_object (0000557BA17CC850)
 vpi_get_time (0000000000000000, {mtype=vpiSimTime}) = 0ms
     0.00ns DEBUG    cocotb.gpi                                  VpiImpl.cpp:307  in native_check_create             Unable to fetch object mean.DATA_WIDTH
 vpi_get_time (0000000000000000, {mtype=vpiSimTime}) = 0ms
     0.00ns DEBUG    cocotb.gpi                                GpiCommon.cpp:371  in gpi_get_handle_by_name          Failed to find a handle named DATA_WIDTH via any registered implementation

VPI type 7 is vpiConstant ("numerical constant or literal string"). Seemingly, you are then supposed to obtain the type of the constant by another call: vpi_get(vpiConstType, handle). So this is our bug.

@marlonjames
Copy link
Contributor

marlonjames commented Jun 30, 2020

Interesting that BUS_WIDTH is vpiParameter but DATA_WIDTH is vpiConstant.

Edit: Nevermind, I was looking at the SystemVerilog file. GHDL uses VPI to access the VHDL design.

@ktbarrett
Copy link
Member

It might have to do with DATA_WIDTH being constant folded and being stored in another part of the binary and accessed in another way. No one may have checked for consistency. I'll bring it up, but I have a PR. I'm not sure if it belongs in 1.4 or not since we are in rc.

@marlonjames
Copy link
Contributor

Tested with Active-HDL.

Active-HDL 11.1

Verilog failures:

test_array.test_discover_all - needs expected count specified

These tests are marked as expect fail or skip for Riviera, probably for the same underlying reasons:
test_discovery.access_integer
test_discovery.access_const_string_verilog

VHDL failures:

issue_1279.test_sim_failure_a - same as #1859
test_array.test_discover_all - needs expected count specified
test_timing_triggers.test_readwrite_in_readonly - passes but test expects error (Riviera does this as well, see #1877)
several tests in test_endian_swapper - (#1498 fixes these)
example dff test - same as #1880

Active-HDL 10.1

Various tests fail beyond those listed above. Many verilog tests crash due to #1834.

@imphil
Copy link
Member Author

imphil commented Jul 7, 2020

Thanks all for your testing. We do not have any more issues blocking the 1.4 milestone. I therefore just created the 1.4rc2 tag. If nothing blocking comes up by tomorrow I intend to release this version without further changes as 1.4.0 final.

@imphil
Copy link
Member Author

imphil commented Jul 8, 2020

The release is now done and master is open for feature development again. Thanks everyone!

@imphil imphil closed this as completed Jul 8, 2020
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

7 participants