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

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [hdl/] [rtl/] [sparc_core/] [lsu_qdp1.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: lsu_qdp1.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:  LSU PCX Datapath - QDP1
24
*/
25
////////////////////////////////////////////////////////////////////////
26
// 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
/* ========== Copyright Header Begin ==========================================
309
*
310
* OpenSPARC T1 Processor File: iop.h
311
* Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
312
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
313
*
314
* The above named program is free software; you can redistribute it and/or
315
* modify it under the terms of the GNU General Public
316
* License version 2 as published by the Free Software Foundation.
317
*
318
* The above named program is distributed in the hope that it will be
319
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
320
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
321
* General Public License for more details.
322
*
323
* You should have received a copy of the GNU General Public
324
* License along with this work; if not, write to the Free Software
325
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
326
*
327
* ========== Copyright Header End ============================================
328
*/
329
//-*- verilog -*-
330
////////////////////////////////////////////////////////////////////////
331
/*
332
//
333
//  Description:        Global header file that contain definitions that
334
//                      are common/shared at the IOP chip level
335
*/
336
////////////////////////////////////////////////////////////////////////
337
 
338
 
339
// Address Map Defines
340
// ===================
341
 
342
 
343
 
344
 
345
// CMP space
346
 
347
 
348
 
349
// IOP space
350
 
351
 
352
 
353
 
354
                               //`define ENET_ING_CSR     8'h84
355
                               //`define ENET_EGR_CMD_CSR 8'h85
356
 
357
 
358
 
359
 
360
 
361
 
362
 
363
 
364
 
365
 
366
 
367
 
368
 
369
 
370
 
371
// L2 space
372
 
373
 
374
 
375
// More IOP space
376
 
377
 
378
 
379
 
380
 
381
//Cache Crossbar Width and Field Defines
382
//======================================
383
 
384
 
385
 
386
 
387
 
388
 
389
 
390
 
391
 
392
 
393
 
394
 
395
 
396
 
397
 
398
 
399
 
400
 
401
 
402
 
403
 
404
 
405
 
406
 
407
 
408
 
409
 
410
 
411
 
412
 
413
 
414
 
415
 
416
 
417
 
418
 
419
 
420
 
421
 
422
 
423
 
424
 
425
 
426
 
427
 
428
//bits 133:128 are shared by different fields
429
//for different packet types.
430
 
431
 
432
 
433
 
434
 
435
 
436
 
437
 
438
 
439
 
440
 
441
 
442
 
443
 
444
 
445
 
446
 
447
 
448
 
449
 
450
 
451
 
452
 
453
 
454
 
455
 
456
 
457
 
458
 
459
 
460
 
461
 
462
 
463
 
464
 
465
 
466
 
467
 
468
 
469
 
470
 
471
 
472
 
473
 
474
 
475
 
476
 
477
 
478
 
479
 
480
 
481
 
482
 
483
 
484
 
485
 
486
 
487
 
488
 
489
 
490
 
491
 
492
//End cache crossbar defines
493
 
494
 
495
// Number of COS supported by EECU 
496
 
497
 
498
 
499
// 
500
// BSC bus sizes
501
// =============
502
//
503
 
504
// General
505
 
506
 
507
 
508
 
509
// CTags
510
 
511
 
512
 
513
 
514
 
515
 
516
 
517
 
518
 
519
 
520
 
521
 
522
 
523
// reinstated temporarily
524
 
525
 
526
 
527
 
528
// CoS
529
 
530
 
531
 
532
 
533
 
534
 
535
// L2$ Bank
536
 
537
 
538
 
539
// L2$ Req
540
 
541
 
542
 
543
 
544
 
545
 
546
 
547
 
548
 
549
 
550
 
551
 
552
 
553
// L2$ Ack
554
 
555
 
556
 
557
 
558
 
559
 
560
 
561
 
562
// Enet Egress Command Unit
563
 
564
 
565
 
566
 
567
 
568
 
569
 
570
 
571
 
572
 
573
 
574
 
575
 
576
 
577
// Enet Egress Packet Unit
578
 
579
 
580
 
581
 
582
 
583
 
584
 
585
 
586
 
587
 
588
 
589
 
590
 
591
// This is cleaved in between Egress Datapath Ack's
592
 
593
 
594
 
595
 
596
 
597
 
598
 
599
 
600
// Enet Egress Datapath
601
 
602
 
603
 
604
 
605
 
606
 
607
 
608
 
609
 
610
 
611
 
612
 
613
 
614
 
615
 
616
 
617
// In-Order / Ordered Queue: EEPU
618
// Tag is: TLEN, SOF, EOF, QID = 15
619
 
620
 
621
 
622
 
623
 
624
 
625
// Nack + Tag Info + CTag
626
 
627
 
628
 
629
 
630
// ENET Ingress Queue Management Req
631
 
632
 
633
 
634
 
635
 
636
 
637
 
638
 
639
 
640
 
641
 
642
 
643
// ENET Ingress Queue Management Ack
644
 
645
 
646
 
647
 
648
 
649
 
650
 
651
 
652
// Enet Ingress Packet Unit
653
 
654
 
655
 
656
 
657
 
658
 
659
 
660
 
661
 
662
 
663
 
664
 
665
// ENET Ingress Packet Unit Ack
666
 
667
 
668
 
669
 
670
 
671
 
672
 
673
// In-Order / Ordered Queue: PCI
674
// Tag is: CTAG
675
 
676
 
677
 
678
 
679
 
680
// PCI-X Request
681
 
682
 
683
 
684
 
685
 
686
 
687
 
688
 
689
 
690
 
691
 
692
// PCI_X Acknowledge
693
 
694
 
695
 
696
 
697
 
698
 
699
 
700
 
701
 
702
 
703
 
704
//
705
// BSC array sizes
706
//================
707
//
708
 
709
 
710
 
711
 
712
 
713
 
714
 
715
 
716
 
717
 
718
 
719
 
720
// ECC syndrome bits per memory element
721
 
722
 
723
 
724
 
725
//
726
// BSC Port Definitions
727
// ====================
728
//
729
// Bits 7 to 4 of curr_port_id
730
 
731
 
732
 
733
 
734
 
735
 
736
 
737
 
738
// Number of ports of each type
739
 
740
 
741
// Bits needed to represent above
742
 
743
 
744
// How wide the linked list pointers are
745
// 60b for no payload (2CoS)
746
// 80b for payload (2CoS)
747
 
748
//`define BSC_OBJ_PTR   80
749
//`define BSC_HD1_HI    69
750
//`define BSC_HD1_LO    60
751
//`define BSC_TL1_HI    59
752
//`define BSC_TL1_LO    50
753
//`define BSC_CT1_HI    49
754
//`define BSC_CT1_LO    40
755
//`define BSC_HD0_HI    29
756
//`define BSC_HD0_LO    20
757
//`define BSC_TL0_HI    19
758
//`define BSC_TL0_LO    10
759
//`define BSC_CT0_HI     9
760
//`define BSC_CT0_LO     0
761
 
762
 
763
 
764
 
765
 
766
 
767
 
768
 
769
 
770
 
771
 
772
 
773
 
774
 
775
 
776
 
777
 
778
 
779
 
780
 
781
 
782
 
783
 
784
 
785
 
786
 
787
 
788
 
789
 
790
 
791
 
792
 
793
 
794
 
795
// I2C STATES in DRAMctl
796
 
797
 
798
 
799
 
800
 
801
 
802
 
803
//
804
// IOB defines
805
// ===========
806
//
807
 
808
 
809
 
810
 
811
 
812
 
813
 
814
 
815
 
816
 
817
 
818
 
819
 
820
 
821
 
822
 
823
 
824
 
825
 
826
//`define IOB_INT_STAT_WIDTH   32
827
//`define IOB_INT_STAT_HI      31
828
//`define IOB_INT_STAT_LO       0
829
 
830
 
831
 
832
 
833
 
834
 
835
 
836
 
837
 
838
 
839
 
840
 
841
 
842
 
843
 
844
 
845
 
846
 
847
 
848
 
849
 
850
 
851
 
852
 
853
 
854
 
855
 
856
 
857
 
858
 
859
 
860
 
861
 
862
 
863
 
864
 
865
 
866
 
867
 
868
 
869
 
870
 
871
 
872
 
873
 
874
 
875
 
876
 
877
 
878
// fixme - double check address mapping
879
// CREG in `IOB_INT_CSR space
880
 
881
 
882
 
883
 
884
 
885
 
886
 
887
 
888
 
889
 
890
// CREG in `IOB_MAN_CSR space
891
 
892
 
893
 
894
 
895
 
896
 
897
 
898
 
899
 
900
 
901
 
902
 
903
 
904
 
905
 
906
 
907
 
908
 
909
 
910
 
911
 
912
 
913
 
914
 
915
 
916
 
917
 
918
 
919
 
920
 
921
 
922
 
923
 
924
 
925
 
926
 
927
 
928
// Address map for TAP access of SPARC ASI
929
 
930
 
931
 
932
 
933
 
934
 
935
 
936
 
937
 
938
 
939
 
940
 
941
 
942
//
943
// CIOP UCB Bus Width
944
// ==================
945
//
946
//`define IOB_EECU_WIDTH       16  // ethernet egress command
947
//`define EECU_IOB_WIDTH       16
948
 
949
//`define IOB_NRAM_WIDTH       16  // NRAM (RLDRAM previously)
950
//`define NRAM_IOB_WIDTH        4
951
 
952
 
953
 
954
 
955
//`define IOB_ENET_ING_WIDTH   32  // ethernet ingress
956
//`define ENET_ING_IOB_WIDTH    8
957
 
958
//`define IOB_ENET_EGR_WIDTH    4  // ethernet egress
959
//`define ENET_EGR_IOB_WIDTH    4
960
 
961
//`define IOB_ENET_MAC_WIDTH    4  // ethernet MAC
962
//`define ENET_MAC_IOB_WIDTH    4
963
 
964
 
965
 
966
 
967
//`define IOB_BSC_WIDTH         4  // BSC
968
//`define BSC_IOB_WIDTH         4
969
 
970
 
971
 
972
 
973
 
974
 
975
 
976
//`define IOB_CLSP_WIDTH        4  // clk spine unit
977
//`define CLSP_IOB_WIDTH        4
978
 
979
 
980
 
981
 
982
 
983
//
984
// CIOP UCB Buf ID Type
985
// ====================
986
//
987
 
988
 
989
 
990
//
991
// Interrupt Device ID
992
// ===================
993
//
994
// Caution: DUMMY_DEV_ID has to be 9 bit wide
995
//          for fields to line up properly in the IOB.
996
 
997
 
998
 
999
//
1000
// Soft Error related definitions 
1001
// ==============================
1002
//
1003
 
1004
 
1005
 
1006
//
1007
// CMP clock
1008
// =========
1009
//
1010
 
1011
 
1012
 
1013
 
1014
//
1015
// NRAM/IO Interface
1016
// =================
1017
//
1018
 
1019
 
1020
 
1021
 
1022
 
1023
 
1024
 
1025
 
1026
 
1027
 
1028
//
1029
// NRAM/ENET Interface
1030
// ===================
1031
//
1032
 
1033
 
1034
 
1035
 
1036
 
1037
 
1038
 
1039
//
1040
// IO/FCRAM Interface
1041
// ==================
1042
//
1043
 
1044
 
1045
 
1046
 
1047
 
1048
 
1049
//
1050
// PCI Interface
1051
// ==================
1052
// Load/store size encodings
1053
// -------------------------
1054
// Size encoding
1055
// 000 - byte
1056
// 001 - half-word
1057
// 010 - word
1058
// 011 - double-word
1059
// 100 - quad
1060
 
1061
 
1062
 
1063
 
1064
 
1065
 
1066
//
1067
// JBI<->SCTAG Interface
1068
// =======================
1069
// Outbound Header Format
1070
 
1071
 
1072
 
1073
 
1074
 
1075
 
1076
 
1077
 
1078
 
1079
 
1080
 
1081
 
1082
 
1083
 
1084
 
1085
 
1086
 
1087
 
1088
 
1089
 
1090
 
1091
 
1092
 
1093
 
1094
 
1095
 
1096
 
1097
// Inbound Header Format
1098
 
1099
 
1100
 
1101
 
1102
 
1103
 
1104
 
1105
 
1106
 
1107
 
1108
 
1109
 
1110
 
1111
 
1112
 
1113
 
1114
 
1115
 
1116
 
1117
 
1118
//
1119
// JBI->IOB Mondo Header Format
1120
// ============================
1121
//
1122
 
1123
 
1124
 
1125
 
1126
 
1127
 
1128
 
1129
 
1130
 
1131
 
1132
 
1133
 
1134
 
1135
 
1136
// JBI->IOB Mondo Bus Width/Cycle
1137
// ==============================
1138
// Cycle  1 Header[15:8]
1139
// Cycle  2 Header[ 7:0]
1140
// Cycle  3 J_AD[127:120]
1141
// Cycle  4 J_AD[119:112]
1142
// .....
1143
// Cycle 18 J_AD[  7:  0]
1144
 
1145
 
1146
/*
1147
/* ========== Copyright Header Begin ==========================================
1148
*
1149
* OpenSPARC T1 Processor File: lsu.h
1150
* Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
1151
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
1152
*
1153
* The above named program is free software; you can redistribute it and/or
1154
* modify it under the terms of the GNU General Public
1155
* License version 2 as published by the Free Software Foundation.
1156
*
1157
* The above named program is distributed in the hope that it will be
1158
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
1159
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1160
* General Public License for more details.
1161
*
1162
* You should have received a copy of the GNU General Public
1163
* License along with this work; if not, write to the Free Software
1164
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
1165
*
1166
* ========== Copyright Header End ============================================
1167
*/
1168
 
1169
 
1170
 
1171
 
1172
 
1173
 
1174
 
1175
 
1176
//`define STB_PCX_WY_HI   107
1177
//`define STB_PCX_WY_LO   106
1178
 
1179
 
1180
 
1181
 
1182
 
1183
 
1184
 
1185
 
1186
 
1187
 
1188
 
1189
 
1190
 
1191
 
1192
 
1193
 
1194
 
1195
 
1196
 
1197
 
1198
 
1199
 
1200
 
1201
 
1202
 
1203
 
1204
 
1205
 
1206
 
1207
 
1208
 
1209
 
1210
 
1211
 
1212
 
1213
 
1214
 
1215
 
1216
 
1217
 
1218
 
1219
 
1220
 
1221
 
1222
 
1223
 
1224
 
1225
 
1226
 
1227
 
1228
 
1229
 
1230
 
1231
 
1232
 
1233
 
1234
 
1235
 
1236
 
1237
 
1238
 
1239
 
1240
 
1241
 
1242
 
1243
 
1244
 
1245
 
1246
 
1247
 
1248
 
1249
 
1250
 
1251
 
1252
 
1253
 
1254
 
1255
 
1256
 
1257
 
1258
 
1259
 
1260
 
1261
// TLB Tag and Data Format
1262
 
1263
 
1264
 
1265
 
1266
 
1267
 
1268
 
1269
 
1270
 
1271
 
1272
 
1273
 
1274
 
1275
 
1276
 
1277
 
1278
 
1279
 
1280
 
1281
 
1282
 
1283
 
1284
 
1285
 
1286
 
1287
 
1288
 
1289
 
1290
 
1291
 
1292
 
1293
 
1294
 
1295
 
1296
 
1297
 
1298
 
1299
 
1300
 
1301
 
1302
 
1303
 
1304
 
1305
 
1306
 
1307
 
1308
 
1309
 
1310
 
1311
 
1312
 
1313
 
1314
 
1315
 
1316
 
1317
 
1318
 
1319
 
1320
 
1321
 
1322
 
1323
// I-TLB version - lsu_tlb only.
1324
 
1325
 
1326
 
1327
 
1328
 
1329
 
1330
 
1331
 
1332
 
1333
 
1334
 
1335
 
1336
 
1337
 
1338
 
1339
 
1340
 
1341
 
1342
 
1343
 
1344
 
1345
 
1346
 
1347
 
1348
// Invalidate Format
1349
//addr<5:4>=00
1350
 
1351
 
1352
 
1353
 
1354
 
1355
 
1356
 
1357
 
1358
 
1359
 
1360
 
1361
 
1362
 
1363
 
1364
 
1365
 
1366
 
1367
//addr<5:4>=01
1368
 
1369
 
1370
 
1371
 
1372
 
1373
 
1374
 
1375
 
1376
 
1377
 
1378
 
1379
 
1380
 
1381
 
1382
 
1383
 
1384
 
1385
//addr<5:4>=10
1386
 
1387
 
1388
 
1389
 
1390
 
1391
 
1392
 
1393
 
1394
 
1395
 
1396
 
1397
 
1398
 
1399
 
1400
 
1401
 
1402
 
1403
//addr<5:4>=11
1404
 
1405
 
1406
 
1407
 
1408
 
1409
 
1410
 
1411
 
1412
 
1413
 
1414
 
1415
 
1416
 
1417
 
1418
 
1419
 
1420
 
1421
// cpuid - 4b
1422
 
1423
 
1424
 
1425
// CPUany, addr<5:4>=00,10
1426
 
1427
 
1428
 
1429
 
1430
 
1431
// CPUany, addr<5:4>=01,11
1432
 
1433
 
1434
 
1435
 
1436
// CPUany, addr<5:4>=01,11
1437
 
1438
 
1439
 
1440
 
1441
// DTAG parity error Invalidate
1442
 
1443
 
1444
 
1445
 
1446
// CPX BINIT STORE
1447
 
1448
 
1449
////////////////////////////////////////////////////////////////////////
1450
// Local header file includes / local defines
1451
////////////////////////////////////////////////////////////////////////
1452
 
1453
//FPGA_SYN enables all FPGA related modifications
1454
 
1455
 
1456
 
1457
 
1458
 
1459
module lsu_qdp1 ( /*AUTOARG*/
1460
   // Outputs
1461
   so, lsu_va_match_b47_b32_m, lsu_va_match_b31_b3_m, lsu_va_wtchpt_addr, spc_pcx_data_pa,
1462
   dtag_wdata_m, lmq0_byp_misc_sz, lmq1_byp_misc_sz,
1463
   lmq2_byp_misc_sz, lmq3_byp_misc_sz, lsu_byp_misc_sz_e,
1464
   lsu_l2fill_sign_extend_m, lsu_l2fill_bendian_m, lmq0_l2fill_fpld,
1465
   lmq1_l2fill_fpld, lmq2_l2fill_fpld, lmq3_l2fill_fpld, lmq_ld_rd1,
1466
   lmq0_ncache_ld, lmq1_ncache_ld, lmq2_ncache_ld, lmq3_ncache_ld,
1467
   lmq0_ld_rq_type, lmq1_ld_rq_type, lmq2_ld_rq_type,
1468
   lmq3_ld_rq_type, lmq0_ldd_vld, lmq1_ldd_vld, lmq2_ldd_vld,
1469
   lmq3_ldd_vld, ld_sec_hit_thrd0, ld_sec_hit_thrd1,
1470
   ld_sec_hit_thrd2, ld_sec_hit_thrd3, lmq0_pcx_pkt_addr,
1471
   lmq1_pcx_pkt_addr, lmq2_pcx_pkt_addr, lmq3_pcx_pkt_addr,
1472
   lsu_mmu_rs3_data_g, lsu_tlu_rs3_data_g, lsu_diagnstc_wr_data_b0,
1473
   lsu_diagnstc_wr_data_e, lsu_ifu_stxa_data,
1474
   lsu_ifu_ld_icache_index, lsu_ifu_ld_pcxpkt_tid, lsu_error_pa_m,
1475
   lsu_pref_pcx_req, st_rs3_data_g, lsu_ldst_va_way_g,
1476
   dcache_alt_data_w0_m,
1477
   // Inputs
1478
   rclk, si, se, lsu_dcache_iob_rd_w, lsu_ramtest_rd_w,
1479
   lsu_pcx_rq_sz_b3, lsu_diagnstc_data_sel, pcx_pkt_src_sel,
1480
   lsu_stb_pcx_rvld_d1, imiss_pcx_mx_sel, fwd_int_fp_pcx_mx_sel,
1481
   spu_lsu_ldst_pckt, tlu_lsu_pcxpkt, const_cpuid, ifu_pcx_pkt,
1482
   lmq_byp_data_en_w2, lmq_byp_data_sel0, lmq_byp_data_sel1,
1483
   lmq_byp_data_sel2, lmq_byp_data_sel3, lmq_byp_ldxa_sel0,
1484
   lmq_byp_ldxa_sel1, lmq_byp_ldxa_sel2, lmq_byp_ldxa_sel3,
1485
   lmq_byp_data_fmx_sel, exu_lsu_rs3_data_e, ifu_lsu_ldxa_data_w2,
1486
   tlu_lsu_int_ldxa_data_w2, spu_lsu_ldxa_data_w2, stb_rdata_ramd,
1487
   stb_rdata_ramc, lmq_byp_misc_sel, dfq_byp_sel, ld_pcx_rq_sel,
1488
   ld_pcx_thrd, lmq_enable, ld_pcx_pkt_g, ffu_lsu_data,
1489
   lsu_tlb_st_sel_m, lsu_pcx_fwd_pkt, lsu_pcx_fwd_reply,
1490
   lsu_diagnstc_dtagv_prty_invrt_e, lsu_misc_rdata_w2,
1491
   lsu_stb_rd_tid, lsu_iobrdge_rply_data_sel, lsu_iobrdge_rd_data,
1492
   lsu_atomic_pkt2_bsel_g, lsu_pcx_ld_dtag_perror_w2,
1493
   lsu_dcache_rdata_w, lsu_va_wtchpt0_wr_en_l,
1494
   lsu_va_wtchpt1_wr_en_l, lsu_va_wtchpt2_wr_en_l,
1495
   lsu_va_wtchpt3_wr_en_l, thread0_m, thread1_m, thread2_m,
1496
   thread3_m, lsu_thread_g, lsu_ldst_va_m, tlb_pgnum, lsu_bld_pcx_rq,
1497
   lsu_bld_rq_addr, lmq0_pcx_pkt_way, lmq1_pcx_pkt_way,
1498
   lmq2_pcx_pkt_way, lmq3_pcx_pkt_way, lsu_dfq_ld_vld,
1499
   lsu_ifu_asi_data_en_l, lsu_ld0_spec_vld_kill_w2,
1500
   lsu_ld1_spec_vld_kill_w2, lsu_ld2_spec_vld_kill_w2,
1501
   lsu_ld3_spec_vld_kill_w2, lsu_fwd_rply_sz1_unc, rst_tri_en,
1502
   lsu_l2fill_data, l2fill_vld_m, ld_thrd_byp_sel_m, sehold
1503
   ) ;
1504
 
1505
input                     rclk ;
1506
input                     si;
1507
input                     se;
1508
input                     sehold;
1509
//input                   tmb_l;
1510
 
1511
output                    so;
1512
input                     lsu_dcache_iob_rd_w ;
1513
input                     lsu_ramtest_rd_w ;
1514
 
1515
input                    lsu_pcx_rq_sz_b3 ;
1516
 
1517
input  [3:0]               lsu_diagnstc_data_sel ;
1518
 
1519
input   [3:0]             pcx_pkt_src_sel ;       // sel 1/4 pkt src for pcx.
1520
input                     lsu_stb_pcx_rvld_d1 ;   // stb has been read-delayby1cycle
1521
input                     imiss_pcx_mx_sel ;      // select imiss over spu.
1522
input   [2:0]             fwd_int_fp_pcx_mx_sel ; // select fwd/intrpt/fpop
1523
 
1524
input   [124-1:0]  spu_lsu_ldst_pckt ;     // stream ld/st pkt for pcx.
1525
input   [25:0]            tlu_lsu_pcxpkt ;        // truncated pcx interrupt pkt.
1526
input   [2:0]             const_cpuid ;           // cpu id
1527
input   [51:0]            ifu_pcx_pkt ;           // ifu imiss request.
1528
input   [3:0]             lmq_byp_data_en_w2 ;
1529
input   [3:0]             lmq_byp_data_sel0 ;     // ldxa/stb/cas bypass data sel.
1530
input   [3:0]             lmq_byp_data_sel1 ;     // ldxa/stb/cas bypass data sel.
1531
input   [3:0]             lmq_byp_data_sel2 ;     // ldxa/stb/cas bypass data sel.
1532
input   [3:0]             lmq_byp_data_sel3 ;     // ldxa/stb/cas bypass data sel.
1533
input   [2:0]             lmq_byp_ldxa_sel0 ;     // ldxa data sel - thread0
1534
input   [2:0]             lmq_byp_ldxa_sel1 ;     // ldxa data sel - thread1
1535
input   [2:0]             lmq_byp_ldxa_sel2 ;     // ldxa data sel - thread2
1536
input   [2:0]             lmq_byp_ldxa_sel3 ;     // ldxa data sel - thread3
1537
input   [3:0]              lmq_byp_data_fmx_sel ;  // final sel for lmq data.
1538
input   [63:0]            exu_lsu_rs3_data_e ;    // rs3_data for cas pkt 2.
1539
input   [63:0]            ifu_lsu_ldxa_data_w2 ;  // ldxa data from ifu. 
1540
//input   [63:0]            tlu_lsu_ldxa_data_w2 ;  // ldxa data from tlu (mmu)
1541
input   [63:0]            tlu_lsu_int_ldxa_data_w2 ;  // ldxa data from tlu (intrpt/scpd)
1542
input   [63:0]            spu_lsu_ldxa_data_w2 ;  // ldxa data from spu 
1543
input   [75:0]            stb_rdata_ramd ;        // stb0 data ram output.
1544
input   [44:9]            stb_rdata_ramc ;        // stb0 tag ram output.
1545
input   [3:0]             lmq_byp_misc_sel ;      // select g-stage lmq source
1546
input   [3:0]             dfq_byp_sel ;
1547
input   [3:0]             ld_pcx_rq_sel ;
1548
input   [1:0]             ld_pcx_thrd ;
1549
 
1550
input   [3:0]             lmq_enable ;             // 4 enables for lmq.
1551
input   [65-1:40]  ld_pcx_pkt_g ;           // ld miss pkt for thread.
1552
input   [80:0]            ffu_lsu_data ;
1553
input   [3:0]             lsu_tlb_st_sel_m ;
1554
//input   [3:0]             lsu_tlb_st_sel_g ;
1555
//input                     lsu_tlb_st_vld_g ;   
1556
input   [107:0]           lsu_pcx_fwd_pkt ;         // local fwd reply/req
1557
input                     lsu_pcx_fwd_reply ;       // fwd reply on pcx pkt 
1558
input                     lsu_diagnstc_dtagv_prty_invrt_e ;
1559
//input                     lsu_diagnstc_wr_src_sel_e ;// dcache/dtag/v write - diag   
1560
//input   [47:0]            lsu_local_ldxa_data_w2 ;   // local ldxa data 
1561
input   [63:0]            lsu_misc_rdata_w2 ;   // local ldxa data 
1562
input   [1:0]             lsu_stb_rd_tid ;           // thread for which stb rd occurs
1563
input   [2:0]             lsu_iobrdge_rply_data_sel ;
1564
input   [43:0]            lsu_iobrdge_rd_data ;
1565
input   [2:0]             lsu_atomic_pkt2_bsel_g ;
1566
input                     lsu_pcx_ld_dtag_perror_w2 ;
1567
input   [63:0]             lsu_dcache_rdata_w ;
1568
//input   [47:0]            tlu_lsu_iobrdge_pc_data ;  // NOTE: unused: remove this in sync w/ tlu
1569
 
1570
input         lsu_va_wtchpt0_wr_en_l;
1571
input         lsu_va_wtchpt1_wr_en_l;
1572
input         lsu_va_wtchpt2_wr_en_l;
1573
input         lsu_va_wtchpt3_wr_en_l;
1574
input         thread0_m;
1575
input         thread1_m;
1576
input         thread2_m;
1577
input         thread3_m;
1578
 
1579
   input [3:0] lsu_thread_g;
1580
 
1581
 
1582
//input         lsu_pa_wtchpt_wr_en_l;
1583
input [47:0]  lsu_ldst_va_m;
1584
input [39:13] tlb_pgnum;
1585
input         lsu_bld_pcx_rq ;        // cycle after request
1586
input [1:0]   lsu_bld_rq_addr ;       // cycle after request
1587
 
1588
//input  [1:0]           lsu_lmq_pkt_way_g;
1589
input  [1:0]           lmq0_pcx_pkt_way;
1590
input  [1:0]           lmq1_pcx_pkt_way;
1591
input  [1:0]           lmq2_pcx_pkt_way;
1592
input  [1:0]           lmq3_pcx_pkt_way;
1593
 
1594
input           lsu_dfq_ld_vld ;
1595
input           lsu_ifu_asi_data_en_l ;
1596
 
1597
input           lsu_ld0_spec_vld_kill_w2 ;
1598
input           lsu_ld1_spec_vld_kill_w2 ;
1599
input           lsu_ld2_spec_vld_kill_w2 ;
1600
input           lsu_ld3_spec_vld_kill_w2 ;
1601
 
1602
input           lsu_fwd_rply_sz1_unc ;
1603
 
1604
input           rst_tri_en ;
1605
 
1606
output        lsu_va_match_b47_b32_m;
1607
output        lsu_va_match_b31_b3_m;
1608
 
1609
//output        lsu_pa_match_b39_13_g;
1610
//output        lsu_pa_match_b12_3_m;
1611
output [47:3] lsu_va_wtchpt_addr;
1612
//output [39:3] lsu_pa_wtchpt_addr;
1613
 
1614
//output  [63:0]            ld_stb_bypass_data ;  // st to load bypass data.
1615
 
1616
output  [124-1:0]  spc_pcx_data_pa ;
1617
output  [29:0]            dtag_wdata_m ;            // tag to write to dtag.
1618
//output  [3:0]             lsu_byp_misc_addr_m ;     // lower 3bits of addr for ldxa/raw etc
1619
//output  [1:0]             lsu_byp_misc_sz_m ;       // size for ldxa/raw etc
1620
output  [1:0]             lmq0_byp_misc_sz ;
1621
output  [1:0]             lmq1_byp_misc_sz ;
1622
output  [1:0]             lmq2_byp_misc_sz ;
1623
output  [1:0]             lmq3_byp_misc_sz ;
1624
 
1625
output  [1:0]             lsu_byp_misc_sz_e ;       // size for ldxa/raw etc
1626
output                    lsu_l2fill_sign_extend_m ;// requires sign-extend else zero extend
1627
output                    lsu_l2fill_bendian_m ;    // big endian fill/bypass.
1628
//output                    lsu_l2fill_fpld_e ;       // fp load 
1629
output                    lmq0_l2fill_fpld ;       // fp load 
1630
output                    lmq1_l2fill_fpld ;       // fp load 
1631
output                    lmq2_l2fill_fpld ;       // fp load 
1632
output                    lmq3_l2fill_fpld ;       // fp load 
1633
 
1634
output  [4:0]             lmq_ld_rd1 ;              // rd for all loads
1635
//output                    lsu_ncache_ld_e ;         // non-cacheable ld from dfq
1636
output                    lmq0_ncache_ld ;         // non-cacheable ld from dfq
1637
output                    lmq1_ncache_ld ;         // non-cacheable ld from dfq
1638
output                    lmq2_ncache_ld ;         // non-cacheable ld from dfq
1639
output                    lmq3_ncache_ld ;         // non-cacheable ld from dfq
1640
//output  [2:0]             lsu_ld_rq_type_e ;        // for identifying atomic ld.
1641
 
1642
output  [2:0]             lmq0_ld_rq_type ;        // for identifying atomic ld.
1643
output  [2:0]             lmq1_ld_rq_type ;        // for identifying atomic ld.
1644
output  [2:0]             lmq2_ld_rq_type ;        // for identifying atomic ld.
1645
output  [2:0]             lmq3_ld_rq_type ;        // for identifying atomic ld.
1646
 
1647
output                    lmq0_ldd_vld ;             // ld double 
1648
output                    lmq1_ldd_vld ;             // ld double 
1649
output                    lmq2_ldd_vld ;             // ld double 
1650
output                    lmq3_ldd_vld ;             // ld double 
1651
 
1652
output                    ld_sec_hit_thrd0 ;        // ld has sec. hit against th0
1653
output                    ld_sec_hit_thrd1 ;        // ld has sec. hit against th1
1654
output                    ld_sec_hit_thrd2 ;        // ld has sec. hit against th2
1655
output                    ld_sec_hit_thrd3 ;        // ld has sec. hit against th3
1656
//output  [1:0]             lmq_pcx_pkt_sz ;
1657
//output  [39:0]            lmq_pcx_pkt_addr ;  
1658
output  [10:0]            lmq0_pcx_pkt_addr;
1659
output  [10:0]            lmq1_pcx_pkt_addr;
1660
output  [10:0]            lmq2_pcx_pkt_addr;
1661
output  [10:0]            lmq3_pcx_pkt_addr;
1662
 
1663
//output  [63:0]            lsu_tlu_st_rs3_data_g ;
1664
output  [63:0]            lsu_mmu_rs3_data_g ;
1665
output  [63:0]            lsu_tlu_rs3_data_g ;
1666
 
1667
output                    lsu_diagnstc_wr_data_b0 ; // diagnostic wr data - bit 0
1668
output  [63:0]            lsu_diagnstc_wr_data_e ;
1669
 
1670
output  [47:0]            lsu_ifu_stxa_data ;       // stxa related data
1671
 
1672
output  [11:5]            lsu_ifu_ld_icache_index ;
1673
output  [1:0]             lsu_ifu_ld_pcxpkt_tid ;
1674
 
1675
//output  [1:0]             lmq_ld_way ;              // cache set way for ld fill
1676
 
1677
output  [28:0]            lsu_error_pa_m ;          // error phy addr
1678
//output  [13:0]            lsu_spu_rsrv_data_m ;     // rs3 data for reserved fields.
1679
output                    lsu_pref_pcx_req ;        // pref sent to pcx
1680
 
1681
   output [63:0]          st_rs3_data_g;
1682
 
1683
output  [1:0]             lsu_ldst_va_way_g ;          // 12:11 for direct map
1684
//====================================================================   
1685
//dc_fill CP
1686
 
1687
   input [63:0]           lsu_l2fill_data; //from qdp2
1688
   input                  l2fill_vld_m;    //from dctl
1689
   input   [3:0]          ld_thrd_byp_sel_m;//from dctl 
1690
 
1691
   output [63:0]          dcache_alt_data_w0_m;  //to d$
1692
//   output [7:0]           lsu_l2fill_or_byp_msb_m;   //to dctl
1693
//====================================================================   
1694
 
1695
 
1696
wire  [115-1:0]  store_pcx_pkt ;
1697
wire  [124-1:0]  pcx_pkt_data ;
1698
wire  [115-1:0]  stb_pcx_pkt ;
1699
wire  [124-1:0]  imiss_strm_pcx_pkt ;
1700
wire  [124-1:0]  intrpt_full_pcxpkt ;
1701
wire  [124-1:0]  ifu_full_pcx_pkt_e ;
1702
wire  [51:0]      ifu_pcx_pkt_e ;
1703
wire  [63:0]      cas_pkt2_data ;
1704
wire  [63:0]      lmq0_bypass_data_in,lmq1_bypass_data_in ;
1705
wire  [63:0]      lmq2_bypass_data_in,lmq3_bypass_data_in ;
1706
wire  [63:0]      lmq0_bypass_data, lmq1_bypass_data ;
1707
wire  [63:0]      lmq2_bypass_data, lmq3_bypass_data ;
1708
wire  [39:0]      lmq_ld_addr ;
1709
wire  [65:0]    load_pcx_pkt ;
1710
wire  [65-1:0]  lmq0_pcx_pkt, lmq1_pcx_pkt ;
1711
wire  [65-1:0]  lmq2_pcx_pkt, lmq3_pcx_pkt ;
1712
wire  [124-1:0]  fpop_full_pcxpkt ;
1713
wire  [63:0]      tlb_st_data ;
1714
//wire    [63:0]      formatted_tte_tag ;
1715
//wire    [63:0]      formatted_tte_data ;
1716
wire  [63:0]      lmq0_bypass_ldxa_data ;
1717
wire  [63:0]      lmq1_bypass_ldxa_data ;
1718
wire  [63:0]      lmq2_bypass_ldxa_data ;
1719
wire  [63:0]      lmq3_bypass_ldxa_data ;
1720
wire  [124-1:0]  fwd_full_pcxpkt ;
1721
wire  [47:3]            lsu_tlu_st_rs3_data_g ;
1722
 
1723
 
1724
//===================================================
1725
//  clock buffer   
1726
//===================================================
1727
//wire   lsu_qdp1_clk ;   
1728
wire   clk;
1729
assign  clk = rclk;
1730
 
1731
wire         thread0_g;
1732
wire         thread1_g;
1733
wire         thread2_g;
1734
wire         thread3_g;
1735
 
1736
   assign    thread0_g = lsu_thread_g[0];
1737
   assign    thread1_g = lsu_thread_g[1];
1738
   assign    thread2_g = lsu_thread_g[2];
1739
   assign    thread3_g = lsu_thread_g[3];
1740
 
1741
//=================================================================================================
1742
//    LMQ DP
1743
//=================================================================================================
1744
 
1745
wire  [12:0]  ldst_va_g;
1746
 
1747
dff  #(13) ff_ldst_va_g (
1748
        .din    (lsu_ldst_va_m[12:0]),
1749
        .q      (ldst_va_g[12:0]),
1750
        .clk    (clk),
1751
        .se     (1'b0),       .si (),          .so ()
1752
        );
1753
 
1754
assign  lsu_ldst_va_way_g[1:0] =  ldst_va_g[12:11];
1755
 
1756
wire  [64:0]  ld_pcx_pkt_g_tmp;
1757
 
1758
assign ld_pcx_pkt_g_tmp[64:0] =  {ld_pcx_pkt_g[65-1:44],
1759
                                        2'b00,      // done after the flop
1760
                                        //lsu_lmq_pkt_way_g[1:0],
1761
                                        ld_pcx_pkt_g[41:40],
1762
                                        tlb_pgnum[39:13],ldst_va_g[12:0]};
1763
 
1764
// Unfortunately ld_pcx_pkt_g is now 65 bits wide. Grape-mapper needs to give feedback.
1765
// THREAD 0.
1766
/*
1767
dffe  #(`LMQ_WIDTH) lmq0 (
1768
        .din    (ld_pcx_pkt_g_tmp[`LMQ_VLD:0]),
1769
        .q      (lmq0_pcx_pkt[`LMQ_VLD:0]),
1770
        .en     (lmq_enable[0]), .clk (clk),
1771
        .se     (1'b0),       .si (),          .so ()
1772
        );
1773
*/
1774
wire lmq0_clk;
1775
 
1776
 
1777
 
1778
 
1779
 
1780
 
1781
 
1782
 
1783
 
1784
wire  [64:0]  lmq0_pcx_pkt_tmp ;
1785
 
1786
 
1787
dffe  #(65) lmq0 (
1788
        .din    (ld_pcx_pkt_g_tmp[64:0]),
1789
        .q      (lmq0_pcx_pkt_tmp[64:0]),
1790
        .en (~(~lmq_enable[0])), .clk(clk),
1791
        .se     (1'b0),       .si (),          .so ()
1792
        );
1793
 
1794
 
1795
 
1796
 
1797
 
1798
 
1799
 
1800
 
1801
 
1802
//bug2705 - speculative pick in w-cycle
1803
wire    lmq0_pcx_pkt_vld ;
1804
assign  lmq0_pcx_pkt_vld  =  lmq0_pcx_pkt_tmp[64] & ~lsu_ld0_spec_vld_kill_w2 ;
1805
 
1806
assign  lmq0_pcx_pkt[64:0]  = {lmq0_pcx_pkt_vld,
1807
                                     lmq0_pcx_pkt_tmp[64-1:44],
1808
                                     lmq0_pcx_pkt_way[1:0],
1809
                                     lmq0_pcx_pkt_tmp[41:0]};
1810
 
1811
// Needs to be multi-threaded.
1812
//assign lmq_pcx_pkt_sz[1:0] = lmq0_pcx_pkt[`LMQ_SZ_HI:`LMQ_SZ_LO]  ;
1813
 
1814
assign  ld_sec_hit_thrd0 =
1815
(ld_pcx_pkt_g_tmp[39:0+4] == lmq0_pcx_pkt[39:0+4]) ;
1816
 
1817
 
1818
 
1819
 
1820
// THREAD 1.
1821
/*
1822
dffe  #(`LMQ_WIDTH) lmq1 (
1823
        .din    (ld_pcx_pkt_g_tmp[`LMQ_VLD:0]),
1824
        .q      (lmq1_pcx_pkt[`LMQ_VLD:0]),
1825
        .en     (lmq_enable[1]), .clk (clk),
1826
        .se     (1'b0),       .si (),          .so ()
1827
        );
1828
*/
1829
wire lmq1_clk;
1830
 
1831
 
1832
 
1833
 
1834
 
1835
 
1836
 
1837
 
1838
 
1839
 
1840
wire  [64:0]  lmq1_pcx_pkt_tmp;
1841
 
1842
 
1843
dffe  #(65) lmq1 (
1844
        .din    (ld_pcx_pkt_g_tmp[64:0]),
1845
        .q      (lmq1_pcx_pkt_tmp[64:0]),
1846
        .en (~(~lmq_enable[1])), .clk(clk),
1847
        .se     (1'b0),       .si (),          .so ()
1848
        );
1849
 
1850
 
1851
 
1852
 
1853
 
1854
 
1855
 
1856
 
1857
 
1858
//bug2705 - speculative pick in w-cycle
1859
wire    lmq1_pcx_pkt_vld ;
1860
assign  lmq1_pcx_pkt_vld  =  lmq1_pcx_pkt_tmp[64] & ~lsu_ld1_spec_vld_kill_w2 ;
1861
 
1862
assign  lmq1_pcx_pkt[64:0]  =  {lmq1_pcx_pkt_vld,
1863
                                      lmq1_pcx_pkt_tmp[64-1:44],
1864
                                      lmq1_pcx_pkt_way[1:0],
1865
                                      lmq1_pcx_pkt_tmp[41:0]};
1866
 
1867
assign  ld_sec_hit_thrd1 =
1868
(ld_pcx_pkt_g_tmp[39:0+4] == lmq1_pcx_pkt[39:0+4]) ;
1869
 
1870
// THREAD 2.
1871
/*
1872
dffe  #(`LMQ_WIDTH) lmq2 (
1873
        .din    (ld_pcx_pkt_g_tmp[`LMQ_VLD:0]),
1874
        .q      (lmq2_pcx_pkt[`LMQ_VLD:0]),
1875
        .en     (lmq_enable[2]), .clk (clk),
1876
        .se     (1'b0),       .si (),          .so ()
1877
        );
1878
*/
1879
wire lmq2_clk;
1880
 
1881
 
1882
 
1883
 
1884
 
1885
 
1886
 
1887
 
1888
 
1889
 
1890
wire  [64:0]  lmq2_pcx_pkt_tmp;
1891
 
1892
 
1893
dffe  #(65) lmq2 (
1894
        .din    (ld_pcx_pkt_g_tmp[64:0]),
1895
        .q      (lmq2_pcx_pkt_tmp[64:0]),
1896
        .en (~(~lmq_enable[2])), .clk(clk),
1897
        .se     (1'b0),       .si (),          .so ()
1898
        );
1899
 
1900
 
1901
 
1902
 
1903
 
1904
 
1905
 
1906
 
1907
 
1908
//bug2705 - speculative pick in w-cycle
1909
wire    lmq2_pcx_pkt_vld ;
1910
assign  lmq2_pcx_pkt_vld  =  lmq2_pcx_pkt_tmp[64] & ~lsu_ld2_spec_vld_kill_w2 ;
1911
 
1912
 
1913
assign  lmq2_pcx_pkt[64:0]  =  {lmq2_pcx_pkt_vld,
1914
                                      lmq2_pcx_pkt_tmp[64-1:44],
1915
                                      lmq2_pcx_pkt_way[1:0],
1916
                                      lmq2_pcx_pkt_tmp[41:0]};
1917
 
1918
assign  ld_sec_hit_thrd2 =
1919
(ld_pcx_pkt_g_tmp[39:0+4] == lmq2_pcx_pkt[39:0+4]) ;
1920
 
1921
// THREAD 3.
1922
/*
1923
dffe  #(`LMQ_WIDTH) lmq3 (
1924
        .din    (ld_pcx_pkt_g_tmp[`LMQ_VLD:0]),
1925
        .q      (lmq3_pcx_pkt[`LMQ_VLD:0]),
1926
        .en     (lmq_enable[3]), .clk (clk),
1927
        .se     (1'b0),       .si (),          .so ()
1928
        );
1929
*/
1930
wire lmq3_clk;
1931
 
1932
 
1933
 
1934
 
1935
 
1936
 
1937
 
1938
 
1939
 
1940
 
1941
wire  [64:0]  lmq3_pcx_pkt_tmp;
1942
 
1943
 
1944
dffe  #(65) lmq3 (
1945
        .din    (ld_pcx_pkt_g_tmp[64:0]),
1946
        .q      (lmq3_pcx_pkt_tmp[64:0]),
1947
        .en (~(~lmq_enable[3])), .clk(clk),
1948
        .se     (1'b0),       .si (),          .so ()
1949
        );
1950
 
1951
 
1952
 
1953
 
1954
 
1955
 
1956
 
1957
 
1958
 
1959
//bug2705 - speculative pick in w-cycle
1960
wire    lmq3_pcx_pkt_vld ;
1961
assign  lmq3_pcx_pkt_vld  =  lmq3_pcx_pkt_tmp[64] & ~lsu_ld3_spec_vld_kill_w2 ;
1962
 
1963
 
1964
assign  lmq3_pcx_pkt[64:0]  =  {lmq3_pcx_pkt_vld,
1965
                                      lmq3_pcx_pkt_tmp[64-1:44],
1966
                                      lmq3_pcx_pkt_way[1:0],
1967
                                      lmq3_pcx_pkt_tmp[41:0]};
1968
 
1969
 
1970
assign  ld_sec_hit_thrd3 =
1971
(ld_pcx_pkt_g_tmp[39:0+4] == lmq3_pcx_pkt[39:0+4]) ;
1972
 
1973
// Select 1 of 4 LMQ Contents.
1974
// selection is based on which thread's load is chosen for pcx.
1975
mux4ds  #(65) lmq_pthrd_sel (
1976
  .in0  (lmq0_pcx_pkt[65-1:0]),
1977
  .in1  (lmq1_pcx_pkt[65-1:0]),
1978
  .in2  (lmq2_pcx_pkt[65-1:0]),
1979
  .in3  (lmq3_pcx_pkt[65-1:0]),
1980
  .sel0 (ld_pcx_rq_sel[0]),
1981
  .sel1   (ld_pcx_rq_sel[1]),
1982
  .sel2 (ld_pcx_rq_sel[2]),
1983
  .sel3   (ld_pcx_rq_sel[3]),
1984
  .dout (load_pcx_pkt[65-1:0])
1985
);
1986
 
1987
 
1988
assign  lsu_pref_pcx_req = load_pcx_pkt[62] ;
1989
 
1990
// Choose data to src for fill/bypass.
1991
// E-stage muxing : required for fills specifically.
1992
 
1993
   assign lmq0_ldd_vld =   lmq0_pcx_pkt[53];
1994
 
1995
 
1996
 
1997
 
1998
 
1999
   assign lmq1_ldd_vld =   lmq1_pcx_pkt[53];
2000
   assign lmq2_ldd_vld =   lmq2_pcx_pkt[53];
2001
   assign lmq3_ldd_vld =   lmq3_pcx_pkt[53];
2002
 
2003
 
2004
   assign lmq0_pcx_pkt_addr[10:0] =  lmq0_pcx_pkt[0 + 10 :0];
2005
 
2006
 
2007
 
2008
 
2009
 
2010
   assign lmq1_pcx_pkt_addr[10:0] =  lmq1_pcx_pkt[0 + 10 :0];
2011
   assign lmq2_pcx_pkt_addr[10:0] =  lmq2_pcx_pkt[0 + 10 :0];
2012
   assign lmq3_pcx_pkt_addr[10:0] =  lmq3_pcx_pkt[0 + 10 :0];
2013
 
2014
 
2015
   assign lmq0_ld_rq_type[2:0] = lmq0_pcx_pkt[47:45];
2016
 
2017
 
2018
 
2019
 
2020
 
2021
   assign lmq1_ld_rq_type[2:0] = lmq1_pcx_pkt[47:45];
2022
   assign lmq2_ld_rq_type[2:0] = lmq2_pcx_pkt[47:45];
2023
   assign lmq3_ld_rq_type[2:0] = lmq3_pcx_pkt[47:45];
2024
 
2025
 
2026
    assign lmq0_l2fill_fpld =  lmq0_pcx_pkt[61];
2027
 
2028
 
2029
 
2030
 
2031
 
2032
    assign lmq1_l2fill_fpld =  lmq1_pcx_pkt[61];
2033
    assign lmq2_l2fill_fpld =  lmq2_pcx_pkt[61];
2034
    assign lmq3_l2fill_fpld =  lmq3_pcx_pkt[61];
2035
 
2036
/*
2037
   wire    lsu_l2fill_fpld_e;
2038
 
2039
mux4ds  #(44) lmq_dthrd_sel1 (
2040
  .in0  ({lmq0_pcx_pkt[`LMQ_AD_HI:`LMQ_AD_LO], lmq0_pcx_pkt[`LMQ_NC],
2041
          lmq0_pcx_pkt[`LMQ_FPLD],lmq0_pcx_pkt[`LMQ_SZ_HI: `LMQ_SZ_LO]}),
2042
  .in1  ({lmq1_pcx_pkt[`LMQ_AD_HI:`LMQ_AD_LO], lmq1_pcx_pkt[`LMQ_NC],
2043
          lmq1_pcx_pkt[`LMQ_FPLD],lmq1_pcx_pkt[`LMQ_SZ_HI: `LMQ_SZ_LO]}),
2044
  .in2  ({lmq2_pcx_pkt[`LMQ_AD_HI:`LMQ_AD_LO], lmq2_pcx_pkt[`LMQ_NC],
2045
          lmq2_pcx_pkt[`LMQ_FPLD],lmq2_pcx_pkt[`LMQ_SZ_HI: `LMQ_SZ_LO]}),
2046
  .in3  ({lmq3_pcx_pkt[`LMQ_AD_HI:`LMQ_AD_LO], lmq3_pcx_pkt[`LMQ_NC],
2047
          lmq3_pcx_pkt[`LMQ_FPLD],lmq3_pcx_pkt[`LMQ_SZ_HI: `LMQ_SZ_LO]}),
2048
  .sel0 (dfq_byp_sel[0]),
2049
  .sel1 (dfq_byp_sel[1]),
2050
  .sel2 (dfq_byp_sel[2]),
2051
  .sel3 (dfq_byp_sel[3]),
2052
  .dout ({lmq_ld_addr[39:0], lsu_ncache_ld_e,
2053
          lsu_l2fill_fpld_e, lsu_byp_misc_sz_e[1:0]})
2054
);
2055
*/
2056
 
2057
   assign  lmq0_ncache_ld =   lmq0_pcx_pkt[44];
2058
 
2059
 
2060
 
2061
 
2062
 
2063
   assign  lmq1_ncache_ld =   lmq1_pcx_pkt[44];
2064
   assign  lmq2_ncache_ld =   lmq2_pcx_pkt[44];
2065
   assign  lmq3_ncache_ld =   lmq3_pcx_pkt[44];
2066
 
2067
 
2068
 
2069
 
2070
 
2071
 
2072
 
2073
 
2074
 
2075
mux4ds  #(42) lmq_dthrd_sel1 (
2076
  .in0  ({lmq0_pcx_pkt[39:0],
2077
          lmq0_pcx_pkt[41: 40]}),
2078
  .in1  ({lmq1_pcx_pkt[39:0],
2079
          lmq1_pcx_pkt[41: 40]}),
2080
  .in2  ({lmq2_pcx_pkt[39:0],
2081
          lmq2_pcx_pkt[41: 40]}),
2082
  .in3  ({lmq3_pcx_pkt[39:0],
2083
          lmq3_pcx_pkt[41: 40]}),
2084
  .sel0 (dfq_byp_sel[0]),
2085
  .sel1 (dfq_byp_sel[1]),
2086
  .sel2 (dfq_byp_sel[2]),
2087
  .sel3 (dfq_byp_sel[3]),
2088
  .dout ({lmq_ld_addr[39:0], lsu_byp_misc_sz_e[1:0]})
2089
);
2090
 
2091
// POR
2092
// M-stage muxing : require for alignment and bypassing to exu.
2093
// flopped then used in qctl/dctl G-stage  
2094
// lmq_ld_rd1 to lsu_qctl
2095
// others to lsu_dctl
2096
 
2097
// M-Stage Muxing 
2098
 
2099
mux4ds  #(7) lmq_dthrd_sel2 (
2100
  .in0  ({lmq0_pcx_pkt[58: 54],lmq0_pcx_pkt[59],
2101
    lmq0_pcx_pkt[60]}),
2102
  .in1  ({lmq1_pcx_pkt[58: 54],lmq1_pcx_pkt[59],
2103
    lmq1_pcx_pkt[60]}),
2104
  .in2  ({lmq2_pcx_pkt[58: 54],lmq2_pcx_pkt[59],
2105
    lmq2_pcx_pkt[60]}),
2106
  .in3  ({lmq3_pcx_pkt[58: 54],lmq3_pcx_pkt[59],
2107
    lmq3_pcx_pkt[60]}),
2108
  .sel0 (lmq_byp_misc_sel[0]),
2109
  .sel1 (lmq_byp_misc_sel[1]),
2110
  .sel2 (lmq_byp_misc_sel[2]),
2111
  .sel3 (lmq_byp_misc_sel[3]),
2112
  .dout ({lmq_ld_rd1[4:0],lsu_l2fill_bendian_m,lsu_l2fill_sign_extend_m})
2113
);
2114
 
2115
 
2116
   assign  lmq0_byp_misc_sz[1:0] = lmq0_pcx_pkt[41: 40];
2117
 
2118
 
2119
 
2120
 
2121
 
2122
   assign  lmq1_byp_misc_sz[1:0] = lmq1_pcx_pkt[41: 40];
2123
   assign  lmq2_byp_misc_sz[1:0] = lmq2_pcx_pkt[41: 40];
2124
   assign  lmq3_byp_misc_sz[1:0] = lmq3_pcx_pkt[41: 40];
2125
 
2126
 
2127
 
2128
//assign  lmq_pcx_pkt_addr[10:0] = lmq_ld_addr[10:0] ;
2129
 
2130
 
2131
   wire [28:0] dtag_wdata_e;
2132
 
2133
assign  dtag_wdata_e[28:0] =
2134
        ~lsu_dfq_ld_vld ?
2135
        lsu_diagnstc_wr_data_e[29:1] : lmq_ld_addr[39:11] ;
2136
 
2137
// Parity Generation for Tag. Match with macro.
2138
wire    dtag_wr_parity ;
2139
//assign  dtag_wr_parity = ^dtag_wdata_e[28:0] ;   
2140
//assign  dtag_wdata_e[29] = 
2141
//        ~lsu_dfq_ld_vld ?
2142
//        lsu_diagnstc_dtagv_prty_invrt_e^dtag_wr_parity : dtag_wr_parity ;
2143
 
2144
   wire dtag_wr_parity_7_0, dtag_wr_parity_15_8,
2145
        dtag_wr_parity_23_16,  dtag_wr_parity_28_24;
2146
 
2147
   assign dtag_wr_parity_7_0  =  ^dtag_wdata_e[7:0];   //zzpar8
2148
   assign dtag_wr_parity_15_8 =  ^dtag_wdata_e[15:8];  //zzpar8
2149
   assign dtag_wr_parity_23_16 = ^dtag_wdata_e[23:16]; //zzpar8
2150
   assign dtag_wr_parity_28_24 = ^dtag_wdata_e[28:24]; //zzpar8
2151
 
2152
   wire   dtag_wr_parity_28_24_with_invrt;
2153
 
2154
   assign dtag_wr_parity_28_24_with_invrt =
2155
           (^dtag_wdata_e[28:24]) ^ lsu_diagnstc_dtagv_prty_invrt_e; //zzpar8
2156
 
2157
 
2158
   wire dtag_wr_parity_7_0_m, dtag_wr_parity_15_8_m,
2159
        dtag_wr_parity_23_16_m,  dtag_wr_parity_28_24_m;
2160
   wire lsu_dfq_ld_vld_m;
2161
   wire dtag_wr_parity_28_24_with_invrt_m;
2162
 
2163
 
2164
// 12/12/03 : Change for Macrotest. I didn't mention
2165
// these 4 bits ! Pls check for a max time violation.
2166
wire    dtag_wr_parity_7_0_din, dtag_wr_parity_15_8_din ;
2167
wire    dtag_wr_parity_23_16_din, dtag_wr_parity_28_24_din ;
2168
assign  dtag_wr_parity_7_0_din =
2169
sehold ? dtag_wr_parity_7_0_m : dtag_wr_parity_7_0 ;
2170
assign  dtag_wr_parity_15_8_din =
2171
sehold ? dtag_wr_parity_15_8_m : dtag_wr_parity_15_8 ;
2172
assign  dtag_wr_parity_23_16_din =
2173
sehold ? dtag_wr_parity_23_16_m : dtag_wr_parity_23_16 ;
2174
assign  dtag_wr_parity_28_24_din =
2175
sehold ? dtag_wr_parity_28_24_m : dtag_wr_parity_28_24 ;
2176
 
2177
dff #(6) tag_parity_m (
2178
     .din ({dtag_wr_parity_7_0_din, dtag_wr_parity_15_8_din,
2179
            dtag_wr_parity_23_16_din, dtag_wr_parity_28_24_din,
2180
            lsu_dfq_ld_vld,   dtag_wr_parity_28_24_with_invrt}),
2181
     .q   ({dtag_wr_parity_7_0_m, dtag_wr_parity_15_8_m,
2182
            dtag_wr_parity_23_16_m, dtag_wr_parity_28_24_m,
2183
            lsu_dfq_ld_vld_m, dtag_wr_parity_28_24_with_invrt_m}),
2184
     .clk  (clk),
2185
     .se   (1'b0),     .si (),          .so ()
2186
);
2187
 
2188
assign dtag_wr_parity = dtag_wr_parity_7_0_m ^ dtag_wr_parity_15_8_m ^
2189
                        dtag_wr_parity_23_16_m ^ dtag_wr_parity_28_24_m;
2190
 
2191
   wire dtag_wr_parity_with_invrt;
2192
 
2193
assign dtag_wr_parity_with_invrt =
2194
       dtag_wr_parity_7_0_m ^ dtag_wr_parity_15_8_m ^
2195
       dtag_wr_parity_23_16_m ^ dtag_wr_parity_28_24_with_invrt_m;
2196
 
2197
wire [29:0] dtag_wdata_m;
2198
 
2199
// 12/12/03 : Change for Macrotest.
2200
assign dtag_wdata_m[29] =
2201
        ~(lsu_dfq_ld_vld_m | sehold) ?
2202
        dtag_wr_parity_with_invrt : dtag_wr_parity ;
2203
 
2204
// 12/12/03 : Change for Macrotest.
2205
wire [28:0] dtag_wdata_e_din ;
2206
assign  dtag_wdata_e_din[28:0] =
2207
sehold ? dtag_wdata_m[28:0] : dtag_wdata_e[28:0] ;
2208
 
2209
dff  #(29) tag_stgm (
2210
        .din  (dtag_wdata_e_din[28:0]),
2211
        .q    (dtag_wdata_m[28:0]),
2212
        .clk  (clk),
2213
        .se   (1'b0),     .si (),          .so ()
2214
        );
2215
 
2216
   assign      lsu_error_pa_m[28:0] =  dtag_wdata_m[28:0];
2217
 
2218
 
2219
//=================================================================================================
2220
//    RS3 DATA ALIGNMENT FOR CAS
2221
//=================================================================================================
2222
 
2223
wire  [7:0] rs3_byte0, rs3_byte1, rs3_byte2, rs3_byte3 ;
2224
wire  [7:0] rs3_byte4, rs3_byte5, rs3_byte6, rs3_byte7 ;
2225
wire  [63:0]  atm_byte_g ;
2226
wire  [63:0]  st_rs3_data_m,st_rs3_data_g ;
2227
 
2228
dff  #(64) rs3_stgm (
2229
        .din  (exu_lsu_rs3_data_e[63:0]),
2230
        .q    (st_rs3_data_m[63:0]),
2231
        .clk  (clk),
2232
        .se   (1'b0),     .si (),          .so ()
2233
        );
2234
 
2235
// rm (along with spu).
2236
//assign  lsu_spu_rsrv_data_m[13:0] =
2237
//  {st_rs3_data_m[27:23],st_rs3_data_m[21:16],st_rs3_data_m[8:6]} ;
2238
 
2239
dff  #(64) rs3_stgg (
2240
        .din  (st_rs3_data_m[63:0]),
2241
        .q    (st_rs3_data_g[63:0]),
2242
        .clk  (clk),
2243
        .se   (1'b0),     .si (),          .so ()
2244
        );
2245
 
2246
assign  rs3_byte0[7:0] = st_rs3_data_g[7:0] ;
2247
assign  rs3_byte1[7:0] = st_rs3_data_g[15:8] ;
2248
assign  rs3_byte2[7:0] = st_rs3_data_g[23:16] ;
2249
assign  rs3_byte3[7:0] = st_rs3_data_g[31:24] ;
2250
assign  rs3_byte4[7:0] = st_rs3_data_g[39:32] ;
2251
assign  rs3_byte5[7:0] = st_rs3_data_g[47:40] ;
2252
assign  rs3_byte6[7:0] = st_rs3_data_g[55:48] ;
2253
assign  rs3_byte7[7:0] = st_rs3_data_g[63:56] ;
2254
 
2255
//assign  atm_byte_g[7:0] =
2256
//lsu_atomic_pkt2_bsel_g[2] ? rs3_byte0[7:0] :
2257
//  lsu_atomic_pkt2_bsel_g[1] ? rs3_byte3[7:0] :
2258
//    lsu_atomic_pkt2_bsel_g[0] ? rs3_byte7[7:0] : 8'bxxxx_xxxx ;
2259
 
2260
mux3ds #(8) mx_atm_byte_g_7_0 (
2261
    .in0 (rs3_byte0[7:0]),
2262
    .in1 (rs3_byte3[7:0]),
2263
    .in2 (rs3_byte7[7:0]),
2264
    .sel0(lsu_atomic_pkt2_bsel_g[2]),
2265
    .sel1(lsu_atomic_pkt2_bsel_g[1]),
2266
    .sel2(lsu_atomic_pkt2_bsel_g[0]),
2267
    .dout(atm_byte_g[7:0]));
2268
 
2269
 
2270
//assign  atm_byte_g[15:8] =
2271
//lsu_atomic_pkt2_bsel_g[2] ? rs3_byte1[7:0] :
2272
//  lsu_atomic_pkt2_bsel_g[1] ? rs3_byte2[7:0] :
2273
//    lsu_atomic_pkt2_bsel_g[0] ? rs3_byte6[7:0] : 8'bxxxx_xxxx ;
2274
 
2275
mux3ds #(8) mx_atm_byte_g_15_8 (
2276
    .in0 (rs3_byte1[7:0]),
2277
    .in1 (rs3_byte2[7:0]),
2278
    .in2 (rs3_byte6[7:0]),
2279
    .sel0(lsu_atomic_pkt2_bsel_g[2]),
2280
    .sel1(lsu_atomic_pkt2_bsel_g[1]),
2281
    .sel2(lsu_atomic_pkt2_bsel_g[0]),
2282
    .dout(atm_byte_g[15:8]));
2283
 
2284
//assign  atm_byte_g[23:16] =
2285
//lsu_atomic_pkt2_bsel_g[2] ? rs3_byte2[7:0] :
2286
//  lsu_atomic_pkt2_bsel_g[1] ? rs3_byte1[7:0] :
2287
//    lsu_atomic_pkt2_bsel_g[0] ? rs3_byte5[7:0] : 8'bxxxx_xxxx ;
2288
 
2289
mux3ds #(8) mx_atm_byte_g_23_16 (
2290
    .in0 (rs3_byte2[7:0]),
2291
    .in1 (rs3_byte1[7:0]),
2292
    .in2 (rs3_byte5[7:0]),
2293
    .sel0(lsu_atomic_pkt2_bsel_g[2]),
2294
    .sel1(lsu_atomic_pkt2_bsel_g[1]),
2295
    .sel2(lsu_atomic_pkt2_bsel_g[0]),
2296
    .dout(atm_byte_g[23:16]));
2297
 
2298
//assign  atm_byte_g[31:24] =
2299
//lsu_atomic_pkt2_bsel_g[2] ? rs3_byte3[7:0] :
2300
//  lsu_atomic_pkt2_bsel_g[1] ? rs3_byte0[7:0] :
2301
//    lsu_atomic_pkt2_bsel_g[0] ? rs3_byte4[7:0] : 8'bxxxx_xxxx ;
2302
 
2303
mux3ds #(8) mx_atm_byte_g_31_24 (
2304
    .in0 (rs3_byte3[7:0]),
2305
    .in1 (rs3_byte0[7:0]),
2306
    .in2 (rs3_byte4[7:0]),
2307
    .sel0(lsu_atomic_pkt2_bsel_g[2]),
2308
    .sel1(lsu_atomic_pkt2_bsel_g[1]),
2309
    .sel2(lsu_atomic_pkt2_bsel_g[0]),
2310
    .dout(atm_byte_g[31:24]));
2311
 
2312
//assign  atm_byte_g[39:32] =
2313
//lsu_atomic_pkt2_bsel_g[2] ? rs3_byte4[7:0] :
2314
//  lsu_atomic_pkt2_bsel_g[1] ? rs3_byte0[7:0] :
2315
//    lsu_atomic_pkt2_bsel_g[0] ? rs3_byte3[7:0] : 8'bxxxx_xxxx ;
2316
 
2317
mux3ds #(8) mx_atm_byte_g_39_32 (
2318
    .in0 (rs3_byte4[7:0]),
2319
    .in1 (rs3_byte0[7:0]),
2320
    .in2 (rs3_byte3[7:0]),
2321
    .sel0(lsu_atomic_pkt2_bsel_g[2]),
2322
    .sel1(lsu_atomic_pkt2_bsel_g[1]),
2323
    .sel2(lsu_atomic_pkt2_bsel_g[0]),
2324
    .dout(atm_byte_g[39:32]));
2325
 
2326
//assign  atm_byte_g[47:40] =
2327
//lsu_atomic_pkt2_bsel_g[2] ? rs3_byte5[7:0] :
2328
//  lsu_atomic_pkt2_bsel_g[1] ? rs3_byte1[7:0] :
2329
//    lsu_atomic_pkt2_bsel_g[0] ? rs3_byte2[7:0] : 8'bxxxx_xxxx ;
2330
 
2331
mux3ds #(8) mx_atm_byte_g_47_40(
2332
    .in0 (rs3_byte5[7:0]),
2333
    .in1 (rs3_byte1[7:0]),
2334
    .in2 (rs3_byte2[7:0]),
2335
    .sel0(lsu_atomic_pkt2_bsel_g[2]),
2336
    .sel1(lsu_atomic_pkt2_bsel_g[1]),
2337
    .sel2(lsu_atomic_pkt2_bsel_g[0]),
2338
    .dout(atm_byte_g[47:40]));
2339
 
2340
//assign  atm_byte_g[55:48] =
2341
//lsu_atomic_pkt2_bsel_g[2] ? rs3_byte6[7:0] :
2342
//  lsu_atomic_pkt2_bsel_g[1] ? rs3_byte2[7:0] :
2343
//    lsu_atomic_pkt2_bsel_g[0] ? rs3_byte1[7:0] : 8'bxxxx_xxxx ;
2344
 
2345
mux3ds #(8) mx_atm_byte_g_55_48(
2346
    .in0 (rs3_byte6[7:0]),
2347
    .in1 (rs3_byte2[7:0]),
2348
    .in2 (rs3_byte1[7:0]),
2349
    .sel0(lsu_atomic_pkt2_bsel_g[2]),
2350
    .sel1(lsu_atomic_pkt2_bsel_g[1]),
2351
    .sel2(lsu_atomic_pkt2_bsel_g[0]),
2352
    .dout(atm_byte_g[55:48]));
2353
 
2354
//assign  atm_byte_g[63:56] =
2355
//lsu_atomic_pkt2_bsel_g[2] ? rs3_byte7[7:0] :
2356
//  lsu_atomic_pkt2_bsel_g[1] ? rs3_byte3[7:0] :
2357
//    lsu_atomic_pkt2_bsel_g[0] ? rs3_byte0[7:0] : 8'bxxxx_xxxx ;
2358
 
2359
mux3ds #(8) mx_atm_byte_g_63_56 (
2360
    .in0 (rs3_byte7[7:0]),
2361
    .in1 (rs3_byte3[7:0]),
2362
    .in2 (rs3_byte0[7:0]),
2363
    .sel0(lsu_atomic_pkt2_bsel_g[2]),
2364
    .sel1(lsu_atomic_pkt2_bsel_g[1]),
2365
    .sel2(lsu_atomic_pkt2_bsel_g[0]),
2366
    .dout(atm_byte_g[63:56]));
2367
 
2368
//=================================================================================================
2369
//    STB/LDXA DATA BYPASSING
2370
//=================================================================================================
2371
 
2372
// Add STB to load bypass data flops.
2373
// Attempt is made to bypass data in G-stage for load. If not
2374
// possible then flop data and wait for next available bubble.
2375
// Once bypass occurs then load can be considered resolved.
2376
// Load Full Raw bypassing does not have to use DFQ.
2377
 
2378
// ldxa data will reside in bypass flops until an opportunity
2379
// is available to write to irf. ldxa's must write to lmq
2380
// in order to provide information such as rd to irf.
2381
 
2382
// ** The two conditions are mutually exclusive. **
2383
 
2384
// lsu_local_ldxa_data_w2 w/ lsu_misc_rdata_w2 for all 4 threads
2385
 
2386
// 1-hot fix: 8/1/03 - can be multihot during scan
2387
// grape mapper convert the 1 of the inverter used for the select to the logic below
2388
wire  [2:0]  lmq_byp_ldxa_sel0_1hot ;
2389
assign  lmq_byp_ldxa_sel0_1hot[0]  =  lmq_byp_ldxa_sel0[0] & ~rst_tri_en;
2390
assign  lmq_byp_ldxa_sel0_1hot[1]  =  lmq_byp_ldxa_sel0[1] & ~rst_tri_en;
2391
assign  lmq_byp_ldxa_sel0_1hot[2]  =  lmq_byp_ldxa_sel0[2] |  rst_tri_en;
2392
 
2393
 
2394
// THREAD 0
2395
mux3ds  #(64) ldbyp0_ldxa_mx (
2396
  .in0  (ifu_lsu_ldxa_data_w2[63:0]), // ifu-ldxa bypass data
2397
  //.in1  (tlu_lsu_ldxa_data_w2[63:0]), // tlu-ldxa bypass data
2398
  .in1  (spu_lsu_ldxa_data_w2[63:0]), // spu-ldxa bypass data
2399
  .in2  (lsu_misc_rdata_w2[63:0]),    // local asi bypass data
2400
  .sel0 (lmq_byp_ldxa_sel0_1hot[0]),
2401
  //.sel1 (lmq_byp_ldxa_sel0[1]),
2402
  .sel1 (lmq_byp_ldxa_sel0_1hot[1]),
2403
  .sel2 (lmq_byp_ldxa_sel0_1hot[2]),
2404
  .dout (lmq0_bypass_ldxa_data[63:0])
2405
);
2406
 
2407
// 1-hot fix: 8/1/03 - can be multihot during scan
2408
// grape mapper convert the 1 of the inverter used for the select to the logic below
2409
wire  [3:0]  lmq_byp_data_sel0_1hot ;
2410
assign  lmq_byp_data_sel0_1hot[0]  =  lmq_byp_data_sel0[0] ;
2411
assign  lmq_byp_data_sel0_1hot[1]  =  lmq_byp_data_sel0[1] ;
2412
assign  lmq_byp_data_sel0_1hot[2]  =  lmq_byp_data_sel0[2] ;
2413
assign  lmq_byp_data_sel0_1hot[3]  =  lmq_byp_data_sel0[3] ;
2414
 
2415
wire    [63:0]   lmq0_bypass_misc_data ;
2416
mux4ds  #(64) ldbyp0_data_mx (
2417
  .in0  (stb_rdata_ramd[63:0]),   // stb bypass data
2418
  .in1  (exu_lsu_rs3_data_e[63:0]), // rs3 data
2419
  .in2  (atm_byte_g[63:0]),   // cas formatted data
2420
  .in3  (lmq0_bypass_ldxa_data[63:0]),  // ldxa bypass data
2421
  .sel0 (lmq_byp_data_sel0_1hot[0]),
2422
  .sel1 (lmq_byp_data_sel0_1hot[1]),
2423
  .sel2 (lmq_byp_data_sel0_1hot[2]),
2424
  .sel3 (lmq_byp_data_sel0_1hot[3]),
2425
  .dout (lmq0_bypass_misc_data[63:0])
2426
);
2427
 
2428
 
2429
// 2:1 mux for additional data bus from tlu.
2430
// Grape : merge into mux-flop.
2431
mux2ds  #(64) ldbyp0_fmx (
2432
  .in0  (lmq0_bypass_misc_data[63:0]),
2433
  .in1  (tlu_lsu_int_ldxa_data_w2[63:0]),
2434
  .sel0 (~lmq_byp_data_fmx_sel[0]),
2435
  .sel1 (lmq_byp_data_fmx_sel[0]),
2436
  .dout (lmq0_bypass_data_in[63:0])
2437
);
2438
 
2439
/*
2440
dffe  #(64) ldbyp0_data_ff (
2441
        .din    (lmq0_bypass_data_in[63:0]),
2442
        .q      (lmq0_bypass_data[63:0]),
2443
        .en     (lmq_byp_data_en_w2[0]), .clk (clk),
2444
        .se     (1'b0),       .si (),          .so ()
2445
        );
2446
*/
2447
wire ldbyp0_data_clk;
2448
 
2449
 
2450
 
2451
 
2452
 
2453
 
2454
 
2455
 
2456
 
2457
 
2458
 
2459
dffe  #(64) ldbyp0_data_ff (
2460
        .din    (lmq0_bypass_data_in[63:0]),
2461
        .q      (lmq0_bypass_data[63:0]),
2462
        .en (~(~lmq_byp_data_en_w2[0])), .clk(clk),
2463
        .se     (1'b0),       .si (),          .so ()
2464
        );
2465
 
2466
 
2467
 
2468
 
2469
 
2470
 
2471
 
2472
 
2473
 
2474
 
2475
 
2476
 
2477
// THREAD 1
2478
// 1-hot fix: 8/1/03 - can be multihot during scan
2479
// grape mapper convert the 1 of the inverter used for the select to the logic below
2480
wire  [2:0]  lmq_byp_ldxa_sel1_1hot ;
2481
assign  lmq_byp_ldxa_sel1_1hot[0]  =  lmq_byp_ldxa_sel1[0] & ~rst_tri_en;
2482
assign  lmq_byp_ldxa_sel1_1hot[1]  =  lmq_byp_ldxa_sel1[1] & ~rst_tri_en;
2483
assign  lmq_byp_ldxa_sel1_1hot[2]  =  lmq_byp_ldxa_sel1[2] |  rst_tri_en;
2484
 
2485
 
2486
mux3ds  #(64) ldbyp1_ldxa_mx (
2487
        .in0    (ifu_lsu_ldxa_data_w2[63:0]),   // ifu-ldxa bypass data
2488
        //.in1    (tlu_lsu_ldxa_data_w2[63:0]),   // tlu-ldxa bypass data
2489
        .in1    (spu_lsu_ldxa_data_w2[63:0]), // spu-ldxa bypass data
2490
        .in2    (lsu_misc_rdata_w2[63:0]),// local asi bypass data
2491
        .sel0   (lmq_byp_ldxa_sel1_1hot[0]),
2492
        //.sel1   (lmq_byp_ldxa_sel1[1]),
2493
        .sel1   (lmq_byp_ldxa_sel1_1hot[1]),
2494
        .sel2   (lmq_byp_ldxa_sel1_1hot[2]),
2495
        .dout   (lmq1_bypass_ldxa_data[63:0])
2496
);
2497
 
2498
// 1-hot fix: 8/1/03 - can be multihot during scan
2499
// grape mapper convert the 1 of the inverter used for the select to the logic below
2500
wire  [3:0]  lmq_byp_data_sel1_1hot ;
2501
assign  lmq_byp_data_sel1_1hot[0]  =  lmq_byp_data_sel1[0] ;
2502
assign  lmq_byp_data_sel1_1hot[1]  =  lmq_byp_data_sel1[1] ;
2503
assign  lmq_byp_data_sel1_1hot[2]  =  lmq_byp_data_sel1[2] ;
2504
assign  lmq_byp_data_sel1_1hot[3]  =  lmq_byp_data_sel1[3] ;
2505
 
2506
 
2507
wire    [63:0]   lmq1_bypass_misc_data ;
2508
mux4ds  #(64) ldbyp1_data_mx (
2509
  .in0  (stb_rdata_ramd[63:0]),   // stb bypass data
2510
  .in1  (exu_lsu_rs3_data_e[63:0]), // rs3 data
2511
  .in2  (atm_byte_g[63:0]),   // cas formatted data
2512
  .in3  (lmq1_bypass_ldxa_data[63:0]),  // ldxa bypass data
2513
  .sel0 (lmq_byp_data_sel1_1hot[0]),
2514
  .sel1 (lmq_byp_data_sel1_1hot[1]),
2515
  .sel2 (lmq_byp_data_sel1_1hot[2]),
2516
  .sel3 (lmq_byp_data_sel1_1hot[3]),
2517
  .dout (lmq1_bypass_misc_data[63:0])
2518
);
2519
 
2520
// 2:1 mux for additional data bus from tlu.
2521
// Grape : merge into mux-flop.
2522
mux2ds  #(64) ldbyp1_fmx (
2523
  .in0  (lmq1_bypass_misc_data[63:0]),
2524
  .in1  (tlu_lsu_int_ldxa_data_w2[63:0]),
2525
  .sel0 (~lmq_byp_data_fmx_sel[1]),
2526
  .sel1 (lmq_byp_data_fmx_sel[1]),
2527
  .dout (lmq1_bypass_data_in[63:0])
2528
);
2529
 
2530
/*
2531
dffe  #(64) ldbyp1_data_ff (
2532
        .din    (lmq1_bypass_data_in[63:0]),
2533
        .q      (lmq1_bypass_data[63:0]),
2534
        .en     (lmq_byp_data_en_w2[1]), .clk (clk),
2535
        .se     (1'b0),       .si (),          .so ()
2536
        );
2537
*/
2538
wire ldbyp1_data_clk;
2539
 
2540
 
2541
 
2542
 
2543
 
2544
 
2545
 
2546
 
2547
 
2548
 
2549
 
2550
dffe  #(64) ldbyp1_data_ff (
2551
        .din    (lmq1_bypass_data_in[63:0]),
2552
        .q      (lmq1_bypass_data[63:0]),
2553
        .en (~(~lmq_byp_data_en_w2[1])), .clk(clk),
2554
        .se     (1'b0),       .si (),          .so ()
2555
        );
2556
 
2557
 
2558
 
2559
 
2560
 
2561
 
2562
 
2563
 
2564
 
2565
// THREAD 2
2566
// 1-hot fix: 8/1/03 - can be multihot during scan
2567
// grape mapper convert the 1 of the inverter used for the select to the logic below
2568
wire  [2:0]  lmq_byp_ldxa_sel2_1hot ;
2569
assign  lmq_byp_ldxa_sel2_1hot[0]  =  lmq_byp_ldxa_sel2[0] & ~rst_tri_en;
2570
assign  lmq_byp_ldxa_sel2_1hot[1]  =  lmq_byp_ldxa_sel2[1] & ~rst_tri_en;
2571
assign  lmq_byp_ldxa_sel2_1hot[2]  =  lmq_byp_ldxa_sel2[2] |  rst_tri_en;
2572
 
2573
 
2574
mux3ds  #(64) ldbyp2_data_mx (
2575
        .in0    (ifu_lsu_ldxa_data_w2[63:0]),   // ifu-ldxa bypass data
2576
        //.in1    (tlu_lsu_ldxa_data_w2[63:0]),   // tlu-ldxa bypass data
2577
        .in1    (spu_lsu_ldxa_data_w2[63:0]), // spu-ldxa bypass data
2578
        .in2    (lsu_misc_rdata_w2[63:0]),// local asi bypass data
2579
        .sel0   (lmq_byp_ldxa_sel2_1hot[0]),
2580
        //.sel1   (lmq_byp_ldxa_sel2[1]),
2581
        .sel1 (lmq_byp_ldxa_sel2_1hot[1]),
2582
        .sel2 (lmq_byp_ldxa_sel2_1hot[2]),
2583
        .dout   (lmq2_bypass_ldxa_data[63:0])
2584
);
2585
 
2586
// 1-hot fix: 8/1/03 - can be multihot during scan
2587
// grape mapper convert the 1 of the inverter used for the select to the logic below
2588
wire  [3:0]  lmq_byp_data_sel2_1hot ;
2589
assign  lmq_byp_data_sel2_1hot[0]  =  lmq_byp_data_sel2[0] ;
2590
assign  lmq_byp_data_sel2_1hot[1]  =  lmq_byp_data_sel2[1] ;
2591
assign  lmq_byp_data_sel2_1hot[2]  =  lmq_byp_data_sel2[2] ;
2592
assign  lmq_byp_data_sel2_1hot[3]  =  lmq_byp_data_sel2[3] ;
2593
 
2594
 
2595
wire    [63:0]   lmq2_bypass_misc_data ;
2596
mux4ds  #(64) ldbyp2_ldxa_mx (
2597
  .in0  (stb_rdata_ramd[63:0]),   // stb bypass data
2598
  .in1  (exu_lsu_rs3_data_e[63:0]), // rs3 data
2599
  .in2  (atm_byte_g[63:0]),   // cas formatted data
2600
  .in3  (lmq2_bypass_ldxa_data[63:0]),  // ldxa bypass data
2601
  .sel0 (lmq_byp_data_sel2_1hot[0]),
2602
  .sel1 (lmq_byp_data_sel2_1hot[1]),
2603
  .sel2 (lmq_byp_data_sel2_1hot[2]),
2604
  .sel3 (lmq_byp_data_sel2_1hot[3]),
2605
  .dout (lmq2_bypass_misc_data[63:0])
2606
);
2607
 
2608
// 2:1 mux for additional data bus from tlu.
2609
// Grape : merge into mux-flop.
2610
mux2ds  #(64) ldbyp2_fmx (
2611
  .in0  (lmq2_bypass_misc_data[63:0]),
2612
  .in1  (tlu_lsu_int_ldxa_data_w2[63:0]),
2613
  .sel0 (~lmq_byp_data_fmx_sel[2]),
2614
  .sel1 (lmq_byp_data_fmx_sel[2]),
2615
  .dout (lmq2_bypass_data_in[63:0])
2616
);
2617
 
2618
/*
2619
dffe  #(64) ldbyp2_data_ff (
2620
        .din    (lmq2_bypass_data_in[63:0]),
2621
        .q      (lmq2_bypass_data[63:0]),
2622
        .en     (lmq_byp_data_en_w2[2]), .clk (clk),
2623
        .se     (1'b0),       .si (),          .so ()
2624
        );
2625
*/
2626
wire ldbyp2_data_clk;
2627
 
2628
 
2629
 
2630
 
2631
 
2632
 
2633
 
2634
 
2635
 
2636
 
2637
 
2638
dffe  #(64) ldbyp2_data_ff (
2639
        .din    (lmq2_bypass_data_in[63:0]),
2640
        .q      (lmq2_bypass_data[63:0]),
2641
        .en (~(~lmq_byp_data_en_w2[2])), .clk(clk),
2642
        .se     (1'b0),       .si (),          .so ()
2643
        );
2644
 
2645
 
2646
 
2647
 
2648
 
2649
 
2650
 
2651
 
2652
 
2653
// THREAD 3
2654
// 1-hot fix: 8/1/03 - can be multihot during scan
2655
// grape mapper convert the 1 of the inverter used for the select to the logic below
2656
wire  [2:0]  lmq_byp_ldxa_sel3_1hot ;
2657
assign  lmq_byp_ldxa_sel3_1hot[0]  =  lmq_byp_ldxa_sel3[0] & ~rst_tri_en;
2658
assign  lmq_byp_ldxa_sel3_1hot[1]  =  lmq_byp_ldxa_sel3[1] & ~rst_tri_en;
2659
assign  lmq_byp_ldxa_sel3_1hot[2]  =  lmq_byp_ldxa_sel3[2] |  rst_tri_en;
2660
 
2661
 
2662
mux3ds  #(64) ldbyp3_data_mx (
2663
        .in0    (ifu_lsu_ldxa_data_w2[63:0]),   // ifu-ldxa bypass data
2664
        //.in1    (tlu_lsu_ldxa_data_w2[63:0]),   // tlu-ldxa bypass data
2665
        .in1    (spu_lsu_ldxa_data_w2[63:0]), // spu-ldxa bypass data
2666
        .in2    (lsu_misc_rdata_w2[63:0]),// local asi bypass data
2667
        .sel0   (lmq_byp_ldxa_sel3_1hot[0]),
2668
        //.sel1   (lmq_byp_ldxa_sel3[1]),
2669
        .sel1   (lmq_byp_ldxa_sel3_1hot[1]),
2670
        .sel2   (lmq_byp_ldxa_sel3_1hot[2]),
2671
        .dout   (lmq3_bypass_ldxa_data[63:0])
2672
);
2673
 
2674
// 1-hot fix: 8/1/03 - can be multihot during scan
2675
// grape mapper convert the 1 of the inverter used for the select to the logic below
2676
wire  [3:0]  lmq_byp_data_sel3_1hot ;
2677
assign  lmq_byp_data_sel3_1hot[0]  =  lmq_byp_data_sel3[0] ;
2678
assign  lmq_byp_data_sel3_1hot[1]  =  lmq_byp_data_sel3[1] ;
2679
assign  lmq_byp_data_sel3_1hot[2]  =  lmq_byp_data_sel3[2] ;
2680
assign  lmq_byp_data_sel3_1hot[3]  =  lmq_byp_data_sel3[3] ;
2681
 
2682
 
2683
wire    [63:0]   lmq3_bypass_misc_data ;
2684
mux4ds  #(64) ldbyp3_ldxa_mx (
2685
  .in0  (stb_rdata_ramd[63:0]),   // stb bypass data
2686
  .in1  (exu_lsu_rs3_data_e[63:0]), // rs3 data
2687
  .in2  (atm_byte_g[63:0]),   // cas formatted data
2688
  .in3  (lmq3_bypass_ldxa_data[63:0]),  // ldxa bypass data
2689
  .sel0 (lmq_byp_data_sel3_1hot[0]),
2690
  .sel1 (lmq_byp_data_sel3_1hot[1]),
2691
  .sel2 (lmq_byp_data_sel3_1hot[2]),
2692
  .sel3 (lmq_byp_data_sel3_1hot[3]),
2693
  .dout (lmq3_bypass_misc_data[63:0])
2694
);
2695
 
2696
// 2:1 mux for additional data bus from tlu.
2697
// Grape : merge into mux-flop.
2698
mux2ds  #(64) ldbyp3_fmx (
2699
  .in0  (lmq3_bypass_misc_data[63:0]),
2700
  .in1  (tlu_lsu_int_ldxa_data_w2[63:0]),
2701
  .sel0 (~lmq_byp_data_fmx_sel[3]),
2702
  .sel1 (lmq_byp_data_fmx_sel[3]),
2703
  .dout (lmq3_bypass_data_in[63:0])
2704
);
2705
 
2706
/*
2707
dffe  #(64) ldbyp3_data_ff (
2708
        .din    (lmq3_bypass_data_in[63:0]),
2709
        .q      (lmq3_bypass_data[63:0]),
2710
        .en     (lmq_byp_data_en_w2[3]), .clk (clk),
2711
        .se     (1'b0),       .si (),          .so ()
2712
        );
2713
*/
2714
wire ldbyp3_data_clk;
2715
 
2716
 
2717
 
2718
 
2719
 
2720
 
2721
 
2722
 
2723
 
2724
 
2725
 
2726
dffe  #(64) ldbyp3_data_ff (
2727
        .din    (lmq3_bypass_data_in[63:0]),
2728
        .q      (lmq3_bypass_data[63:0]),
2729
        .en (~(~lmq_byp_data_en_w2[3])), .clk(clk),
2730
        .se     (1'b0),       .si (),          .so ()
2731
        );
2732
 
2733
 
2734
 
2735
 
2736
 
2737
 
2738
 
2739
 
2740
 
2741
 
2742
 
2743
 
2744
 
2745
 
2746
 
2747
// This can be merged with above mux !!!!
2748
mux4ds  #(64) ld_byp_cas_mx (
2749
  .in0  (lmq0_bypass_data[63:0]),
2750
  .in1  (lmq1_bypass_data[63:0]),
2751
  .in2  (lmq2_bypass_data[63:0]),
2752
  .in3  (lmq3_bypass_data[63:0]),
2753
  .sel0 (ld_pcx_rq_sel[0]),
2754
  .sel1   (ld_pcx_rq_sel[1]),
2755
  .sel2 (ld_pcx_rq_sel[2]),
2756
  .sel3   (ld_pcx_rq_sel[3]),
2757
  .dout (cas_pkt2_data[63:0])
2758
);
2759
 
2760
// Can this be merged with above muxes ?
2761
mux4ds  #(64) tlb_st_mx (
2762
  .in0  (lmq0_bypass_data[63:0]),
2763
  .in1  (lmq1_bypass_data[63:0]),
2764
  .in2  (lmq2_bypass_data[63:0]),
2765
  .in3  (lmq3_bypass_data[63:0]),
2766
  .sel0 (lsu_tlb_st_sel_m[0]),
2767
  .sel1   (lsu_tlb_st_sel_m[1]),
2768
  .sel2 (lsu_tlb_st_sel_m[2]),
2769
  .sel3   (lsu_tlb_st_sel_m[3]),
2770
  .dout (tlb_st_data[63:0])
2771
);
2772
 
2773
 
2774
/*mux4ds  #(64) tlb_st_mx (
2775
  .in0  (lmq0_bypass_data[63:0]),
2776
  .in1  (lmq1_bypass_data[63:0]),
2777
  .in2  (lmq2_bypass_data[63:0]),
2778
  .in3  (lmq3_bypass_data[63:0]),
2779
  .sel0 (lsu_tlb_st_sel_g[0]),
2780
  .sel1   (lsu_tlb_st_sel_g[1]),
2781
  .sel2 (lsu_tlb_st_sel_g[2]),
2782
  .sel3   (lsu_tlb_st_sel_g[3]),
2783
  .dout (tlb_st_data[63:0])
2784
);*/
2785
 
2786
wire    [63:0] tlb_st_data_d1 ;
2787
dff  #(64) std_d1 (
2788
        .din    (tlb_st_data[63:0]),
2789
        .q      (tlb_st_data_d1[63:0]),
2790
        .clk    (clk),
2791
        .se     (1'b0),     .si (),          .so ()
2792
        );
2793
 
2794
// Begin - Bug3487. 
2795
 
2796
 
2797
wire asi_data_clk;
2798
 
2799
 
2800
 
2801
 
2802
 
2803
 
2804
 
2805
 
2806
 
2807
 
2808
 
2809
dffe  #(48) ifu_std_d1 (
2810
        .din    (tlb_st_data[47:0]),
2811
        .q      (lsu_ifu_stxa_data[47:0]),
2812
        .en (~(lsu_ifu_asi_data_en_l)), .clk(clk),
2813
        .se     (1'b0),     .si (),          .so ()
2814
        );
2815
 
2816
 
2817
 
2818
 
2819
 
2820
 
2821
 
2822
 
2823
 
2824
// select is now a stage earlier, which should be
2825
// fine as selects stay constant.
2826
//assign  lsu_ifu_stxa_data[47:0] = tlb_st_data_d1[47:0] ;
2827
 
2828
// End - Bug3487. 
2829
 
2830
 
2831
//wire    [3:0]   lsu_diag_access_sel_d1 ;
2832
 
2833
//dff #(4)  diagsel_stgd1 (
2834
//        .din    (lsu_diag_access_sel[3:0]),
2835
//        .q      (lsu_diag_access_sel_d1[3:0]),
2836
//        .clk    (clk),
2837
//        .se     (1'b0),       .si (),          .so ()
2838
//        ); 
2839
 
2840
//mux4ds  #(64) diag_st_mx (
2841
//  .in0  (lmq0_bypass_data[63:0]),
2842
//  .in1  (lmq1_bypass_data[63:0]),
2843
//  .in2  (lmq2_bypass_data[63:0]),
2844
//  .in3  (lmq3_bypass_data[63:0]),
2845
//  .sel0 (lsu_diag_access_sel_d1[0]),  
2846
//  .sel1 (lsu_diag_access_sel_d1[1]),
2847
//  .sel2 (lsu_diag_access_sel_d1[2]),  
2848
//  .sel3 (lsu_diag_access_sel_d1[3]),
2849
//  .dout (lsu_diagnstc_wr_data_e[63:0])
2850
//);
2851
 
2852
// 1-hot fix: 8/1/03 - can be multihot during scan
2853
// grape mapper convert the 1 of the inverter used for the select to the logic below
2854
wire  [3:0]  lsu_diagnstc_data_sel_1hot ;
2855
assign  lsu_diagnstc_data_sel_1hot[0]  =  lsu_diagnstc_data_sel[0] & ~rst_tri_en;
2856
assign  lsu_diagnstc_data_sel_1hot[1]  =  lsu_diagnstc_data_sel[1] & ~rst_tri_en;
2857
assign  lsu_diagnstc_data_sel_1hot[2]  =  lsu_diagnstc_data_sel[2] & ~rst_tri_en;
2858
assign  lsu_diagnstc_data_sel_1hot[3]  =  lsu_diagnstc_data_sel[3] |  rst_tri_en;
2859
 
2860
 
2861
 
2862
 
2863
 
2864
mux4ds  #(64) diag_st_mx (
2865
  .in0  (lmq0_bypass_data[63:0]),
2866
  .in1  (lmq1_bypass_data[63:0]),
2867
  .in2  (lmq2_bypass_data[63:0]),
2868
  .in3  (lmq3_bypass_data[63:0]),
2869
  .sel0 (lsu_diagnstc_data_sel_1hot[0]),
2870
  .sel1 (lsu_diagnstc_data_sel_1hot[1]),
2871
  .sel2 (lsu_diagnstc_data_sel_1hot[2]),
2872
  .sel3 (lsu_diagnstc_data_sel_1hot[3]),
2873
  .dout (lsu_diagnstc_wr_data_e[63:0])
2874
);
2875
 
2876
 
2877
// Remove flops
2878
/*dff  #(64) dgndt_d1 (
2879
        .din    (tlb_st_data[63:0]),
2880
        .q      (lsu_diagnstc_wr_data_e[63:0]),
2881
        .clk    (clk),
2882
        .se     (1'b0),     .si (),          .so ()
2883
        ); */
2884
 
2885
assign lsu_diagnstc_wr_data_b0 = lsu_diagnstc_wr_data_e[0] ;
2886
 
2887
// Move tte format and parity calc to tlbdp
2888
 
2889
//assign lsu_tlu_st_rs3_data_g[63:0] = tlb_st_data_d1[63:0];
2890
assign lsu_tlu_st_rs3_data_g[47:3] = tlb_st_data_d1[47:3];
2891
assign lsu_mmu_rs3_data_g[63:0] = tlb_st_data_d1[63:0];
2892
assign lsu_tlu_rs3_data_g[63:0] = tlb_st_data_d1[63:0];
2893
 
2894
// Removed Fast bypass as penalty is negligible.
2895
 
2896
//=================================================================================================
2897
//    STQ PKT2 DATA
2898
//=================================================================================================
2899
 
2900
//** stquad support removed **
2901
 
2902
//=================================================================================================
2903
//    IMISS/SPU DP
2904
//=================================================================================================
2905
 
2906
// Format of IFU pcx packet (50b) :
2907
//  b49 - valid
2908
//  b48:44 - req type
2909
//  b43:42 - rep way (for "eviction" - maintains directory consistency )
2910
//  b41:40 - mil id
2911
//  b39:0  - imiss address
2912
 
2913
 
2914
// Align ifu pkt with ldst pkt - temporary !
2915
// Does this need to be enabled ?!!!! No.
2916
assign  ifu_pcx_pkt_e[51:0] = ifu_pcx_pkt[51:0] ;
2917
 
2918
// Form pcx-wide ifu request packet.
2919
assign  ifu_full_pcx_pkt_e[123] = ifu_pcx_pkt_e[51] ;
2920
assign  ifu_full_pcx_pkt_e[122:118] = ifu_pcx_pkt_e[48:44];
2921
assign  ifu_full_pcx_pkt_e[117] = ifu_pcx_pkt_e[49] ;
2922
assign  ifu_full_pcx_pkt_e[116:114] = const_cpuid[2:0] ;
2923
// thread-id unused - use mil id instead.
2924
assign  ifu_full_pcx_pkt_e[113:112] = ifu_pcx_pkt_e[41:40] ;
2925
assign  ifu_full_pcx_pkt_e[111] =  ifu_pcx_pkt_e[50] ;
2926
assign  ifu_full_pcx_pkt_e[111-1:109] =  2'b00;
2927
assign  ifu_full_pcx_pkt_e[108:107] =  ifu_pcx_pkt_e[43:42] ;
2928
// unused - always infer 32b
2929
assign  ifu_full_pcx_pkt_e[106:104] =  3'b000 ;
2930
assign  ifu_full_pcx_pkt_e[103:64] =  ifu_pcx_pkt_e[39:0] ;
2931
// no data
2932
assign  ifu_full_pcx_pkt_e[63:0] =  64'd0 ;
2933
 
2934
// Form pcx-wide interrupt request packet.
2935
assign  intrpt_full_pcxpkt[123] = tlu_lsu_pcxpkt[25] ;
2936
assign  intrpt_full_pcxpkt[122:118] = tlu_lsu_pcxpkt[24:20];
2937
assign  intrpt_full_pcxpkt[117] = 1'b0 ;
2938
 
2939
//tlu_lsu_pcxpkt[12:8] is the 5 bit interrupt destination thread id,
2940
//so [12:10] is the cpu id, and [9:8] is the thread id.   
2941
assign  intrpt_full_pcxpkt[116:114] = tlu_lsu_pcxpkt[12:10];
2942
 
2943
// or should thread-id be 19:18 ?
2944
assign  intrpt_full_pcxpkt[113:112] = tlu_lsu_pcxpkt[19:18] ;
2945
// May actually make undriven fields x.
2946
assign  intrpt_full_pcxpkt[111:109] =  3'b000;
2947
assign  intrpt_full_pcxpkt[108:107] =  2'b00 ;
2948
assign  intrpt_full_pcxpkt[106:104] =  3'b000 ;
2949
assign  intrpt_full_pcxpkt[103:64] =  40'd0 ;
2950
assign  intrpt_full_pcxpkt[63:0] =  {46'd0,tlu_lsu_pcxpkt[17:0]} ;
2951
 
2952
// Format fpop_full_pcxpkt.
2953
 
2954
assign  fpop_full_pcxpkt[123] = ffu_lsu_data[80] ;
2955
assign  fpop_full_pcxpkt[122:118] = {4'b0101,ffu_lsu_data[78]} ;
2956
assign  fpop_full_pcxpkt[117] = 1'b0 ;
2957
assign  fpop_full_pcxpkt[116:114] = const_cpuid[2:0] ;
2958
assign  fpop_full_pcxpkt[113:112] = ffu_lsu_data[77:76] ;
2959
assign  fpop_full_pcxpkt[111:104] = 8'd0 ;
2960
assign  fpop_full_pcxpkt[103:64+16] = 24'd0 ;
2961
assign  fpop_full_pcxpkt[64+15:64+8] = ffu_lsu_data[75:68]; // 79:72
2962
assign  fpop_full_pcxpkt[64+7:64+4] = 4'b0000;      // 71:68
2963
assign  fpop_full_pcxpkt[64+3:64] = ffu_lsu_data[67:64] ; // 67:64
2964
assign  fpop_full_pcxpkt[63:0] = ffu_lsu_data[63:0] ;
2965
 
2966
 
2967
// RAMTest Data Merging.
2968
wire cacherd_clk;
2969
 
2970
 
2971
 
2972
 
2973
 
2974
 
2975
 
2976
 
2977
 
2978
 
2979
wire  [63:0]  cache_rdata_w,cache_rdata_w2 ;
2980
 
2981
mux2ds  #(64) cacherd_sel (
2982
  .in0  (ifu_lsu_ldxa_data_w2[63:0]),
2983
  .in1  (lsu_dcache_rdata_w[63:0]),
2984
  .sel0 (~lsu_dcache_iob_rd_w),
2985
  .sel1 (lsu_dcache_iob_rd_w),
2986
  .dout (cache_rdata_w[63:0])
2987
);
2988
 
2989
 
2990
dffe  #(64) cachedata (
2991
        .din    (cache_rdata_w[63:0]),
2992
        .q      (cache_rdata_w2[63:0]), // references dcache rd staging
2993
        .en (~(~lsu_ramtest_rd_w)), .clk(clk),
2994
        .se     (1'b0),       .si (),          .so ()
2995
        );
2996
 
2997
 
2998
 
2999
 
3000
 
3001
 
3002
 
3003
 
3004
 
3005
assign  fwd_full_pcxpkt[123] = 1'b1 ;
3006
assign  fwd_full_pcxpkt[122:118] = {3'b011,lsu_pcx_fwd_reply,~lsu_pcx_fwd_reply} ;
3007
assign  fwd_full_pcxpkt[117] = lsu_pcx_fwd_pkt[107] ;
3008
assign  fwd_full_pcxpkt[116:114] = lsu_pcx_fwd_pkt[106:104] ;
3009
assign  fwd_full_pcxpkt[113:112] = 2'b00 ;
3010
assign  fwd_full_pcxpkt[111:104] =
3011
                        {6'b000000,lsu_fwd_rply_sz1_unc,1'b1} ;
3012
// All address bits should not be required !!!
3013
assign  fwd_full_pcxpkt[103:64] = lsu_pcx_fwd_pkt[103:64] ;
3014
 
3015
//  Mux sources of TAP request data - margin,pc,defeature/debug/bist.
3016
// Be careful about pc - could be a critical path.
3017
// ** Assume read-data stays constant at output latches of dcache **
3018
//assign  fwd_full_pcxpkt[`PCX_DA_HI:`PCX_DA_LO] =
3019
//lsu_iobrdge_rply_data_sel[0] ?  {20'd0,lsu_iobrdge_rd_data[43:0]} :
3020
//      lsu_iobrdge_rply_data_sel[1] ?  cache_rdata_w2[63:0] : 
3021
//                      lsu_iobrdge_rply_data_sel[2] ?  lsu_pcx_fwd_pkt[63:0] : 
3022
//                                                      64'hxxxx_xxxx_xxxx_xxxx ;
3023
 
3024
mux3ds #(64) mx_fwd_full_pcxpkt (
3025
    .in0 ({20'd0,lsu_iobrdge_rd_data[43:0]}),
3026
    .in1 (cache_rdata_w2[63:0]),
3027
    .in2 (lsu_pcx_fwd_pkt[63:0]),
3028
    .sel0(lsu_iobrdge_rply_data_sel[0]),
3029
    .sel1(lsu_iobrdge_rply_data_sel[1]),
3030
    .sel2(lsu_iobrdge_rply_data_sel[2]),
3031
    .dout(fwd_full_pcxpkt[63:0]));
3032
 
3033
 
3034
wire  [124-1:0]  spu_lsu_ldst_pckt_d1 ;
3035
dff  #(124) ff_spu_lsu_ldst_pckt_d1 (
3036
        .din  (spu_lsu_ldst_pckt[124-1:0]),
3037
        .q    (spu_lsu_ldst_pckt_d1[124-1:0]),
3038
        .clk  (clk),
3039
        .se   (1'b0),     .si (),          .so ()
3040
        );
3041
 
3042
assign  imiss_strm_pcx_pkt[124-1:0] = imiss_pcx_mx_sel ?
3043
          ifu_full_pcx_pkt_e[124-1:0] : spu_lsu_ldst_pckt_d1[124-1:0] ;
3044
 
3045
wire  [124-1:0]  fwd_int_fp_pcx_pkt ;
3046
mux3ds #(124) mux_fwd_int_fp_pcx_pkt (
3047
     .in0  (fwd_full_pcxpkt[124-1:0]),
3048
     .in1  (intrpt_full_pcxpkt[124-1:0]),
3049
     .in2  (fpop_full_pcxpkt[124-1:0]),
3050
     .sel0 (fwd_int_fp_pcx_mx_sel[0]),
3051
     .sel1 (fwd_int_fp_pcx_mx_sel[1]),
3052
     .sel2 (fwd_int_fp_pcx_mx_sel[2]),
3053
     .dout (fwd_int_fp_pcx_pkt [124-1:0])
3054
);
3055
 
3056
//=================================================================================================
3057
//    PCX PKT SELECTION
3058
//=================================================================================================
3059
 
3060
assign stb_pcx_pkt[114] = lsu_stb_pcx_rvld_d1 ;                // Valid
3061
// Support stores for now.
3062
assign stb_pcx_pkt[113:111] = stb_rdata_ramd[74:72] ;     // Rq-type
3063
assign stb_pcx_pkt[110] =
3064
        // Mina the OR gate has been extended to a 3 input gate
3065
        stb_rdata_ramd[74] | stb_rdata_ramd[73] |       // atomics
3066
        stb_rdata_ramd[71] ;                            // flush inst 
3067
// cpu-id will be inserted on way out of core.
3068
assign  stb_pcx_pkt[109:108] = lsu_stb_rd_tid[1:0] ;    // TID
3069
// bf-id is not required.
3070
// mux will have to be placed elsewhere. (grape)
3071
assign  stb_pcx_pkt[107] = stb_rdata_ramd[71] ; // flush
3072
assign  stb_pcx_pkt[107-1] = 1'b0 ;
3073
//assign  stb_pcx_pkt[`STB_PCX_WY_HI:`STB_PCX_WY_LO] = 2'b00 ;
3074
 
3075
//bug 2511   
3076
assign  stb_pcx_pkt[105:104] =
3077
                        stb_rdata_ramd[69:68];                          // Size
3078
 
3079
//assign  stb_pcx_pkt[`STB_PCX_AD_HI:`STB_PCX_AD_LO] = stb_pcx_pkt[`STB_PCX_FLSH] ? 40'b0 :
3080
//                        {stb_rdata_ramc[44:9],stb_rdata_ramd[67:64]} ;// Addr
3081
 
3082
assign  stb_pcx_pkt[103:64] =
3083
                        {stb_rdata_ramc[44:9],stb_rdata_ramd[67:64]} ;// Addr
3084
 
3085
 
3086
assign  stb_pcx_pkt[63:0] =
3087
                        stb_rdata_ramd[63:0];                           // Data   
3088
 
3089
assign  store_pcx_pkt[115-1:0] = stb_pcx_pkt[115-1:0] ;
3090
 
3091
// bld addr select. 
3092
wire [1:0] bld_addr_b54 ;
3093
assign  bld_addr_b54[1:0] =
3094
        lsu_bld_pcx_rq ? lsu_bld_rq_addr[1:0] : load_pcx_pkt[0+5:0+4] ;
3095
 
3096
// Select between load and store outbound pkt.
3097
// *** cpu-id currently hardwired in pkt
3098
// *** Thrd id currently hardwired.
3099
mux4ds  #(124) pcx_pkt_src (
3100
  .in0  ({load_pcx_pkt[64],2'b00,
3101
    load_pcx_pkt[47: 45],
3102
    load_pcx_pkt[44],const_cpuid[2:0],
3103
    ld_pcx_thrd[1:0],lsu_pcx_ld_dtag_perror_w2,
3104
    load_pcx_pkt[62],load_pcx_pkt[63],
3105
    load_pcx_pkt[43:42],lsu_pcx_rq_sz_b3,
3106
    //load_pcx_pkt[`LMQ_WY_HI:`LMQ_WY_LO],1'b0,
3107
    //load_pcx_pkt[`LMQ_SZ_HI:0],cas_pkt2_data[63:0]}), // load
3108
    load_pcx_pkt[41:0+6], bld_addr_b54[1:0],
3109
    load_pcx_pkt[0+3:0],cas_pkt2_data[63:0]}), // load
3110
  .in1  ({store_pcx_pkt[114],1'b0,
3111
  store_pcx_pkt[107],   // turn into interrupt request.
3112
    store_pcx_pkt[113:111],
3113
    store_pcx_pkt[110], const_cpuid[2:0],
3114
    store_pcx_pkt[109:108],
3115
    1'b0,
3116
    stb_rdata_ramd[70], // blk-st : Bug 3395
3117
    stb_rdata_ramd[75],
3118
    2'b00,
3119
    //store_pcx_pkt[`STB_PCX_WY_HI:`STB_PCX_WY_LO],
3120
    1'b0,store_pcx_pkt[105:0]}),     // store
3121
  .in2  (imiss_strm_pcx_pkt[124-1:0]),   // alt src : imiss,stream.
3122
  .in3  (fwd_int_fp_pcx_pkt[124-1:0]),   // fwd, interrupt, fpop                           
3123
  .sel0 (pcx_pkt_src_sel[0]),
3124
  .sel1 (pcx_pkt_src_sel[1]),
3125
  .sel2 (pcx_pkt_src_sel[2]),
3126
  .sel3 (pcx_pkt_src_sel[3]),
3127
  .dout (pcx_pkt_data[124-1:0])
3128
);
3129
 
3130
dff  #(124) pcx_xmit_ff (
3131
        .din  (pcx_pkt_data[124-1:0]),
3132
        .q    (spc_pcx_data_pa[124-1:0]),
3133
        .clk  (clk),
3134
        .se     (1'b0),     .si (),          .so ()
3135
        );
3136
 
3137
//  Stage to avoid critical path
3138
/*assign  lsu_ifu_ld_icache_index[11:5] = pcx_pkt_data[`PCX_AD_LO+11:`PCX_AD_LO+5] ;
3139
assign  lsu_ifu_ld_pcxpkt_tid[1:0] = pcx_pkt_data[`PCX_TH_HI:`PCX_TH_LO] ;*/
3140
 
3141
dff  #(9) stg_icindx (
3142
        .din  ({pcx_pkt_data[64+11:64+5],pcx_pkt_data[113:112]}),
3143
        .q    ({lsu_ifu_ld_icache_index[11:5],lsu_ifu_ld_pcxpkt_tid[1:0]}),
3144
        .clk  (clk),
3145
        .se     (1'b0),     .si (),          .so ()
3146
        );
3147
 
3148
//=========================================================================================
3149
//  VA Watchpt Reg per thread
3150
//=========================================================================================
3151
 
3152
//VA_watchpoint_thread0   
3153
   wire        va_wtchpt0_clk ;
3154
   wire [47:3] va_wtchpt0_addr;
3155
 
3156
 
3157
 
3158
 
3159
 
3160
 
3161
 
3162
 
3163
 
3164
 
3165
 
3166
 
3167
dffe #(45) va_wtchpt0_ff (
3168
        .din    (lsu_tlu_st_rs3_data_g[47:3]),
3169
        .q      (va_wtchpt0_addr[47:3]),
3170
        .en (~(lsu_va_wtchpt0_wr_en_l)), .clk(clk),
3171
        .se     (1'b0),       .si (),          .so ()
3172
        );
3173
 
3174
 
3175
 
3176
 
3177
 
3178
 
3179
 
3180
 
3181
 
3182
//VA_watchpoint_thread1   
3183
   wire        va_wtchpt1_clk ;
3184
   wire [47:3] va_wtchpt1_addr;
3185
 
3186
 
3187
 
3188
 
3189
 
3190
 
3191
 
3192
 
3193
 
3194
 
3195
 
3196
 
3197
dffe #(45) va_wtchpt1_ff (
3198
        .din    (lsu_tlu_st_rs3_data_g[47:3]),
3199
        .q      (va_wtchpt1_addr[47:3]),
3200
        .en (~(lsu_va_wtchpt1_wr_en_l)), .clk(clk),
3201
        .se     (1'b0),       .si (),          .so ()
3202
        );
3203
 
3204
 
3205
 
3206
 
3207
 
3208
 
3209
 
3210
 
3211
 
3212
//VA_watchpoint_thread2   
3213
   wire        va_wtchpt2_clk ;
3214
   wire [47:3] va_wtchpt2_addr;
3215
 
3216
 
3217
 
3218
 
3219
 
3220
 
3221
 
3222
 
3223
 
3224
 
3225
 
3226
 
3227
dffe #(45) va_wtchpt2_ff (
3228
        .din    (lsu_tlu_st_rs3_data_g[47:3]),
3229
        .q      (va_wtchpt2_addr[47:3]),
3230
        .en (~(lsu_va_wtchpt2_wr_en_l)), .clk(clk),
3231
        .se     (1'b0),       .si (),          .so ()
3232
        );
3233
 
3234
 
3235
 
3236
 
3237
 
3238
 
3239
 
3240
 
3241
 
3242
//VA_watchpoint_thread3   
3243
   wire        va_wtchpt3_clk ;
3244
   wire [47:3] va_wtchpt3_addr;
3245
 
3246
 
3247
 
3248
 
3249
 
3250
 
3251
 
3252
 
3253
 
3254
 
3255
 
3256
 
3257
dffe #(45) va_wtchpt3_ff (
3258
        .din    (lsu_tlu_st_rs3_data_g[47:3]),
3259
        .q      (va_wtchpt3_addr[47:3]),
3260
        .en (~(lsu_va_wtchpt3_wr_en_l)), .clk(clk),
3261
        .se     (1'b0),       .si (),          .so ()
3262
        );
3263
 
3264
 
3265
 
3266
 
3267
 
3268
 
3269
 
3270
 
3271
 
3272
   wire [47:3] va_wtchpt_addr;
3273
 
3274
mux4ds #(45)     va_wtchpt_mx_m (
3275
        .in0    (va_wtchpt0_addr[47:3]),
3276
        .in1    (va_wtchpt1_addr[47:3]),
3277
        .in2    (va_wtchpt2_addr[47:3]),
3278
        .in3    (va_wtchpt3_addr[47:3]),
3279
        .sel0   (thread0_m),
3280
        .sel1   (thread1_m),
3281
        .sel2   (thread2_m),
3282
        .sel3   (thread3_m),
3283
        .dout   (va_wtchpt_addr[47:3])
3284
        );
3285
 
3286
mux4ds #(45)     va_wtchpt_mx_g (
3287
        .in0    (va_wtchpt0_addr[47:3]),
3288
        .in1    (va_wtchpt1_addr[47:3]),
3289
        .in2    (va_wtchpt2_addr[47:3]),
3290
        .in3    (va_wtchpt3_addr[47:3]),
3291
        .sel0   (thread0_g),
3292
        .sel1   (thread1_g),
3293
        .sel2   (thread2_g),
3294
        .sel3   (thread3_g),
3295
        .dout   (lsu_va_wtchpt_addr[47:3])
3296
        );
3297
 
3298
//VA wtchpt comparison at M stage
3299
//assign lsu_va_match_m = (lsu_ldst_va_m[47:3] == va_wtchpt_addr[47:3]); 
3300
//bug6480/eco6623
3301
assign lsu_va_match_b47_b32_m = (lsu_ldst_va_m[47:32] == va_wtchpt_addr[47:32]);
3302
assign lsu_va_match_b31_b3_m =  (lsu_ldst_va_m[31:3 ] == va_wtchpt_addr[31:3 ]);
3303
 
3304
//====================================================================   
3305
//dc_fill CP
3306
   wire [63:0] l2fill_data_m;
3307
 
3308
//dff #(64) stgm_l2fd (
3309
//        .din    (lsu_l2fill_data[63:0]),
3310
//        .q      (l2fill_data_m[63:0]),
3311
//        .clk    (clk),
3312
//        .se     (se),       .si (),          .so ()
3313
//        );
3314
   assign      l2fill_data_m[63:0] = lsu_l2fill_data[63:0];
3315
 
3316
 
3317
   wire [63:0] ld_byp_data_m;
3318
 
3319
 
3320
 
3321
 
3322
mux4ds  #(64) ld_byp_mx (
3323
  .in0  (lmq0_bypass_data[63:0]),
3324
  .in1  (lmq1_bypass_data[63:0]),
3325
  .in2  (lmq2_bypass_data[63:0]),
3326
  .in3  (lmq3_bypass_data[63:0]),
3327
  .sel0 (ld_thrd_byp_sel_m[0]),
3328
  .sel1 (ld_thrd_byp_sel_m[1]),
3329
  .sel2 (ld_thrd_byp_sel_m[2]),
3330
  .sel3 (ld_thrd_byp_sel_m[3]),
3331
  .dout (ld_byp_data_m[63:0])
3332
);
3333
 
3334
 
3335
assign dcache_alt_data_w0_m[63:0] =
3336
       l2fill_vld_m ? l2fill_data_m[63:0] :
3337
                      ld_byp_data_m[63:0];
3338
 
3339
//assign        lsu_l2fill_or_byp_msb_m[7:0]
3340
//      = {lsu_l2fill_or_byp_data_m[63], 
3341
//     lsu_l2fill_or_byp_data_m[55], 
3342
//     lsu_l2fill_or_byp_data_m[47], 
3343
//     lsu_l2fill_or_byp_data_m[39],
3344
//         lsu_l2fill_or_byp_data_m[31], 
3345
//     lsu_l2fill_or_byp_data_m[23], 
3346
//     lsu_l2fill_or_byp_data_m[15], 
3347
//     lsu_l2fill_or_byp_data_m[07]} ;
3348
//====================================================================   
3349
 
3350
endmodule

powered by: WebSVN 2.1.0

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