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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1200/] [rtl/] [verilog/] [or1200_sprs.v] - Diff between revs 258 and 353

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

Rev 258 Rev 353
Line 97... Line 97...
input   [15:0]                   addrofs;        // SPR offset
input   [15:0]                   addrofs;        // SPR offset
input   [width-1:0]              dat_i;          // SPR write data
input   [width-1:0]              dat_i;          // SPR write data
input                           ex_spr_read;    // l.mfspr in EX
input                           ex_spr_read;    // l.mfspr in EX
input                           ex_spr_write;   // l.mtspr in EX
input                           ex_spr_write;   // l.mtspr in EX
input   [`OR1200_BRANCHOP_WIDTH-1:0]     branch_op;      // Branch operation
input   [`OR1200_BRANCHOP_WIDTH-1:0]     branch_op;      // Branch operation
input   [width-1:0]              epcr;           // EPCR0
input   [width-1:0]              epcr /* verilator public */;            // EPCR0
input   [width-1:0]              eear;           // EEAR0
input   [width-1:0]              eear /* verilator public */;            // EEAR0
input   [`OR1200_SR_WIDTH-1:0]   esr;            // ESR0
input   [`OR1200_SR_WIDTH-1:0]   esr /* verilator public */;             // ESR0
input                           except_started; // Exception was started
input                           except_started; // Exception was started
output  [width-1:0]              to_wbmux;       // For l.mfspr
output  [width-1:0]              to_wbmux;       // For l.mfspr
output                          epcr_we;        // EPCR0 write enable
output                          epcr_we;        // EPCR0 write enable
output                          eear_we;        // EEAR0 write enable
output                          eear_we;        // EEAR0 write enable
output                          esr_we;         // ESR0 write enable
output                          esr_we;         // ESR0 write enable
output                          pc_we;          // PC write enable
output                          pc_we;          // PC write enable
output                          sr_we;          // Write enable SR
output                          sr_we;          // Write enable SR
output  [`OR1200_SR_WIDTH-1:0]   to_sr;          // Data to SR
output  [`OR1200_SR_WIDTH-1:0]   to_sr;          // Data to SR
output  [`OR1200_SR_WIDTH-1:0]   sr;             // SR
output  [`OR1200_SR_WIDTH-1:0]   sr /* verilator public */;              // SR
input   [31:0]                   spr_dat_cfgr;   // Data from CFGR
input   [31:0]                   spr_dat_cfgr;   // Data from CFGR
input   [31:0]                   spr_dat_rf;     // Data from RF
input   [31:0]                   spr_dat_rf;     // Data from RF
input   [31:0]                   spr_dat_npc;    // Data from NPC
input   [31:0]                   spr_dat_npc;    // Data from NPC
input   [31:0]                   spr_dat_ppc;    // Data from PPC   
input   [31:0]                   spr_dat_ppc;    // Data from PPC   
input   [31:0]                   spr_dat_mac;    // Data from MAC
input   [31:0]                   spr_dat_mac;    // Data from MAC
Line 356... Line 356...
 
 
// EPH part joined together with rest of Supervision register
// EPH part joined together with rest of Supervision register
always @(sr_reg or sr_reg_bit_eph_muxed)
always @(sr_reg or sr_reg_bit_eph_muxed)
        sr = {sr_reg[`OR1200_SR_WIDTH-1:`OR1200_SR_WIDTH-2], sr_reg_bit_eph_muxed, sr_reg[`OR1200_SR_WIDTH-4:0]};
        sr = {sr_reg[`OR1200_SR_WIDTH-1:`OR1200_SR_WIDTH-2], sr_reg_bit_eph_muxed, sr_reg[`OR1200_SR_WIDTH-4:0]};
 
 
 
`ifdef verilator
 
   // Function to access various sprs (for Verilator). Have to hide this from
 
   // simulator, since functions with no inputs are not allowed in IEEE
 
   // 1364-2001.
 
 
 
   function [31:0] get_sr;
 
      // verilator public
 
      get_sr = sr;
 
   endfunction // get_sr
 
 
 
   function [31:0] get_epcr;
 
      // verilator public
 
      get_epcr = epcr;
 
   endfunction // get_epcr
 
 
 
   function [31:0] get_eear;
 
      // verilator public
 
      get_eear = eear;
 
   endfunction // get_eear
 
 
 
   function [31:0] get_esr;
 
      // verilator public
 
      get_esr = esr;
 
   endfunction // get_esr
 
 
 
`endif
 
 
 
 
//
//
// MTSPR/MFSPR interface
// MTSPR/MFSPR interface
//
//
always @(spr_addr or sys_data or spr_dat_mac or spr_dat_pic or spr_dat_pm or
always @(spr_addr or sys_data or spr_dat_mac or spr_dat_pic or spr_dat_pm or
         spr_dat_fpu or
         spr_dat_fpu or

powered by: WebSVN 2.1.0

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