From 0996e83947fb0582314d7368d772a166e7d54a54 Mon Sep 17 00:00:00 2001 From: Luca Valente Date: Tue, 24 Jan 2023 17:10:30 +0100 Subject: [PATCH] Add option for aligned accesses of given `ax_size`. --- src/axi_test.sv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/axi_test.sv b/src/axi_test.sv index 7c7fab63e..ae74cf1ac 100644 --- a/src/axi_test.sv +++ b/src/axi_test.sv @@ -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, @@ -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