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

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [hdl/] [rtl/] [sparc_core/] [tlu_mmu_dp.v] - Blame information for rev 95

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 95 fafa1971
// ========== Copyright Header Begin ==========================================
2
// 
3
// OpenSPARC T1 Processor File: tlu_mmu_dp.v
4
// Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
5
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
6
// 
7
// The above named program is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU General Public
9
// License version 2 as published by the Free Software Foundation.
10
// 
11
// The above named program is distributed in the hope that it will be 
12
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
// General Public License for more details.
15
// 
16
// You should have received a copy of the GNU General Public
17
// License along with this work; if not, write to the Free Software
18
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19
// 
20
// ========== Copyright Header End ============================================
21
///////////////////////////////////////////////////////////////////////
22
/*
23
//      Description:    MMU Datapath - I & D.
24
*/
25
////////////////////////////////////////////////////////////////////////
26
// Global header file includes
27
////////////////////////////////////////////////////////////////////////
28
// system level definition file which contains the /*
29
/* ========== Copyright Header Begin ==========================================
30
*
31
* OpenSPARC T1 Processor File: sys.h
32
* Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
34
*
35
* The above named program is free software; you can redistribute it and/or
36
* modify it under the terms of the GNU General Public
37
* License version 2 as published by the Free Software Foundation.
38
*
39
* The above named program is distributed in the hope that it will be
40
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
41
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42
* General Public License for more details.
43
*
44
* You should have received a copy of the GNU General Public
45
* License along with this work; if not, write to the Free Software
46
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
47
*
48
* ========== Copyright Header End ============================================
49
*/
50
// -*- verilog -*-
51
////////////////////////////////////////////////////////////////////////
52
/*
53
//
54
// Description:         Global header file that contain definitions that
55
//                      are common/shared at the systme level
56
*/
57
////////////////////////////////////////////////////////////////////////
58
//
59
// Setting the time scale
60
// If the timescale changes, JP_TIMESCALE may also have to change.
61
`timescale      1ps/1ps
62
 
63
//
64
// JBUS clock
65
// =========
66
//
67
 
68
 
69
 
70
// Afara Link Defines
71
// ==================
72
 
73
// Reliable Link
74
 
75
 
76
 
77
 
78
// Afara Link Objects
79
 
80
 
81
// Afara Link Object Format - Reliable Link
82
 
83
 
84
 
85
 
86
 
87
 
88
 
89
 
90
 
91
 
92
// Afara Link Object Format - Congestion
93
 
94
 
95
 
96
 
97
 
98
 
99
 
100
 
101
 
102
 
103
 
104
// Afara Link Object Format - Acknowledge
105
 
106
 
107
 
108
 
109
 
110
 
111
 
112
 
113
 
114
 
115
 
116
// Afara Link Object Format - Request
117
 
118
 
119
 
120
 
121
 
122
 
123
 
124
 
125
 
126
 
127
 
128
 
129
 
130
 
131
 
132
 
133
 
134
// Afara Link Object Format - Message
135
 
136
 
137
 
138
// Acknowledge Types
139
 
140
 
141
 
142
 
143
// Request Types
144
 
145
 
146
 
147
 
148
 
149
// Afara Link Frame
150
 
151
 
152
 
153
//
154
// UCB Packet Type
155
// ===============
156
//
157
 
158
 
159
 
160
 
161
 
162
 
163
 
164
 
165
 
166
 
167
 
168
 
169
 
170
 
171
 
172
 
173
 
174
//
175
// UCB Data Packet Format
176
// ======================
177
//
178
 
179
 
180
 
181
 
182
 
183
 
184
 
185
 
186
 
187
 
188
 
189
 
190
 
191
 
192
 
193
 
194
 
195
 
196
 
197
 
198
 
199
 
200
 
201
 
202
 
203
 
204
 
205
 
206
 
207
 
208
// Size encoding for the UCB_SIZE_HI/LO field
209
// 000 - byte
210
// 001 - half-word
211
// 010 - word
212
// 011 - double-word
213
// 111 - quad-word
214
 
215
 
216
 
217
 
218
 
219
 
220
 
221
//
222
// UCB Interrupt Packet Format
223
// ===========================
224
//
225
 
226
 
227
 
228
 
229
 
230
 
231
 
232
 
233
 
234
 
235
//`define UCB_THR_HI             9      // (6) cpu/thread ID shared with
236
//`define UCB_THR_LO             4             data packet format
237
//`define UCB_PKT_HI             3      // (4) packet type shared with
238
//`define UCB_PKT_LO             0      //     data packet format
239
 
240
 
241
 
242
 
243
 
244
 
245
 
246
//
247
// FCRAM Bus Widths
248
// ================
249
//
250
 
251
 
252
 
253
 
254
 
255
 
256
//
257
// ENET clock periods
258
// ==================
259
//
260
 
261
 
262
 
263
 
264
//
265
// JBus Bridge defines
266
// =================
267
//
268
 
269
 
270
 
271
 
272
 
273
 
274
 
275
 
276
 
277
 
278
 
279
//
280
// PCI Device Address Configuration
281
// ================================
282
//
283
 
284
 
285
 
286
 
287
 
288
 
289
 
290
 
291
 
292
 
293
 
294
 
295
 
296
 
297
 
298
 
299
 
300
 
301
 
302
 
303
 
304
 
305
 
306
                                        // time scale definition
307
 
308
////////////////////////////////////////////////////////////////////////
309
// Local header file includes / local defines
310
////////////////////////////////////////////////////////////////////////
311
 
312
/*
313
/* ========== Copyright Header Begin ==========================================
314
*
315
* OpenSPARC T1 Processor File: tlu.h
316
* Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
317
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
318
*
319
* The above named program is free software; you can redistribute it and/or
320
* modify it under the terms of the GNU General Public
321
* License version 2 as published by the Free Software Foundation.
322
*
323
* The above named program is distributed in the hope that it will be
324
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
325
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
326
* General Public License for more details.
327
*
328
* You should have received a copy of the GNU General Public
329
* License along with this work; if not, write to the Free Software
330
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
331
*
332
* ========== Copyright Header End ============================================
333
*/
334
// ifu trap types
335
 
336
 
337
 
338
 
339
 
340
 
341
 
342
 
343
 
344
 
345
 
346
 
347
 
348
 
349
 
350
 
351
//
352
// modified for hypervisor support
353
//
354
 
355
 
356
 
357
 
358
 
359
 
360
 
361
 
362
 
363
 
364
 
365
 
366
 
367
 
368
 
369
 
370
 
371
 
372
 
373
 
374
 
375
 
376
 
377
 
378
//
379
 
380
 
381
// modified due to bug 2588
382
// `define      TSA_PSTATE_VRANGE2_LO 16 
383
 
384
 
385
//
386
 
387
 
388
 
389
 
390
 
391
 
392
 
393
 
394
 
395
 
396
 
397
//
398
// added due to Niagara SRAMs methodology
399
// The following defines have been replaced due
400
// the memory macro replacement from:
401
// bw_r_rf32x144 -> 2x bw_r_rf32x80
402
/*
403
`define TSA_MEM_WIDTH     144
404
`define TSA_HTSTATE_HI    142 //  3 bits
405
`define TSA_HTSTATE_LO    140
406
`define TSA_TPC_HI        138 // 47 bits
407
`define TSA_TPC_LO         92
408
`define TSA_TNPC_HI        90 // 47 bits
409
`define TSA_TNPC_LO        44
410
`define TSA_TSTATE_HI      40 // 29 bits
411
`define TSA_TSTATE_LO      12
412
`define TSA_TTYPE_HI        8 //  9 bits
413
`define TSA_TTYPE_LO        0
414
`define TSA_MEM_CWP_LO     12
415
`define TSA_MEM_CWP_HI     14
416
`define TSA_MEM_PSTATE_LO  15
417
`define TSA_MEM_PSTATE_HI  22
418
`define TSA_MEM_ASI_LO     23
419
`define TSA_MEM_ASI_HI     30
420
`define TSA_MEM_CCR_LO     31
421
`define TSA_MEM_CCR_HI     38
422
`define TSA_MEM_GL_LO      39
423
`define TSA_MEM_GL_HI      40
424
*/
425
 
426
 
427
 
428
 
429
 
430
 
431
 
432
 
433
 
434
 
435
 
436
//
437
 
438
 
439
 
440
 
441
 
442
 
443
 
444
 
445
 
446
 
447
 
448
// HPSTATE position definitions within wsr
449
 
450
 
451
 
452
 
453
 
454
 
455
// TSTATE postition definitions within wsr
456
 
457
 
458
 
459
 
460
 
461
 
462
 
463
// modified due to bug 2588
464
 
465
 
466
// added for bug 2584 
467
 
468
 
469
 
470
 
471
//
472
 
473
 
474
 
475
 
476
 
477
 
478
 
479
//
480
// tick_cmp and stick_cmp definitions
481
 
482
 
483
 
484
 
485
 
486
//
487
// PIB WRAP
488
 
489
 
490
 
491
// HPSTATE postition definitions
492
 
493
 
494
 
495
 
496
 
497
 
498
// HTBA definitions
499
 
500
 
501
 
502
 
503
// TBA definitions
504
 
505
 
506
 
507
 
508
 
509
 
510
 
511
 
512
 
513
 
514
 
515
 
516
 
517
 
518
 
519
 
520
 
521
 
522
 
523
 
524
//
525
// added for the hypervisor support
526
 
527
 
528
// modified due to bug 2588
529
 
530
 
531
 
532
 
533
 
534
 
535
 
536
 
537
 
538
 
539
 
540
 
541
 
542
 
543
 
544
 
545
//
546
// compressed PSTATE WSR definitions
547
 
548
 
549
 
550
 
551
 
552
 
553
 
554
 
555
 
556
 
557
 
558
 
559
 
560
 
561
//
562
// ASI_QUEUE for hypervisor
563
// Queues are: CPU_MONODO
564
//             DEV_MONODO
565
//             RESUMABLE_ERROR
566
//             NON_RESUMABLE_ERROR
567
//
568
 
569
 
570
 
571
 
572
 
573
 
574
 
575
// for address range checking
576
 
577
 
578
 
579
 
580
 
581
 
582
 
583
 
584
 
585
 
586
 
587
 
588
 
589
 
590
 
591
 
592
//
593
// Niagara scratch-pads
594
// VA address of 0x20 and 0x28 are exclusive to hypervisor
595
// 
596
 
597
 
598
 
599
 
600
 
601
 
602
 
603
//
604
// range checking 
605
 
606
 
607
 
608
 
609
 
610
 
611
 
612
// PIB related definitions
613
// Bit definition for events
614
 
615
 
616
 
617
 
618
 
619
 
620
 
621
 
622
 
623
// 
624
// PIB related definitions
625
// PCR and PIC address definitions
626
 
627
 
628
 
629
// 
630
// PCR bit definitions
631
 
632
 
633
 
634
 
635
 
636
 
637
 
638
//
639
 
640
 
641
 
642
 
643
 
644
 
645
 
646
 
647
 
648
// PIC definitions
649
 
650
 
651
 
652
 
653
 
654
 
655
 
656
 
657
// PIC  mask bit position definitions
658
 
659
 
660
 
661
 
662
 
663
 
664
 
665
 
666
 
667
 
668
// added define from sparc_tlu_int.v 
669
 
670
 
671
 
672
 
673
 
674
 
675
 
676
 
677
 
678
 
679
//
680
// shadow scan related definitions 
681
 
682
// modified due to logic redistribution
683
// `define TCL_SSCAN_WIDTH 12 
684
 
685
 
686
 
687
 
688
 
689
// `define TCL_SSCAN_LO 51 
690
 
691
 
692
 
693
 
694
// 
695
// position definitions - TDP
696
 
697
 
698
 
699
 
700
 
701
 
702
// 
703
// position definitions - TCL
704
 
705
 
706
 
707
 
708
// 
709
// To speedup POR for verification purposes
710
 
711
 
712
//FPGA_SYN enables all FPGA related modifications
713
 
714
 
715
 
716
 
717
 
718
module tlu_mmu_dp ( /*AUTOARG*/
719
   // Outputs
720
   tlu_dtsb_split_w2, tlu_dtsb_size_w2, tlu_dtag_access_w2,
721
   tlu_itsb_split_w2, tlu_itsb_size_w2,
722
   tlu_itlb_tte_tag_w2, tlu_itlb_tte_data_w2, tlu_dtlb_tte_tag_w2,
723
   tlu_dtlb_tte_data_w2, tlu_idtlb_dmp_key_g, tlu_dsfsr_flt_vld,
724
   tlu_isfsr_flt_vld, mra_wdata, tlu_ctxt_cfg_w2, tlu_tag_access_ctxt_g,
725
   lsu_exu_ldxa_data_g, so, tlu_tsb_base_w2_d1,
726
   // Inputs
727
   tlu_addr_msk_g, dmmu_any_sfsr_wr, dmmu_sfsr_wr_en_l, dmmu_sfar_wr_en_l,
728
   immu_any_sfsr_wr, immu_sfsr_wr_en_l, tlu_lng_ltncy_en_l,
729
   lsu_tlu_dside_ctxt_m, lsu_tlu_pctxt_m, tlu_tag_access_ctxt_sel_m,
730
   lsu_tlu_st_rs3_data_b63t59_g, lsu_tlu_st_rs3_data_b47t0_g,
731
   exu_lsu_ldst_va_e, tlu_idtsb_8k_ptr,lsu_tlu_tlb_dmp_va_m, ifu_tlu_pc_m,
732
   tlu_slxa_thrd_sel,
733
   tlu_tte_tag_g, tlu_dmp_key_vld_g, tlb_access_rst_l,
734
   tag_access_wdata_sel, mra_rdata, tlu_admp_key_sel,
735
   tlu_isfsr_din_g, tlu_dsfsr_din_g,
736
   tlu_tte_wr_pid_g, tlu_tte_real_g, tlu_ldxa_l1mx1_sel,
737
   tlu_ldxa_l1mx2_sel, tlu_ldxa_l2mx1_sel, rclk, grst_l, arst_l,
738
   tlu_tlb_tag_invrt_parity, tlu_tlb_data_invrt_parity, tlu_sun4r_tte_g,
739
   tlu_tsb_rd_ps0_sel, si, se, tlu_tlb_access_en_l_d1
740
   ) ;
741
 
742
/*AUTOINPUT*/
743
// Beginning of automatic inputs (from unused autoinst inputs)
744
// End of automatics
745
 
746
input                   tlu_addr_msk_g ;        // address masking active for thread in pipe.
747
input                   dmmu_any_sfsr_wr ;
748
input   [3:0]            dmmu_sfsr_wr_en_l ;
749
input   [3:0]            dmmu_sfar_wr_en_l ;
750
input                   immu_any_sfsr_wr ;
751
input   [3:0]           immu_sfsr_wr_en_l ;
752
input   [12:0]          lsu_tlu_dside_ctxt_m ;
753
input   [12:0]          lsu_tlu_pctxt_m ;
754
input   [2:0]            tlu_tag_access_ctxt_sel_m ;
755
// rs3_data split for vlint purposes.
756
input   [63:59]         lsu_tlu_st_rs3_data_b63t59_g ;
757
input   [47:0]           lsu_tlu_st_rs3_data_b47t0_g ;
758
input   [47:0]           exu_lsu_ldst_va_e ;
759
input   [47:0]          tlu_idtsb_8k_ptr ;
760
input   [47:13]         lsu_tlu_tlb_dmp_va_m ;
761
input   [47:13]         ifu_tlu_pc_m ;
762
input   [3:0]            tlu_slxa_thrd_sel ;
763
//input         [63:0]          int_tlu_asi_data;
764
//input                 int_tlu_asi_data_vld;
765
input   [2:0]            tlu_tte_tag_g ;
766
input   [4:0]            tlu_dmp_key_vld_g ;
767
//input                 tlb_access_en_l ;
768
input                   tlu_tlb_access_en_l_d1 ;
769
input                   tlb_access_rst_l ;
770
 
771
input   [2:0]            tag_access_wdata_sel ;
772
input   [155:6]         mra_rdata ;
773
 
774
input                   tlu_admp_key_sel ;
775
 
776
input   [23:0]           tlu_isfsr_din_g ;
777
input   [23:0]           tlu_dsfsr_din_g ;
778
 
779
input   [2:0]            tlu_tte_wr_pid_g ;      // thread selected pid
780
input                   tlu_tte_real_g ;        // tte is real          
781
 
782
input   [3:0]            tlu_ldxa_l1mx1_sel ;    // mmu ldxa level1 mx1 sel
783
input   [3:0]            tlu_ldxa_l1mx2_sel ;    // mmu ldxa level1 mx2 sel
784
input   [2:0]            tlu_ldxa_l2mx1_sel ;    // mmu ldxa level2 mx1 sel
785
input                   tlu_tlb_tag_invrt_parity ;      // invert parity for tag write
786
input                   tlu_tlb_data_invrt_parity ;     // invert parity for data write
787
input                   tlu_sun4r_tte_g ;       // sun4r vs. sun4v tte.
788
 
789
input                  tlu_lng_ltncy_en_l ;
790
 
791
input                  tlu_tsb_rd_ps0_sel ;
792
 
793
input                 rclk ;
794
input                 arst_l ;
795
input                 grst_l ;
796
input                 si ;
797
input                 se ;
798
 
799
output                        so ;
800
 
801
//output  [47:13]         tlu_dtsb_base_w2 ;    // represents ps0
802
output                  tlu_dtsb_split_w2 ;
803
output  [3:0]           tlu_dtsb_size_w2 ;
804
output  [47:13]         tlu_dtag_access_w2 ;    // used to represent both i/d.
805
//output  [47:13]         tlu_itsb_base_w2 ;    // represents ps1
806
output                  tlu_itsb_split_w2 ;
807
output  [3:0]           tlu_itsb_size_w2 ;
808
//output  [32:13]               tlu_itag_access_w2 ;    // to be obsoleted.
809
output  [58:0]           tlu_itlb_tte_tag_w2 ;
810
output  [42:0]           tlu_itlb_tte_data_w2 ;
811
output  [58:0]           tlu_dtlb_tte_tag_w2 ;
812
output  [42:0]           tlu_dtlb_tte_data_w2 ;
813
//output        [63:0]          tlu_lsu_ldxa_data_w2 ;
814
output  [5:0]           tlu_ctxt_cfg_w2 ;       // i/d context zero/non-zero config.
815
output  [40:0]           tlu_idtlb_dmp_key_g ;
816
 
817
 
818
output  [3:0]            tlu_dsfsr_flt_vld ;
819
output  [3:0]            tlu_isfsr_flt_vld ;
820
 
821
output  [12:0]           tlu_tag_access_ctxt_g ;
822
output  [63:0]           lsu_exu_ldxa_data_g ;
823
 
824
output  [47:13]         tlu_tsb_base_w2_d1 ;
825
 
826
///output       tlu_tag_access_nctxt_g ;                // tag-access contains nucleus context.
827
 
828
output  [155:0]          mra_wdata ;
829
 
830
wire    [47:0]           ldst_va_m,ldst_va_g ;
831
// st_rs3_data partitioned for vlint.
832
//wire  [63:0]          st_rs3_data_g ;
833
wire    [63:59]         st_rs3_data_b63t59_g ;
834
wire    [39:8]          st_rs3_data_b39t8_g ;
835
wire    [6:1]           st_rs3_data_b6t1_g ;
836
wire    [63:0]           tag_target ;
837
wire    [47:13]         dtag_access_w2 ;
838
wire    [23:0]           dsfsr,isfsr ;
839
wire    [23:0]           dsfsr0,isfsr0 ;
840
wire    [23:0]           dsfsr1,isfsr1 ;
841
wire    [23:0]           dsfsr2,isfsr2 ;
842
wire    [23:0]           dsfsr3,isfsr3 ;
843
wire    [47:0]           dsfar ;
844
wire    [47:0]           dsfar0,dsfar1 ;
845
wire    [47:0]           dsfar2,dsfar3 ;
846
wire    [23:0]           dsfsr_din ;
847
wire    [23:0]           isfsr_din ;
848
//wire  [39:22]         tte_relocated_pa ;
849
wire    [40:0]           dmp_key ;
850
wire    [47:0]           tag_access_w2 ;
851
wire    [41:0]           idtte_data_w2 ;
852
wire                    tlb_access0_clk, tlb_access1_clk ;
853
wire    [40:0]           idtlb_dmp_key_pend ;
854
wire    [47:0]           tag_access_wdata ;
855
wire    [12:0]           tag_access_ctxt_m,tag_access_ctxt_g ;
856
// buses split for vlint purposes.
857
wire    [58:55]         idtte_tag_b58t55_g ;
858
wire    [53:0]           idtte_tag_b53t0_g ;
859
wire    [58:55]         idtte_tag_b58t55_w2 ;
860
wire    [53:0]           idtte_tag_b53t0_w2 ;
861
wire    [41:0]           idtte_data_g ;
862
wire    [47:13]         tlb_dmp_va_g ;
863
wire    [47:0]   ldxa_l1mx1_dout_e ;
864
wire    [47:0]   ldxa_l1mx1_dout_m ;
865
 
866
 //=========================================================================================
867
 //    RESET/CLK
868
 //=========================================================================================
869
 
870
    wire       clk;
871
    assign     clk = rclk;
872
 
873
    wire       rst_l;
874
 
875
    dffrl_async rstff(.din (grst_l),
876
                      .q   (rst_l),
877
                      .clk (clk), .se(se), .si(), .so(),
878
                      .rst_l (arst_l));
879
 
880
 
881
//=========================================================================================
882
//      Staging
883
//=========================================================================================
884
 
885
// Stage
886
wire [47:13] pc_g ;
887
dff  #(35) stg_w (
888
        .din    (ifu_tlu_pc_m[47:13]),
889
        .q      (pc_g[47:13]),
890
        .clk    (clk),
891
        .se     (1'b0),       .si (),          .so ()
892
        );
893
 
894
//assign        pc_g[47:13] = ifu_tlu_pc_w[47:13] ;
895
 
896
// Stage va
897
dff  #(48) stg_m (
898
        .din    (exu_lsu_ldst_va_e[47:0]),
899
        .q      (ldst_va_m[47:0]),
900
        .clk    (clk),
901
        .se     (1'b0),       .si (),          .so ()
902
        );
903
 
904
dff  #(48) stg_g (
905
        .din    (ldst_va_m[47:0]),
906
        .q      (ldst_va_g[47:0]),
907
        .clk    (clk),
908
        .se     (1'b0),       .si (),          .so ()
909
        );
910
 
911
dff  #(35) dstg_g (
912
        .din    (lsu_tlu_tlb_dmp_va_m[47:13]),
913
        .q      (tlb_dmp_va_g[47:13]),
914
        .clk    (clk),
915
        .se     (1'b0),       .si (),          .so ()
916
        );
917
 
918
//=========================================================================================
919
 
920
wire [4:0] tlu_dmp_key_vld_d1 ;
921
wire [47:13] tlb_dmp_va_d1 ;
922
dff  #(40) dstg_d1 (
923
        .din    ({tlb_dmp_va_g[47:13],tlu_dmp_key_vld_g[4:0]}),
924
        .q      ({tlb_dmp_va_d1[47:13],tlu_dmp_key_vld_d1[4:0]}),
925
        .clk    (clk),
926
        .se     (1'b0),       .si (),          .so ()
927
        );
928
 
929
wire    [2:0]    tlu_tte_tag_d1,tlu_tte_wr_pid_d1 ;
930
wire            tlu_tte_real_d1,tlu_tlb_tag_invrt_parity_d1 ;
931
wire    [47:13] dmp_va_d1 ;
932
wire    [5:0]    dmp_key_vld_d1 ;
933
dp_mux2es #(41) dmp_key_sel (
934
                .in0    ({tlb_dmp_va_d1[47:13],tlu_dmp_key_vld_d1[4:0],tlu_tte_real_d1}),
935
                .in1    ({tag_access_w2[47:13],1'b1,tlu_tte_tag_d1[2:0],tlu_tte_real_d1,tlu_tte_real_d1}),
936
                //.in1  ({tag_access_w2[47:13],1'b1,tlu_tte_tag_d1[2:0],1'b0,tlu_tte_real_d1}), // Bug 3754
937
                .sel    (tlu_admp_key_sel),
938
                .dout   ({dmp_va_d1[47:13],dmp_key_vld_d1[5:0]})
939
        );
940
 
941
assign  dmp_key[40:0] =
942
        {
943
        dmp_va_d1[47:28],        // (20b)
944
        dmp_key_vld_d1[5],       // (1b)
945
        dmp_va_d1[27:22],        // (6b)
946
        dmp_key_vld_d1[4],       // (1b)
947
        dmp_va_d1[21:16],        // (6b)
948
        dmp_key_vld_d1[3],       // (1b)
949
        dmp_va_d1[15:13],        // (3b)
950
        dmp_key_vld_d1[2],       // (1b)
951
        dmp_key_vld_d1[1],       // (1b)
952
        dmp_key_vld_d1[0]        // (1b)
953
        } ;
954
 
955
 
956
//wire  tlb_access_en_l_d1 ;
957
wire    tlb_access2_clk ;
958
 
959
 
960
 
961
 
962
 
963
 
964
 
965
 
966
 
967
 
968
 
969
 
970
 
971
// Advance by a cycle. Do not have to reset state.
972
 
973
dffrle  #(41) stg_w2 (
974
        .din    (dmp_key[40:0]),
975
        .q      (idtlb_dmp_key_pend[40:0]),
976
        .rst_l  (tlb_access_rst_l),
977
        .en (~(tlu_tlb_access_en_l_d1)), .clk(clk),
978
        .se     (1'b0),       .si (),          .so ()
979
        );
980
 
981
 
982
 
983
 
984
 
985
 
986
 
987
 
988
 
989
 
990
 
991
 
992
 
993
 
994
 
995
 
996
 
997
 
998
 
999
 
1000
assign  tlu_idtlb_dmp_key_g[40:0] = idtlb_dmp_key_pend[40:0] ;
1001
 
1002
 
1003
//=========================================================================================
1004
//      WR DATA FOR MRA
1005
//=========================================================================================
1006
 
1007
// Format for each entry of MRA on a per thread basis.
1008
// Current :
1009
//      |       dtsb(48b)       |       dtag_access(48b)        |       dsfar(48b)      |       
1010
//      |       itsb(48b)       |       itag_access(48b)        |                       |       
1011
// New(Hyp,Legacy) : 8 tsb per thread instead of 2. dsfar removed.
1012
// -This allows tag-access to be lined up with simultaneous reads of tsb
1013
// -zero-ctxt and non-zero-ctxt tag-access will have to be distinguished either
1014
// by doing a zero-detect on the lower 13b of the write-data or using a disinct asi.
1015
//      |       zcps0_dtsb(48b) |       zcps1_dtsb(48b) |       zctxt_dtag_acc(48b) | dzctxt_cfg(6b) |
1016
//      |       zcps0_itsb(48b) |       zcps1_itsb(48b) |       zctxt_itag_acc(48b) | izctxt_cfg(6b) |
1017
//      |       nzcps0_dtsb(48b)|       nzcps1_dtsb(48b)|       nzctxt_dtag_acc(48b)| dnzctxt_cfg(6b)|
1018
//      |       nzcps0_itsb(48b)|       nzcps1_itsb(48b)|       nzctxt_itag_acc(48b)| inzctxt_cfg(6b)|
1019
 
1020
mux3ds #(13)    tag_acc_ctxtmx(
1021
                .in0    (lsu_tlu_pctxt_m[12:0]), // iside selects primary ctxt
1022
                .in1    (13'd0),                 // iside selects nucleus ctxt
1023
                .in2    (lsu_tlu_dside_ctxt_m[12:0]), // otherwise select dside ctxt
1024
                .sel0   (tlu_tag_access_ctxt_sel_m[0]),
1025
                .sel1   (tlu_tag_access_ctxt_sel_m[1]),
1026
                .sel2   (tlu_tag_access_ctxt_sel_m[2]),
1027
                .dout   (tag_access_ctxt_m[12:0])
1028
        );
1029
 
1030
/*assign        tag_access_ctxt_m[12:0] =
1031
        tlu_tag_access_ctxt_sel_m[0] ?  lsu_tlu_pctxt_m[12:0] :         // iside selects primary ctxt
1032
                tlu_tag_access_ctxt_sel_m[1] ?  13'd0  :                // iside selects nucleus ctxt
1033
                        tlu_tag_access_ctxt_sel_m[2] ? lsu_tlu_dside_ctxt_m[12:0] : 13'bx_xxxx_xxxx_xxxx ;                      // otherwise select dside ctxt
1034
*/
1035
 
1036
dff  #(13) ctxt_stgg (
1037
        .din    (tag_access_ctxt_m[12:0]),
1038
        .q      (tag_access_ctxt_g[12:0]),
1039
        .clk    (clk),
1040
        .se     (1'b0),       .si (),          .so ()
1041
        );
1042
 
1043
// pstate.am masking
1044
wire    [15:0]   ldst_va_masked_g ;
1045
assign  ldst_va_masked_g[15:0] = ldst_va_g[47:32] & {16{~tlu_addr_msk_g}} ;
1046
 
1047
mux3ds #(48)    dtag_access_dsel(
1048
                .in0    ({ldst_va_masked_g[15:0],ldst_va_g[31:13],tag_access_ctxt_g[12:0]}), // dside hardware
1049
                .in1    ({pc_g[47:13],tag_access_ctxt_g[12:0]}), // iside hardware
1050
                .in2    (lsu_tlu_st_rs3_data_b47t0_g[47:0]),     // stxa,tsb write as an example.
1051
                .sel0   (tag_access_wdata_sel[0]),
1052
                .sel1   (tag_access_wdata_sel[1]),
1053
                .sel2   (tag_access_wdata_sel[2]),
1054
                .dout   (tag_access_wdata[47:0])
1055
        );
1056
 
1057
// Determine whether context is nucleus or not.
1058
//assign tlu_tag_access_nctxt_g = (tag_access_wdata[12:0] == 13'd0) ;
1059
assign        tlu_tag_access_ctxt_g[12:0] = tag_access_ctxt_g[12:0] ;
1060
 
1061
wire    [47:0]   dsfar_wdata ;
1062
dp_mux2es #(48) dsfar_dsel(
1063
                .in0    ({ldst_va_masked_g[15:0],ldst_va_g[31:0]}), // dsfar;trap
1064
                .in1    (lsu_tlu_st_rs3_data_b47t0_g[47:0]), // asi write
1065
                .sel    (dmmu_any_sfsr_wr),
1066
                .dout   (dsfar_wdata[47:0])
1067
        );
1068
 
1069
// Warning for Grape Mapper - the number of bits may have to be changed to
1070
// map implementation.
1071
assign  mra_wdata[155:0] =
1072
        // Bug 4676 - tsb rsrved field
1073
        {lsu_tlu_st_rs3_data_b47t0_g[47:12],8'd0,
1074
                lsu_tlu_st_rs3_data_b47t0_g[3:0],        //ps0 zctxt,nzctxt tsb
1075
         lsu_tlu_st_rs3_data_b47t0_g[47:12],8'd0,
1076
                lsu_tlu_st_rs3_data_b47t0_g[3:0],        //ps1 zctxt,nzctxt tsb
1077
         tag_access_wdata[47:0],         //i/d tag-access
1078
         lsu_tlu_st_rs3_data_b47t0_g[10:8],     //ps1 page size
1079
         lsu_tlu_st_rs3_data_b47t0_g[2:0],       //ps0 page size
1080
         6'd0};
1081
 
1082
 
1083
//=========================================================================================
1084
//      D-TAG ACCESS
1085
//=========================================================================================
1086
 
1087
// 4 registers for the 4 threads.
1088
// 35b of VA || 13b Ctxt.
1089
// ** Ctxt is to be read as zero if there is no context associated with the access **
1090
// VA will be sing-extended based on bit 47. 
1091
 
1092
// Update in w2.
1093
assign  dtag_access_w2[47:13] = mra_rdata[59:12+13] ;
1094
 
1095
// Can this be shared with the i-side ?
1096
assign  tlu_dtag_access_w2[47:13] = dtag_access_w2[47:13] ;
1097
 
1098
 
1099
//=========================================================================================
1100
//      I-TAG ACCESS
1101
//=========================================================================================
1102
 
1103
// 4 registers for the 4 threads.
1104
// 35b of VA || 13b Ctxt.
1105
// ** Ctxt is to be read as zero if there is no context associated with the access **
1106
// VA will be sing-extended based on bit 47. 
1107
 
1108
// Update in w2.
1109
// SPARC_HPV_EN - This needs to be obsoleted. Common tag-access will be superimposed
1110
// on dta_access bus.
1111
 
1112
//assign        itag_access_w2[32:13] = mra_rdata[`MRA_TACCESS_HI-15:`MRA_TACCESS_LO+13] ;
1113
//assign        itag_access_w2[47:0] = mra_rdata[`MRA_TACCESS_HI:`MRA_TACCESS_LO] ;
1114
 
1115
//assign        tlu_itag_access_w2[32:13] = itag_access_w2[32:13] ;
1116
 
1117
 
1118
//=========================================================================================
1119
//      D-TAG TARGET
1120
//=========================================================================================
1121
 
1122
// Tag Target is based on currently selected thread.
1123
 
1124
// Thread0,1,2,3
1125
assign tag_target[63:0] =
1126
        {3'b000,
1127
        ldxa_l1mx1_dout_m[12:0], // Context
1128
        //tag_access_w2[12:0],          // Context
1129
        6'b000000,
1130
        {16{ldxa_l1mx1_dout_m[47]}},    // Sign-extend VA[47]
1131
        //{16{tag_access_w2[47]}},      // Sign-extend VA[47]
1132
        ldxa_l1mx1_dout_m[47:22]};      // VA // Bug 3975.
1133
        //tag_access_w2[47:22]};        // VA
1134
 
1135
//=========================================================================================
1136
//      D-TSB
1137
//=========================================================================================
1138
 
1139
// Note : on interface, dtsb represents ps0 tsbs, itsb represents ps1 tsbs. 
1140
 
1141
wire    [47:0]   tsb_ps0, tsb_ps1 ;
1142
assign  tsb_ps0[47:0] = mra_rdata[155:108] ;
1143
assign  tsb_ps1[47:0] = mra_rdata[107:60] ;
1144
 
1145
assign  tlu_dtsb_split_w2 = tsb_ps0[12] ;
1146
// SPARC_HPV_EN - extend tsb_size by 1b.
1147
assign  tlu_dtsb_size_w2[3:0] = tsb_ps0[3:0] ;
1148
 
1149
//=========================================================================================
1150
//      CTXT CONFIG
1151
//=========================================================================================
1152
 
1153
wire    [5:0]    ptr_ctxt_cfg ;
1154
assign  tlu_ctxt_cfg_w2[5:0] =   mra_rdata[11:6] ;
1155
 
1156
dff  #(6) pctxt_stgm (
1157
        .din    (mra_rdata[11:6]),
1158
        .q      (ptr_ctxt_cfg[5:0]),
1159
        .clk    (clk),
1160
        .se     (1'b0),       .si (),          .so ()
1161
        );
1162
 
1163
//=========================================================================================
1164
//      I-TSB
1165
//=========================================================================================
1166
 
1167
assign  tlu_itsb_split_w2 = tsb_ps1[12] ;
1168
assign  tlu_itsb_size_w2[3:0] = tsb_ps1[3:0] ;
1169
 
1170
//=========================================================================================
1171
//      STAGE TSB BASE FOR USE IN PTR CALCULATION
1172
//=========================================================================================
1173
 
1174
wire    [47:13] tsb_base ;
1175
assign  tsb_base[47:13] =
1176
        tlu_tsb_rd_ps0_sel ? tsb_ps0[47:13] : tsb_ps1[47:13] ;
1177
        //tlu_tsb_rd_ps0_sel ? dtsb[47:13] : itsb[47:13] ;
1178
 
1179
dff  #(35) tsbbase_stgm (
1180
        .din    (tsb_base[47:13]),
1181
        .q      (tlu_tsb_base_w2_d1[47:13]),
1182
        .clk    (clk),
1183
        .se     (1'b0),       .si (),          .so ()
1184
        );
1185
 
1186
//=========================================================================================
1187
//      8K and 64K Ptr
1188
//=========================================================================================
1189
 
1190
// In MMU Control.
1191
 
1192
//=========================================================================================
1193
//      Direct Ptr
1194
//=========================================================================================
1195
 
1196
//=========================================================================================
1197
//      I-/D TLB Fill : TTE Tag and Data.
1198
//=========================================================================================
1199
 
1200
 
1201
// TTE Tag is formed from Tag Access.
1202
// TTE Data is formed from rs3_data for store.
1203
 
1204
// Timing needs to be fixed !!! Partition mode will add one more cycle
1205
// to path. tlb write will occur in w3.
1206
 
1207
// partitioned for vlint purposes.
1208
//assign        st_rs3_data_g[63:0] = lsu_tlu_st_rs3_data_g[63:0] ; 
1209
assign  st_rs3_data_b63t59_g[63:59] = lsu_tlu_st_rs3_data_b63t59_g[63:59] ;
1210
assign  st_rs3_data_b39t8_g[39:8] = lsu_tlu_st_rs3_data_b47t0_g[39:8] ;
1211
assign  st_rs3_data_b6t1_g[6:1] = lsu_tlu_st_rs3_data_b47t0_g[6:1] ;
1212
 
1213
assign  tag_access_w2[47:0] = mra_rdata[59:12] ;
1214
 
1215
wire idtte_tag_vld_g,idtte_tag_vld_d1 ;
1216
assign  idtte_tag_vld_g =
1217
        st_rs3_data_b63t59_g[63] ;
1218
wire idtte_tag_lock_g,idtte_tag_lock_d1 ;
1219
assign  idtte_tag_lock_g =
1220
        tlu_sun4r_tte_g ? st_rs3_data_b6t1_g[6] : st_rs3_data_b63t59_g[61] ;
1221
 
1222
 
1223
 
1224
 
1225
 
1226
 
1227
 
1228
 
1229
 
1230
 
1231
 
1232
 
1233
 
1234
 
1235
// Stage some bits to match posedge rd for lng-lat reads of mra.
1236
 
1237
dffe  #(10) stgd1_idttetg (
1238
        .din    ({idtte_tag_vld_g,idtte_tag_lock_g,tlu_tte_tag_g[2:0],
1239
                tlu_tte_wr_pid_g[2:0],tlu_tte_real_g,tlu_tlb_tag_invrt_parity}),
1240
        .q      ({idtte_tag_vld_d1,idtte_tag_lock_d1,tlu_tte_tag_d1[2:0],
1241
                tlu_tte_wr_pid_d1[2:0],tlu_tte_real_d1,tlu_tlb_tag_invrt_parity_d1}),
1242
        .en (~(tlu_lng_ltncy_en_l)), .clk(clk),
1243
        .se     (1'b0),       .si (),          .so ()
1244
        );
1245
 
1246
 
1247
 
1248
 
1249
 
1250
 
1251
 
1252
 
1253
 
1254
 
1255
 
1256
 
1257
 
1258
 
1259
 
1260
 
1261
 
1262
 
1263
 
1264
 
1265
 
1266
 
1267
// assumption is that tag_access_w2 gets delayed by a cycle because
1268
// the rd is now posedge.
1269
assign idtte_tag_b53t0_g[53:0] =
1270
        {tag_access_w2[47:22],          // VA_tag       (26b)
1271
        tlu_tte_tag_d1[2],              // 27:22 are valid (1b)
1272
        idtte_tag_vld_d1,               // V            (1b) can be 0 or 1
1273
        idtte_tag_lock_d1,              // L            (1b) 
1274
        1'b1,                           // U            (1b) : must be set on write
1275
        tag_access_w2[21:16],           // VA_tag       (6b)
1276
        tlu_tte_tag_d1[1],              // 21:16 are valid (1b)
1277
        tag_access_w2[15:13],           // VA_tag       (3b)
1278
        tlu_tte_tag_d1[0],               // 15:13 are valid (1b)
1279
        tag_access_w2[12:0]              // Ctxt b12:0   (13b)
1280
                        };
1281
 
1282
assign  idtte_tag_b58t55_g[58:55] = {tlu_tte_wr_pid_d1[2:0],tlu_tte_real_d1};
1283
// V and U bit omitted from tag as it can change once in tlb
1284
// assign       idtte_tag_g[54] = 
1285
// tlu_tlb_tag_invrt_parity_d1^(^{idtte_tag_g[58:55],idtte_tag_g[53:27],idtte_tag_g[25],idtte_tag_g[23:0]}) ;
1286
 
1287
// Additional page size bit does not have to be included. EP ? 
1288
// SUN4R TTE
1289
wire    [41:0]   idtte_data_sun4r_g ;
1290
assign idtte_data_sun4r_g[41:0] =
1291
        {st_rs3_data_b39t8_g[39:22],    // PA           (18b)
1292
        ~tlu_tte_tag_g[2],              // 27:20 - mx sel (1b) : active-low
1293
        st_rs3_data_b39t8_g[21:16],     // PA           (6b)
1294
        ~tlu_tte_tag_g[1],              // 21:16 - mx sel (1b) : active-low
1295
        st_rs3_data_b39t8_g[15:13],     // PA           (3b)
1296
        ~tlu_tte_tag_g[0],               // 15:13 - mx sel (1b) : active-low
1297
        st_rs3_data_b63t59_g[63],       // V            (1b)
1298
        st_rs3_data_b63t59_g[60],       // NFO          (1b)
1299
        st_rs3_data_b63t59_g[59],       // IE           (1b)
1300
        st_rs3_data_b6t1_g[6],          // L            (1b)
1301
        st_rs3_data_b6t1_g[5:4],        // CP/CV        (2b)
1302
        st_rs3_data_b6t1_g[3],          // E            (1b)
1303
        st_rs3_data_b6t1_g[2],          // P            (1b)
1304
        st_rs3_data_b6t1_g[1],          // W            (1b)
1305
        3'b000};                        // Spare        (3b)
1306
// SUN4V TTE
1307
wire    [41:0]   idtte_data_sun4v_g ;
1308
assign idtte_data_sun4v_g[41:0] =
1309
        {st_rs3_data_b39t8_g[39:22],    // PA           (18b)
1310
        ~tlu_tte_tag_g[2],              // 27:20 - mx sel (1b) : active-low
1311
        st_rs3_data_b39t8_g[21:16],     // PA           (6b)
1312
        ~tlu_tte_tag_g[1],              // 21:16 - mx sel (1b) : active-low
1313
        st_rs3_data_b39t8_g[15:13],     // PA           (3b)
1314
        ~tlu_tte_tag_g[0],               // 15:13 - mx sel (1b) : active-low
1315
        st_rs3_data_b63t59_g[63],       // V            (1b) // 4->63. Bug 2977
1316
        st_rs3_data_b63t59_g[62],       // NFO          (1b) // 10->62
1317
        st_rs3_data_b39t8_g[12],        // IE           (1b)
1318
        st_rs3_data_b63t59_g[61],       // L            (1b)
1319
        //1'b0,                         //// L(none)    (1b)
1320
        st_rs3_data_b39t8_g[10:9],      // CP/CV        (2b) // 9:8 -> 10:9
1321
        st_rs3_data_b39t8_g[11],        // E            (1b)
1322
        st_rs3_data_b39t8_g[8],         // P            (1b) // 7->8
1323
        st_rs3_data_b6t1_g[6],          // W            (1b) // 5->6
1324
        3'b000};                        // Spare        (3b)
1325
assign  idtte_data_g[41:0] =
1326
        tlu_sun4r_tte_g ? idtte_data_sun4r_g[41:0] : idtte_data_sun4v_g[41:0];
1327
 
1328
// Generate Parity for tte data. Match to DP Macro.
1329
//assign idtte_data_g[42] = tlu_tlb_data_invrt_parity^(^idtte_data_g[41:0]) ;
1330
 
1331
/*dff  #(1) stgd1_tlbacc (
1332
        .din    (tlb_access_en_l),
1333
        .q      (tlb_access_en_l_d1),
1334
        .clk    (clk),
1335
        .se     (1'b0),       .si (),          .so ()
1336
        );*/
1337
 
1338
// flopping of tte-tag is delayed by a cycle,tte-data
1339
// is not. wr-vld will match tte-tag.
1340
 
1341
 
1342
 
1343
 
1344
 
1345
 
1346
 
1347
 
1348
 
1349
 
1350
 
1351
 
1352
 
1353
// Ship for write to TLB. Doesn't have to be resettable.
1354
// Shorten by a bit, as parity will be generated based on output.
1355
// Instead of removing the bit, use it for parity-invrt bit
1356
// in section below.
1357
/*dff  #(59) stgw2_ttetg (
1358
        .din    (idtte_tag_g[58:0]),
1359
        .q      (idtte_tag_w2[58:0]),
1360
        .clk    (tlb_access0_clk),
1361
        .se     (1'b0),       .si (),          .so ()
1362
        ); */
1363
 
1364
 
1365
dffe  #(58) stgw2_ttetg (
1366
        .din    ({idtte_tag_b58t55_g[58:55],idtte_tag_b53t0_g[53:0]}),
1367
        .q      ({idtte_tag_b58t55_w2[58:55],idtte_tag_b53t0_w2[53:0]}),
1368
        .en (~(tlu_tlb_access_en_l_d1)), .clk(clk),
1369
        .se     (1'b0),       .si (),          .so ()
1370
        );
1371
 
1372
 
1373
 
1374
 
1375
 
1376
 
1377
 
1378
 
1379
 
1380
 
1381
 
1382
 
1383
 
1384
 
1385
 
1386
 
1387
 
1388
 
1389
 
1390
 
1391
 
1392
 
1393
 
1394
 
1395
 
1396
 
1397
 
1398
 
1399
 
1400
 
1401
 
1402
 
1403
// Shorten by a bit, as parity will be generated based on output.
1404
// Instead of removing the bit, use it for parity-invrt bit
1405
// in section below.
1406
/*dff  #(43) stgw2_ttedt (
1407
        .din    (idtte_data_g[42:0]),
1408
        .q      (idtte_data_w2[42:0]),
1409
        .clk    (tlb_access1_clk),
1410
        .se     (1'b0),       .si (),          .so ()
1411
        );*/
1412
 
1413
 
1414
dffe  #(42) stgw2_ttedt (
1415
        .din    (idtte_data_g[41:0]),
1416
        .q      (idtte_data_w2[41:0]),
1417
        .en (~(tlu_lng_ltncy_en_l)), .clk(clk),
1418
        .se     (1'b0),       .si (),          .so ()
1419
        );
1420
 
1421
 
1422
 
1423
 
1424
 
1425
 
1426
 
1427
 
1428
 
1429
 
1430
 
1431
 
1432
 
1433
 
1434
 
1435
 
1436
 
1437
 
1438
wire    parity_tag,parity_data ;
1439
wire    parity_tag_d1,parity_data_d1 ;
1440
assign tlu_dtlb_tte_tag_w2[58:0] = {idtte_tag_b58t55_w2[58:55],parity_tag_d1,idtte_tag_b53t0_w2[53:0]} ;
1441
assign tlu_itlb_tte_tag_w2[58:0] = {idtte_tag_b58t55_w2[58:55],parity_tag_d1,idtte_tag_b53t0_w2[53:0]} ;
1442
assign tlu_dtlb_tte_data_w2[42:0] = {parity_data_d1,idtte_data_w2[41:0]} ;
1443
assign tlu_itlb_tte_data_w2[42:0] = {parity_data_d1,idtte_data_w2[41:0]} ;
1444
 
1445
//=========================================================================================
1446
//      PARITY GEN FOR TTE TAG & DATA
1447
//=========================================================================================
1448
 
1449
// Timing Change : Since parity is not required until the write, and the write
1450
// is preceeded by a auto-demap, the parity generation can be hidden in the
1451
// cycle of auto-demap.
1452
 
1453
wire    tlu_tlb_tag_invrt_parity_d2,tlu_tlb_data_invrt_parity_d1 ;
1454
 
1455
 
1456
dffe  #(1) stgw2_ttetgpar (
1457
        .din    (tlu_tlb_tag_invrt_parity_d1),
1458
        .q      (tlu_tlb_tag_invrt_parity_d2),
1459
        .en (~(tlu_tlb_access_en_l_d1)), .clk(clk),
1460
        .se     (1'b0),       .si (),          .so ()
1461
        );
1462
 
1463
 
1464
 
1465
 
1466
 
1467
 
1468
 
1469
 
1470
 
1471
 
1472
 
1473
 
1474
 
1475
 
1476
 
1477
 
1478
 
1479
 
1480
 
1481
dffe  #(1) stgw2_ttedtpar (
1482
        .din    (tlu_tlb_data_invrt_parity),
1483
        .q      (tlu_tlb_data_invrt_parity_d1),
1484
        .en (~(tlu_lng_ltncy_en_l)), .clk(clk),
1485
        .se     (1'b0),       .si (),          .so ()
1486
        );
1487
 
1488
 
1489
 
1490
 
1491
 
1492
 
1493
 
1494
 
1495
 
1496
 
1497
 
1498
 
1499
 
1500
 
1501
 
1502
 
1503
 
1504
 
1505
assign  parity_tag =
1506
tlu_tlb_tag_invrt_parity_d2^(^{idtte_tag_b58t55_w2[58:55],
1507
        idtte_tag_b53t0_w2[53:27],idtte_tag_b53t0_w2[25],idtte_tag_b53t0_w2[23:0]}) ;
1508
assign parity_data = tlu_tlb_data_invrt_parity_d1^(^idtte_data_w2[41:0]) ;
1509
//assign        idtte_tag_w2[54] = 
1510
//tlu_tlb_tag_invrt_parity_d2^(^{idtte_tag_w2[58:55],idtte_tag_w2[53:27],idtte_tag_w2[25],idtte_tag_w2[23:0]}) ;
1511
//assign idtte_data_w2[42] = tlu_tlb_data_invrt_parity_d1^(^idtte_data_w2[41:0]) ;
1512
 
1513
dff  #(2) stg_partd (
1514
        .din    ({parity_tag,parity_data}),
1515
        .q      ({parity_tag_d1,parity_data_d1}),
1516
        .clk    (clk),
1517
        .se     (1'b0),       .si (),          .so ()
1518
        );
1519
 
1520
//=========================================================================================
1521
//      D-SFAR
1522
//=========================================================================================
1523
 
1524
// dsfar is written into mra for pre SPARC_HPV_EN changes. It will be written into flops
1525
// for SPARC_HPV_EN. 
1526
 
1527
wire    [47:0]           dsfar_din ;
1528
 
1529
assign  dsfar_din[47:0] = dsfar_wdata[47:0] ;
1530
 
1531
wire    dsfar0_clk ;
1532
 
1533
 
1534
 
1535
 
1536
 
1537
 
1538
 
1539
 
1540
 
1541
 
1542
 
1543
 
1544
 
1545
// Thread0
1546
 
1547
dffe  #(48) dsfar0_ff (
1548
        .din    (dsfar_din[47:0]),
1549
        .q      (dsfar0[47:0]),
1550
        .en (~(dmmu_sfar_wr_en_l[0])), .clk(clk),
1551
        .se     (1'b0),       .si (),          .so ()
1552
        );
1553
 
1554
 
1555
 
1556
 
1557
 
1558
 
1559
 
1560
 
1561
 
1562
 
1563
 
1564
 
1565
 
1566
 
1567
 
1568
 
1569
 
1570
 
1571
 
1572
wire    dsfar1_clk ;
1573
 
1574
 
1575
 
1576
 
1577
 
1578
 
1579
 
1580
 
1581
 
1582
 
1583
 
1584
 
1585
 
1586
// Thread1
1587
 
1588
dffe  #(48) dsfar1_ff (
1589
        .din    (dsfar_din[47:0]),
1590
        .q      (dsfar1[47:0]),
1591
        .en (~(dmmu_sfar_wr_en_l[1])), .clk(clk),
1592
        .se     (1'b0),       .si (),          .so ()
1593
        );
1594
 
1595
 
1596
 
1597
 
1598
 
1599
 
1600
 
1601
 
1602
 
1603
 
1604
 
1605
 
1606
 
1607
 
1608
 
1609
 
1610
 
1611
 
1612
wire    dsfar2_clk ;
1613
 
1614
 
1615
 
1616
 
1617
 
1618
 
1619
 
1620
 
1621
 
1622
 
1623
 
1624
 
1625
 
1626
// Thread2
1627
 
1628
dffe  #(48) dsfar2_ff (
1629
        .din    (dsfar_din[47:0]),
1630
        .q      (dsfar2[47:0]),
1631
        .en (~(dmmu_sfar_wr_en_l[2])), .clk(clk),
1632
        .se     (1'b0),       .si (),          .so ()
1633
        );
1634
 
1635
 
1636
 
1637
 
1638
 
1639
 
1640
 
1641
 
1642
 
1643
 
1644
 
1645
 
1646
 
1647
 
1648
 
1649
 
1650
 
1651
 
1652
 
1653
wire    dsfar3_clk ;
1654
 
1655
 
1656
 
1657
 
1658
 
1659
 
1660
 
1661
 
1662
 
1663
 
1664
 
1665
 
1666
 
1667
// Thread3
1668
 
1669
dffe  #(48) dsfar3_ff (
1670
        .din    (dsfar_din[47:0]),
1671
        .q      (dsfar3[47:0]),
1672
        .en (~(dmmu_sfar_wr_en_l[3])), .clk(clk),
1673
        .se     (1'b0),       .si (),          .so ()
1674
        );
1675
 
1676
 
1677
 
1678
 
1679
 
1680
 
1681
 
1682
 
1683
 
1684
 
1685
 
1686
 
1687
 
1688
 
1689
 
1690
 
1691
 
1692
 
1693
mux4ds #(48) dsfar_mx(
1694
        .in0(dsfar0[47:0]),
1695
        .in1(dsfar1[47:0]),
1696
        .in2(dsfar2[47:0]),
1697
        .in3(dsfar3[47:0]),
1698
        .sel0 (tlu_slxa_thrd_sel[0]),
1699
        .sel1 (tlu_slxa_thrd_sel[1]),
1700
        .sel2 (tlu_slxa_thrd_sel[2]),
1701
        .sel3 (tlu_slxa_thrd_sel[3]),
1702
        .dout(dsfar[47:0])
1703
);
1704
 
1705
 
1706
//=========================================================================================
1707
//      D-SFSR
1708
//=========================================================================================
1709
 
1710
 
1711
dp_mux2es #(24) dsfsr_wdsel(
1712
                .in0    (tlu_dsfsr_din_g[23:0]),
1713
                .in1    ({lsu_tlu_st_rs3_data_b47t0_g[23:16],   // stxa
1714
                         2'b00,lsu_tlu_st_rs3_data_b47t0_g[13:0]}),
1715
                // .in1 (lsu_tlu_st_rs3_data_b47t0_g[23:0]),    // Bug 4283
1716
                .sel    (dmmu_any_sfsr_wr),
1717
                .dout   (dsfsr_din[23:0])
1718
        );
1719
 
1720
wire    dsfsr0_clk ;
1721
 
1722
 
1723
 
1724
 
1725
 
1726
 
1727
 
1728
 
1729
 
1730
 
1731
 
1732
 
1733
 
1734
// Thread0
1735
 
1736
dffe  #(23) dsfsr0_ff (
1737
        .din    (dsfsr_din[23:1]),
1738
        .q      (dsfsr0[23:1]),
1739
        .en (~(dmmu_sfsr_wr_en_l[0])), .clk(clk),
1740
        .se     (1'b0),       .si (),          .so ()
1741
        );
1742
 
1743
 
1744
 
1745
 
1746
 
1747
 
1748
 
1749
 
1750
 
1751
 
1752
 
1753
 
1754
 
1755
 
1756
 
1757
 
1758
 
1759
 
1760
 
1761
dffrle  #(1) dsfsr0vld_ff (
1762
        .din    (dsfsr_din[0]),
1763
        .q      (dsfsr0[0]),
1764
        .rst_l  (rst_l),
1765
        .en (~(dmmu_sfsr_wr_en_l[0])), .clk(clk),
1766
        .se     (1'b0),       .si (),          .so ()
1767
        );
1768
 
1769
 
1770
 
1771
 
1772
 
1773
 
1774
 
1775
 
1776
 
1777
 
1778
 
1779
 
1780
 
1781
 
1782
 
1783
 
1784
 
1785
 
1786
 
1787
 
1788
assign  tlu_dsfsr_flt_vld[0] = dsfsr0[0] ;
1789
 
1790
wire    dsfsr1_clk ;
1791
 
1792
 
1793
 
1794
 
1795
 
1796
 
1797
 
1798
 
1799
 
1800
 
1801
 
1802
 
1803
 
1804
// Thread1
1805
 
1806
dffe  #(23) dsfsr1_ff (
1807
        .din    (dsfsr_din[23:1]),
1808
        .q      (dsfsr1[23:1]),
1809
        .en (~(dmmu_sfsr_wr_en_l[1])), .clk(clk),
1810
        .se     (1'b0),       .si (),          .so ()
1811
        );
1812
 
1813
 
1814
 
1815
 
1816
 
1817
 
1818
 
1819
 
1820
 
1821
 
1822
 
1823
 
1824
 
1825
 
1826
 
1827
 
1828
 
1829
 
1830
 
1831
dffrle  #(1) dsfsr1vld_ff (
1832
        .din    (dsfsr_din[0]),
1833
        .q      (dsfsr1[0]),
1834
        .rst_l  (rst_l),
1835
        .en (~(dmmu_sfsr_wr_en_l[1])), .clk(clk),
1836
        .se     (1'b0),       .si (),          .so ()
1837
        );
1838
 
1839
 
1840
 
1841
 
1842
 
1843
 
1844
 
1845
 
1846
 
1847
 
1848
 
1849
 
1850
 
1851
 
1852
 
1853
 
1854
 
1855
 
1856
 
1857
 
1858
assign  tlu_dsfsr_flt_vld[1] = dsfsr1[0] ;
1859
 
1860
wire    dsfsr2_clk ;
1861
 
1862
 
1863
 
1864
 
1865
 
1866
 
1867
 
1868
 
1869
 
1870
 
1871
 
1872
 
1873
 
1874
// Thread2
1875
 
1876
dffe  #(23) dsfsr2_ff (
1877
        .din    (dsfsr_din[23:1]),
1878
        .q      (dsfsr2[23:1]),
1879
        .en (~(dmmu_sfsr_wr_en_l[2])), .clk(clk),
1880
        .se     (1'b0),       .si (),          .so ()
1881
        );
1882
 
1883
 
1884
 
1885
 
1886
 
1887
 
1888
 
1889
 
1890
 
1891
 
1892
 
1893
 
1894
 
1895
 
1896
 
1897
 
1898
 
1899
 
1900
 
1901
dffrle  #(1) dsfsr2vld_ff (
1902
        .din    (dsfsr_din[0]),
1903
        .q      (dsfsr2[0]),
1904
        .rst_l  (rst_l),
1905
        .en (~(dmmu_sfsr_wr_en_l[2])), .clk(clk),
1906
        .se     (1'b0),       .si (),          .so ()
1907
        );
1908
 
1909
 
1910
 
1911
 
1912
 
1913
 
1914
 
1915
 
1916
 
1917
 
1918
 
1919
 
1920
 
1921
 
1922
 
1923
 
1924
 
1925
 
1926
 
1927
 
1928
assign  tlu_dsfsr_flt_vld[2] = dsfsr2[0] ;
1929
 
1930
wire    dsfsr3_clk ;
1931
 
1932
 
1933
 
1934
 
1935
 
1936
 
1937
 
1938
 
1939
 
1940
 
1941
 
1942
 
1943
 
1944
// Thread3
1945
 
1946
dffe  #(23) dsfsr3_ff (
1947
        .din    (dsfsr_din[23:1]),
1948
        .q      (dsfsr3[23:1]),
1949
        .en (~(dmmu_sfsr_wr_en_l[3])), .clk(clk),
1950
        .se     (1'b0),       .si (),          .so ()
1951
        );
1952
 
1953
 
1954
 
1955
 
1956
 
1957
 
1958
 
1959
 
1960
 
1961
 
1962
 
1963
 
1964
 
1965
 
1966
 
1967
 
1968
 
1969
 
1970
 
1971
dffrle  #(1) dsfsr3vld_ff (
1972
        .din    (dsfsr_din[0]),
1973
        .q      (dsfsr3[0]),
1974
        .rst_l  (rst_l),
1975
        .en (~(dmmu_sfsr_wr_en_l[3])), .clk(clk),
1976
        .se     (1'b0),       .si (),          .so ()
1977
        );
1978
 
1979
 
1980
 
1981
 
1982
 
1983
 
1984
 
1985
 
1986
 
1987
 
1988
 
1989
 
1990
 
1991
 
1992
 
1993
 
1994
 
1995
 
1996
 
1997
 
1998
assign  tlu_dsfsr_flt_vld[3] = dsfsr3[0] ;
1999
 
2000
dp_mux4ds #(24) dsfsr_msel(
2001
                .in0    (dsfsr0[23:0]),
2002
                .in1    (dsfsr1[23:0]),
2003
                .in2    (dsfsr2[23:0]),
2004
                .in3    (dsfsr3[23:0]),
2005
                .sel0_l (~tlu_slxa_thrd_sel[0]),
2006
                .sel1_l (~tlu_slxa_thrd_sel[1]),
2007
                .sel2_l (~tlu_slxa_thrd_sel[2]),
2008
                .sel3_l (~tlu_slxa_thrd_sel[3]),
2009
                .dout   (dsfsr[23:0])
2010
        );
2011
 
2012
//=========================================================================================
2013
//      I-SFSR
2014
//=========================================================================================
2015
 
2016
// Should be able to reduce the width of these regs !!!
2017
 
2018
 
2019
dp_mux2es #(24) isfsr_wdsel(
2020
                .in0    (tlu_isfsr_din_g[23:0]),
2021
                .in1    ({lsu_tlu_st_rs3_data_b47t0_g[23:16],   // stxa
2022
                         2'b00,lsu_tlu_st_rs3_data_b47t0_g[13:0]}),
2023
                //.in1  (lsu_tlu_st_rs3_data_b47t0_g[23:0]),    // Bug 4283
2024
                .sel    (immu_any_sfsr_wr),
2025
                .dout   (isfsr_din[23:0])
2026
        );
2027
 
2028
wire    isfsr0_clk ;
2029
 
2030
 
2031
 
2032
 
2033
 
2034
 
2035
 
2036
 
2037
 
2038
 
2039
 
2040
 
2041
 
2042
// Thread0
2043
 
2044
dffe  #(23) isfsr0_ff (
2045
        .din    (isfsr_din[23:1]),
2046
        .q      (isfsr0[23:1]),
2047
        .en (~(immu_sfsr_wr_en_l[0])), .clk(clk),
2048
        .se     (1'b0),       .si (),          .so ()
2049
        );
2050
 
2051
 
2052
 
2053
 
2054
 
2055
 
2056
 
2057
 
2058
 
2059
 
2060
 
2061
 
2062
 
2063
 
2064
 
2065
 
2066
 
2067
 
2068
// Chandra - This has changed.
2069
 
2070
dffrle  #(1) isfsrvld0_ff (
2071
        .din    (isfsr_din[0]),
2072
        .q      (isfsr0[0]),
2073
        .rst_l  (rst_l),      .en (~(immu_sfsr_wr_en_l[0])), .clk(clk),
2074
        .se     (1'b0),       .si (),          .so ()
2075
        );
2076
 
2077
 
2078
 
2079
 
2080
 
2081
 
2082
 
2083
 
2084
 
2085
 
2086
 
2087
 
2088
 
2089
 
2090
 
2091
 
2092
 
2093
 
2094
assign  tlu_isfsr_flt_vld[0] = isfsr0[0] ;
2095
 
2096
wire    isfsr1_clk ;
2097
 
2098
 
2099
 
2100
 
2101
 
2102
 
2103
 
2104
 
2105
 
2106
 
2107
 
2108
 
2109
 
2110
// Thread1
2111
 
2112
dffe  #(23) isfsr1_ff (
2113
        .din    (isfsr_din[23:1]),
2114
        .q      (isfsr1[23:1]),
2115
        .en (~(immu_sfsr_wr_en_l[1])), .clk(clk),
2116
        .se     (1'b0),       .si (),          .so ()
2117
        );
2118
 
2119
 
2120
 
2121
 
2122
 
2123
 
2124
 
2125
 
2126
 
2127
 
2128
 
2129
 
2130
 
2131
 
2132
 
2133
 
2134
 
2135
 
2136
// Chandra - This has changed.
2137
 
2138
dffrle  #(1) isfsrvld1_ff (
2139
        .din    (isfsr_din[0]),
2140
        .q      (isfsr1[0]),
2141
        .rst_l  (rst_l),                .en (~(immu_sfsr_wr_en_l[1])), .clk(clk),
2142
        .se     (1'b0),       .si (),          .so ()
2143
        );
2144
 
2145
 
2146
 
2147
 
2148
 
2149
 
2150
 
2151
 
2152
 
2153
 
2154
 
2155
 
2156
 
2157
 
2158
 
2159
 
2160
 
2161
 
2162
assign  tlu_isfsr_flt_vld[1] = isfsr1[0] ;
2163
 
2164
wire    isfsr2_clk ;
2165
 
2166
 
2167
 
2168
 
2169
 
2170
 
2171
 
2172
 
2173
 
2174
 
2175
 
2176
 
2177
 
2178
// Thread2
2179
 
2180
dffe  #(23) isfsr2_ff (
2181
        .din    (isfsr_din[23:1]),
2182
        .q      (isfsr2[23:1]),
2183
        .en (~(immu_sfsr_wr_en_l[2])), .clk(clk),
2184
        .se     (1'b0),       .si (),          .so ()
2185
        );
2186
 
2187
 
2188
 
2189
 
2190
 
2191
 
2192
 
2193
 
2194
 
2195
 
2196
 
2197
 
2198
 
2199
 
2200
 
2201
 
2202
 
2203
 
2204
// Chandra - This has changed.
2205
 
2206
dffrle  #(1) isfsrvld2_ff (
2207
        .din    (isfsr_din[0]),
2208
        .q      (isfsr2[0]),
2209
        .rst_l  (rst_l),        .en (~(immu_sfsr_wr_en_l[2])), .clk(clk),
2210
        .se     (1'b0),       .si (),          .so ()
2211
        );
2212
 
2213
 
2214
 
2215
 
2216
 
2217
 
2218
 
2219
 
2220
 
2221
 
2222
 
2223
 
2224
 
2225
 
2226
 
2227
 
2228
 
2229
 
2230
assign  tlu_isfsr_flt_vld[2] = isfsr2[0] ;
2231
 
2232
wire    isfsr3_clk ;
2233
 
2234
 
2235
 
2236
 
2237
 
2238
 
2239
 
2240
 
2241
 
2242
 
2243
 
2244
 
2245
 
2246
// Thread3
2247
 
2248
dffe  #(23) isfsr3_ff (
2249
        .din    (isfsr_din[23:1]),
2250
        .q      (isfsr3[23:1]),
2251
        .en (~(immu_sfsr_wr_en_l[3])), .clk(clk),
2252
        .se     (1'b0),       .si (),          .so ()
2253
        );
2254
 
2255
 
2256
 
2257
 
2258
 
2259
 
2260
 
2261
 
2262
 
2263
 
2264
 
2265
 
2266
 
2267
 
2268
 
2269
 
2270
 
2271
 
2272
// Chandra - This has changed.
2273
 
2274
dffrle  #(1) isfsrvld3_ff (
2275
        .din    (isfsr_din[0]),
2276
        .q      (isfsr3[0]),
2277
        .rst_l  (rst_l),        .en (~(immu_sfsr_wr_en_l[3])), .clk(clk),
2278
        .se     (1'b0),       .si (),          .so ()
2279
        );
2280
 
2281
 
2282
 
2283
 
2284
 
2285
 
2286
 
2287
 
2288
 
2289
 
2290
 
2291
 
2292
 
2293
 
2294
 
2295
 
2296
 
2297
 
2298
assign  tlu_isfsr_flt_vld[3] = isfsr3[0] ;
2299
 
2300
dp_mux4ds #(24) isfsr_msel(
2301
                .in0    (isfsr0[23:0]),
2302
                .in1    (isfsr1[23:0]),
2303
                .in2    (isfsr2[23:0]),
2304
                .in3    (isfsr3[23:0]),
2305
                .sel0_l (~tlu_slxa_thrd_sel[0]),
2306
                .sel1_l (~tlu_slxa_thrd_sel[1]),
2307
                .sel2_l (~tlu_slxa_thrd_sel[2]),
2308
                .sel3_l (~tlu_slxa_thrd_sel[3]),
2309
                .dout   (isfsr[23:0])
2310
        );
2311
 
2312
//=========================================================================================
2313
//      D-SFAR
2314
//=========================================================================================
2315
/*
2316
`ifdef SPARC_HPV_EN
2317
`else
2318
assign  dsfar[47:0] = mra_rdata[`MRA_DSFAR_HI:`MRA_DSFAR_LO];
2319
`endif
2320
*/
2321
 
2322
//=========================================================================================
2323
//      Muxing for ldxa read
2324
//=========================================================================================
2325
 
2326
// Note - collapse dtsb/itsb into one leg of the mux. Similar for
2327
// dtag_access/itag_access.
2328
// read of zcps1_itsb,zcps1_dtsb collapsed into read of dtsb.
2329
// read of nzcps0_dtsb,nzcps0_itsb collapsed into read of dtag_access.
2330
// read of nzcps1_dtsb,nzcps1_itsb collapsed into read of dsfar.
2331
 
2332
// use rs3 to return data.
2333
 
2334
//*****************************************************************
2335
//      SPARC_HPV_EN 
2336
//*****************************************************************
2337
 
2338
// Warning for Grape Mapper : Be careful about loading on replicated
2339
// msb.
2340
 
2341
// First Level, Mux 1
2342
// This is done in Estage to save on flops.
2343
// !!! The sels except b0 are also Estage !!! b0 is delayed by a cycle.
2344
mux3ds #(48) ldxa_l1mx1_e(
2345
                .in0(tsb_ps0[47:0]), // becomes ps0 tsb with SPARC_HPV_EN
2346
                .in1(tsb_ps1[47:0]), // becomes ps1 tsb with SPARC_HPV_EN
2347
                .in2(tag_access_w2[47:0]),
2348
                .sel0(tlu_ldxa_l1mx1_sel[1]),
2349
                .sel1(tlu_ldxa_l1mx1_sel[2]),
2350
                .sel2(tlu_ldxa_l1mx1_sel[3]),
2351
                .dout(ldxa_l1mx1_dout_e[47:0])
2352
);
2353
 
2354
// New
2355
dff  #(48) l1mx1_ff (
2356
        .din    (ldxa_l1mx1_dout_e[47:0]),
2357
        .q      (ldxa_l1mx1_dout_m[47:0]),
2358
        .clk    (clk),
2359
        .se     (1'b0),       .si (),          .so ()
2360
        );
2361
 
2362
wire [63:0] ldxa_l1mx1_dout_final ;
2363
 
2364
// New
2365
assign  ldxa_l1mx1_dout_final[63:0] =
2366
                // Note : this bit of the mx sel is stage delayed relative to the others.
2367
                tlu_ldxa_l1mx1_sel[0] ?
2368
                tag_target[63:0] : // tag_target.
2369
                {{16{ldxa_l1mx1_dout_m[47]}},ldxa_l1mx1_dout_m[47:0]} ; // tsb_ps0/ps1,tag_access
2370
 
2371
/*mux4ds #(64) ldxa_l1mx1(
2372
                .in0(tag_target[63:0]),
2373
                .in1({{16{tsb_ps0[47]}},tsb_ps0[47:0]}), // becomes ps0 tsb with SPARC_HPV_EN
2374
                .in2({{16{tsb_ps1[47]}},tsb_ps1[47:0]}), // becomes ps1 tsb with SPARC_HPV_EN
2375
                .in3({{16{tag_access_w2[47]}},tag_access_w2[47:0]}),
2376
                .sel0(tlu_ldxa_l1mx1_sel[0]),
2377
                .sel1(tlu_ldxa_l1mx1_sel[1]),
2378
                .sel2(tlu_ldxa_l1mx1_sel[2]),
2379
                .sel3(tlu_ldxa_l1mx1_sel[3]),
2380
                .dout(ldxa_l1mx1_dout[63:0])
2381
);*/
2382
 
2383
wire    [47:0]   ldxa_l1mx2_dout ;
2384
// First Level, Mux 2 - This is done in M stage.
2385
mux4ds #(48) ldxa_l1mx2(
2386
                .in0({24'd0,dsfsr[23:0]}),
2387
                .in1(dsfar[47:0]),
2388
                .in2({24'd0,isfsr[23:0]}),
2389
                .in3({37'd0,ptr_ctxt_cfg[5:3],5'd0,ptr_ctxt_cfg[2:0]}),
2390
                .sel0(tlu_ldxa_l1mx2_sel[0]),
2391
                .sel1(tlu_ldxa_l1mx2_sel[1]),
2392
                .sel2(tlu_ldxa_l1mx2_sel[2]),
2393
                .sel3(tlu_ldxa_l1mx2_sel[3]),
2394
                .dout(ldxa_l1mx2_dout[47:0])
2395
);
2396
 
2397
wire    [63:0]   tlu_ldxa_data_m ;
2398
mux3ds #(64)    ldxa_fmx (
2399
                .in0    (ldxa_l1mx1_dout_final[63:0]),
2400
                //.in0  (ldxa_l1mx1_dout[63:0]),
2401
                .in1    ({{16{ldxa_l1mx2_dout[47]}},ldxa_l1mx2_dout[47:0]}),
2402
                .in2    ({{16{tlu_idtsb_8k_ptr[47]}},tlu_idtsb_8k_ptr[47:0]}),
2403
                .sel0   (tlu_ldxa_l2mx1_sel[0]),
2404
                .sel1   (tlu_ldxa_l2mx1_sel[1]),
2405
                .sel2   (tlu_ldxa_l2mx1_sel[2]),
2406
                .dout   (tlu_ldxa_data_m[63:0])
2407
                //.dout (tlu_ldxa_data_e[63:0])
2408
        );
2409
 
2410
dff  #(64) stgg_eldxa (
2411
        .din    (tlu_ldxa_data_m[63:0]),
2412
        .q      (lsu_exu_ldxa_data_g[63:0]),
2413
        .clk    (clk),
2414
        .se     (1'b0),       .si (),          .so ()
2415
        );
2416
 
2417
endmodule
2418
 
2419
 

powered by: WebSVN 2.1.0

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