Skip to content

Commit

Permalink
Change ASSERTS_OFF macro to COMMON_CELLS_ASSERTS_OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-platzer committed Oct 20, 2023
1 parent e461610 commit 387da0a
Show file tree
Hide file tree
Showing 31 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/addr_decode_dync.sv
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ module addr_decode_dync #(
end

// Assumptions and assertions
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
`ifndef XSIM
// pragma translate_off
initial begin : proc_check_parameters
Expand Down
2 changes: 1 addition & 1 deletion src/cb_filter.sv
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ module hash_block #(
end
end

`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
// assertions
// pragma translate_off
initial begin
Expand Down
4 changes: 2 additions & 2 deletions src/cdc_2phase_clearable.sv
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ module cdc_2phase_clearable #(
assign dst_clear_pending_o = s_dst_isolate_req;


`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF

no_valid_i_during_clear_i : assert property (
@(posedge src_clk_i) disable iff (!src_rst_ni) src_clear_i |-> !src_valid_i
Expand Down Expand Up @@ -257,7 +257,7 @@ module cdc_2phase_src_clearable #(
assign async_data_o = data_src_q;

// Assertions
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
// pragma translate_off
no_clear_and_request: assume property (
@(posedge clk_i) disable iff(~rst_ni) (clear_i |-> ~valid_i))
Expand Down
2 changes: 1 addition & 1 deletion src/cdc_fifo_gray.sv
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ module cdc_fifo_gray #(

// Check the invariants.
// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial assert(LOG_DEPTH > 0);
initial assert(SYNC_STAGES >= 2);
`endif
Expand Down
2 changes: 1 addition & 1 deletion src/cdc_fifo_gray_clearable.sv
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ module cdc_fifo_gray_clearable #(

// Check the invariants.
// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial assert(LOG_DEPTH > 0);
initial assert(SYNC_STAGES >= 2);
`endif
Expand Down
2 changes: 1 addition & 1 deletion src/cf_math_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package cf_math_pkg;
automatic longint remainder;

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
if (dividend < 0) begin
$fatal(1, "Dividend %0d is not a natural number!", dividend);
end
Expand Down
2 changes: 1 addition & 1 deletion src/deprecated/fifo_v2.sv
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module fifo_v2 #(
);

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin
assert (ALM_FULL_TH <= DEPTH) else $error("ALM_FULL_TH can't be larger than the DEPTH.");
assert (ALM_EMPTY_TH <= DEPTH) else $error("ALM_EMPTY_TH can't be larger than the DEPTH.");
Expand Down
2 changes: 1 addition & 1 deletion src/exp_backoff.sv
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module exp_backoff #(
///////////////////////////////////////////////////////

//pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin
// assert wrong parameterizations
assert (MaxExp>0)
Expand Down
2 changes: 1 addition & 1 deletion src/fifo_v3.sv
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ module fifo_v3 #(
end

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin
assert (DEPTH > 0) else $error("DEPTH must be greater than 0.");
end
Expand Down
2 changes: 1 addition & 1 deletion src/id_queue.sv
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ module id_queue #(

// Validate parameters.
// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin: validate_params
assert (ID_WIDTH >= 1)
else $fatal(1, "The ID must at least be one bit wide!");
Expand Down
2 changes: 1 addition & 1 deletion src/isochronous_4phase_handshake.sv
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module isochronous_4phase_handshake (

// pragma translate_off
// stability guarantees
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
assert property (@(posedge src_clk_i) disable iff (~src_rst_ni)
(src_valid_i && !src_ready_o |=> $stable(src_valid_i))) else $error("src_valid_i is unstable");
assert property (@(posedge dst_clk_i) disable iff (~dst_rst_ni)
Expand Down
2 changes: 1 addition & 1 deletion src/isochronous_spill_register.sv
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ module isochronous_spill_register #(

// pragma translate_off
// stability guarantees
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
assert property (@(posedge src_clk_i) disable iff (~src_rst_ni)
(src_valid_i && !src_ready_o |=> $stable(src_valid_i))) else $error("src_valid_i is unstable");
assert property (@(posedge src_clk_i) disable iff (~src_rst_ni)
Expand Down
2 changes: 1 addition & 1 deletion src/lfsr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ end
////////////////////////////////////////////////////////////////////////
// assertions
////////////////////////////////////////////////////////////////////////
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
// pragma translate_off
initial begin
// these are the LUT limits
Expand Down
2 changes: 1 addition & 1 deletion src/lfsr_16bit.sv
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module lfsr_16bit #(
end
end

`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
//pragma translate_off
initial begin
assert (WIDTH <= 16)
Expand Down
2 changes: 1 addition & 1 deletion src/lfsr_8bit.sv
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module lfsr_8bit #(
end
end

`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
//pragma translate_off
initial begin
assert (WIDTH <= 8) else $fatal(1, "WIDTH needs to be less than 8 because of the 8-bit LFSR");
Expand Down
4 changes: 2 additions & 2 deletions src/lzc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module lzc #(

localparam int unsigned NumLevels = $clog2(WIDTH);

`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
// pragma translate_off
initial begin
assert(WIDTH > 0) else $fatal(1, "input must be at least one bit wide");
Expand Down Expand Up @@ -102,7 +102,7 @@ module lzc #(
end : gen_lzc

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin: validate_params
assert (WIDTH >= 1)
else $fatal(1, "The WIDTH must at least be one bit wide!");
Expand Down
2 changes: 1 addition & 1 deletion src/mem_to_banks_detailed.sv
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ module mem_to_banks_detailed #(

// Assertions
// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
`ifndef SYNTHESIS
initial begin
assume (DataWidth != 0 && (DataWidth & (DataWidth - 1)) == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/multiaddr_decode.sv
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ module multiaddr_decode #(
end

// Assumptions and assertions
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
`ifndef XSIM
// pragma translate_off
initial begin : proc_check_parameters
Expand Down
2 changes: 1 addition & 1 deletion src/onehot_to_bin.sv
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module onehot_to_bin #(
end

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
assert final ($onehot0(onehot)) else
$fatal(1, "[onehot_to_bin] More than two bit set in the one-hot signal");
`endif
Expand Down
2 changes: 1 addition & 1 deletion src/plru_tree.sv
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module plru_tree #(
end

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin
assert (ENTRIES == 2**LogEntries) else $error("Entries must be a power of two");
end
Expand Down
6 changes: 3 additions & 3 deletions src/rr_arb_tree.sv
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module rr_arb_tree #(
);

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
`ifndef VERILATOR
`ifndef XSIM
// Default SVA reset
Expand Down Expand Up @@ -171,7 +171,7 @@ module rr_arb_tree #(
end

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
lock: assert property(
@(posedge clk_i) disable iff (!rst_ni || flush_i) LockIn |-> req_o &&
(!gnt_i && !flush_i) |=> idx_o == $past(idx_o)) else
Expand Down Expand Up @@ -310,7 +310,7 @@ module rr_arb_tree #(
end

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
`ifndef XSIM
initial begin : p_assert
assert(NumIn)
Expand Down
2 changes: 1 addition & 1 deletion src/rstgen_bypass.sv
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module rstgen_bypass #(
end
end
// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin : p_assertions
if (NumRegs < 1) $fatal(1, "At least one register is required.");
end
Expand Down
2 changes: 1 addition & 1 deletion src/spill_register_flushable.sv
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module spill_register_flushable #(
assign data_o = b_full_q ? b_data_q : a_data_q;

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
flush_valid : assert property (
@(posedge clk_i) disable iff (~rst_ni) (flush_i |-> ~valid_i)) else
$warning("Trying to flush and feed the spill register simultaneously. You will lose data!");
Expand Down
2 changes: 1 addition & 1 deletion src/stream_fork.sv
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module stream_fork #(
// of the '1 literal when assigned to a port of parametrized width.

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin: p_assertions
assert (N_OUP >= 1) else $fatal(1, "Number of outputs must be at least 1!");
end
Expand Down
2 changes: 1 addition & 1 deletion src/stream_fork_dynamic.sv
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module stream_fork_dynamic #(
);

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin: p_assertions
assert (N_OUP >= 1) else $fatal(1, "N_OUP must be at least 1!");
end
Expand Down
2 changes: 1 addition & 1 deletion src/stream_intf.sv
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface STREAM_DV #(

// Make sure that the handshake and payload is stable
// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
assert property (@(posedge clk_i) (valid && !ready |=> $stable(data)));
assert property (@(posedge clk_i) (valid && !ready |=> valid));
`endif
Expand Down
2 changes: 1 addition & 1 deletion src/stream_join_dynamic.sv
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module stream_join_dynamic #(
end

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin: p_assertions
assert (N_INP >= 1) else $fatal(1, "N_INP must be at least 1!");
end
Expand Down
2 changes: 1 addition & 1 deletion src/stream_mux.sv
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module stream_mux #(
assign oup_valid_o = inp_valid_i[inp_sel_i];

// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
initial begin: p_assertions
assert (N_INP >= 1) else $fatal (1, "The number of inputs must be at least 1!");
end
Expand Down
2 changes: 1 addition & 1 deletion src/stream_omega_net.sv
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ module stream_omega_net #(
// Assertions
// Make sure that the handshake and payload is stable
// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
`ifndef VERILATOR
default disable iff (~rst_ni);
`endif
Expand Down
2 changes: 1 addition & 1 deletion src/stream_to_mem.sv
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ module stream_to_mem #(

// Assertions
// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
if (BufDepth > 0) begin : gen_buf_asserts
assert property (@(posedge clk_i) mem_resp_valid_i |-> buf_ready)
else $error("Memory response lost!");
Expand Down
2 changes: 1 addition & 1 deletion src/stream_xbar.sv
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ module stream_xbar #(
// Assertions
// Make sure that the handshake and payload is stable
// pragma translate_off
`ifndef ASSERTS_OFF
`ifndef COMMON_CELLS_ASSERTS_OFF
`ifndef VERILATOR
default disable iff (~rst_ni);
`endif
Expand Down

0 comments on commit 387da0a

Please sign in to comment.