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

Subversion Repositories amber

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /amber/trunk/hw/vlog/amber23
    from Rev 82 to Rev 83
    Reverse comparison

Rev 82 → Rev 83

/a23_alu.v
49,7 → 49,7
input [8:0] i_function,
 
output [31:0] o_out,
output [3:0] o_flags
output [3:0] o_flags // negative, zero, carry, overflow
);
 
wire [31:0] a, b, b_not;
/a23_decode.v
86,6 → 86,7
output reg [1:0] o_barrel_shift_data_sel = 'd0,
output reg [1:0] o_barrel_shift_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 [2:0] o_interrupt_vector_sel = 'd0,
output reg [3:0] o_address_sel = 4'd2,
200,6 → 201,7
 
reg [1:0] barrel_shift_function_nxt;
wire [8:0] alu_function_nxt;
reg use_carry_in_nxt;
reg [1:0] multiply_function_nxt;
reg [1:0] status_bits_mode_nxt;
reg status_bits_irq_mask_nxt;
612,6 → 614,7
barrel_shift_amount_sel_nxt = 'd0; // don't shift the input
barrel_shift_data_sel_nxt = 'd0; // immediate value
barrel_shift_function_nxt = 'd0;
use_carry_in_nxt = 'd0;
multiply_function_nxt = 'd0;
address_sel_nxt = 'd0;
pc_sel_nxt = 'd0;
681,6 → 684,7
begin
alu_out_sel_nxt = 4'd1; // Add
alu_cin_sel_nxt = 2'd2; // carry in from status_bits
use_carry_in_nxt = 1'd1;
end
if ( opcode == SUB || opcode == CMP ) // Subtract
699,6 → 703,7
alu_out_sel_nxt = 4'd1; // Add
alu_cin_sel_nxt = 2'd2; // carry in from status_bits
alu_not_sel_nxt = 1'd1; // invert B
use_carry_in_nxt = 1'd1;
end
if ( opcode == RSB ) // Reverse Subtract
715,6 → 720,7
alu_cin_sel_nxt = 2'd2; // carry in from status_bits
alu_not_sel_nxt = 1'd1; // invert B
alu_swap_sel_nxt = 1'd1; // swap A and B
use_carry_in_nxt = 1'd1;
end
if ( opcode == AND || opcode == TST ) // Logical AND, Test (using AND operator)
1543,6 → 1549,7
o_barrel_shift_data_sel <= barrel_shift_data_sel_nxt;
o_barrel_shift_function <= barrel_shift_function_nxt;
o_alu_function <= alu_function_nxt;
o_use_carry_in <= use_carry_in_nxt;
o_multiply_function <= multiply_function_nxt;
o_interrupt_vector_sel <= next_interrupt;
o_address_sel <= address_sel_nxt;
/a23_core.v
105,7 → 105,8
wire [3:0] rn_sel_nxt;
wire [1:0] barrel_shift_amount_sel;
wire [1:0] barrel_shift_data_sel;
wire [1:0] barrel_shift_function;
wire [1:0] barrel_shift_function;
wire use_carry_in;
wire [8:0] alu_function;
wire [1:0] multiply_function;
wire [2:0] interrupt_vector_sel;
226,6 → 227,7
.o_barrel_shift_amount_sel ( barrel_shift_amount_sel ),
.o_barrel_shift_data_sel ( barrel_shift_data_sel ),
.o_barrel_shift_function ( barrel_shift_function ),
.o_use_carry_in ( use_carry_in ),
.o_alu_function ( alu_function ),
.o_multiply_function ( multiply_function ),
.o_interrupt_vector_sel ( interrupt_vector_sel ),
305,6 → 307,7
.i_barrel_shift_amount_sel ( barrel_shift_amount_sel ),
.i_barrel_shift_data_sel ( barrel_shift_data_sel ),
.i_barrel_shift_function ( barrel_shift_function ),
.i_use_carry_in ( use_carry_in ),
.i_alu_function ( alu_function ),
.i_multiply_function ( multiply_function ),
.i_interrupt_vector_sel ( interrupt_vector_sel ),
/a23_execute.v
85,6 → 85,7
input i_shift_imm_zero,
input [3:0] i_condition,
input i_exclusive_exec, // swap access
input i_use_carry_in, // e.g. add with carry instruction
 
input [3:0] i_rm_sel,
input [3:0] i_rds_sel,
196,6 → 197,9
wire [31:0] alu_out_pc_filtered;
wire adex_nxt;
 
wire carry_in;
 
 
// ========================================================
// Status Bits in PC register
// ========================================================
471,6 → 475,9
// ========================================================
// Instantiate Barrel Shift
// ========================================================
 
assign carry_in = i_use_carry_in ? status_bits_flags[1] : 1'd0;
 
`ifndef ALTERA_FPGA
a23_barrel_shift u_barrel_shift (
`else
477,7 → 484,7
a23_barrel_shift_fpga u_barrel_shift (
`endif
.i_in ( barrel_shift_in ),
.i_carry_in ( status_bits_flags[1] ),
.i_carry_in ( carry_in ),
.i_shift_amount ( shift_amount ),
.i_shift_imm_zero ( i_shift_imm_zero ),
.i_function ( i_barrel_shift_function ),

powered by: WebSVN 2.1.0

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