Skip to content

Commit

Permalink
Merge pull request pulp-platform#284 from pulp-platform/aligned_tests…
Browse files Browse the repository at this point in the history
…_addr

`axi_tb`: add option for aligned accesses of given `ax_size`
  • Loading branch information
thommythomaso authored Feb 10, 2023
2 parents 96f749d + 0996e83 commit fd60be8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/axi_test.sv
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ package axi_test;
parameter int RESP_MIN_WAIT_CYCLES = 0,
parameter int RESP_MAX_WAIT_CYCLES = 20,
// AXI feature usage
parameter int SIZE_ALIGN = 0,
parameter int AXI_MAX_BURST_LEN = 0, // maximum number of beats in burst; 0 = AXI max (256)
parameter int TRAFFIC_SHAPING = 0,
parameter bit AXI_EXCLS = 1'b0,
Expand Down Expand Up @@ -926,7 +927,7 @@ package axi_test;
end
end

ax_beat.ax_addr = addr;
ax_beat.ax_addr = axi_pkg::aligned_addr(addr, axi_pkg::size_t'(SIZE_ALIGN) );
rand_success = std::randomize(id); assert(rand_success);
rand_success = std::randomize(qos); assert(rand_success);
// The random ID *must* be legalized with `legalize_id()` before the beat is sent! This is
Expand Down

0 comments on commit fd60be8

Please sign in to comment.