Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 27 16:32

    marlonjames on new-ci-badge

    (compare)

  • May 27 15:14

    marlonjames on master

    Update CI badge on README (#299… (compare)

  • May 27 15:14
    marlonjames closed #2991
  • May 26 21:16
    codecov[bot] commented #2991
  • May 26 21:01
    codecov[bot] commented #2991
  • May 26 20:54
    codecov[bot] commented #2991
  • May 26 20:48
    codecov[bot] commented #2991
  • May 26 20:29
    marlonjames review_requested #2991
  • May 26 20:25
    marlonjames opened #2991
  • May 26 20:25
    marlonjames labeled #2991
  • May 26 20:24

    marlonjames on new-ci-badge

    Update CI badge on README (compare)

  • May 24 13:30
    brunbruns opened #2990
  • May 24 12:47
    imphil review_requested #2988
  • May 24 12:46

    imphil on master

    Cleanup: Keep the lines at arou… Ensure editable installs are al… Update codecov expectations Wi… (compare)

  • May 24 12:46
    imphil closed #2989
  • May 24 08:12
    codecov[bot] commented #2989
  • May 24 07:56
    codecov[bot] commented #2989
  • May 24 07:48
    codecov[bot] commented #2989
  • May 24 07:41
    codecov[bot] commented #2989
  • May 24 07:19
    imphil synchronize #2989
Marlon James
@marlonjames
dut.bdiepkg._id('\zz_b2s_cmi0_bnd_rd_cpl_dbi_s2b', extended=False)
cocotb attempts to build a tree of objects based on the hierarchy, accessible with the . syntax in Python, but it has issues with unusual but valid names
vivekkrajan
@vivekkrajan
Here is the log now
200.00ns ERROR cocotb.regression regression.py:399 in _score_test Test Failed: my_test (result was AttributeError) Traceback (most recent call last): File "/nfs/pdx/disks/mtl_integ_fcl_01/vkrajan/ZILER_PROJECT_GIT_REPO/CocoTB/test.py", line 35, in my_test dut.bdiepkg._id('\zz_b2s_cmi0_bnd_rd_cpl_dbi_s2b', extended=False) File "/nfs/pdx/disks/mtl_integ_fcl_01/vkrajan/fdio_cocotb/cocotb-install/lib/python3.7/site-packages/cocotb/handle.py", line 358, in _id raise AttributeError("%s contains no object named %s" % (self._name, name)) AttributeError: bdiepkg contains no object named \zz_b2s_cmi0_bnd_rd_cpl_dbi_s2b 200.00ns ERROR cocotb.regression regression.py:485 in _log_test_summary Failed 1 out of 1 tests (0 skipped)
Marlon James
@marlonjames
Hmm, it's hard to say what the problem is without more logging
vivekkrajan
@vivekkrajan
something magic happened
this seemed to work
dut.bdiepkg._id('\zz_b2s_cmi0_bnd_rd_cpl_dbi_s2b[4]', extended=False)
Now how do I get the value for this signal?
Is that something that I can assign to a variable and print ?
what I wanted was to log
Like this prints the value
dut._log.info("dut.bdiepkg.zz_gpsb_payload_s2b is %s", dut.bdiepkg.zz_gpsb_payload_s2b.value)
how can I do the same with _id ?
Marlon James
@marlonjames
Yeah you can assign to a variable, that would be a handle. Use .value to get the current value
So the [4] was part of the signal name
vivekkrajan
@vivekkrajan
Yes [4] is part of signal name
Thank you so, so much
I think it is working now
Cool!
foo = dut.bdiepkg._id('\zz_b2s_cmi0_bnd_rd_cpl_dbi_s2b[4]', extended=False)
dut._log.info("Foo value is %s", foo.value)
That is how it is working now!
Thanks again
Marlon James
@marlonjames
Glad it is working. handling name edge cases is still a bit rough
Ray Salemi
@raysalemi
I have an embarrassing question. How do you create a one-on-one conversation in Gitter? I cannot find a button for that.
4 replies
Philipp Wagner
@imphil
Some days seem to be crazy. Or it's me? https://github.com/cocotb/cocotb/runs/6476625378?check_suite_focus=true has the strangest collection of regression failures I've seen in a while.
3 replies
brunbruns
@brunbruns
Hi I'm using cocotb.binary today, I've noticed that : if the value of a BinaryValue is set to 0 the binstr is empty
I want to use this class to concatenate 2 vector on a single input for complex number , in my case this is a major issue, I want to patch this but I don't really know if it is a bug. It seem too obvious for beeing here unseen
jwprice100
@jwprice100
I don't ever jump into the depths of binary value but I get zero values from it all the time
brunbruns
@brunbruns
well I often use binstr since it's more natural in a lot of case to see the logic_vector
jwprice100
@jwprice100
I just treat it as an integers and use python to view it in other forms. That might be more effective
brunbruns
@brunbruns
Do you have native tools on python to manipulate binary? I don't know one it's why I use the cocotb class
maybe I'm the only one, which coul'd resolve why nobody ever patched this
jwprice100
@jwprice100
you can just use fstrings to print integers as hex/integer. For actual binary manipulation there's a library for it
bitstring is the library I've used for the couple of times where I wanted to do what I think you're describing
brunbruns
@brunbruns
I will look into it, thank you
yuqi
@yuqi-feng
module dut(
    input [7:0] data_in_data0,
    input [7:0] data_in_data1,
    output logic  [7:0] data_out_data0,
    output logic  [7:0] data_out_data1
);
always_comb begin
    data_out_data0=data_in_data1;
    data_out_data1=data_in_data0;
end
endmodule
class dataPkg(object):
    def __init__(self,data0,data1) -> None:
        self.data0=data0
        self.data1=data1

@cocotb.test()
async def testDemo(dut):
    dataIn=Bus(dut,"data_in",["data0","data1"])
    await Timer(1,'ms')
    dataIn.drive(dataPkg(5,6))
    await Timer(1,'ms')
The Bus.drive doesn't work ,are there some error? I test it in cocotb 1.6.2.
data_in_data0 is not assigned to 5 ,and the data_in_data1 is not assigned to 6 too
And are there some example about the bus used in Struct?
Martin Cejp
@mcejp
Hi, I've managed to hang cocotb+iverilog by accessing an array variable wrong (dut.my_variable.value[123], instead of my_variable[123].value)
Worth filing a bug, or is it a clear WONTFIX?
Philipp Wagner
@imphil
A hang is never nice. Please file an issue, let's at least try to give a helpful error message.
Jon Povey
@jonpovey
@imphil I noticed that the cocotb logo at https://www.fossi-foundation.org/projects could do with updating
Vijayvithal
@jahagirdar
Does the pytest assertion rewrite require some special Incantation? or will it work with a vanilla makefile based cocotb setup?
Marlon James
@marlonjames
As long as you have pytest installed in the same Python environment it should work
Vijayvithal
@jahagirdar
Thanks @marlonjames I had pytest installed but my MODULE was testbench instead of test_* which was creating the problem.
jwprice100
@jwprice100
Yeah my modules aren't usually named test_*. There is a way to force assertion rewriting on a module, might be nice to have cocotb do that for us?
Vijayvithal
@jahagirdar

Are there any user stories on integrating UVM VIP's(Eth, PCIe, DDR) from Big-3 in cocotb based verification Env?

Is it possible? Or would that be the time to shift to SV+UVM?