diff options
| author | Fuwn <[email protected]> | 2026-02-24 19:55:11 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-24 19:55:11 -0800 |
| commit | 871c6eae5ffda0ada6b1798209cb784c20afea06 (patch) | |
| tree | a24590b45440f62c67c0aa9aadf408a3bb207659 /homework_2/SRC/item.sv | |
| parent | feat(midterm): Add implementation (diff) | |
| download | cst456-871c6eae5ffda0ada6b1798209cb784c20afea06.tar.xz cst456-871c6eae5ffda0ada6b1798209cb784c20afea06.zip | |
feat(homework_2): Add initial files
Diffstat (limited to 'homework_2/SRC/item.sv')
| -rw-r--r-- | homework_2/SRC/item.sv | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/homework_2/SRC/item.sv b/homework_2/SRC/item.sv new file mode 100644 index 0000000..5decdca --- /dev/null +++ b/homework_2/SRC/item.sv @@ -0,0 +1,15 @@ +class Item extends uvm_sequence_item;
+ `uvm_object_utils(Item)
+ rand bit in;
+ bit out;
+
+ virtual function string convert2str();
+ return $sformatf("in=%0d, out=%0d", in, out);
+ endfunction
+
+ function new(string name = "Item");
+ super.new(name);
+ endfunction
+
+ constraint c1 { in dist {0:/20, 1:/80}; }
+endclass
\ No newline at end of file |