Commit 3efc55dc authored by Andrey Filippov's avatar Andrey Filippov
Browse files

fixed error handling, added other error

parent 2d189c2d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -493,7 +493,7 @@ localparam PxCMD_MASK = HBA_PORT__PxCMD__ICC__MASK | // 'hf0000000;
        else if (swr_HBA_PORT__PxCI) pxci0_r <= soft_write_data[0];
        else if (swr_HBA_PORT__PxCI) pxci0_r <= soft_write_data[0];
    end    
    end    


    // HBA_PORT__PxCMD register - different behaviors of differtnt fields 
    // HBA_PORT__PxCMD register - different behaviors of different fields 
    // use PxCMD_MASK to prevent generation of unneeded register bits
    // use PxCMD_MASK to prevent generation of unneeded register bits
    
    
    always @(posedge mclk) begin
    always @(posedge mclk) begin
+4 −1
Original line number Original line Diff line number Diff line
@@ -318,6 +318,7 @@ module ahci_fsm
    wire                           clear_pisn32; // additional clear when in P:NotRunning state
    wire                           clear_pisn32; // additional clear when in P:NotRunning state
    
    
    assign fsm_next = (fsm_preload || (fsm_actions && !update_busy && !fsm_act_busy) || fsm_transitions[0]) && !async_pend_r[0]; // quiet if received cominit is pending
    assign fsm_next = (fsm_preload || (fsm_actions && !update_busy && !fsm_act_busy) || fsm_transitions[0]) && !async_pend_r[0]; // quiet if received cominit is pending

    assign update_all = fsm_jump[0];
    assign update_all = fsm_jump[0];


    assign ssts_ipm_dnp =      phy_ready_chng_r && (phy_ready_prev == 0);  // device not present or communication not established
    assign ssts_ipm_dnp =      phy_ready_chng_r && (phy_ready_prev == 0);  // device not present or communication not established
@@ -389,7 +390,9 @@ module ahci_fsm
        
        
        if (fsm_actions && fsm_next)                        was_last_action_r <= fsm_last_act_w;
        if (fsm_actions && fsm_next)                        was_last_action_r <= fsm_last_act_w;
        
        
        if      (hba_rst || pre_jump_w)                                fsm_transitions <= 0;
////    if      (hba_rst || pre_jump_w)                                fsm_transitions <= 0;
/// 2016.12.07 jumps were not disabled after async transitions, they came from the previously executed code
        if      (hba_rst || pre_jump_w || dis_actions)                 fsm_transitions <= 0;
        else if (fsm_transitions_w)                                    fsm_transitions <= 1; 
        else if (fsm_transitions_w)                                    fsm_transitions <= 1; 
//        else if ((fsm_last_act_w && fsm_actions && fsm_next && !fsm_wait_act_w) ||
//        else if ((fsm_last_act_w && fsm_actions && fsm_next && !fsm_wait_act_w) ||
//                 (fsm_act_busy && fsm_act_done && was_last_action_r) ) fsm_transitions <= 1;
//                 (fsm_act_busy && fsm_act_done && was_last_action_r) ) fsm_transitions <= 1;
+2 −2
Original line number Original line Diff line number Diff line
/*******************************************************************************
/*******************************************************************************
 * Module: action_decoder
 * Module: action_decoder
 * Date:2016-03-12  
 * Date:2016-12-07  
 * Author: auto-generated file, see ahci_fsm_sequence_old.py
 * Author: auto-generated file, see ahci_fsm_sequence.py
 * Description: Decode sequencer code to 1-hot actions
 * Description: Decode sequencer code to 1-hot actions
 *******************************************************************************/
 *******************************************************************************/


+2 −2
Original line number Original line Diff line number Diff line
/*******************************************************************************
/*******************************************************************************
 * Module: condition_mux
 * Module: condition_mux
 * Date:2016-03-12  
 * Date:2016-12-07  
 * Author: auto-generated file, see ahci_fsm_sequence_old.py
 * Author: auto-generated file, see ahci_fsm_sequence.py
 * Description: Select condition
 * Description: Select condition
 *******************************************************************************/
 *******************************************************************************/


+1 −1
Original line number Original line Diff line number Diff line
@@ -2,6 +2,6 @@
, .INIT_08 (256'h000000000024000600000000000000000000000080000C000000000080000800)
, .INIT_08 (256'h000000000024000600000000000000000000000080000C000000000080000800)
, .INIT_09 (256'h000000000000000000000000000000000000000000000000FFFFFFFF00000000)
, .INIT_09 (256'h000000000000000000000000000000000000000000000000FFFFFFFF00000000)
, .INIT_0B (256'h0000000000000000000000000000003300000000000000000000000000000000)
, .INIT_0B (256'h0000000000000000000000000000003300000000000000000000000000000000)
, .INIT_0C (256'h000000000000000000000000000000000000000001010002001000000001FFFE)
, .INIT_0C (256'h000000000000000000000000000000000000000001010004001000000001FFFE)
, .INIT_0D (256'h000001000000000000000040000000000001FFFE000000008000000000000000)
, .INIT_0D (256'h000001000000000000000040000000000001FFFE000000008000000000000000)
, .INIT_0E (256'h0000000000000000000000000000000000000000000000000000000040000001)
, .INIT_0E (256'h0000000000000000000000000000000000000000000000000000000040000001)
Loading