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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel_13/] [or1200/] [rtl/] [verilog/] [or1200_freeze.v] - Diff between revs 788 and 895

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

Rev 788 Rev 895
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.4  2002/03/29 15:16:55  lampret
 
// Some of the warnings fixed.
 
//
// Revision 1.3  2002/01/28 01:16:00  lampret
// Revision 1.3  2002/01/28 01:16:00  lampret
// Changed 'void' nop-ops instead of insn[0] to use insn[16]. Debug unit stalls the tick timer. Prepared new flag generation for add and and insns. Blocked DC/IC while they are turned off. Fixed I/D MMU SPRs layout except WAYs. TODO: smart IC invalidate, l.j 2 and TLB ways.
// Changed 'void' nop-ops instead of insn[0] to use insn[16]. Debug unit stalls the tick timer. Prepared new flag generation for add and and insns. Blocked DC/IC while they are turned off. Fixed I/D MMU SPRs layout except WAYs. TODO: smart IC invalidate, l.j 2 and TLB ways.
//
//
// Revision 1.2  2002/01/14 06:18:22  lampret
// Revision 1.2  2002/01/14 06:18:22  lampret
// Fixed mem2reg bug in FAST implementation. Updated debug unit to work with new genpc/if.
// Fixed mem2reg bug in FAST implementation. Updated debug unit to work with new genpc/if.
Line 96... Line 99...
 
 
        // Internal i/f
        // Internal i/f
        multicycle, flushpipe, extend_flush, lsu_stall, if_stall,
        multicycle, flushpipe, extend_flush, lsu_stall, if_stall,
        lsu_unstall, du_stall, mac_stall,
        lsu_unstall, du_stall, mac_stall,
        force_dslot_fetch, abort_ex,
        force_dslot_fetch, abort_ex,
        genpc_freeze, if_freeze, id_freeze, ex_freeze, wb_freeze
        genpc_freeze, if_freeze, id_freeze, ex_freeze, wb_freeze,
 
        icpu_ack_i, icpu_err_i
);
);
 
 
//
//
// I/O
// I/O
//
//
Line 119... Line 123...
output                          genpc_freeze;
output                          genpc_freeze;
output                          if_freeze;
output                          if_freeze;
output                          id_freeze;
output                          id_freeze;
output                          ex_freeze;
output                          ex_freeze;
output                          wb_freeze;
output                          wb_freeze;
 
input                           icpu_ack_i;
 
input                           icpu_err_i;
 
 
//
//
// Internal wires and regs
// Internal wires and regs
//
//
wire                            multicycle_freeze;
wire                            multicycle_freeze;
reg     [`OR1200_MULTICYCLE_WIDTH-1:0]   multicycle_cnt;
reg     [`OR1200_MULTICYCLE_WIDTH-1:0]   multicycle_cnt;
 
reg                             flushpipe_r;
 
 
//
//
// Pipeline freeze
// Pipeline freeze
//
//
// Rules how to create freeze signals:
// Rules how to create freeze signals:
Line 139... Line 146...
//
//
// 2. Inserting NOPs in the middle of pipeline only if supported:
// 2. Inserting NOPs in the middle of pipeline only if supported:
// At this time, only ex_freeze (and wb_freeze) can be deassrted when id_freeze (and if_freeze) are asserted.
// At this time, only ex_freeze (and wb_freeze) can be deassrted when id_freeze (and if_freeze) are asserted.
// This way NOP is asserted from stage ID into EX stage.
// This way NOP is asserted from stage ID into EX stage.
//
//
assign genpc_freeze = du_stall | flushpipe;
assign genpc_freeze = du_stall | flushpipe_r;
assign if_freeze = id_freeze | extend_flush;
assign if_freeze = id_freeze | extend_flush;
//assign id_freeze = (lsu_stall | (~lsu_unstall & if_stall) | multicycle_freeze | force_dslot_fetch) & ~flushpipe | du_stall;
//assign id_freeze = (lsu_stall | (~lsu_unstall & if_stall) | multicycle_freeze | force_dslot_fetch) & ~flushpipe | du_stall;
assign id_freeze = (lsu_stall | (~lsu_unstall & if_stall) | multicycle_freeze | force_dslot_fetch) | du_stall;
assign id_freeze = (lsu_stall | (~lsu_unstall & if_stall) | multicycle_freeze | force_dslot_fetch) | du_stall;
assign ex_freeze = wb_freeze;
assign ex_freeze = wb_freeze;
//assign wb_freeze = (lsu_stall | (~lsu_unstall & if_stall) | multicycle_freeze) & ~flushpipe | du_stall | mac_stall;
//assign wb_freeze = (lsu_stall | (~lsu_unstall & if_stall) | multicycle_freeze) & ~flushpipe | du_stall | mac_stall;
assign wb_freeze = (lsu_stall | (~lsu_unstall & if_stall) | multicycle_freeze) | du_stall | mac_stall | abort_ex;
assign wb_freeze = (lsu_stall | (~lsu_unstall & if_stall) | multicycle_freeze) | du_stall | mac_stall | abort_ex;
 
 
//
//
 
// registered flushpipe
 
//
 
always @(posedge clk or posedge rst)
 
        if (rst)
 
                flushpipe_r <= #1 1'b0;
 
        else if (icpu_ack_i | icpu_err_i)
 
//      else if (!if_stall)
 
                flushpipe_r <= #1 flushpipe;
 
        else if (!flushpipe)
 
                flushpipe_r <= #1 1'b0;
 
 
 
//
// Multicycle freeze
// Multicycle freeze
//
//
assign multicycle_freeze = |multicycle_cnt;
assign multicycle_freeze = |multicycle_cnt;
 
 
//
//

powered by: WebSVN 2.1.0

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