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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel_10/] [or1200/] [rtl/] [verilog/] [or1200_genpc.v] - Diff between revs 504 and 562

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

Rev 504 Rev 562
Line 43... Line 43...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.1  2002/01/03 08:16:15  lampret
 
// New prefixes for RTL files, prefixed module names. Updated cache controllers and MMUs.
 
//
// Revision 1.10  2001/11/20 18:46:15  simons
// Revision 1.10  2001/11/20 18:46:15  simons
// Break point bug fixed
// Break point bug fixed
//
//
// Revision 1.9  2001/11/18 09:58:28  lampret
// Revision 1.9  2001/11/18 09:58:28  lampret
// Fixed some l.trap typos.
// Fixed some l.trap typos.
Line 82... Line 85...
        icpu_ack_i, icpu_rty_i, icpu_err_i, icpu_adr_i,
        icpu_ack_i, icpu_rty_i, icpu_err_i, icpu_adr_i,
 
 
        // Internal i/f
        // Internal i/f
        branch_op, except_type,
        branch_op, except_type,
        branch_addrofs, lr_restor, flag, taken, except_start,
        branch_addrofs, lr_restor, flag, taken, except_start,
        binsn_addr, epcr, spr_dat_i, spr_pc_we, genpc_refetch
        binsn_addr, epcr, spr_dat_i, spr_pc_we, genpc_refetch,
 
        genpc_freeze, flushpipe
);
);
 
 
//
//
// I/O
// I/O
//
//
Line 123... Line 127...
input   [31:2]                  binsn_addr;
input   [31:2]                  binsn_addr;
input   [31:0]                   epcr;
input   [31:0]                   epcr;
input   [31:0]                   spr_dat_i;
input   [31:0]                   spr_dat_i;
input                           spr_pc_we;
input                           spr_pc_we;
input                           genpc_refetch;
input                           genpc_refetch;
 
input                           genpc_freeze;
 
input                           flushpipe;
 
 
//
//
// Internal wires and regs
// Internal wires and regs
//
//
reg     [31:2]                  pcreg;
reg     [31:2]                  pcreg;
Line 136... Line 142...
reg                             btarget; /* set when fetching branch target insns */
reg                             btarget; /* set when fetching branch target insns */
 
 
//
//
// Address of insn to be fecthed
// Address of insn to be fecthed
//
//
assign icpu_adr_o = icpu_rty_i | genpc_refetch ? icpu_adr_i : pc;
assign icpu_adr_o = !except_start & !spr_pc_we & (icpu_rty_i | genpc_refetch) ? icpu_adr_i : pc;
 
 
//
//
// Control access to IC subsystem
// Control access to IC subsystem
//
//
assign icpu_cyc_o = 1'b1;
assign icpu_cyc_o = !genpc_freeze;
assign icpu_stb_o = 1'b1;
assign icpu_stb_o = icpu_cyc_o;
assign icpu_sel_o = 4'b1111;
assign icpu_sel_o = 4'b1111;
assign icpu_tag_o = `OR1200_ITAG_NI;
assign icpu_tag_o = `OR1200_ITAG_NI;
 
 
//
//
// Async calculation of new PC value. This value is used for addressing the IC.
// Async calculation of new PC value. This value is used for addressing the IC.
Line 259... Line 265...
always @(posedge clk or posedge rst)
always @(posedge clk or posedge rst)
        if (rst)
        if (rst)
                pcreg <= #1 30'd63;
                pcreg <= #1 30'd63;
        else if (spr_pc_we)
        else if (spr_pc_we)
                pcreg <= #1 spr_dat_i[31:2];
                pcreg <= #1 spr_dat_i[31:2];
        else if (!icpu_rty_i & !genpc_refetch)
        else if (except_start | !genpc_freeze & !icpu_rty_i & !genpc_refetch)
                pcreg <= #1 pc[31:2];
                pcreg <= #1 pc[31:2];
 
 
//
//
// dslot
// dslot
//
//

powered by: WebSVN 2.1.0

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