Skip to content

Commit

Permalink
implement sresp count check
Browse files Browse the repository at this point in the history
  • Loading branch information
taichi-ishitani committed Mar 13, 2024
1 parent ca59449 commit e95305a
Show file tree
Hide file tree
Showing 9 changed files with 378 additions and 111 deletions.
47 changes: 36 additions & 11 deletions pzcorebus_1_to_m_switch/pzcorebus_1_to_m_switch.sv
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module pzcorebus_1_to_m_switch
.COMMAND_DEPTH (COMMAND_DEPTH ),
.DATA_DEPTH (DATA_DEPTH ),
.ALIGN_OUT (ALIGN_OUT ),
.SVA_CHECKER (REQUEST_SVA_CHECKER )
.SVA_CHECKER (0 )
) u_request_switch (
.i_clk (i_clk ),
.i_rst_n (i_rst_n ),
Expand All @@ -91,16 +91,16 @@ module pzcorebus_1_to_m_switch
);

pzcorebus_response_1_to_m_switch #(
.BUS_CONFIG (BUS_CONFIG ),
.MASTERS (MASTERS ),
.ENABLE_ARBITER (ENABLE_ARBITER ),
.PRIORITY_WIDTH (PRIORITY_WIDTH ),
.WEIGHT_WIDTH (WEIGHT_WIDTH ),
.WEIGHT (WEIGHT ),
.SLAVE_FIFO (SLAVE_FIFO[1] ),
.MASTER_FIFO (MASTER_FIFO[1] ),
.RESPONSE_DEPTH (RESPONSE_DEPTH ),
.SVA_CHECKER (RESPONSE_SVA_CHECKER )
.BUS_CONFIG (BUS_CONFIG ),
.MASTERS (MASTERS ),
.ENABLE_ARBITER (ENABLE_ARBITER ),
.PRIORITY_WIDTH (PRIORITY_WIDTH ),
.WEIGHT_WIDTH (WEIGHT_WIDTH ),
.WEIGHT (WEIGHT ),
.SLAVE_FIFO (SLAVE_FIFO[1] ),
.MASTER_FIFO (MASTER_FIFO[1] ),
.RESPONSE_DEPTH (RESPONSE_DEPTH ),
.SVA_CHECKER (0 )
) u_response_switch (
.i_clk (i_clk ),
.i_rst_n (i_rst_n ),
Expand All @@ -113,4 +113,29 @@ module pzcorebus_1_to_m_switch
.slave_if (bus_if[1:MASTERS] ),
.master_if (master_if )
);

//--------------------------------------------------------------
// SVA checker
//--------------------------------------------------------------
if (PZCOREBUS_ENABLE_SVA_CHECKER) begin : g_sva
pzcorebus_request_sva_checker #(
.BUS_CONFIG (BUS_CONFIG ),
.SVA_CHECKER (REQUEST_SVA_CHECKER )
) u_request_sva_checker (
.i_clk (i_clk ),
.i_rst_n (i_rst_n ),
.bus_if (slave_if )
);

pzcorebus_response_sva_array_checker #(
.BUS_CONFIG (BUS_CONFIG ),
.N (MASTERS ),
.SVA_CHECKER (RESPONSE_SVA_CHECKER ),
.SRESP_IF_ONLY (0 )
) u_sva_checker (
.i_clk (i_clk ),
.i_rst_n (i_rst_n ),
.bus_if (master_if )
);
end
endmodule
27 changes: 11 additions & 16 deletions pzcorebus_async_fifo/pzcorebus_async_fifo.sv
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,17 @@ module pzcorebus_async_fifo
// SVA checker
//--------------------------------------------------------------
if (PZCOREBUS_ENABLE_SVA_CHECKER) begin : g_sva
pzcorebus_request_sva_checker #(
.BUS_CONFIG (BUS_CONFIG ),
.SVA_CHECKER (REQUEST_SVA_CHECKER )
) u_request_sva_checker (
.i_clk (i_slave_clk ),
.i_rst_n (i_slave_rst_n ),
.bus_if (slave_if )
);

pzcorebus_response_sva_checker #(
.BUS_CONFIG (BUS_CONFIG ),
.SVA_CHECKER (RESPONSE_SVA_CHECKER )
) u_response_sva_checker (
.i_clk (i_master_clk ),
.i_rst_n (i_master_rst_n ),
.bus_if (master_if )
pzcorebus_sva_checker #(
.BUS_CONFIG (BUS_CONFIG ),
.REQUEST_SVA_CHECKER (REQUEST_SVA_CHECKER ),
.RESPONSE_SVA_CHECKER (RESPONSE_SVA_CHECKER )
) u_sva_checker (
.i_request_clk (i_slave_clk ),
.i_request_rst_n (i_slave_rst_n ),
.request_bus_if (slave_if ),
.i_response_clk (i_master_clk ),
.i_response_rst_n (i_master_rst_n ),
.response_bus_if (master_if )
);
end
endmodule
27 changes: 11 additions & 16 deletions pzcorebus_axi_bridge/pzcorebus_corebus2axi_simple_bridge.sv
Original file line number Diff line number Diff line change
Expand Up @@ -193,22 +193,17 @@ module pzcorebus_corebus2axi_simple_bridge
// SVA checker
//--------------------------------------------------------------
if (PZCOREBUS_ENABLE_SVA_CHECKER) begin : g_sva
pzcorebus_request_sva_checker #(
.BUS_CONFIG (COREBUS_CONFIG ),
.SVA_CHECKER (REQUEST_SVA_CHECKER )
) u_request_sva_checker (
.i_clk (i_clk ),
.i_rst_n (i_rst_n ),
.bus_if (corebus_if )
);

pzcorebus_response_sva_checker #(
.BUS_CONFIG (COREBUS_CONFIG ),
.SVA_CHECKER (RESPONSE_SVA_CHECKER )
) u_response_sva_checker (
.i_clk (i_clk ),
.i_rst_n (i_rst_n ),
.bus_if (corebus_if )
pzcorebus_sva_checker #(
.BUS_CONFIG (COREBUS_CONFIG ),
.REQUEST_SVA_CHECKER (REQUEST_SVA_CHECKER ),
.RESPONSE_SVA_CHECKER (RESPONSE_SVA_CHECKER )
) u_sva_checker (
.i_request_clk (i_clk ),
.i_request_rst_n (i_rst_n ),
.request_bus_if (corebus_if ),
.i_response_clk (i_clk ),
.i_response_rst_n (i_rst_n ),
.response_bus_if (corebus_if )
);
end
endmodule
28 changes: 23 additions & 5 deletions pzcorebus_command_data_aligner/pzcorebus_command_data_aligner.sv
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module pzcorebus_command_data_aligner
.SLAVE_FIFO (SLAVE_FIFO ),
.COMMAND_DEPTH (COMMAND_DEPTH ),
.DATA_DEPTH (DATA_DEPTH ),
.SVA_CHECKER (REQUEST_SVA_CHECKER )
.SVA_CHECKER (0 )
) u_aligner_core (
.i_clk (i_clk ),
.i_rst_n (i_rst_n ),
Expand All @@ -54,10 +54,10 @@ module pzcorebus_command_data_aligner
);

pzcorebus_response_fifo #(
.BUS_CONFIG (BUS_CONFIG ),
.DEPTH (RESPONSE_DEPTH ),
.VALID (SLAVE_FIFO ),
.SVA_CHECKER (RESPONSE_SVA_CHECKER )
.BUS_CONFIG (BUS_CONFIG ),
.DEPTH (RESPONSE_DEPTH ),
.VALID (SLAVE_FIFO ),
.SVA_CHECKER (0 )
) u_response_fifo (
.i_clk (i_clk ),
.i_rst_n (i_rst_n ),
Expand All @@ -73,4 +73,22 @@ module pzcorebus_command_data_aligner
.slave_if (bus_if[1] ),
.master_if (master_if )
);

//--------------------------------------------------------------
// SVA checker
//--------------------------------------------------------------
if (PZCOREBUS_ENABLE_SVA_CHECKER) begin : g_sva
pzcorebus_sva_checker #(
.BUS_CONFIG (BUS_CONFIG ),
.REQUEST_SVA_CHECKER (REQUEST_SVA_CHECKER ),
.RESPONSE_SVA_CHECKER (RESPONSE_SVA_CHECKER )
) u_sva_checker (
.i_request_clk (i_clk ),
.i_request_rst_n (i_rst_n ),
.request_bus_if (slave_if ),
.i_response_clk (i_clk ),
.i_response_rst_n (i_rst_n ),
.response_bus_if (master_if )
);
end
endmodule
Loading

0 comments on commit e95305a

Please sign in to comment.