Line 42... |
Line 42... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.1 2001/08/09 13:39:33 lampret
|
|
// Major clean-up.
|
|
//
|
// Revision 1.1 2001/07/20 00:46:21 lampret
|
// Revision 1.1 2001/07/20 00:46:21 lampret
|
// Development version of RTL. Libraries are missing.
|
// Development version of RTL. Libraries are missing.
|
//
|
//
|
//
|
//
|
|
|
|
// synopsys translate_off
|
`include "timescale.v"
|
`include "timescale.v"
|
|
// synopsys translate_on
|
`include "defines.v"
|
`include "defines.v"
|
|
|
module cfgr(
|
module cfgr(
|
// RISC Internal Interface
|
// RISC Internal Interface
|
clk, rst, spr_addr, spr_dat_o
|
clk, rst, spr_addr, spr_dat_o
|
Line 79... |
Line 84... |
`ifdef SYS_FULL_DECODE
|
`ifdef SYS_FULL_DECODE
|
if (!spr_addr[31:4])
|
if (!spr_addr[31:4])
|
`endif
|
`endif
|
case(spr_addr[3:0])
|
case(spr_addr[3:0])
|
`SPRGRP_SYS_VR: begin
|
`SPRGRP_SYS_VR: begin
|
spr_dat_o[`VR_REV_BITS] <= `VR_REV;
|
spr_dat_o[`VR_REV_BITS] = `VR_REV;
|
spr_dat_o[`VR_RES1_BITS] <= `VR_RES1;
|
spr_dat_o[`VR_RES1_BITS] = `VR_RES1;
|
spr_dat_o[`VR_CFG_BITS] <= `VR_CFG;
|
spr_dat_o[`VR_CFG_BITS] = `VR_CFG;
|
spr_dat_o[`VR_VER_BITS] <= `VR_VER;
|
spr_dat_o[`VR_VER_BITS] = `VR_VER;
|
end
|
end
|
`SPRGRP_SYS_UPR: begin
|
`SPRGRP_SYS_UPR: begin
|
spr_dat_o[`UPR_UP_BITS] <= `UPR_UP;
|
spr_dat_o[`UPR_UP_BITS] = `UPR_UP;
|
spr_dat_o[`UPR_DCP_BITS] <= `UPR_DCP;
|
spr_dat_o[`UPR_DCP_BITS] = `UPR_DCP;
|
spr_dat_o[`UPR_ICP_BITS] <= `UPR_ICP;
|
spr_dat_o[`UPR_ICP_BITS] = `UPR_ICP;
|
spr_dat_o[`UPR_DMP_BITS] <= `UPR_DMP;
|
spr_dat_o[`UPR_DMP_BITS] = `UPR_DMP;
|
spr_dat_o[`UPR_IMP_BITS] <= `UPR_IMP;
|
spr_dat_o[`UPR_IMP_BITS] = `UPR_IMP;
|
spr_dat_o[`UPR_MP_BITS] <= `UPR_MP;
|
spr_dat_o[`UPR_MP_BITS] = `UPR_MP;
|
spr_dat_o[`UPR_DUP_BITS] <= `UPR_DUP;
|
spr_dat_o[`UPR_DUP_BITS] = `UPR_DUP;
|
spr_dat_o[`UPR_PCUP_BITS] <= `UPR_PCUP;
|
spr_dat_o[`UPR_PCUP_BITS] = `UPR_PCUP;
|
spr_dat_o[`UPR_PMP_BITS] <= `UPR_PMP;
|
spr_dat_o[`UPR_PMP_BITS] = `UPR_PMP;
|
spr_dat_o[`UPR_PICP_BITS] <= `UPR_PICP;
|
spr_dat_o[`UPR_PICP_BITS] = `UPR_PICP;
|
spr_dat_o[`UPR_TTP_BITS] <= `UPR_TTP;
|
spr_dat_o[`UPR_TTP_BITS] = `UPR_TTP;
|
spr_dat_o[`UPR_RES1_BITS] <= `UPR_RES1;
|
spr_dat_o[`UPR_RES1_BITS] = `UPR_RES1;
|
spr_dat_o[`UPR_CUP_BITS] <= `UPR_CUP;
|
spr_dat_o[`UPR_CUP_BITS] = `UPR_CUP;
|
end
|
end
|
`SPRGRP_SYS_CPUCFGR: begin
|
`SPRGRP_SYS_CPUCFGR: begin
|
spr_dat_o[`CPUCFGR_NSGF_BITS] <= `CPUCFGR_NSGF;
|
spr_dat_o[`CPUCFGR_NSGF_BITS] = `CPUCFGR_NSGF;
|
spr_dat_o[`CPUCFGR_HGF_BITS] <= `CPUCFGR_HGF;
|
spr_dat_o[`CPUCFGR_HGF_BITS] = `CPUCFGR_HGF;
|
spr_dat_o[`CPUCFGR_OB32S_BITS] <= `CPUCFGR_OB32S;
|
spr_dat_o[`CPUCFGR_OB32S_BITS] = `CPUCFGR_OB32S;
|
spr_dat_o[`CPUCFGR_OB64S_BITS] <= `CPUCFGR_OB64S;
|
spr_dat_o[`CPUCFGR_OB64S_BITS] = `CPUCFGR_OB64S;
|
spr_dat_o[`CPUCFGR_OF32S_BITS] <= `CPUCFGR_OF32S;
|
spr_dat_o[`CPUCFGR_OF32S_BITS] = `CPUCFGR_OF32S;
|
spr_dat_o[`CPUCFGR_OF64S_BITS] <= `CPUCFGR_OF64S;
|
spr_dat_o[`CPUCFGR_OF64S_BITS] = `CPUCFGR_OF64S;
|
spr_dat_o[`CPUCFGR_OV64S_BITS] <= `CPUCFGR_OV64S;
|
spr_dat_o[`CPUCFGR_OV64S_BITS] = `CPUCFGR_OV64S;
|
spr_dat_o[`CPUCFGR_RES1_BITS] <= `CPUCFGR_RES1;
|
spr_dat_o[`CPUCFGR_RES1_BITS] = `CPUCFGR_RES1;
|
end
|
end
|
`SPRGRP_SYS_DMMUCFGR: begin
|
`SPRGRP_SYS_DMMUCFGR: begin
|
spr_dat_o[`DMMUCFGR_NTW_BITS] <= `DMMUCFGR_NTW;
|
spr_dat_o[`DMMUCFGR_NTW_BITS] = `DMMUCFGR_NTW;
|
spr_dat_o[`DMMUCFGR_NTS_BITS] <= `DMMUCFGR_NTS;
|
spr_dat_o[`DMMUCFGR_NTS_BITS] = `DMMUCFGR_NTS;
|
spr_dat_o[`DMMUCFGR_NAE_BITS] <= `DMMUCFGR_NAE;
|
spr_dat_o[`DMMUCFGR_NAE_BITS] = `DMMUCFGR_NAE;
|
spr_dat_o[`DMMUCFGR_CRI_BITS] <= `DMMUCFGR_CRI;
|
spr_dat_o[`DMMUCFGR_CRI_BITS] = `DMMUCFGR_CRI;
|
spr_dat_o[`DMMUCFGR_PRI_BITS] <= `DMMUCFGR_PRI;
|
spr_dat_o[`DMMUCFGR_PRI_BITS] = `DMMUCFGR_PRI;
|
spr_dat_o[`DMMUCFGR_TEIRI_BITS] <= `DMMUCFGR_TEIRI;
|
spr_dat_o[`DMMUCFGR_TEIRI_BITS] = `DMMUCFGR_TEIRI;
|
spr_dat_o[`DMMUCFGR_HTR_BITS] <= `DMMUCFGR_HTR;
|
spr_dat_o[`DMMUCFGR_HTR_BITS] = `DMMUCFGR_HTR;
|
spr_dat_o[`DMMUCFGR_RES1_BITS] <= `DMMUCFGR_RES1;
|
spr_dat_o[`DMMUCFGR_RES1_BITS] = `DMMUCFGR_RES1;
|
end
|
end
|
`SPRGRP_SYS_IMMUCFGR: begin
|
`SPRGRP_SYS_IMMUCFGR: begin
|
spr_dat_o[`IMMUCFGR_NTW_BITS] <= `IMMUCFGR_NTW;
|
spr_dat_o[`IMMUCFGR_NTW_BITS] = `IMMUCFGR_NTW;
|
spr_dat_o[`IMMUCFGR_NTS_BITS] <= `IMMUCFGR_NTS;
|
spr_dat_o[`IMMUCFGR_NTS_BITS] = `IMMUCFGR_NTS;
|
spr_dat_o[`IMMUCFGR_NAE_BITS] <= `IMMUCFGR_NAE;
|
spr_dat_o[`IMMUCFGR_NAE_BITS] = `IMMUCFGR_NAE;
|
spr_dat_o[`IMMUCFGR_CRI_BITS] <= `IMMUCFGR_CRI;
|
spr_dat_o[`IMMUCFGR_CRI_BITS] = `IMMUCFGR_CRI;
|
spr_dat_o[`IMMUCFGR_PRI_BITS] <= `IMMUCFGR_PRI;
|
spr_dat_o[`IMMUCFGR_PRI_BITS] = `IMMUCFGR_PRI;
|
spr_dat_o[`IMMUCFGR_TEIRI_BITS] <= `IMMUCFGR_TEIRI;
|
spr_dat_o[`IMMUCFGR_TEIRI_BITS] = `IMMUCFGR_TEIRI;
|
spr_dat_o[`IMMUCFGR_HTR_BITS] <= `IMMUCFGR_HTR;
|
spr_dat_o[`IMMUCFGR_HTR_BITS] = `IMMUCFGR_HTR;
|
spr_dat_o[`IMMUCFGR_RES1_BITS] <= `IMMUCFGR_RES1;
|
spr_dat_o[`IMMUCFGR_RES1_BITS] = `IMMUCFGR_RES1;
|
end
|
end
|
`SPRGRP_SYS_DCCFGR: begin
|
`SPRGRP_SYS_DCCFGR: begin
|
spr_dat_o[`DCCFGR_NCW_BITS] <= `DCCFGR_NCW;
|
spr_dat_o[`DCCFGR_NCW_BITS] = `DCCFGR_NCW;
|
spr_dat_o[`DCCFGR_NCS_BITS] <= `DCCFGR_NCS;
|
spr_dat_o[`DCCFGR_NCS_BITS] = `DCCFGR_NCS;
|
spr_dat_o[`DCCFGR_CBS_BITS] <= `DCCFGR_CBS;
|
spr_dat_o[`DCCFGR_CBS_BITS] = `DCCFGR_CBS;
|
spr_dat_o[`DCCFGR_CWS_BITS] <= `DCCFGR_CWS;
|
spr_dat_o[`DCCFGR_CWS_BITS] = `DCCFGR_CWS;
|
spr_dat_o[`DCCFGR_CCRI_BITS] <= `DCCFGR_CCRI;
|
spr_dat_o[`DCCFGR_CCRI_BITS] = `DCCFGR_CCRI;
|
spr_dat_o[`DCCFGR_CBIRI_BITS] <= `DCCFGR_CBIRI;
|
spr_dat_o[`DCCFGR_CBIRI_BITS] = `DCCFGR_CBIRI;
|
spr_dat_o[`DCCFGR_CBPRI_BITS] <= `DCCFGR_CBPRI;
|
spr_dat_o[`DCCFGR_CBPRI_BITS] = `DCCFGR_CBPRI;
|
spr_dat_o[`DCCFGR_CBLRI_BITS] <= `DCCFGR_CBLRI;
|
spr_dat_o[`DCCFGR_CBLRI_BITS] = `DCCFGR_CBLRI;
|
spr_dat_o[`DCCFGR_CBFRI_BITS] <= `DCCFGR_CBFRI;
|
spr_dat_o[`DCCFGR_CBFRI_BITS] = `DCCFGR_CBFRI;
|
spr_dat_o[`DCCFGR_CBWBRI_BITS] <= `DCCFGR_CBWBRI;
|
spr_dat_o[`DCCFGR_CBWBRI_BITS] = `DCCFGR_CBWBRI;
|
spr_dat_o[`DCCFGR_RES1_BITS] <= `DCCFGR_RES1;
|
spr_dat_o[`DCCFGR_RES1_BITS] = `DCCFGR_RES1;
|
end
|
end
|
`SPRGRP_SYS_ICCFGR: begin
|
`SPRGRP_SYS_ICCFGR: begin
|
spr_dat_o[`ICCFGR_NCW_BITS] <= `ICCFGR_NCW;
|
spr_dat_o[`ICCFGR_NCW_BITS] = `ICCFGR_NCW;
|
spr_dat_o[`ICCFGR_NCS_BITS] <= `ICCFGR_NCS;
|
spr_dat_o[`ICCFGR_NCS_BITS] = `ICCFGR_NCS;
|
spr_dat_o[`ICCFGR_CBS_BITS] <= `ICCFGR_CBS;
|
spr_dat_o[`ICCFGR_CBS_BITS] = `ICCFGR_CBS;
|
spr_dat_o[`ICCFGR_CWS_BITS] <= `ICCFGR_CWS;
|
spr_dat_o[`ICCFGR_CWS_BITS] = `ICCFGR_CWS;
|
spr_dat_o[`ICCFGR_CCRI_BITS] <= `ICCFGR_CCRI;
|
spr_dat_o[`ICCFGR_CCRI_BITS] = `ICCFGR_CCRI;
|
spr_dat_o[`ICCFGR_CBIRI_BITS] <= `ICCFGR_CBIRI;
|
spr_dat_o[`ICCFGR_CBIRI_BITS] = `ICCFGR_CBIRI;
|
spr_dat_o[`ICCFGR_CBPRI_BITS] <= `ICCFGR_CBPRI;
|
spr_dat_o[`ICCFGR_CBPRI_BITS] = `ICCFGR_CBPRI;
|
spr_dat_o[`ICCFGR_CBLRI_BITS] <= `ICCFGR_CBLRI;
|
spr_dat_o[`ICCFGR_CBLRI_BITS] = `ICCFGR_CBLRI;
|
spr_dat_o[`ICCFGR_CBFRI_BITS] <= `ICCFGR_CBFRI;
|
spr_dat_o[`ICCFGR_CBFRI_BITS] = `ICCFGR_CBFRI;
|
spr_dat_o[`ICCFGR_CBWBRI_BITS] <= `ICCFGR_CBWBRI;
|
spr_dat_o[`ICCFGR_CBWBRI_BITS] = `ICCFGR_CBWBRI;
|
spr_dat_o[`ICCFGR_RES1_BITS] <= `ICCFGR_RES1;
|
spr_dat_o[`ICCFGR_RES1_BITS] = `ICCFGR_RES1;
|
end
|
end
|
`SPRGRP_SYS_DCFGR: begin
|
`SPRGRP_SYS_DCFGR: begin
|
spr_dat_o[`DCFGR_NDP_BITS] <= `DCFGR_NDP;
|
spr_dat_o[`DCFGR_NDP_BITS] = `DCFGR_NDP;
|
spr_dat_o[`DCFGR_WPCI_BITS] <= `DCFGR_WPCI;
|
spr_dat_o[`DCFGR_WPCI_BITS] = `DCFGR_WPCI;
|
spr_dat_o[`DCFGR_RES1_BITS] <= `DCFGR_RES1;
|
spr_dat_o[`DCFGR_RES1_BITS] = `DCFGR_RES1;
|
end
|
end
|
default: spr_dat_o <= 32'b0;
|
default: spr_dat_o = 32'h0000_0000;
|
endcase
|
endcase
|
|
`ifdef SYS_FULL_DECODE
|
|
else
|
|
spr_dat_o = 32'h0000_0000;
|
|
`endif
|
|
|
`else
|
`else
|
|
|
//
|
//
|
// When configuration registers are not implemented, only
|
// When configuration registers are not implemented, only
|
// implement VR and UPR
|
// implement VR and UPR
|
Line 174... |
Line 184... |
`ifdef SYS_FULL_DECODE
|
`ifdef SYS_FULL_DECODE
|
if (!spr_addr[31:4])
|
if (!spr_addr[31:4])
|
`endif
|
`endif
|
case(spr_addr[3:0])
|
case(spr_addr[3:0])
|
`SPRGRP_SYS_VR: begin
|
`SPRGRP_SYS_VR: begin
|
spr_dat_o[`VR_REV_BITS] <= `VR_REV;
|
spr_dat_o[`VR_REV_BITS] = `VR_REV;
|
spr_dat_o[`VR_RES1_BITS] <= `VR_RES1;
|
spr_dat_o[`VR_RES1_BITS] = `VR_RES1;
|
spr_dat_o[`VR_CFG_BITS] <= `VR_CFG;
|
spr_dat_o[`VR_CFG_BITS] = `VR_CFG;
|
spr_dat_o[`VR_VER_BITS] <= `VR_VER;
|
spr_dat_o[`VR_VER_BITS] = `VR_VER;
|
end
|
end
|
`SPRGRP_SYS_UPR: begin
|
`SPRGRP_SYS_UPR: begin
|
spr_dat_o[`UPR_UP_BITS] <= `UPR_UP;
|
spr_dat_o[`UPR_UP_BITS] = `UPR_UP;
|
spr_dat_o[`UPR_DCP_BITS] <= `UPR_DCP;
|
spr_dat_o[`UPR_DCP_BITS] = `UPR_DCP;
|
spr_dat_o[`UPR_ICP_BITS] <= `UPR_ICP;
|
spr_dat_o[`UPR_ICP_BITS] = `UPR_ICP;
|
spr_dat_o[`UPR_DMP_BITS] <= `UPR_DMP;
|
spr_dat_o[`UPR_DMP_BITS] = `UPR_DMP;
|
spr_dat_o[`UPR_IMP_BITS] <= `UPR_IMP;
|
spr_dat_o[`UPR_IMP_BITS] = `UPR_IMP;
|
spr_dat_o[`UPR_MP_BITS] <= `UPR_MP;
|
spr_dat_o[`UPR_MP_BITS] = `UPR_MP;
|
spr_dat_o[`UPR_DUP_BITS] <= `UPR_DUP;
|
spr_dat_o[`UPR_DUP_BITS] = `UPR_DUP;
|
spr_dat_o[`UPR_PCUP_BITS] <= `UPR_PCUP;
|
spr_dat_o[`UPR_PCUP_BITS] = `UPR_PCUP;
|
spr_dat_o[`UPR_PMP_BITS] <= `UPR_PMP;
|
spr_dat_o[`UPR_PMP_BITS] = `UPR_PMP;
|
spr_dat_o[`UPR_PICP_BITS] <= `UPR_PICP;
|
spr_dat_o[`UPR_PICP_BITS] = `UPR_PICP;
|
spr_dat_o[`UPR_TTP_BITS] <= `UPR_TTP;
|
spr_dat_o[`UPR_TTP_BITS] = `UPR_TTP;
|
spr_dat_o[`UPR_RES1_BITS] <= `UPR_RES1;
|
spr_dat_o[`UPR_RES1_BITS] = `UPR_RES1;
|
spr_dat_o[`UPR_CUP_BITS] <= `UPR_CUP;
|
spr_dat_o[`UPR_CUP_BITS] = `UPR_CUP;
|
end
|
end
|
default: spr_dat_o <= 32'b0;
|
default: spr_dat_o = 32'h0000_0000;
|
endcase
|
endcase
|
|
`ifdef SYS_FULL_DECODE
|
|
else
|
|
spr_dat_o = 32'h0000_0000;
|
|
`endif
|
|
|
`endif
|
`endif
|
|
|
endmodule
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|