ibex/formal/data_ind_timing/operation_rem.svh
Tobias Wölfel 1553636a7d [formal] Add check for multdiv cycle consumption
Check that the number of cycles are always as specified for the current
configuration for data independent operations.

The required input signals for each arithmetic operation are split into
different files which are included into the testbench.
For each combination of operation and configured configuration
(slow/fast/single) a define stores the number of cycles in a separate
file. A target exists for each combination.
For a convenient execution the targets are grouped together in a
makefile.

The implementation is based on the formal/icache checks.

For the selection of the single cycle multiplication with the fast
multiplication the parameter is set directly to the enum integer value.
2020-09-16 16:30:20 +01:00

21 lines
585 B
Systemverilog

// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
always_comb begin
// Formal prove only for data independent timing
assume (data_ind_timing_i);
assume(~mult_sel_i);
assume(~mult_en_i);
if (f_startup_count >= 3'd2) begin
// Enable signal must be asserted in order for the state machine to advance
assume (div_en_i);
assume (div_sel_i);
assume (operator_i == ibex_pkg::MD_OP_REM);
end else begin
assume (~div_en_i);
assume (~div_sel_i);
end
end