tpoikela / uvm-python

UVM 1.2 port to Python
Apache License 2.0
243 stars 46 forks source link

Fix for Issue #32 #33

Closed sjalloq closed 3 years ago

sjalloq commented 3 years ago
sjalloq commented 3 years ago

This is my initial attempt at fixing this bug. Need some feedback on how byte_en should be treated before merging this.

tpoikela commented 3 years ago

This looks like a copy-paste error from the return [...] of Xget_bus_infoX( ). Thanks for the fix!

tpoikela commented 3 years ago

I think further development could be to add this as a static function in class sv. Something along lines:

class sv:
...
  def get_vector_of_ones(cls, width):
    return int(''.join(['1' for bit in range(width)]),2)
sjalloq commented 3 years ago

Hi, agree that moving that not very intuitive snippet into the sv class is a good idea.