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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel_26/] [or1200/] [rtl/] [verilog/] [or1200_immu_top.v] - Diff between revs 1063 and 1161

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

Rev 1063 Rev 1161
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.11  2002/10/17 20:04:40  lampret
 
// Added BIST scan. Special VS RAMs need to be used to implement BIST.
 
//
// Revision 1.10  2002/09/16 03:08:56  lampret
// Revision 1.10  2002/09/16 03:08:56  lampret
// Disabled cache inhibit atttribute.
// Disabled cache inhibit atttribute.
//
//
// Revision 1.9  2002/08/18 19:54:17  lampret
// Revision 1.9  2002/08/18 19:54:17  lampret
// Added store buffer.
// Added store buffer.
Line 193... Line 196...
wire                            itlb_done;
wire                            itlb_done;
wire                            fault;
wire                            fault;
wire                            miss;
wire                            miss;
wire                            page_cross;
wire                            page_cross;
reg     [31:0]                   icpu_adr_o;
reg     [31:0]                   icpu_adr_o;
 
reg     [31:`OR1200_IMMU_PS]    icpu_vpn_r;
`ifdef OR1200_NO_IMMU
`ifdef OR1200_NO_IMMU
`else
`else
reg                             itlb_en_r;
reg                             itlb_en_r;
reg                             dis_spr_access;
reg                             dis_spr_access;
reg     [31:`OR1200_IMMU_PS]    icpu_vpn_r;
 
`endif
`endif
 
 
//
//
// Implemented bits inside match and translate registers
// Implemented bits inside match and translate registers
//
//
Line 226... Line 229...
                icpu_adr_o <= #1 icpu_adr_i;
                icpu_adr_o <= #1 icpu_adr_i;
`else
`else
Unsupported !!!
Unsupported !!!
`endif
`endif
 
 
 
//
 
// 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] != icpu_vpn_r;
 
 
 
//
 
// 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.
 
//
 
always @(posedge clk or posedge rst)
 
        if (rst)
 
                icpu_vpn_r <= #1 {31-`OR1200_IMMU_PS{1'b0}};
 
        else
 
                icpu_vpn_r <= #1 icpu_adr_i[31:`OR1200_IMMU_PS];
 
 
`ifdef OR1200_NO_IMMU
`ifdef OR1200_NO_IMMU
 
 
//
//
// Put all outputs in inactive state
// Put all outputs in inactive state
//
//
assign spr_dat_o = 32'h00000000;
assign spr_dat_o = 32'h00000000;
assign icimmu_adr_o = icpu_adr_i;
assign icimmu_adr_o = icpu_adr_i;
assign icpu_tag_o = icimmu_tag_i;
assign icpu_tag_o = icimmu_tag_i;
assign icimmu_cycstb_o = icpu_cycstb_i;
assign icimmu_cycstb_o = icpu_cycstb_i & ~page_cross;
assign icpu_rty_o = icimmu_rty_i;
assign icpu_rty_o = icimmu_rty_i;
assign icpu_err_o = icimmu_err_i;
assign icpu_err_o = icimmu_err_i;
assign icimmu_ci_o = `OR1200_IMMU_CI;
assign icimmu_ci_o = `OR1200_IMMU_CI;
`ifdef OR1200_BIST
`ifdef OR1200_BIST
assign scanb_so = scanb_si;
assign scanb_so = scanb_si;
Line 324... Line 344...
// 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;
// However this causes a async combinational loop so we stick to
// However this causes a async combinational loop so we stick to
// no cache inhibit.
// no cache inhibit.
assign icimmu_ci_o = `OR1200_IMMU_CI;
assign icimmu_ci_o = `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] != icpu_vpn_r;
 
 
 
//
 
// 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.
 
//
 
always @(posedge clk or posedge rst)
 
        if (rst)
 
                icpu_vpn_r <= #1 {31-`OR1200_IMMU_PS{1'b0}};
 
        else
 
                icpu_vpn_r <= #1 icpu_adr_i[31:`OR1200_IMMU_PS];
 
 
 
//
//
// Physical address is either translated virtual address or
// Physical address is either translated virtual address or
// simply equal when IMMU is disabled
// simply equal when IMMU is disabled
//
//

powered by: WebSVN 2.1.0

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