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

Subversion Repositories amber

[/] [amber/] [trunk/] [hw/] [vlog/] [amber23/] [a23_decode.v] - Diff between revs 82 and 83

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 82 Rev 83
Line 84... Line 84...
output      [3:0]           o_rn_sel_nxt,
output      [3:0]           o_rn_sel_nxt,
output reg  [1:0]           o_barrel_shift_amount_sel = 'd0,
output reg  [1:0]           o_barrel_shift_amount_sel = 'd0,
output reg  [1:0]           o_barrel_shift_data_sel = 'd0,
output reg  [1:0]           o_barrel_shift_data_sel = 'd0,
output reg  [1:0]           o_barrel_shift_function = 'd0,
output reg  [1:0]           o_barrel_shift_function = 'd0,
output reg  [8:0]           o_alu_function = 'd0,
output reg  [8:0]           o_alu_function = 'd0,
 
output reg                  o_use_carry_in = 'd0,
output reg  [1:0]           o_multiply_function = 'd0,
output reg  [1:0]           o_multiply_function = 'd0,
output reg  [2:0]           o_interrupt_vector_sel = 'd0,
output reg  [2:0]           o_interrupt_vector_sel = 'd0,
output reg  [3:0]           o_address_sel = 4'd2,
output reg  [3:0]           o_address_sel = 4'd2,
output reg  [1:0]           o_pc_sel = 2'd2,
output reg  [1:0]           o_pc_sel = 2'd2,
output reg  [1:0]           o_byte_enable_sel = 'd0,        // byte, halfword or word write
output reg  [1:0]           o_byte_enable_sel = 'd0,        // byte, halfword or word write
Line 198... Line 199...
reg                    exclusive_exec_nxt;
reg                    exclusive_exec_nxt;
reg                    data_access_exec_nxt;
reg                    data_access_exec_nxt;
 
 
reg     [1:0]          barrel_shift_function_nxt;
reg     [1:0]          barrel_shift_function_nxt;
wire    [8:0]          alu_function_nxt;
wire    [8:0]          alu_function_nxt;
 
reg                    use_carry_in_nxt;
reg     [1:0]          multiply_function_nxt;
reg     [1:0]          multiply_function_nxt;
reg     [1:0]          status_bits_mode_nxt;
reg     [1:0]          status_bits_mode_nxt;
reg                    status_bits_irq_mask_nxt;
reg                    status_bits_irq_mask_nxt;
reg                    status_bits_firq_mask_nxt;
reg                    status_bits_firq_mask_nxt;
 
 
Line 610... Line 612...
 
 
    // default Mux Select values
    // default Mux Select values
    barrel_shift_amount_sel_nxt     = 'd0;  // don't shift the input
    barrel_shift_amount_sel_nxt     = 'd0;  // don't shift the input
    barrel_shift_data_sel_nxt       = 'd0;  // immediate value
    barrel_shift_data_sel_nxt       = 'd0;  // immediate value
    barrel_shift_function_nxt       = 'd0;
    barrel_shift_function_nxt       = 'd0;
 
    use_carry_in_nxt                = 'd0;
    multiply_function_nxt           = 'd0;
    multiply_function_nxt           = 'd0;
    address_sel_nxt                 = 'd0;
    address_sel_nxt                 = 'd0;
    pc_sel_nxt                      = 'd0;
    pc_sel_nxt                      = 'd0;
    byte_enable_sel_nxt             = 'd0;
    byte_enable_sel_nxt             = 'd0;
    status_bits_sel_nxt             = 'd0;
    status_bits_sel_nxt             = 'd0;
Line 679... Line 682...
 
 
            if ( opcode == ADC ) // Add with Carry
            if ( opcode == ADC ) // Add with Carry
                begin
                begin
                alu_out_sel_nxt  = 4'd1; // Add
                alu_out_sel_nxt  = 4'd1; // Add
                alu_cin_sel_nxt  = 2'd2; // carry in from status_bits
                alu_cin_sel_nxt  = 2'd2; // carry in from status_bits
 
                use_carry_in_nxt = 1'd1;
                end
                end
 
 
            if ( opcode == SUB || opcode == CMP ) // Subtract
            if ( opcode == SUB || opcode == CMP ) // Subtract
                begin
                begin
                alu_out_sel_nxt  = 4'd1; // Add
                alu_out_sel_nxt  = 4'd1; // Add
Line 697... Line 701...
            if ( opcode == SBC ) // Subtract with Carry
            if ( opcode == SBC ) // Subtract with Carry
                begin
                begin
                alu_out_sel_nxt  = 4'd1; // Add
                alu_out_sel_nxt  = 4'd1; // Add
                alu_cin_sel_nxt  = 2'd2; // carry in from status_bits
                alu_cin_sel_nxt  = 2'd2; // carry in from status_bits
                alu_not_sel_nxt  = 1'd1; // invert B
                alu_not_sel_nxt  = 1'd1; // invert B
 
                use_carry_in_nxt = 1'd1;
                end
                end
 
 
            if ( opcode == RSB ) // Reverse Subtract
            if ( opcode == RSB ) // Reverse Subtract
                begin
                begin
                alu_out_sel_nxt  = 4'd1; // Add
                alu_out_sel_nxt  = 4'd1; // Add
Line 713... Line 718...
                begin
                begin
                alu_out_sel_nxt  = 4'd1; // Add
                alu_out_sel_nxt  = 4'd1; // Add
                alu_cin_sel_nxt  = 2'd2; // carry in from status_bits
                alu_cin_sel_nxt  = 2'd2; // carry in from status_bits
                alu_not_sel_nxt  = 1'd1; // invert B
                alu_not_sel_nxt  = 1'd1; // invert B
                alu_swap_sel_nxt = 1'd1; // swap A and B
                alu_swap_sel_nxt = 1'd1; // swap A and B
 
                use_carry_in_nxt = 1'd1;
                end
                end
 
 
            if ( opcode == AND || opcode == TST ) // Logical AND, Test  (using AND operator)
            if ( opcode == AND || opcode == TST ) // Logical AND, Test  (using AND operator)
                begin
                begin
                alu_out_sel_nxt  = 4'd8;  // AND
                alu_out_sel_nxt  = 4'd8;  // AND
Line 1541... Line 1547...
        o_rn_sel                    <= o_rn_sel_nxt;
        o_rn_sel                    <= o_rn_sel_nxt;
        o_barrel_shift_amount_sel   <= barrel_shift_amount_sel_nxt;
        o_barrel_shift_amount_sel   <= barrel_shift_amount_sel_nxt;
        o_barrel_shift_data_sel     <= barrel_shift_data_sel_nxt;
        o_barrel_shift_data_sel     <= barrel_shift_data_sel_nxt;
        o_barrel_shift_function     <= barrel_shift_function_nxt;
        o_barrel_shift_function     <= barrel_shift_function_nxt;
        o_alu_function              <= alu_function_nxt;
        o_alu_function              <= alu_function_nxt;
 
        o_use_carry_in              <= use_carry_in_nxt;
        o_multiply_function         <= multiply_function_nxt;
        o_multiply_function         <= multiply_function_nxt;
        o_interrupt_vector_sel      <= next_interrupt;
        o_interrupt_vector_sel      <= next_interrupt;
        o_address_sel               <= address_sel_nxt;
        o_address_sel               <= address_sel_nxt;
        o_pc_sel                    <= pc_sel_nxt;
        o_pc_sel                    <= pc_sel_nxt;
        o_byte_enable_sel           <= byte_enable_sel_nxt;
        o_byte_enable_sel           <= byte_enable_sel_nxt;

powered by: WebSVN 2.1.0

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