Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fifo_input_mon.sv #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions SVA_and_coverage/fifo_input_mon.sv
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,24 @@ class fifo_input_mon;
trans = new();

@(posedge fifo_vif.clk);
trans.wr_en = fifo_vif.wr_en;
trans.data_in = fifo_vif.data_in;
trans.rd_en = fifo_vif.rd_en;
$display("\tINPUT MONITOR::sample() : Transaction info: wr_en = %0d, rd_en = %0d, data_in=%0d\n",trans.wr_en,trans.rd_en,trans.data_in);
@(posedge fifo_vif.clk);
in_mon2sb.put(trans);
if (!fifo_vif.rstN) begin
fork
begin
if (fifo_vif.wr_en == 1)
trans.wr_en = fifo_vif.wr_en;
trans.data_in = fifo_vif.data_in;
$display("\tINPUT MONITOR::sample() : Write detected, updating mailbox to send to scoreboard. Transaction info: wr_en = %0d, rd_en = %0d, data_in=%0d\n",trans.wr_en,trans.rd_en,trans.data_in);
in_mon2sb.put(trans);
end
begin
if (fifo_vif.rd_en == 1)
trans.rd_en = fifo_vif.rd_en;
$display("\tINPUT MONITOR::sample() : Read detected, updating mailbox to send to scoreboard.Transaction info: wr_en = %0d, rd_en = %0d, data_in=%0d\n",trans.wr_en,trans.rd_en,trans.data_in);
in_mon2sb.put(trans);
end
join_none
end

end
endtask
endclass