URL
https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk
Subversion Repositories qaz_libs
Compare Revisions
- This comparison shows the changes necessary to convert path
/qaz_libs/trunk/BFM/src/axis_video_frame
- from Rev 47 to Rev 45
- ↔ Reverse comparison
Rev 47 → Rev 45
/avf_config.svh
29,7 → 29,12
|
virtual axis_if #(.N(N), .U(U)) vif; |
protected uvm_active_passive_enum is_active; // UVM_ACTIVE or UVM_PASSIVE |
video_frame_config c_h; |
int pixels_per_line; |
int lines_per_frame; |
int bits_per_pixel; |
int bytes_per_pixel; |
int pixels_per_clk; |
string name; |
|
// -------------------------------------------------------------------- |
function void init |
38,12 → 43,16
, int bits_per_pixel |
, string name = "" |
); |
c_h = new(); |
c_h.init( .pixels_per_line(pixels_per_line) |
, .lines_per_frame(lines_per_frame) |
, .bits_per_pixel(bits_per_pixel) |
, .bus_width(N) |
); |
this.pixels_per_line = pixels_per_line; |
this.lines_per_frame = lines_per_frame; |
this.bits_per_pixel = bits_per_pixel; |
this.name = name; |
this.bytes_per_pixel = (bits_per_pixel % 8 == 0) |
? (bits_per_pixel / 8) |
: (bits_per_pixel / 8) + 1; |
assert(N % bytes_per_pixel == 0) else |
`uvm_fatal("avf_config", "N % bytes_per_pixel != 0") |
this.pixels_per_clk = N / bytes_per_pixel; |
endfunction: init |
|
// -------------------------------------------------------------------- |
/avf_master_agent.svh
55,7 → 55,7
driver_h.seq_item_port.connect(sequencer_h.seq_item_export); |
end |
monitor_h.vif = cfg_h.vif; |
monitor_h.c_h = cfg_h.c_h; |
monitor_h.cfg_h = cfg_h; |
endfunction |
|
// -------------------------------------------------------------------- |
/avf_monitor.svh
29,7 → 29,7
`uvm_component_param_utils(avf_monitor #(N, U)); |
|
virtual axis_if #(.N(N), .U(U)) vif; |
video_frame_config c_h; |
avf_config #(N, U) cfg_h; |
uvm_analysis_port #(avf_sequence_item) ap; |
uvm_analysis_port #(avf_sequence_item) req; |
|
68,11 → 68,11
ap_item = avf_sequence_item::type_id::create("ap_item"); |
ap_item.kind = AVF_TRANSACTION; |
ap_item.f_h = new(); |
ap_item.f_h.init( c_h.pixels_per_line |
, c_h.lines_per_frame |
, c_h.bits_per_pixel |
, c_h.pixels_per_clk |
, c_h.name |
ap_item.f_h.init( cfg_h.pixels_per_line |
, cfg_h.lines_per_frame |
, cfg_h.bits_per_pixel |
, cfg_h.pixels_per_clk |
, cfg_h.name |
); |
sof_received = 1; |
p = 0; |
/avf_slave_agent.svh
56,7 → 56,7
monitor_h.req.connect(sequencer_h.m_request_export); |
end |
monitor_h.vif = cfg_h.vif; |
monitor_h.c_h = cfg_h.c_h; |
monitor_h.cfg_h = cfg_h; |
endfunction |
|
// -------------------------------------------------------------------- |
/s_avf_api.svh
30,22 → 30,37
`uvm_object_utils(s_avf_api) |
|
avf_sequence_item item; |
|
// -------------------------------------------------------------------- |
mailbox #(video_frame_class) frame_buffer; |
int pixels_per_line; |
int lines_per_frame; |
int bits_per_pixel; |
int bytes_per_pixel; |
int pixels_per_clk; |
|
// -------------------------------------------------------------------- |
video_frame_config c_h; |
|
function void init(video_frame_config c_h); |
this.c_h = c_h; |
function void init( int pixels_per_line |
, int lines_per_frame |
, int bits_per_pixel |
, int pixels_per_clk |
); |
this.pixels_per_line = pixels_per_line; |
this.lines_per_frame = lines_per_frame; |
this.bits_per_pixel = bits_per_pixel; |
this.bytes_per_pixel = (bits_per_pixel % 8 == 0) |
? (bits_per_pixel / 8) |
: (bits_per_pixel / 8) + 1; |
this.pixels_per_clk = pixels_per_clk; |
endfunction : init |
|
// -------------------------------------------------------------------- |
task automatic put_frame(string pattern, int pixel = 0); |
video_frame_class f_h = new; |
f_h.init( c_h.pixels_per_line |
, c_h.lines_per_frame |
, c_h.bits_per_pixel |
, c_h.pixels_per_clk |
f_h.init( pixels_per_line |
, lines_per_frame |
, bits_per_pixel |
, pixels_per_clk |
); |
case(pattern.tolower) |
"constant": f_h.make_constant(pixel); |
/s_avf_base.svh
32,9 → 32,17
s_avf_api avf_api_h; |
|
// -------------------------------------------------------------------- |
function void init(video_frame_config c_h); |
function void init( int pixels_per_line |
, int lines_per_frame |
, int bits_per_pixel |
, int pixels_per_clk |
); |
avf_api_h = s_avf_api::type_id::create("s_avf_api"); |
avf_api_h.init(c_h); |
avf_api_h.init( pixels_per_line |
, lines_per_frame |
, bits_per_pixel |
, pixels_per_clk |
); |
endfunction : init |
|
// -------------------------------------------------------------------- |