-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathframe_driver_out.sv
39 lines (33 loc) · 1 KB
/
frame_driver_out.sv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
typedef virtual ycbcr_if ycbcr_vif;
class frame_driver_out extends uvm_driver #(frame_ycbcr_tr);
`uvm_component_utils(frame_driver_out)
ycbcr_vif vif;
function new(string name = "frame_driver_out", uvm_component parent = null);
super.new(name, parent);
endfunction
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
assert(uvm_config_db#(ycbcr_vif)::get(this, "", "vif", vif));
endfunction
virtual task run_phase(uvm_phase phase);
super.run_phase(phase);
fork
reset_signals();
drive(phase);
join
endtask
virtual protected task reset_signals();
wait (vif.rst === 1);
forever begin
vif.Y <= 'x;
vif.Cb <= 'x;
vif.Cr <= 'x;
@(posedge vif.rst);
end
endtask
virtual protected task drive(uvm_phase phase);
wait(vif.rst === 1);
@(negedge vif.rst);
@(posedge vif.clk);
endtask
endclass