Skip to content

Commit

Permalink
test: Add IdealSlave for benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti committed Nov 21, 2024
1 parent aca9ed0 commit 65c288d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
21 changes: 19 additions & 2 deletions hw/test/floo_axi_rand_slave.sv
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,15 @@ module floo_axi_rand_slave #(
.UW ( AxiCfg.UserWidth ),
// Stimuli application and test time
.TA ( ApplTime ),
.TT ( TestTime )
) axi_rand_slave_t;
.TT ( TestTime ),
// Responsiveness
.AX_MIN_WAIT_CYCLES (0),
.AX_MAX_WAIT_CYCLES (0),
.R_MIN_WAIT_CYCLES (0),
.R_MAX_WAIT_CYCLES (0),
.RESP_MIN_WAIT_CYCLES (0),
.RESP_MAX_WAIT_CYCLES (0)
) axi_rand_ideal_slave_t;

typedef axi_test::axi_rand_slave #(
// AXI interface parameters
Expand Down Expand Up @@ -173,6 +180,7 @@ module floo_axi_rand_slave #(
// axi slave
axi_rand_slow_slave_t axi_rand_slow_slave[NumSlaves];
axi_rand_fast_slave_t axi_rand_fast_slave[NumSlaves];
axi_rand_ideal_slave_t axi_rand_ideal_slave[NumSlaves];

if (SlaveType == floo_test_pkg::SlowSlave) begin : gen_slow_slaves
for (genvar i = 0; i < NumSlaves; i++) begin : gen_slow_slaves
Expand All @@ -192,6 +200,15 @@ module floo_axi_rand_slave #(
axi_rand_fast_slave[i].run();
end
end
end else if (SlaveType == floo_test_pkg::IdealSlave) begin : gen_fast_slaves
for (genvar i = 0; i < NumSlaves; i++) begin : gen_fast_slaves
initial begin
axi_rand_ideal_slave[i] = new( slave_dv[i] );
axi_rand_ideal_slave[i].reset();
@(posedge rst_ni)
axi_rand_ideal_slave[i].run();
end
end
end else if (SlaveType == floo_test_pkg::MixedSlave) begin : gen_mixed_slaves
for (genvar i = 0; i < NumSlaves; i++) begin : gen_mixed_slaves
if (i % 2 == 0) begin : gen_slow_slaves
Expand Down
5 changes: 3 additions & 2 deletions hw/test/floo_dma_test_node.sv
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module floo_dma_test_node #(
parameter time TT = 9ns,
parameter int unsigned BufferDepth = 16,
parameter int unsigned NumAxInFlight = 16,
parameter floo_test_pkg::slave_type_e SlaveType = floo_test_pkg::FastSlave,
parameter floo_pkg::axi_cfg_t AxiCfg = '{default:0},
parameter type axi_req_t = logic,
parameter type axi_rsp_t = logic,
Expand Down Expand Up @@ -250,7 +251,7 @@ module floo_dma_test_node #(
.AxiCfg ( AxiCfg ),
.ApplTime ( TA ),
.TestTime ( TT ),
.SlaveType ( floo_test_pkg::FastSlave ),
.SlaveType ( SlaveType ),
.NumSlaves ( 1 ),
.axi_req_t ( axi_xbar_req_t ),
.axi_rsp_t ( axi_xbar_resp_t )
Expand All @@ -267,7 +268,7 @@ module floo_dma_test_node #(
.AxiCfg ( floo_pkg::axi_cfg_swap_iw(AxiCfg) ),
.ApplTime ( TA ),
.TestTime ( TT ),
.SlaveType ( floo_test_pkg::FastSlave ),
.SlaveType ( SlaveType ),
.NumSlaves ( 1 ),
.axi_req_t ( axi_in_req_t ),
.axi_rsp_t ( axi_in_rsp_t )
Expand Down
1 change: 1 addition & 0 deletions hw/test/floo_test_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
package floo_test_pkg;

typedef enum {
IdealSlave,
FastSlave,
SlowSlave,
MixedSlave
Expand Down

0 comments on commit 65c288d

Please sign in to comment.