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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel_21/] [or1200/] [rtl/] [verilog/] [or1200_immu_top.v] - Diff between revs 788 and 942

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

Rev 788 Rev 942
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.6  2002/03/29 15:16:56  lampret
 
// Some of the warnings fixed.
 
//
// Revision 1.5  2002/02/11 04:33:17  lampret
// Revision 1.5  2002/02/11 04:33:17  lampret
// Speed optimizations (removed duplicate _cyc_ and _stb_). Fixed D/IMMU cache-inhibit attr.
// Speed optimizations (removed duplicate _cyc_ and _stb_). Fixed D/IMMU cache-inhibit attr.
//
//
// Revision 1.4  2002/02/01 19:56:54  lampret
// Revision 1.4  2002/02/01 19:56:54  lampret
// Fixed combinational loops.
// Fixed combinational loops.
Line 160... Line 163...
wire                            itlb_en;
wire                            itlb_en;
wire                            itlb_ci;
wire                            itlb_ci;
wire                            itlb_done;
wire                            itlb_done;
wire                            fault;
wire                            fault;
wire                            miss;
wire                            miss;
 
wire                            page_cross;
reg     [31:0]                   icpu_adr_o;
reg     [31:0]                   icpu_adr_o;
`ifdef OR1200_NO_IMMU
`ifdef OR1200_NO_IMMU
`else
`else
reg                             itlb_en_r;
reg                             itlb_en_r;
reg     [31:`OR1200_IMMU_PS]    icpu_vpn_r;
reg     [31:`OR1200_IMMU_PS]    icpu_vpn_r;
Line 257... Line 261...
 
 
//
//
// Cut transfer if something goes wrong with translation. If IC is disabled,
// Cut transfer if something goes wrong with translation. If IC is disabled,
// use delayed signals.
// use delayed signals.
//
//
assign icimmu_cycstb_o = (!ic_en & immu_en) ? ~(miss | fault) & icpu_cycstb_i : (miss | fault) ? 1'b0 : icpu_cycstb_i;
assign icimmu_cycstb_o = (!ic_en & immu_en) ? ~(miss | fault) & icpu_cycstb_i & ~page_cross : (miss | fault) ? 1'b0 : icpu_cycstb_i & ~page_cross;
 
 
//
//
// Cache Inhibit
// Cache Inhibit
//
//
assign icimmu_ci_o = immu_en ? itlb_done & itlb_ci : `OR1200_IMMU_CI;
assign icimmu_ci_o = immu_en ? itlb_done & itlb_ci : `OR1200_IMMU_CI;
 
 
//
//
 
// Page cross
 
//
 
// Asserted when CPU address crosses page boundary. Most of the time it is zero.
 
//
 
assign page_cross = icpu_adr_i[31:`OR1200_IMMU_PS] != icimmu_adr_o[31:`OR1200_IMMU_PS];
 
 
 
//
// Register icpu_adr_i's VPN for use when IMMU is not enabled but PPN is expected to come
// Register icpu_adr_i's VPN for use when IMMU is not enabled but PPN is expected to come
// one clock cycle after offset part.
// one clock cycle after offset part.
//
//
always @(posedge clk or posedge rst)
always @(posedge clk or posedge rst)
        if (rst)
        if (rst)

powered by: WebSVN 2.1.0

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