amiq-consulting / amiq_apb

SystemVerilog VIP for AMBA APB protocol
Apache License 2.0
66 stars 29 forks source link

penable HIGH with psel LOW - Assertion #10

Open oric5599 opened 4 months ago

oric5599 commented 4 months ago

Hi,

According to the AMBA-APB specification, it seems that PENABLE being HIGH while PSEL is LOW is a valid condition, but there are three assertions that report it as an issue:

        //Property definition for sel signal valid value when enable is asserted
        property amiq_apb_sel_validity_during_transfer_phases_p;
            @(posedge enable) disable iff(!reset_n || !en_protocol_checks) (|sel);
        endproperty
        //Check that sel is HIGH when enable is asserted
        AMIQ_APB_ILLEGAL_SEL_TRANSITION_TR_PHASES_ERR: assert property (amiq_apb_sel_validity_during_transfer_phases_p) else
            `uvm_error("AMIQ_APB_ILLEGAL_SEL_TRANSITION_TR_PHASES_ERR", $sformatf("[%0t] AMIQ_APB_ILLEGAL_SEL_TRANSITION_TR_PHASES_ERR : sel must be stable during setup-access transitions.", $time))
        //Property definition for enable valid value between transfers
        property amiq_apb_enable_value_between_transfers_p;
            @(posedge clk) disable iff(!reset_n || !en_protocol_checks)
                !(|sel) |-> !enable;
        endproperty
        //Check that between two transfers enable is kept LOW
        AMIQ_APB_ILLEGAL_ENABLE_VALUE_BETWEEN_TRANSFERS_ERR: assert property(amiq_apb_enable_value_between_transfers_p) else
            `uvm_error("AMIQ_APB_ILLEGAL_ENABLE_VALUE_BETWEEN_TRANSFERS_ERR", $sformatf("[%0t] AMIQ_APB_ILLEGAL_ENABLE_VALUE_BETWEEN_TRANSFERS_ERR : enable must be LOW between two transfers.", $time))
            //Property definition for enable stability during ready changes
        property amiq_apb_enable_stability_during_ready_changes_p;
            @(posedge clk) disable iff(!reset_n || !en_protocol_checks)
                !ready and enable |=> enable;
        endproperty
        //Check that enable is stable during ready changes (when ready is asserted during a transfer, after a LOW period)
        AMIQ_APB_ILLEGAL_ENABLE_TRANSITION_DURING_READY_CHANGES_ERR: assert property (amiq_apb_enable_stability_during_ready_changes_p) else
            `uvm_error("AMIQ_APB_ILLEGAL_ENABLE_TRANSITION_DURING_READY_CHANGES_ERR", $sformatf("[%0t] AMIQ_APB_ILLEGAL_ENABLE_TRANSITION_DURING_READY_CHANGES_ERR : enable must be stable during ready changes.", $time))

Snapshot from spec:
image