Skip to content

Commit

Permalink
packet_filter: Updates and fixes
Browse files Browse the repository at this point in the history
- Updated interconnect communication
- Updated the affected testbenches

Signed-off-by: Istvan-Zsolt Szekely <[email protected]>
  • Loading branch information
IstvanZsSzekely committed Sep 10, 2024
1 parent e5809d9 commit b0c86f6
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
4 changes: 0 additions & 4 deletions axis_sequencers/tests/test_program.sv
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ program test_program;
`TH.`DST_AXIS.inst.IF
);

#1step;

setLoggerVerbosity(250);

env.start();
Expand Down Expand Up @@ -123,8 +121,6 @@ program test_program;

env.src_axis_seq.start();

#1step;

case (`SRC_DESCRIPTORS)
1: //env.src_axis_seq.beat_sent();
env.src_axis_seq.packet_sent();
Expand Down
1 change: 0 additions & 1 deletion common/sv/m_axis_sequencer.sv
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ package m_axis_sequencer_pkg;
enabled = 0;
byte_count = 0;
->> disable_ev;
#1step;
endtask: stop

task run();
Expand Down
2 changes: 2 additions & 0 deletions common/sv/scoreboard.sv
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ package scoreboard_pkg;
packet[i] = source_byte;
end
this.source_monitor.put_key();
this.source_monitor.scoreboard_notified();

if (this.filter_enabled)
this.filter_tree_source.apply_filter(packet);
Expand Down Expand Up @@ -238,6 +239,7 @@ package scoreboard_pkg;
packet[i] = sink_byte;
end
this.sink_monitor.put_key();
this.sink_monitor.scoreboard_notified();

if (this.filter_enabled)
this.filter_tree_sink.apply_filter(packet);
Expand Down
14 changes: 10 additions & 4 deletions common/sv/scoreboard_pack.sv
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,16 @@ package scoreboard_pack_pkg;
end
end
end else begin
if ((this.source_byte_stream_size == 0) &&
(this.sink_byte_stream_size == 0)) begin
byte_streams_empty_sig = 1;
->>byte_streams_empty;
if (this.sink_byte_stream_size < this.channels*this.samples*this.width/8) begin
if (this.transfer_type == CYCLIC) begin
byte_streams_empty_sig = 1;
->>byte_streams_empty;
end else begin
if ((this.source_byte_stream_size == 0)) begin
byte_streams_empty_sig = 1;
->>byte_streams_empty;
end
end
end
fork begin
fork
Expand Down
3 changes: 1 addition & 2 deletions common/sv/watchdog.sv
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,11 @@ package watchdog_pkg;

task reset();
this.stop();
#1step;
this.start();
endtask: reset

task stop();
->>this.stop_event;
->this.stop_event;
endtask: stop

task start();
Expand Down
15 changes: 12 additions & 3 deletions common/sv/x_monitor.sv
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ package x_monitor_pkg;
mailbox_c #(logic [7:0]) mailbox;
protected semaphore semaphore_key;
protected event transaction_event;
protected event scoreboard_event;

protected bit enabled;

Expand Down Expand Up @@ -44,6 +45,14 @@ package x_monitor_pkg;
@this.transaction_event;
endtask

task scoreboard_notified();
->>this.scoreboard_event;
endtask

task wait_for_scoreboard_event();
@this.scoreboard_event;
endtask

// run task
task run();
fork
Expand Down Expand Up @@ -127,13 +136,13 @@ package x_monitor_pkg;
this.put_key();
`INFOV(("Packet mail length: %d", this.mailbox.num()), 200);
this.transaction_captured();
#1step;
this.wait_for_scoreboard_event();
this.get_key();
this.mailbox.flush();
this.put_key();
end else begin
this.axi_ap.write(transaction);
#1step;
#1;
end
end

Expand Down Expand Up @@ -206,7 +215,7 @@ package x_monitor_pkg;
`INFOV(("Packet mail length: %d", this.mailbox.num()), 200);
axi_packet = new [0];
this.transaction_captured();
#1step;
this.wait_for_scoreboard_event();
this.get_key();
this.mailbox.flush();
this.put_key();
Expand Down

0 comments on commit b0c86f6

Please sign in to comment.