| 1 |
2 |
tobil |
//////////////////////////////////////////////////////////////////////
|
| 2 |
|
|
//// ////
|
| 3 |
|
|
//// OR1200's interface to SPRs ////
|
| 4 |
|
|
//// ////
|
| 5 |
|
|
//// This file is part of the OpenRISC 1200 project ////
|
| 6 |
|
|
//// http://www.opencores.org/cores/or1k/ ////
|
| 7 |
|
|
//// ////
|
| 8 |
|
|
//// Description ////
|
| 9 |
|
|
//// Decoding of SPR addresses and access to SPRs ////
|
| 10 |
|
|
//// ////
|
| 11 |
|
|
//// To Do: ////
|
| 12 |
|
|
//// - make it smaller and faster ////
|
| 13 |
|
|
//// ////
|
| 14 |
|
|
//// Author(s): ////
|
| 15 |
|
|
//// - Damjan Lampret, lampret@opencores.org ////
|
| 16 |
|
|
//// ////
|
| 17 |
|
|
//////////////////////////////////////////////////////////////////////
|
| 18 |
|
|
//// ////
|
| 19 |
|
|
//// Copyright (C) 2000 Authors and OPENCORES.ORG ////
|
| 20 |
|
|
//// ////
|
| 21 |
|
|
//// This source file may be used and distributed without ////
|
| 22 |
|
|
//// restriction provided that this copyright statement is not ////
|
| 23 |
|
|
//// removed from the file and that any derivative work contains ////
|
| 24 |
|
|
//// the original copyright notice and the associated disclaimer. ////
|
| 25 |
|
|
//// ////
|
| 26 |
|
|
//// This source file is free software; you can redistribute it ////
|
| 27 |
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
| 28 |
|
|
//// Public License as published by the Free Software Foundation; ////
|
| 29 |
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
| 30 |
|
|
//// later version. ////
|
| 31 |
|
|
//// ////
|
| 32 |
|
|
//// This source is distributed in the hope that it will be ////
|
| 33 |
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
| 34 |
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
| 35 |
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
| 36 |
|
|
//// details. ////
|
| 37 |
|
|
//// ////
|
| 38 |
|
|
//// You should have received a copy of the GNU Lesser General ////
|
| 39 |
|
|
//// Public License along with this source; if not, download it ////
|
| 40 |
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
| 41 |
|
|
//// ////
|
| 42 |
|
|
//////////////////////////////////////////////////////////////////////
|
| 43 |
|
|
//
|
| 44 |
|
|
// CVS Revision History
|
| 45 |
|
|
//
|
| 46 |
|
|
// $Log: not supported by cvs2svn $
|
| 47 |
|
|
// Revision 1.9.4.1 2003/12/17 13:43:38 simons
|
| 48 |
|
|
// Exception prefix configuration changed.
|
| 49 |
|
|
//
|
| 50 |
|
|
// Revision 1.9 2002/09/07 05:42:02 lampret
|
| 51 |
|
|
// Added optional SR[CY]. Added define to enable additional (compare) flag modifiers. Defines are OR1200_IMPL_ADDC and OR1200_ADDITIONAL_FLAG_MODIFIERS.
|
| 52 |
|
|
//
|
| 53 |
|
|
// Revision 1.8 2002/08/28 01:44:25 lampret
|
| 54 |
|
|
// Removed some commented RTL. Fixed SR/ESR flag bug.
|
| 55 |
|
|
//
|
| 56 |
|
|
// Revision 1.7 2002/03/29 15:16:56 lampret
|
| 57 |
|
|
// Some of the warnings fixed.
|
| 58 |
|
|
//
|
| 59 |
|
|
// Revision 1.6 2002/03/11 01:26:57 lampret
|
| 60 |
|
|
// Changed generation of SPR address. Now it is ORed from base and offset instead of a sum.
|
| 61 |
|
|
//
|
| 62 |
|
|
// Revision 1.5 2002/02/01 19:56:54 lampret
|
| 63 |
|
|
// Fixed combinational loops.
|
| 64 |
|
|
//
|
| 65 |
|
|
// Revision 1.4 2002/01/23 07:52:36 lampret
|
| 66 |
|
|
// Changed default reset values for SR and ESR to match or1ksim's. Fixed flop model in or1200_dpram_32x32 when OR1200_XILINX_RAM32X1D is defined.
|
| 67 |
|
|
//
|
| 68 |
|
|
// Revision 1.3 2002/01/19 09:27:49 lampret
|
| 69 |
|
|
// SR[TEE] should be zero after reset.
|
| 70 |
|
|
//
|
| 71 |
|
|
// Revision 1.2 2002/01/18 07:56:00 lampret
|
| 72 |
|
|
// No more low/high priority interrupts (PICPR removed). Added tick timer exception. Added exception prefix (SR[EPH]). Fixed single-step bug whenreading NPC.
|
| 73 |
|
|
//
|
| 74 |
|
|
// Revision 1.1 2002/01/03 08:16:15 lampret
|
| 75 |
|
|
// New prefixes for RTL files, prefixed module names. Updated cache controllers and MMUs.
|
| 76 |
|
|
//
|
| 77 |
|
|
// Revision 1.12 2001/11/23 21:42:31 simons
|
| 78 |
|
|
// Program counter divided to PPC and NPC.
|
| 79 |
|
|
//
|
| 80 |
|
|
// Revision 1.11 2001/11/23 08:38:51 lampret
|
| 81 |
|
|
// Changed DSR/DRR behavior and exception detection.
|
| 82 |
|
|
//
|
| 83 |
|
|
// Revision 1.10 2001/11/12 01:45:41 lampret
|
| 84 |
|
|
// Moved flag bit into SR. Changed RF enable from constant enable to dynamic enable for read ports.
|
| 85 |
|
|
//
|
| 86 |
|
|
// Revision 1.9 2001/10/21 17:57:16 lampret
|
| 87 |
|
|
// Removed params from generic_XX.v. Added translate_off/on in sprs.v and id.v. Removed spr_addr from dc.v and ic.v. Fixed CR+LF.
|
| 88 |
|
|
//
|
| 89 |
|
|
// Revision 1.8 2001/10/14 13:12:10 lampret
|
| 90 |
|
|
// MP3 version.
|
| 91 |
|
|
//
|
| 92 |
|
|
// Revision 1.1.1.1 2001/10/06 10:18:36 igorm
|
| 93 |
|
|
// no message
|
| 94 |
|
|
//
|
| 95 |
|
|
// Revision 1.3 2001/08/13 03:36:20 lampret
|
| 96 |
|
|
// Added cfg regs. Moved all defines into one defines.v file. More cleanup.
|
| 97 |
|
|
//
|
| 98 |
|
|
// Revision 1.2 2001/08/09 13:39:33 lampret
|
| 99 |
|
|
// Major clean-up.
|
| 100 |
|
|
//
|
| 101 |
|
|
// Revision 1.1 2001/07/20 00:46:21 lampret
|
| 102 |
|
|
// Development version of RTL. Libraries are missing.
|
| 103 |
|
|
//
|
| 104 |
|
|
//
|
| 105 |
|
|
|
| 106 |
|
|
// synopsys translate_off
|
| 107 |
|
|
`include "timescale.v"
|
| 108 |
|
|
// synopsys translate_on
|
| 109 |
|
|
`include "or1200_defines.v"
|
| 110 |
|
|
|
| 111 |
|
|
module or1200_sprs_cm4(
|
| 112 |
|
|
clk_i_cml_1,
|
| 113 |
|
|
clk_i_cml_2,
|
| 114 |
|
|
clk_i_cml_3,
|
| 115 |
|
|
|
| 116 |
|
|
// Clk & Rst
|
| 117 |
|
|
clk, rst,
|
| 118 |
|
|
|
| 119 |
|
|
// Internal CPU interface
|
| 120 |
|
|
flagforw, flag_we, flag, cyforw, cy_we, carry,
|
| 121 |
|
|
addrbase, addrofs, dat_i, alu_op, branch_op,
|
| 122 |
|
|
epcr, eear, esr, except_started,
|
| 123 |
|
|
to_wbmux, epcr_we, eear_we, esr_we, pc_we, sr_we, to_sr, sr,
|
| 124 |
|
|
spr_dat_cfgr, spr_dat_rf, spr_dat_npc, spr_dat_ppc, spr_dat_mac,
|
| 125 |
|
|
|
| 126 |
|
|
// From/to other RISC units
|
| 127 |
|
|
spr_dat_pic, spr_dat_tt, spr_dat_pm,
|
| 128 |
|
|
spr_dat_dmmu, spr_dat_immu, spr_dat_du,
|
| 129 |
|
|
spr_addr, spr_dat_o, spr_cs, spr_we,
|
| 130 |
|
|
|
| 131 |
|
|
du_addr, du_dat_du, du_read,
|
| 132 |
|
|
du_write, du_dat_cpu
|
| 133 |
|
|
|
| 134 |
|
|
);
|
| 135 |
|
|
|
| 136 |
|
|
|
| 137 |
|
|
input clk_i_cml_1;
|
| 138 |
|
|
input clk_i_cml_2;
|
| 139 |
|
|
input clk_i_cml_3;
|
| 140 |
|
|
reg [ 32 - 1 : 0 ] dat_i_cml_3;
|
| 141 |
|
|
reg [ 32 - 1 : 0 ] dat_i_cml_2;
|
| 142 |
|
|
reg [ 32 - 1 : 0 ] dat_i_cml_1;
|
| 143 |
|
|
reg [ 3 - 1 : 0 ] branch_op_cml_1;
|
| 144 |
|
|
reg [ 32 - 1 : 0 ] epcr_cml_1;
|
| 145 |
|
|
reg [ 32 - 1 : 0 ] eear_cml_1;
|
| 146 |
|
|
reg [ 16 - 1 : 0 ] esr_cml_1;
|
| 147 |
|
|
reg [ 32 - 1 : 0 ] to_wbmux_cml_3;
|
| 148 |
|
|
reg sr_we_cml_3;
|
| 149 |
|
|
reg sr_we_cml_2;
|
| 150 |
|
|
reg [ 16 - 1 : 0 ] to_sr_cml_3;
|
| 151 |
|
|
reg [ 16 - 1 : 0 ] to_sr_cml_2;
|
| 152 |
|
|
reg [ 16 - 1 : 0 ] sr_cml_3;
|
| 153 |
|
|
reg [ 16 - 1 : 0 ] sr_cml_2;
|
| 154 |
|
|
reg [ 16 - 1 : 0 ] sr_cml_1;
|
| 155 |
|
|
reg [ 31 : 0 ] spr_dat_mac_cml_2;
|
| 156 |
|
|
reg [ 31 : 0 ] spr_dat_pic_cml_2;
|
| 157 |
|
|
reg [ 31 : 0 ] spr_dat_tt_cml_2;
|
| 158 |
|
|
reg [ 31 : 0 ] spr_dat_pm_cml_2;
|
| 159 |
|
|
reg [ 31 : 0 ] spr_dat_dmmu_cml_2;
|
| 160 |
|
|
reg [ 31 : 0 ] spr_dat_du_cml_2;
|
| 161 |
|
|
reg [ 31 : 0 ] spr_addr_cml_2;
|
| 162 |
|
|
reg [ 31 : 0 ] spr_addr_cml_1;
|
| 163 |
|
|
reg [ 31 : 0 ] spr_dat_o_cml_1;
|
| 164 |
|
|
reg [ 31 : 0 ] spr_cs_cml_1;
|
| 165 |
|
|
reg [ 32 - 1 : 0 ] du_dat_du_cml_3;
|
| 166 |
|
|
reg [ 32 - 1 : 0 ] du_dat_du_cml_2;
|
| 167 |
|
|
reg [ 32 - 1 : 0 ] du_dat_du_cml_1;
|
| 168 |
|
|
reg du_read_cml_3;
|
| 169 |
|
|
reg du_read_cml_2;
|
| 170 |
|
|
reg du_read_cml_1;
|
| 171 |
|
|
reg du_write_cml_3;
|
| 172 |
|
|
reg du_write_cml_2;
|
| 173 |
|
|
reg du_write_cml_1;
|
| 174 |
|
|
reg write_spr_cml_3;
|
| 175 |
|
|
reg write_spr_cml_2;
|
| 176 |
|
|
reg write_spr_cml_1;
|
| 177 |
|
|
reg read_spr_cml_1;
|
| 178 |
|
|
reg npc_sel_cml_1;
|
| 179 |
|
|
reg ppc_sel_cml_1;
|
| 180 |
|
|
reg epcr_sel_cml_3;
|
| 181 |
|
|
reg epcr_sel_cml_2;
|
| 182 |
|
|
reg eear_sel_cml_3;
|
| 183 |
|
|
reg eear_sel_cml_2;
|
| 184 |
|
|
reg esr_sel_cml_3;
|
| 185 |
|
|
reg esr_sel_cml_2;
|
| 186 |
|
|
reg [ 31 : 0 ] sys_data_cml_2;
|
| 187 |
|
|
reg [ 4 - 1 : 0 ] sprs_op_cml_2;
|
| 188 |
|
|
reg [ 4 - 1 : 0 ] sprs_op_cml_1;
|
| 189 |
|
|
reg [ 31 : 0 ] sr_32_cml_1;
|
| 190 |
|
|
|
| 191 |
|
|
|
| 192 |
|
|
|
| 193 |
|
|
parameter width = `OR1200_OPERAND_WIDTH;
|
| 194 |
|
|
|
| 195 |
|
|
//
|
| 196 |
|
|
// I/O Ports
|
| 197 |
|
|
//
|
| 198 |
|
|
|
| 199 |
|
|
//
|
| 200 |
|
|
// Internal CPU interface
|
| 201 |
|
|
//
|
| 202 |
|
|
input clk; // Clock
|
| 203 |
|
|
input rst; // Reset
|
| 204 |
|
|
input flagforw; // From ALU
|
| 205 |
|
|
input flag_we; // From ALU
|
| 206 |
|
|
output flag; // SR[F]
|
| 207 |
|
|
input cyforw; // From ALU
|
| 208 |
|
|
input cy_we; // From ALU
|
| 209 |
|
|
output carry; // SR[CY]
|
| 210 |
|
|
input [width-1:0] addrbase; // SPR base address
|
| 211 |
|
|
input [15:0] addrofs; // SPR offset
|
| 212 |
|
|
input [width-1:0] dat_i; // SPR write data
|
| 213 |
|
|
input [`OR1200_ALUOP_WIDTH-1:0] alu_op; // ALU operation
|
| 214 |
|
|
input [`OR1200_BRANCHOP_WIDTH-1:0] branch_op; // Branch operation
|
| 215 |
|
|
input [width-1:0] epcr; // EPCR0
|
| 216 |
|
|
input [width-1:0] eear; // EEAR0
|
| 217 |
|
|
input [`OR1200_SR_WIDTH-1:0] esr; // ESR0
|
| 218 |
|
|
input except_started; // Exception was started
|
| 219 |
|
|
output [width-1:0] to_wbmux; // For l.mfspr
|
| 220 |
|
|
output epcr_we; // EPCR0 write enable
|
| 221 |
|
|
output eear_we; // EEAR0 write enable
|
| 222 |
|
|
output esr_we; // ESR0 write enable
|
| 223 |
|
|
output pc_we; // PC write enable
|
| 224 |
|
|
output sr_we; // Write enable SR
|
| 225 |
|
|
output [`OR1200_SR_WIDTH-1:0] to_sr; // Data to SR
|
| 226 |
|
|
output [`OR1200_SR_WIDTH-1:0] sr; // SR
|
| 227 |
|
|
input [31:0] spr_dat_cfgr; // Data from CFGR
|
| 228 |
|
|
input [31:0] spr_dat_rf; // Data from RF
|
| 229 |
|
|
input [31:0] spr_dat_npc; // Data from NPC
|
| 230 |
|
|
input [31:0] spr_dat_ppc; // Data from PPC
|
| 231 |
|
|
input [31:0] spr_dat_mac; // Data from MAC
|
| 232 |
|
|
|
| 233 |
|
|
//
|
| 234 |
|
|
// To/from other RISC units
|
| 235 |
|
|
//
|
| 236 |
|
|
input [31:0] spr_dat_pic; // Data from PIC
|
| 237 |
|
|
input [31:0] spr_dat_tt; // Data from TT
|
| 238 |
|
|
input [31:0] spr_dat_pm; // Data from PM
|
| 239 |
|
|
input [31:0] spr_dat_dmmu; // Data from DMMU
|
| 240 |
|
|
input [31:0] spr_dat_immu; // Data from IMMU
|
| 241 |
|
|
input [31:0] spr_dat_du; // Data from DU
|
| 242 |
|
|
output [31:0] spr_addr; // SPR Address
|
| 243 |
|
|
output [31:0] spr_dat_o; // Data to unit
|
| 244 |
|
|
output [31:0] spr_cs; // Unit select
|
| 245 |
|
|
output spr_we; // SPR write enable
|
| 246 |
|
|
|
| 247 |
|
|
//
|
| 248 |
|
|
// To/from Debug Unit
|
| 249 |
|
|
//
|
| 250 |
|
|
input [width-1:0] du_addr; // Address
|
| 251 |
|
|
input [width-1:0] du_dat_du; // Data from DU to SPRS
|
| 252 |
|
|
input du_read; // Read qualifier
|
| 253 |
|
|
input du_write; // Write qualifier
|
| 254 |
|
|
output [width-1:0] du_dat_cpu; // Data from SPRS to DU
|
| 255 |
|
|
|
| 256 |
|
|
//
|
| 257 |
|
|
// Internal regs & wires
|
| 258 |
|
|
//
|
| 259 |
|
|
reg [`OR1200_SR_WIDTH-1:0] sr; // SR
|
| 260 |
|
|
reg write_spr; // Write SPR
|
| 261 |
|
|
reg read_spr; // Read SPR
|
| 262 |
|
|
reg [width-1:0] to_wbmux; // For l.mfspr
|
| 263 |
|
|
wire cfgr_sel; // Select for cfg regs
|
| 264 |
|
|
wire rf_sel; // Select for RF
|
| 265 |
|
|
wire npc_sel; // Select for NPC
|
| 266 |
|
|
wire ppc_sel; // Select for PPC
|
| 267 |
|
|
wire sr_sel; // Select for SR
|
| 268 |
|
|
wire epcr_sel; // Select for EPCR0
|
| 269 |
|
|
wire eear_sel; // Select for EEAR0
|
| 270 |
|
|
wire esr_sel; // Select for ESR0
|
| 271 |
|
|
wire [31:0] sys_data; // Read data from system SPRs
|
| 272 |
|
|
wire du_access; // Debug unit access
|
| 273 |
|
|
wire [`OR1200_ALUOP_WIDTH-1:0] sprs_op; // ALU operation
|
| 274 |
|
|
reg [31:0] unqualified_cs; // Unqualified chip selects
|
| 275 |
|
|
|
| 276 |
|
|
//
|
| 277 |
|
|
// Decide if it is debug unit access
|
| 278 |
|
|
//
|
| 279 |
|
|
assign du_access = du_read | du_write;
|
| 280 |
|
|
|
| 281 |
|
|
//
|
| 282 |
|
|
// Generate sprs opcode
|
| 283 |
|
|
//
|
| 284 |
|
|
assign sprs_op = du_write ? `OR1200_ALUOP_MTSR : du_read ? `OR1200_ALUOP_MFSR : alu_op;
|
| 285 |
|
|
|
| 286 |
|
|
//
|
| 287 |
|
|
// Generate SPR address from base address and offset
|
| 288 |
|
|
// OR from debug unit address
|
| 289 |
|
|
//
|
| 290 |
|
|
assign spr_addr = du_access ? du_addr : addrbase | {16'h0000, addrofs};
|
| 291 |
|
|
|
| 292 |
|
|
//
|
| 293 |
|
|
// SPR is written by debug unit or by l.mtspr
|
| 294 |
|
|
//
|
| 295 |
|
|
assign spr_dat_o = du_write ? du_dat_du : dat_i;
|
| 296 |
|
|
|
| 297 |
|
|
//
|
| 298 |
|
|
// debug unit data input:
|
| 299 |
|
|
// - write into debug unit SPRs by debug unit itself
|
| 300 |
|
|
// - read of SPRS by debug unit
|
| 301 |
|
|
// - write into debug unit SPRs by l.mtspr
|
| 302 |
|
|
//
|
| 303 |
|
|
|
| 304 |
|
|
// SynEDA CoreMultiplier
|
| 305 |
|
|
// assignment(s): du_dat_cpu
|
| 306 |
|
|
// replace(s): dat_i, to_wbmux, du_dat_du, du_read, du_write
|
| 307 |
|
|
assign du_dat_cpu = du_write_cml_3 ? du_dat_du_cml_3 : du_read_cml_3 ? to_wbmux_cml_3 : dat_i_cml_3;
|
| 308 |
|
|
|
| 309 |
|
|
//
|
| 310 |
|
|
// Write into SPRs when l.mtspr
|
| 311 |
|
|
//
|
| 312 |
|
|
assign spr_we = du_write | write_spr;
|
| 313 |
|
|
|
| 314 |
|
|
//
|
| 315 |
|
|
// Qualify chip selects
|
| 316 |
|
|
//
|
| 317 |
|
|
assign spr_cs = unqualified_cs & {32{read_spr | write_spr}};
|
| 318 |
|
|
|
| 319 |
|
|
//
|
| 320 |
|
|
// Decoding of groups
|
| 321 |
|
|
//
|
| 322 |
|
|
always @(spr_addr)
|
| 323 |
|
|
case (spr_addr[`OR1200_SPR_GROUP_BITS]) // synopsys parallel_case
|
| 324 |
|
|
`OR1200_SPR_GROUP_WIDTH'd00: unqualified_cs = 32'b00000000_00000000_00000000_00000001;
|
| 325 |
|
|
`OR1200_SPR_GROUP_WIDTH'd01: unqualified_cs = 32'b00000000_00000000_00000000_00000010;
|
| 326 |
|
|
`OR1200_SPR_GROUP_WIDTH'd02: unqualified_cs = 32'b00000000_00000000_00000000_00000100;
|
| 327 |
|
|
`OR1200_SPR_GROUP_WIDTH'd03: unqualified_cs = 32'b00000000_00000000_00000000_00001000;
|
| 328 |
|
|
`OR1200_SPR_GROUP_WIDTH'd04: unqualified_cs = 32'b00000000_00000000_00000000_00010000;
|
| 329 |
|
|
`OR1200_SPR_GROUP_WIDTH'd05: unqualified_cs = 32'b00000000_00000000_00000000_00100000;
|
| 330 |
|
|
`OR1200_SPR_GROUP_WIDTH'd06: unqualified_cs = 32'b00000000_00000000_00000000_01000000;
|
| 331 |
|
|
`OR1200_SPR_GROUP_WIDTH'd07: unqualified_cs = 32'b00000000_00000000_00000000_10000000;
|
| 332 |
|
|
`OR1200_SPR_GROUP_WIDTH'd08: unqualified_cs = 32'b00000000_00000000_00000001_00000000;
|
| 333 |
|
|
`OR1200_SPR_GROUP_WIDTH'd09: unqualified_cs = 32'b00000000_00000000_00000010_00000000;
|
| 334 |
|
|
`OR1200_SPR_GROUP_WIDTH'd10: unqualified_cs = 32'b00000000_00000000_00000100_00000000;
|
| 335 |
|
|
`OR1200_SPR_GROUP_WIDTH'd11: unqualified_cs = 32'b00000000_00000000_00001000_00000000;
|
| 336 |
|
|
`OR1200_SPR_GROUP_WIDTH'd12: unqualified_cs = 32'b00000000_00000000_00010000_00000000;
|
| 337 |
|
|
`OR1200_SPR_GROUP_WIDTH'd13: unqualified_cs = 32'b00000000_00000000_00100000_00000000;
|
| 338 |
|
|
`OR1200_SPR_GROUP_WIDTH'd14: unqualified_cs = 32'b00000000_00000000_01000000_00000000;
|
| 339 |
|
|
`OR1200_SPR_GROUP_WIDTH'd15: unqualified_cs = 32'b00000000_00000000_10000000_00000000;
|
| 340 |
|
|
`OR1200_SPR_GROUP_WIDTH'd16: unqualified_cs = 32'b00000000_00000001_00000000_00000000;
|
| 341 |
|
|
`OR1200_SPR_GROUP_WIDTH'd17: unqualified_cs = 32'b00000000_00000010_00000000_00000000;
|
| 342 |
|
|
`OR1200_SPR_GROUP_WIDTH'd18: unqualified_cs = 32'b00000000_00000100_00000000_00000000;
|
| 343 |
|
|
`OR1200_SPR_GROUP_WIDTH'd19: unqualified_cs = 32'b00000000_00001000_00000000_00000000;
|
| 344 |
|
|
`OR1200_SPR_GROUP_WIDTH'd20: unqualified_cs = 32'b00000000_00010000_00000000_00000000;
|
| 345 |
|
|
`OR1200_SPR_GROUP_WIDTH'd21: unqualified_cs = 32'b00000000_00100000_00000000_00000000;
|
| 346 |
|
|
`OR1200_SPR_GROUP_WIDTH'd22: unqualified_cs = 32'b00000000_01000000_00000000_00000000;
|
| 347 |
|
|
`OR1200_SPR_GROUP_WIDTH'd23: unqualified_cs = 32'b00000000_10000000_00000000_00000000;
|
| 348 |
|
|
`OR1200_SPR_GROUP_WIDTH'd24: unqualified_cs = 32'b00000001_00000000_00000000_00000000;
|
| 349 |
|
|
`OR1200_SPR_GROUP_WIDTH'd25: unqualified_cs = 32'b00000010_00000000_00000000_00000000;
|
| 350 |
|
|
`OR1200_SPR_GROUP_WIDTH'd26: unqualified_cs = 32'b00000100_00000000_00000000_00000000;
|
| 351 |
|
|
`OR1200_SPR_GROUP_WIDTH'd27: unqualified_cs = 32'b00001000_00000000_00000000_00000000;
|
| 352 |
|
|
`OR1200_SPR_GROUP_WIDTH'd28: unqualified_cs = 32'b00010000_00000000_00000000_00000000;
|
| 353 |
|
|
`OR1200_SPR_GROUP_WIDTH'd29: unqualified_cs = 32'b00100000_00000000_00000000_00000000;
|
| 354 |
|
|
`OR1200_SPR_GROUP_WIDTH'd30: unqualified_cs = 32'b01000000_00000000_00000000_00000000;
|
| 355 |
|
|
`OR1200_SPR_GROUP_WIDTH'd31: unqualified_cs = 32'b10000000_00000000_00000000_00000000;
|
| 356 |
|
|
endcase
|
| 357 |
|
|
|
| 358 |
|
|
//
|
| 359 |
|
|
// SPRs System Group
|
| 360 |
|
|
//
|
| 361 |
|
|
|
| 362 |
|
|
//
|
| 363 |
|
|
// What to write into SR
|
| 364 |
|
|
//
|
| 365 |
|
|
assign to_sr[`OR1200_SR_FO:`OR1200_SR_OV] =
|
| 366 |
|
|
(branch_op_cml_1 == `OR1200_BRANCHOP_RFE) ? esr_cml_1[`OR1200_SR_FO:`OR1200_SR_OV] :
|
| 367 |
|
|
(write_spr_cml_1 && sr_sel) ? {1'b1, spr_dat_o_cml_1[`OR1200_SR_FO-1:`OR1200_SR_OV]}:
|
| 368 |
|
|
sr_cml_1[`OR1200_SR_FO:`OR1200_SR_OV];
|
| 369 |
|
|
assign to_sr[`OR1200_SR_CY] =
|
| 370 |
|
|
(branch_op_cml_1 == `OR1200_BRANCHOP_RFE) ? esr_cml_1[`OR1200_SR_CY] :
|
| 371 |
|
|
cy_we ? cyforw :
|
| 372 |
|
|
(write_spr_cml_1 && sr_sel) ? spr_dat_o_cml_1[`OR1200_SR_CY] :
|
| 373 |
|
|
sr_cml_1[`OR1200_SR_CY];
|
| 374 |
|
|
assign to_sr[`OR1200_SR_F] =
|
| 375 |
|
|
(branch_op_cml_1 == `OR1200_BRANCHOP_RFE) ? esr_cml_1[`OR1200_SR_F] :
|
| 376 |
|
|
flag_we ? flagforw :
|
| 377 |
|
|
(write_spr_cml_1 && sr_sel) ? spr_dat_o_cml_1[`OR1200_SR_F] :
|
| 378 |
|
|
sr_cml_1[`OR1200_SR_F];
|
| 379 |
|
|
|
| 380 |
|
|
// SynEDA CoreMultiplier
|
| 381 |
|
|
// assignment(s): to_sr
|
| 382 |
|
|
// replace(s): branch_op, esr, sr, spr_dat_o, write_spr
|
| 383 |
|
|
assign to_sr[`OR1200_SR_CE:`OR1200_SR_SM] =
|
| 384 |
|
|
(branch_op_cml_1 == `OR1200_BRANCHOP_RFE) ? esr_cml_1[`OR1200_SR_CE:`OR1200_SR_SM] :
|
| 385 |
|
|
(write_spr_cml_1 && sr_sel) ? spr_dat_o_cml_1[`OR1200_SR_CE:`OR1200_SR_SM]:
|
| 386 |
|
|
sr_cml_1[`OR1200_SR_CE:`OR1200_SR_SM];
|
| 387 |
|
|
|
| 388 |
|
|
//
|
| 389 |
|
|
// Selects for system SPRs
|
| 390 |
|
|
//
|
| 391 |
|
|
|
| 392 |
|
|
// SynEDA CoreMultiplier
|
| 393 |
|
|
// assignment(s): cfgr_sel
|
| 394 |
|
|
// replace(s): spr_addr, spr_cs
|
| 395 |
|
|
assign cfgr_sel = (spr_cs_cml_1[`OR1200_SPR_GROUP_SYS] && (spr_addr_cml_1[10:4] == `OR1200_SPR_CFGR));
|
| 396 |
|
|
|
| 397 |
|
|
// SynEDA CoreMultiplier
|
| 398 |
|
|
// assignment(s): rf_sel
|
| 399 |
|
|
// replace(s): spr_addr, spr_cs
|
| 400 |
|
|
assign rf_sel = (spr_cs_cml_1[`OR1200_SPR_GROUP_SYS] && (spr_addr_cml_1[10:5] == `OR1200_SPR_RF));
|
| 401 |
|
|
assign npc_sel = (spr_cs[`OR1200_SPR_GROUP_SYS] && (spr_addr[10:0] == `OR1200_SPR_NPC));
|
| 402 |
|
|
assign ppc_sel = (spr_cs[`OR1200_SPR_GROUP_SYS] && (spr_addr[10:0] == `OR1200_SPR_PPC));
|
| 403 |
|
|
|
| 404 |
|
|
// SynEDA CoreMultiplier
|
| 405 |
|
|
// assignment(s): sr_sel
|
| 406 |
|
|
// replace(s): spr_addr, spr_cs
|
| 407 |
|
|
assign sr_sel = (spr_cs_cml_1[`OR1200_SPR_GROUP_SYS] && (spr_addr_cml_1[10:0] == `OR1200_SPR_SR));
|
| 408 |
|
|
|
| 409 |
|
|
// SynEDA CoreMultiplier
|
| 410 |
|
|
// assignment(s): epcr_sel
|
| 411 |
|
|
// replace(s): spr_addr, spr_cs
|
| 412 |
|
|
assign epcr_sel = (spr_cs_cml_1[`OR1200_SPR_GROUP_SYS] && (spr_addr_cml_1[10:0] == `OR1200_SPR_EPCR));
|
| 413 |
|
|
|
| 414 |
|
|
// SynEDA CoreMultiplier
|
| 415 |
|
|
// assignment(s): eear_sel
|
| 416 |
|
|
// replace(s): spr_addr, spr_cs
|
| 417 |
|
|
assign eear_sel = (spr_cs_cml_1[`OR1200_SPR_GROUP_SYS] && (spr_addr_cml_1[10:0] == `OR1200_SPR_EEAR));
|
| 418 |
|
|
|
| 419 |
|
|
// SynEDA CoreMultiplier
|
| 420 |
|
|
// assignment(s): esr_sel
|
| 421 |
|
|
// replace(s): spr_addr, spr_cs
|
| 422 |
|
|
assign esr_sel = (spr_cs_cml_1[`OR1200_SPR_GROUP_SYS] && (spr_addr_cml_1[10:0] == `OR1200_SPR_ESR));
|
| 423 |
|
|
|
| 424 |
|
|
//
|
| 425 |
|
|
// Write enables for system SPRs
|
| 426 |
|
|
//
|
| 427 |
|
|
|
| 428 |
|
|
// SynEDA CoreMultiplier
|
| 429 |
|
|
// assignment(s): sr_we
|
| 430 |
|
|
// replace(s): branch_op, write_spr
|
| 431 |
|
|
assign sr_we = (write_spr_cml_1 && sr_sel) | (branch_op_cml_1 == `OR1200_BRANCHOP_RFE) | flag_we | cy_we;
|
| 432 |
|
|
|
| 433 |
|
|
// SynEDA CoreMultiplier
|
| 434 |
|
|
// assignment(s): pc_we
|
| 435 |
|
|
// replace(s): write_spr, npc_sel, ppc_sel
|
| 436 |
|
|
assign pc_we = (write_spr_cml_1 && (npc_sel_cml_1 | ppc_sel_cml_1));
|
| 437 |
|
|
|
| 438 |
|
|
// SynEDA CoreMultiplier
|
| 439 |
|
|
// assignment(s): epcr_we
|
| 440 |
|
|
// replace(s): write_spr, epcr_sel
|
| 441 |
|
|
assign epcr_we = (write_spr_cml_3 && epcr_sel_cml_3);
|
| 442 |
|
|
|
| 443 |
|
|
// SynEDA CoreMultiplier
|
| 444 |
|
|
// assignment(s): eear_we
|
| 445 |
|
|
// replace(s): write_spr, eear_sel
|
| 446 |
|
|
assign eear_we = (write_spr_cml_3 && eear_sel_cml_3);
|
| 447 |
|
|
|
| 448 |
|
|
// SynEDA CoreMultiplier
|
| 449 |
|
|
// assignment(s): esr_we
|
| 450 |
|
|
// replace(s): write_spr, esr_sel
|
| 451 |
|
|
assign esr_we = (write_spr_cml_3 && esr_sel_cml_3);
|
| 452 |
|
|
|
| 453 |
|
|
//
|
| 454 |
|
|
// Output from system SPRs
|
| 455 |
|
|
//
|
| 456 |
|
|
//assign sys_data = (spr_dat_cfgr & {32{read_spr & cfgr_sel}}) |
|
| 457 |
|
|
// (spr_dat_rf & {32{read_spr & rf_sel}}) |
|
| 458 |
|
|
// (spr_dat_npc & {32{read_spr & npc_sel}}) |
|
| 459 |
|
|
// (spr_dat_ppc & {32{read_spr & ppc_sel}}) |
|
| 460 |
|
|
// ({{32-`OR1200_SR_WIDTH{1'b0}},sr} & {32{read_spr & sr_sel}}) |
|
| 461 |
|
|
// (epcr & {32{read_spr & epcr_sel}}) |
|
| 462 |
|
|
// (eear & {32{read_spr & eear_sel}}) |
|
| 463 |
|
|
// ({{32-`OR1200_SR_WIDTH{1'b0}},esr} & {32{read_spr & esr_sel}});
|
| 464 |
|
|
|
| 465 |
|
|
|
| 466 |
|
|
wire [31:0] read_spr_cfgr_sel_32;
|
| 467 |
|
|
wire [31:0] read_spr_rf_sel_32;
|
| 468 |
|
|
wire [31:0] read_spr_npc_sel_32;
|
| 469 |
|
|
wire [31:0] read_spr_ppc_sel_32;
|
| 470 |
|
|
wire [31:0] read_spr_sr_sel_32;
|
| 471 |
|
|
wire [31:0] read_spr_epcr_sel_32;
|
| 472 |
|
|
wire [31:0] read_spr_eear_sel_32;
|
| 473 |
|
|
wire [31:0] read_spr_esr_sel_32;
|
| 474 |
|
|
wire [31:0] sr_32;
|
| 475 |
|
|
wire [31:0] esr_32;
|
| 476 |
|
|
|
| 477 |
|
|
// SynEDA CoreMultiplier
|
| 478 |
|
|
// assignment(s): read_spr_cfgr_sel_32
|
| 479 |
|
|
// replace(s): read_spr
|
| 480 |
|
|
assign read_spr_cfgr_sel_32 = {32{read_spr_cml_1 & cfgr_sel}};
|
| 481 |
|
|
|
| 482 |
|
|
// SynEDA CoreMultiplier
|
| 483 |
|
|
// assignment(s): read_spr_rf_sel_32
|
| 484 |
|
|
// replace(s): read_spr
|
| 485 |
|
|
assign read_spr_rf_sel_32 = {32{read_spr_cml_1 & rf_sel}};
|
| 486 |
|
|
|
| 487 |
|
|
// SynEDA CoreMultiplier
|
| 488 |
|
|
// assignment(s): read_spr_npc_sel_32
|
| 489 |
|
|
// replace(s): read_spr, npc_sel
|
| 490 |
|
|
assign read_spr_npc_sel_32 = {32{read_spr_cml_1 & npc_sel_cml_1}};
|
| 491 |
|
|
|
| 492 |
|
|
// SynEDA CoreMultiplier
|
| 493 |
|
|
// assignment(s): read_spr_ppc_sel_32
|
| 494 |
|
|
// replace(s): read_spr, ppc_sel
|
| 495 |
|
|
assign read_spr_ppc_sel_32 = {32{read_spr_cml_1 & ppc_sel_cml_1}};
|
| 496 |
|
|
|
| 497 |
|
|
// SynEDA CoreMultiplier
|
| 498 |
|
|
// assignment(s): read_spr_sr_sel_32
|
| 499 |
|
|
// replace(s): read_spr
|
| 500 |
|
|
assign read_spr_sr_sel_32 = {32{read_spr_cml_1 & sr_sel}};
|
| 501 |
|
|
|
| 502 |
|
|
// SynEDA CoreMultiplier
|
| 503 |
|
|
// assignment(s): read_spr_epcr_sel_32
|
| 504 |
|
|
// replace(s): read_spr
|
| 505 |
|
|
assign read_spr_epcr_sel_32 = {32{read_spr_cml_1 & epcr_sel}};
|
| 506 |
|
|
|
| 507 |
|
|
// SynEDA CoreMultiplier
|
| 508 |
|
|
// assignment(s): read_spr_eear_sel_32
|
| 509 |
|
|
// replace(s): read_spr
|
| 510 |
|
|
assign read_spr_eear_sel_32 = {32{read_spr_cml_1 & eear_sel}};
|
| 511 |
|
|
|
| 512 |
|
|
// SynEDA CoreMultiplier
|
| 513 |
|
|
// assignment(s): read_spr_esr_sel_32
|
| 514 |
|
|
// replace(s): read_spr
|
| 515 |
|
|
assign read_spr_esr_sel_32 = {32{read_spr_cml_1 & esr_sel}};
|
| 516 |
|
|
assign sr_32 = {{32-`OR1200_SR_WIDTH{1'b0}},sr};
|
| 517 |
|
|
|
| 518 |
|
|
// SynEDA CoreMultiplier
|
| 519 |
|
|
// assignment(s): esr_32
|
| 520 |
|
|
// replace(s): esr
|
| 521 |
|
|
assign esr_32 = {{32-`OR1200_SR_WIDTH{1'b0}},esr_cml_1};
|
| 522 |
|
|
|
| 523 |
|
|
|
| 524 |
|
|
// SynEDA CoreMultiplier
|
| 525 |
|
|
// assignment(s): sys_data
|
| 526 |
|
|
// replace(s): epcr, eear, sr_32
|
| 527 |
|
|
assign sys_data = (spr_dat_cfgr & read_spr_cfgr_sel_32) |
|
| 528 |
|
|
(spr_dat_rf & read_spr_rf_sel_32) |
|
| 529 |
|
|
(spr_dat_npc & read_spr_npc_sel_32) |
|
| 530 |
|
|
(spr_dat_ppc & read_spr_ppc_sel_32) |
|
| 531 |
|
|
(sr_32_cml_1 & read_spr_sr_sel_32) |
|
| 532 |
|
|
(epcr_cml_1 & read_spr_epcr_sel_32) |
|
| 533 |
|
|
(eear_cml_1 & read_spr_eear_sel_32) |
|
| 534 |
|
|
(esr_32 & read_spr_esr_sel_32);
|
| 535 |
|
|
|
| 536 |
|
|
|
| 537 |
|
|
//
|
| 538 |
|
|
// Flag alias
|
| 539 |
|
|
//
|
| 540 |
|
|
assign flag = sr[`OR1200_SR_F];
|
| 541 |
|
|
|
| 542 |
|
|
//
|
| 543 |
|
|
// Carry alias
|
| 544 |
|
|
//
|
| 545 |
|
|
assign carry = sr[`OR1200_SR_CY];
|
| 546 |
|
|
|
| 547 |
|
|
//
|
| 548 |
|
|
// Supervision register
|
| 549 |
|
|
//
|
| 550 |
|
|
|
| 551 |
|
|
// SynEDA CoreMultiplier
|
| 552 |
|
|
// assignment(s): sr
|
| 553 |
|
|
// replace(s): sr_we, to_sr, sr
|
| 554 |
|
|
always @(posedge clk or posedge rst)
|
| 555 |
|
|
if (rst)
|
| 556 |
|
|
sr <= #1 {1'b1, `OR1200_SR_EPH_DEF, {`OR1200_SR_WIDTH-3{1'b0}}, 1'b1};
|
| 557 |
|
|
else begin sr <= sr_cml_3; if (except_started) begin
|
| 558 |
|
|
sr[`OR1200_SR_SM] <= #1 1'b1;
|
| 559 |
|
|
sr[`OR1200_SR_TEE] <= #1 1'b0;
|
| 560 |
|
|
sr[`OR1200_SR_IEE] <= #1 1'b0;
|
| 561 |
|
|
sr[`OR1200_SR_DME] <= #1 1'b0;
|
| 562 |
|
|
sr[`OR1200_SR_IME] <= #1 1'b0;
|
| 563 |
|
|
end
|
| 564 |
|
|
else if (sr_we_cml_3)
|
| 565 |
|
|
sr <= #1 to_sr_cml_3[`OR1200_SR_WIDTH-1:0]; end
|
| 566 |
|
|
|
| 567 |
|
|
//
|
| 568 |
|
|
// MTSPR/MFSPR interface
|
| 569 |
|
|
//
|
| 570 |
|
|
always @(sprs_op or spr_addr or sys_data or spr_dat_mac or spr_dat_pic or spr_dat_pm or
|
| 571 |
|
|
spr_dat_dmmu or spr_dat_immu or spr_dat_du or spr_dat_tt) begin
|
| 572 |
|
|
case (sprs_op) // synopsys parallel_case
|
| 573 |
|
|
`OR1200_ALUOP_MTSR : begin
|
| 574 |
|
|
write_spr = 1'b1;
|
| 575 |
|
|
end
|
| 576 |
|
|
`OR1200_ALUOP_MFSR : begin
|
| 577 |
|
|
write_spr = 1'b0;
|
| 578 |
|
|
end
|
| 579 |
|
|
default : begin
|
| 580 |
|
|
write_spr = 1'b0;
|
| 581 |
|
|
end
|
| 582 |
|
|
endcase
|
| 583 |
|
|
end
|
| 584 |
|
|
|
| 585 |
|
|
always @(sprs_op or spr_addr or sys_data or spr_dat_mac or spr_dat_pic or spr_dat_pm or
|
| 586 |
|
|
spr_dat_dmmu or spr_dat_immu or spr_dat_du or spr_dat_tt) begin
|
| 587 |
|
|
case (sprs_op) // synopsys parallel_case
|
| 588 |
|
|
`OR1200_ALUOP_MTSR : begin
|
| 589 |
|
|
read_spr = 1'b0;
|
| 590 |
|
|
end
|
| 591 |
|
|
`OR1200_ALUOP_MFSR : begin
|
| 592 |
|
|
read_spr = 1'b1;
|
| 593 |
|
|
end
|
| 594 |
|
|
default : begin
|
| 595 |
|
|
read_spr = 1'b0;
|
| 596 |
|
|
end
|
| 597 |
|
|
endcase
|
| 598 |
|
|
end
|
| 599 |
|
|
|
| 600 |
|
|
|
| 601 |
|
|
// SynEDA CoreMultiplier
|
| 602 |
|
|
// assignment(s): to_wbmux
|
| 603 |
|
|
// replace(s): spr_dat_mac, spr_dat_pic, spr_dat_tt, spr_dat_pm, spr_dat_dmmu, spr_dat_du, spr_addr, sys_data, sprs_op
|
| 604 |
|
|
always @(sprs_op_cml_2 or spr_addr_cml_2 or sys_data_cml_2 or spr_dat_mac_cml_2 or spr_dat_pic_cml_2 or spr_dat_pm_cml_2 or
|
| 605 |
|
|
spr_dat_dmmu_cml_2 or spr_dat_immu or spr_dat_du_cml_2 or spr_dat_tt_cml_2) begin
|
| 606 |
|
|
case (sprs_op_cml_2) // synopsys parallel_case
|
| 607 |
|
|
`OR1200_ALUOP_MTSR : begin
|
| 608 |
|
|
to_wbmux = 32'b0;
|
| 609 |
|
|
end
|
| 610 |
|
|
`OR1200_ALUOP_MFSR : begin
|
| 611 |
|
|
casex (spr_addr_cml_2[`OR1200_SPR_GROUP_BITS]) // synopsys parallel_case
|
| 612 |
|
|
`OR1200_SPR_GROUP_TT:
|
| 613 |
|
|
to_wbmux = spr_dat_tt_cml_2;
|
| 614 |
|
|
`OR1200_SPR_GROUP_PIC:
|
| 615 |
|
|
to_wbmux = spr_dat_pic_cml_2;
|
| 616 |
|
|
`OR1200_SPR_GROUP_PM:
|
| 617 |
|
|
to_wbmux = spr_dat_pm_cml_2;
|
| 618 |
|
|
`OR1200_SPR_GROUP_DMMU:
|
| 619 |
|
|
to_wbmux = spr_dat_dmmu_cml_2;
|
| 620 |
|
|
`OR1200_SPR_GROUP_IMMU:
|
| 621 |
|
|
to_wbmux = spr_dat_immu;
|
| 622 |
|
|
`OR1200_SPR_GROUP_MAC:
|
| 623 |
|
|
to_wbmux = spr_dat_mac_cml_2;
|
| 624 |
|
|
`OR1200_SPR_GROUP_DU:
|
| 625 |
|
|
to_wbmux = spr_dat_du_cml_2;
|
| 626 |
|
|
`OR1200_SPR_GROUP_SYS:
|
| 627 |
|
|
to_wbmux = sys_data_cml_2;
|
| 628 |
|
|
default:
|
| 629 |
|
|
to_wbmux = 32'b0;
|
| 630 |
|
|
endcase
|
| 631 |
|
|
end
|
| 632 |
|
|
default : begin
|
| 633 |
|
|
to_wbmux = 32'b0;
|
| 634 |
|
|
end
|
| 635 |
|
|
endcase
|
| 636 |
|
|
end
|
| 637 |
|
|
|
| 638 |
|
|
|
| 639 |
|
|
always @ (posedge clk_i_cml_1) begin
|
| 640 |
|
|
dat_i_cml_1 <= dat_i;
|
| 641 |
|
|
branch_op_cml_1 <= branch_op;
|
| 642 |
|
|
epcr_cml_1 <= epcr;
|
| 643 |
|
|
eear_cml_1 <= eear;
|
| 644 |
|
|
esr_cml_1 <= esr;
|
| 645 |
|
|
sr_cml_1 <= sr;
|
| 646 |
|
|
spr_addr_cml_1 <= spr_addr;
|
| 647 |
|
|
spr_dat_o_cml_1 <= spr_dat_o;
|
| 648 |
|
|
spr_cs_cml_1 <= spr_cs;
|
| 649 |
|
|
du_dat_du_cml_1 <= du_dat_du;
|
| 650 |
|
|
du_read_cml_1 <= du_read;
|
| 651 |
|
|
du_write_cml_1 <= du_write;
|
| 652 |
|
|
write_spr_cml_1 <= write_spr;
|
| 653 |
|
|
read_spr_cml_1 <= read_spr;
|
| 654 |
|
|
npc_sel_cml_1 <= npc_sel;
|
| 655 |
|
|
ppc_sel_cml_1 <= ppc_sel;
|
| 656 |
|
|
sprs_op_cml_1 <= sprs_op;
|
| 657 |
|
|
sr_32_cml_1 <= sr_32;
|
| 658 |
|
|
end
|
| 659 |
|
|
always @ (posedge clk_i_cml_2) begin
|
| 660 |
|
|
dat_i_cml_2 <= dat_i_cml_1;
|
| 661 |
|
|
sr_we_cml_2 <= sr_we;
|
| 662 |
|
|
to_sr_cml_2 <= to_sr;
|
| 663 |
|
|
sr_cml_2 <= sr_cml_1;
|
| 664 |
|
|
spr_dat_mac_cml_2 <= spr_dat_mac;
|
| 665 |
|
|
spr_dat_pic_cml_2 <= spr_dat_pic;
|
| 666 |
|
|
spr_dat_tt_cml_2 <= spr_dat_tt;
|
| 667 |
|
|
spr_dat_pm_cml_2 <= spr_dat_pm;
|
| 668 |
|
|
spr_dat_dmmu_cml_2 <= spr_dat_dmmu;
|
| 669 |
|
|
spr_dat_du_cml_2 <= spr_dat_du;
|
| 670 |
|
|
spr_addr_cml_2 <= spr_addr_cml_1;
|
| 671 |
|
|
du_dat_du_cml_2 <= du_dat_du_cml_1;
|
| 672 |
|
|
du_read_cml_2 <= du_read_cml_1;
|
| 673 |
|
|
du_write_cml_2 <= du_write_cml_1;
|
| 674 |
|
|
write_spr_cml_2 <= write_spr_cml_1;
|
| 675 |
|
|
epcr_sel_cml_2 <= epcr_sel;
|
| 676 |
|
|
eear_sel_cml_2 <= eear_sel;
|
| 677 |
|
|
esr_sel_cml_2 <= esr_sel;
|
| 678 |
|
|
sys_data_cml_2 <= sys_data;
|
| 679 |
|
|
sprs_op_cml_2 <= sprs_op_cml_1;
|
| 680 |
|
|
end
|
| 681 |
|
|
always @ (posedge clk_i_cml_3) begin
|
| 682 |
|
|
dat_i_cml_3 <= dat_i_cml_2;
|
| 683 |
|
|
to_wbmux_cml_3 <= to_wbmux;
|
| 684 |
|
|
sr_we_cml_3 <= sr_we_cml_2;
|
| 685 |
|
|
to_sr_cml_3 <= to_sr_cml_2;
|
| 686 |
|
|
sr_cml_3 <= sr_cml_2;
|
| 687 |
|
|
du_dat_du_cml_3 <= du_dat_du_cml_2;
|
| 688 |
|
|
du_read_cml_3 <= du_read_cml_2;
|
| 689 |
|
|
du_write_cml_3 <= du_write_cml_2;
|
| 690 |
|
|
write_spr_cml_3 <= write_spr_cml_2;
|
| 691 |
|
|
epcr_sel_cml_3 <= epcr_sel_cml_2;
|
| 692 |
|
|
eear_sel_cml_3 <= eear_sel_cml_2;
|
| 693 |
|
|
esr_sel_cml_3 <= esr_sel_cml_2;
|
| 694 |
|
|
end
|
| 695 |
|
|
endmodule
|
| 696 |
|
|
|