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

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel_5/] [or1200/] [rtl/] [verilog/] [or1200_sprs.v] - Diff between revs 504 and 589

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

Rev 504 Rev 589
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// 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.12  2001/11/23 21:42:31  simons
// Revision 1.12  2001/11/23 21:42:31  simons
// Program counter divided to PPC and NPC.
// Program counter divided to PPC and NPC.
//
//
// Revision 1.11  2001/11/23 08:38:51  lampret
// Revision 1.11  2001/11/23 08:38:51  lampret
// Changed DSR/DRR behavior and exception detection.
// Changed DSR/DRR behavior and exception detection.
Line 254... Line 257...
//
//
 
 
//
//
// What to write into SR
// What to write into SR
//
//
assign to_sr = (branch_op == `OR1200_BRANCHOP_RFE) ? esr : spr_dataout[`OR1200_SR_WIDTH-1:0];
assign to_sr = (branch_op == `OR1200_BRANCHOP_RFE) ? esr : {1'b1, spr_dataout[`OR1200_SR_WIDTH-2:0]};
 
 
//
//
// Selects for system SPRs
// Selects for system SPRs
//
//
assign cfgr_sel = (spr_cs[`OR1200_SPR_GROUP_SYS] && (spr_addr[10:4] == `OR1200_SPR_CFGR));
assign cfgr_sel = (spr_cs[`OR1200_SPR_GROUP_SYS] && (spr_addr[10:4] == `OR1200_SPR_CFGR));
Line 301... Line 304...
//
//
always @(posedge clk or posedge rst)
always @(posedge clk or posedge rst)
        if (rst)
        if (rst)
                sr <= #1 `OR1200_SR_WIDTH'b011;
                sr <= #1 `OR1200_SR_WIDTH'b011;
        else if (except_started) begin
        else if (except_started) begin
`ifdef OR1200_VERBOSE
                sr[`OR1200_SR_SM] <= #1 1'b1;
// synopsys translate_off
                sr[`OR1200_SR_TEE] <= #1 1'b0;
                $display(" INFO: exception started. SR[SUPV] set and SR[EIR] cleared.");
                sr[`OR1200_SR_IEE] <= #1 1'b0;
// synopsys translate_on
 
`endif
 
                sr[`OR1200_SR_SUPV] <= #1 1'b1;
 
                sr[`OR1200_SR_EIR] <= #1 1'b0;
 
                sr[`OR1200_SR_DME] <= #1 1'b0;
                sr[`OR1200_SR_DME] <= #1 1'b0;
                sr[`OR1200_SR_IME] <= #1 1'b0;
                sr[`OR1200_SR_IME] <= #1 1'b0;
        end
        end
        else if (sr_we) begin
        else if (sr_we)
`ifdef OR1200_VERBOSE
                sr <= #1 to_sr[`OR1200_SR_WIDTH-1:0];
// synopsys translate_off
        else if (flag_we)
                $display(" INFO: writing into SR register: %h", spr_dataout);
 
// synopsys translate_on
 
`endif
 
                sr <= #1 {to_sr[`OR1200_SR_WIDTH-1:2], 1'b1, to_sr[0]};
 
        end
 
        else if (flag_we) begin
 
`ifdef OR1200_VERBOSE
 
// synopsys translate_off
 
                $display(" INFO: setting SR[F] bit: %b", flagforw);
 
// synopsys translate_on
 
`endif
 
                sr[`OR1200_SR_F] <= #1 flagforw;
                sr[`OR1200_SR_F] <= #1 flagforw;
        end
 
 
 
//
//
// MTSPR/MFSPR interface
// MTSPR/MFSPR interface
//
//
always @(sprs_op or spr_addr or spr_dataout or sys_data or spr_dat_mac or spr_dat_pic or spr_dat_pm or
always @(sprs_op or spr_addr or spr_dataout or sys_data or spr_dat_mac or spr_dat_pic or spr_dat_pm or

powered by: WebSVN 2.1.0

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