Skip to content

Commit

Permalink
Merge branch 'isa_add_sof_eof_check' into 'devel'
Browse files Browse the repository at this point in the history
Check if dma calypte doesnt break protocol when sof is not on first region

See merge request ndk/ndk-fpga!127
  • Loading branch information
jakubcabal committed Jan 2, 2025
2 parents 360c587 + 839df93 commit 037fa3d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion comp/dma/dma_calypte/comp/rx/uvm/tbench/property.sv
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,20 @@ module DMA_LL_PROPERTY #(DEVICE, USER_REGIONS, USER_REGION_SIZE, USER_BLOCK_SIZ
.vif (mfb_tx)
);

//simplyfied rule
generate if (PCIE_UP_REGIONS > 1) begin
property sof_after_eof;
@(posedge mfb_tx.CLK) disable iff(RESET || START)
mfb_tx.SRC_RDY |-> (( ~(mfb_tx.EOF[PCIE_UP_REGIONS-2:0]) & mfb_tx.SOF[PCIE_UP_REGIONS-1:1]) == 0);
endproperty

// Check when SOF is not on first position then previous packet have to end in region right before.
assert property (sof_after_eof)
else begin
`uvm_error(module_name, $sformatf("\n\tIf sof is set on different region that 0 then region befor have to be eof set\n\tSOF %b\n\tEOF %b", mfb_tx.SOF, mfb_tx.EOF));
end
end endgenerate

//simplyfied rule. No space in middle of packet
property sof_eof_src_rdy;
@(posedge mfb_tx.CLK) disable iff(RESET || START)
(mfb_tx.SRC_RDY && (mfb_tx.SOF != 0)) |-> mfb_tx.SRC_RDY s_until_with (mfb_tx.EOF != 0);
Expand Down

0 comments on commit 037fa3d

Please sign in to comment.