summaryrefslogtreecommitdiff
path: root/homework_2/SRC/item.sv
blob: 655d0b5976afa27c4427e793a73137036339b17a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class Item extends uvm_sequence_item;
  `uvm_object_utils(Item)
  rand bit inp;
  bit      outp;

  virtual function string convert2str();
    return $sformatf("inp=%0d, outp=%0d", inp, outp);
  endfunction

  function new(string name = "Item");
    super.new(name);
  endfunction

  constraint c1 {
    inp dist {
      0 :/ 50,
      1 :/ 50
    };
  }
endclass