OpenCores
URL https://opencores.org/ocsvn/zap/zap/trunk

Subversion Repositories zap

[/] [zap/] [trunk/] [src/] [rtl/] [cpu/] [zap_shifter_main.v] - Diff between revs 38 and 51

Show entire file | Details | Blame | View Log

Rev 38 Rev 51
Line 257... Line 257...
           o_alu_operation_ff                <= (i_alu_operation_ff == UMLALL ||
           o_alu_operation_ff                <= (i_alu_operation_ff == UMLALL ||
                                                 i_alu_operation_ff == UMLALH ||
                                                 i_alu_operation_ff == UMLALH ||
                                                 i_alu_operation_ff == SMLALL ||
                                                 i_alu_operation_ff == SMLALL ||
                                                i_alu_operation_ff == SMLALH) ?
                                                i_alu_operation_ff == SMLALH) ?
                                                MOV : i_alu_operation_ff;
                                                MOV : i_alu_operation_ff;
                                        // Multiplication becomes a MOV for ALU.
 
           o_flag_update_ff                  <= i_flag_update_ff;
           o_flag_update_ff                  <= i_flag_update_ff;
           o_mem_srcdest_index_ff            <= i_mem_srcdest_index_ff;
           o_mem_srcdest_index_ff            <= i_mem_srcdest_index_ff;
           o_mem_load_ff                     <= i_mem_load_ff;
           o_mem_load_ff                     <= i_mem_load_ff;
           o_mem_store_ff                    <= i_mem_store_ff;
           o_mem_store_ff                    <= i_mem_store_ff;
           o_mem_pre_index_ff                <= i_mem_pre_index_ff;
           o_mem_pre_index_ff                <= i_mem_pre_index_ff;
Line 373... Line 372...
        input    [$clog2(PHY_REGS)-1:0]  index_from_this_stage,  // From shift (This) stage output flops.
        input    [$clog2(PHY_REGS)-1:0]  index_from_this_stage,  // From shift (This) stage output flops.
        input    [31:0]                  result_from_alu,        // From ALU output directly.
        input    [31:0]                  result_from_alu,        // From ALU output directly.
        input                            result_from_alu_valid   // Result from ALU is VALID.
        input                            result_from_alu_valid   // Result from ALU is VALID.
);
);
begin
begin
`ifdef SH_DEBUG
 
        $display($time, "%m: ================ resolve_conflict ==================");
 
        $display($time, "%m: index from issue = %d value from issue = %d index from this stage = %d result from alu = %d", index_from_issue, value_from_issue, index_from_this_stage, result_from_alu);
 
        $display($time, "%m: ====================================================");
 
`endif
 
 
 
        if ( index_from_issue[32] == IMMED_EN )
        if ( index_from_issue[32] == IMMED_EN )
        begin
        begin
                resolve_conflict = index_from_issue[31:0];
                resolve_conflict = index_from_issue[31:0];
 
 
`ifdef SH_DEBUG
 
                        $display($time, "%m: => It is an immediate value.");
 
`endif
 
        end
        end
        else if ( index_from_issue == PHY_PC )
        else if ( index_from_issue == PHY_PC )
        begin
        begin
                resolve_conflict = i_pc_plus_8_ff;
                resolve_conflict = i_pc_plus_8_ff;
 
 
`ifdef SH_DEBUG
 
                        $display($time, "%m: => Giving PC");
 
`endif
 
        end
        end
        else if ( index_from_this_stage == index_from_issue[$clog2(PHY_REGS)-1:0] && result_from_alu_valid )
        else if ( index_from_this_stage == index_from_issue[$clog2(PHY_REGS)-1:0] && result_from_alu_valid )
        begin
        begin
                resolve_conflict = result_from_alu;
                resolve_conflict = result_from_alu;
 
 
`ifdef SH_DEBUG
 
                        $display($time, "%m: => Getting result from ALU!");
 
`endif
 
        end
        end
        else
        else
        begin
        begin
                resolve_conflict = value_from_issue[31:0];
                resolve_conflict = value_from_issue[31:0];
`ifdef SH_DEBUG
 
                        $display($time, "%m: => No changes!");
 
`endif
 
        end
        end
 
 
`ifdef SH_DEBUG
 
                $display($time, "%m: ==> Final result is %d", resolve_conflict);
 
`endif
 
end
end
endfunction
endfunction
 
 
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
 
 
endmodule // zap_shifter_main.v
endmodule // zap_shifter_main.v
 
 
`default_nettype wire
`default_nettype wire
 
 
 No newline at end of file
 No newline at end of file
 
// ----------------------------------------------------------------------------
 
// EOF
 
// ----------------------------------------------------------------------------
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2022 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.