Skip to content

Commit

Permalink
ci: speed up tests by mocking more
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Harboe <[email protected]>
  • Loading branch information
oharboe committed Sep 12, 2024
1 parent 2178507 commit b28fb51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions another/tag_array_64x184.sv
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ module tag_array_64x184(
input [7:0] W0_mask
);

reg [183:0] Memory[0:15];
reg [183:0] Memory[0:3]; // Reduced to 4 rows
reg _R0_en_d0;
reg [5:0] _R0_addr_d0;
reg [3:0] _W0_addr_d0, _R0_addr_d1;
reg [1:0] _W0_addr_d0, _R0_addr_d1; // Reduced to 2 bits

always @(posedge R0_clk) begin
_R0_en_d0 <= R0_en;
_R0_addr_d0 <= R0_addr;
_R0_addr_d1 <= R0_addr[5:2] ^ R0_addr[1:0];
_R0_addr_d1 <= R0_addr[1:0]; // Only consider the last 2 bits
end // always @(posedge)

always @(posedge W0_clk) begin
_W0_addr_d0 <= W0_addr[5:2] ^ W0_addr[1:0];
_W0_addr_d0 <= W0_addr[1:0]; // Only consider the last 2 bits
if (W0_en & W0_mask[0])
Memory[_W0_addr_d0][32'h0 +: 23] <= W0_data[22:0];
if (W0_en & W0_mask[1])
Expand Down
8 changes: 4 additions & 4 deletions test/mock/tag_array_64x184.sv
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ module tag_array_64x184(
input [7:0] W0_mask
);

reg [183:0] Memory[0:15];
reg [183:0] Memory[0:3]; // Reduced to 4 rows
reg _R0_en_d0;
reg [5:0] _R0_addr_d0;
reg [3:0] _W0_addr_d0, _R0_addr_d1;
reg [1:0] _W0_addr_d0, _R0_addr_d1; // Reduced to 2 bits

always @(posedge R0_clk) begin
_R0_en_d0 <= R0_en;
_R0_addr_d0 <= R0_addr;
_R0_addr_d1 <= R0_addr[5:2] ^ R0_addr[1:0];
_R0_addr_d1 <= R0_addr[1:0]; // Only consider the last 2 bits
end // always @(posedge)

always @(posedge W0_clk) begin
_W0_addr_d0 <= W0_addr[5:2] ^ W0_addr[1:0];
_W0_addr_d0 <= W0_addr[1:0]; // Only consider the last 2 bits
if (W0_en & W0_mask[0])
Memory[_W0_addr_d0][32'h0 +: 23] <= W0_data[22:0];
if (W0_en & W0_mask[1])
Expand Down

0 comments on commit b28fb51

Please sign in to comment.