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

Subversion Repositories amber

[/] [amber/] [trunk/] [hw/] [vlog/] [amber25/] [a25_execute.v] - Diff between revs 16 and 20

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

Rev 16 Rev 20
Line 117... Line 117...
input                       i_status_bits_flags_wen,
input                       i_status_bits_flags_wen,
input                       i_status_bits_mode_wen,
input                       i_status_bits_mode_wen,
input                       i_status_bits_irq_mask_wen,
input                       i_status_bits_irq_mask_wen,
input                       i_status_bits_firq_mask_wen,
input                       i_status_bits_firq_mask_wen,
input                       i_copro_write_data_wen,
input                       i_copro_write_data_wen,
input                       i_conflict
input                       i_conflict,
 
input                       i_rn_use_read,
 
input                       i_rm_use_read,
 
input                       i_rs_use_read,
 
input                       i_rd_use_read
);
);
 
 
`include "a25_localparams.v"
`include "a25_localparams.v"
`include "a25_functions.v"
`include "a25_functions.v"
 
 
Line 140... Line 143...
wire [3:0]          alu_flags;
wire [3:0]          alu_flags;
wire [31:0]         rm;
wire [31:0]         rm;
wire [31:0]         rs;
wire [31:0]         rs;
wire [31:0]         rd;
wire [31:0]         rd;
wire [31:0]         rn;
wire [31:0]         rn;
 
wire [31:0]         reg_bank_rn;
 
wire [31:0]         reg_bank_rm;
 
wire [31:0]         reg_bank_rs;
 
wire [31:0]         reg_bank_rd;
wire [31:0]         pc;
wire [31:0]         pc;
wire [31:0]         pc_nxt;
wire [31:0]         pc_nxt;
wire [31:0]         interrupt_vector;
wire [31:0]         interrupt_vector;
wire [7:0]          shift_amount;
wire [7:0]          shift_amount;
wire [31:0]         barrel_shift_in;
wire [31:0]         barrel_shift_in;
Line 171... Line 178...
wire [1:0]          multiply_flags;
wire [1:0]          multiply_flags;
reg  [31:0]         base_address = 'd0;             // Saves base address during LDM instruction in 
reg  [31:0]         base_address = 'd0;             // Saves base address during LDM instruction in 
                                                    // case of data abort
                                                    // case of data abort
wire [31:0]         read_data_filtered1;
wire [31:0]         read_data_filtered1;
wire [31:0]         read_data_filtered;
wire [31:0]         read_data_filtered;
 
wire [31:0]         read_data_filtered_c;
 
reg  [31:0]         read_data_filtered_r = 'd0;
 
reg  [3:0]          load_rd_r = 'd0;
 
wire [3:0]          load_rd_c;
 
 
wire                write_enable_nxt;
wire                write_enable_nxt;
wire                daddress_valid_nxt;
wire                daddress_valid_nxt;
wire                iaddress_valid_nxt;
wire                iaddress_valid_nxt;
wire                priviledged_nxt;
wire                priviledged_nxt;
Line 444... Line 455...
 
 
// ========================================================
// ========================================================
// Address Valid
// Address Valid
// ========================================================
// ========================================================
assign daddress_valid_nxt = execute && i_decode_daccess && !i_access_stall;
assign daddress_valid_nxt = execute && i_decode_daccess && !i_access_stall;
assign iaddress_valid_nxt = i_decode_iaccess;
 
 
// For some multi-cycle instructions, the stream of instrution
 
// reads can be paused. However if the instruction does not execute
 
// then the read stream must not be interrupted.
 
assign iaddress_valid_nxt = i_decode_iaccess || !execute;
 
 
 
 
 
// ========================================================
 
// Use read value from data memory instead of from register
 
// ========================================================
 
assign rn = i_rn_use_read && i_rn_sel == load_rd_c ? read_data_filtered_c : reg_bank_rn;
 
assign rm = i_rm_use_read && i_rm_sel == load_rd_c ? read_data_filtered_c : reg_bank_rm;
 
assign rs = i_rs_use_read && i_rs_sel == load_rd_c ? read_data_filtered_c : reg_bank_rs;
 
assign rd = i_rd_use_read && i_rs_sel == load_rd_c ? read_data_filtered_c : reg_bank_rd;
 
 
 
 
 
always@( posedge i_clk )
 
    if ( i_wb_read_data_valid )
 
        begin
 
        read_data_filtered_r <= read_data_filtered;
 
        load_rd_r            <= i_wb_load_rd[3:0];
 
        end
 
 
 
assign read_data_filtered_c = i_wb_read_data_valid ? read_data_filtered : read_data_filtered_r;
 
assign load_rd_c            = i_wb_read_data_valid ? i_wb_load_rd[3:0]  : load_rd_r;
 
 
 
 
// ========================================================
// ========================================================
// Register Update
// Register Update
// ========================================================
// ========================================================
Line 574... Line 609...
    .i_firq_not_user_mode    ( i_firq_not_user_mode      ),
    .i_firq_not_user_mode    ( i_firq_not_user_mode      ),
 
 
    // use one-hot version for speed, combine with i_user_mode_regs_store
    // use one-hot version for speed, combine with i_user_mode_regs_store
    .i_mode_rds_exec         ( status_bits_mode_rds_oh   ),
    .i_mode_rds_exec         ( status_bits_mode_rds_oh   ),
 
 
    .o_rm                    ( rm                        ),
    .o_rm                    ( reg_bank_rm               ),
    .o_rs                    ( rs                        ),
    .o_rs                    ( reg_bank_rs               ),
    .o_rd                    ( rd                        ),
    .o_rd                    ( reg_bank_rd               ),
    .o_rn                    ( rn                        ),
    .o_rn                    ( reg_bank_rn               ),
    .o_pc                    ( pc                        )
    .o_pc                    ( pc                        )
);
);
 
 
 
 
 
 
// ========================================================
// ========================================================
// Debug - non-synthesizable code
// Debug - non-synthesizable code
// ========================================================
// ========================================================
//synopsys translate_off
//synopsys translate_off
 
 

powered by: WebSVN 2.1.0

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