forked from m-labs/VexRiscv-verilog
-
Notifications
You must be signed in to change notification settings - Fork 19
/
VexRiscv_Debug.v
6679 lines (6467 loc) · 333 KB
/
VexRiscv_Debug.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
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
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
429
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
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
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
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
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
879
880
881
882
883
884
885
886
887
888
889
890
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
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Generator : SpinalHDL v1.9.4 git head : 270018552577f3bb8e5339ee2583c9c22d324215
// Component : VexRiscv
// Git hash : 8542a5786b26857f3ef830ae9e72eec031df42d3
`timescale 1ns/1ps
module VexRiscv (
input wire [31:0] externalResetVector,
input wire timerInterrupt,
input wire softwareInterrupt,
input wire [31:0] externalInterruptArray,
input wire debug_bus_cmd_valid,
output reg debug_bus_cmd_ready,
input wire debug_bus_cmd_payload_wr,
input wire [7:0] debug_bus_cmd_payload_address,
input wire [31:0] debug_bus_cmd_payload_data,
output reg [31:0] debug_bus_rsp_data,
output wire debug_resetOut,
output reg iBusWishbone_CYC,
output reg iBusWishbone_STB,
input wire iBusWishbone_ACK,
output wire iBusWishbone_WE,
output wire [29:0] iBusWishbone_ADR,
input wire [31:0] iBusWishbone_DAT_MISO,
output wire [31:0] iBusWishbone_DAT_MOSI,
output wire [3:0] iBusWishbone_SEL,
input wire iBusWishbone_ERR,
output wire [2:0] iBusWishbone_CTI,
output wire [1:0] iBusWishbone_BTE,
output wire dBusWishbone_CYC,
output wire dBusWishbone_STB,
input wire dBusWishbone_ACK,
output wire dBusWishbone_WE,
output wire [29:0] dBusWishbone_ADR,
input wire [31:0] dBusWishbone_DAT_MISO,
output wire [31:0] dBusWishbone_DAT_MOSI,
output wire [3:0] dBusWishbone_SEL,
input wire dBusWishbone_ERR,
output wire [2:0] dBusWishbone_CTI,
output wire [1:0] dBusWishbone_BTE,
output wire halted,
input wire clk,
input wire reset,
input wire debugReset
);
localparam ShiftCtrlEnum_DISABLE_1 = 2'd0;
localparam ShiftCtrlEnum_SLL_1 = 2'd1;
localparam ShiftCtrlEnum_SRL_1 = 2'd2;
localparam ShiftCtrlEnum_SRA_1 = 2'd3;
localparam EnvCtrlEnum_NONE = 2'd0;
localparam EnvCtrlEnum_XRET = 2'd1;
localparam EnvCtrlEnum_ECALL = 2'd2;
localparam BranchCtrlEnum_INC = 2'd0;
localparam BranchCtrlEnum_B = 2'd1;
localparam BranchCtrlEnum_JAL = 2'd2;
localparam BranchCtrlEnum_JALR = 2'd3;
localparam AluBitwiseCtrlEnum_XOR_1 = 2'd0;
localparam AluBitwiseCtrlEnum_OR_1 = 2'd1;
localparam AluBitwiseCtrlEnum_AND_1 = 2'd2;
localparam Src2CtrlEnum_RS = 2'd0;
localparam Src2CtrlEnum_IMI = 2'd1;
localparam Src2CtrlEnum_IMS = 2'd2;
localparam Src2CtrlEnum_PC = 2'd3;
localparam AluCtrlEnum_ADD_SUB = 2'd0;
localparam AluCtrlEnum_SLT_SLTU = 2'd1;
localparam AluCtrlEnum_BITWISE = 2'd2;
localparam Src1CtrlEnum_RS = 2'd0;
localparam Src1CtrlEnum_IMU = 2'd1;
localparam Src1CtrlEnum_PC_INCREMENT = 2'd2;
localparam Src1CtrlEnum_URS1 = 2'd3;
wire IBusCachedPlugin_cache_io_flush;
wire IBusCachedPlugin_cache_io_cpu_prefetch_isValid;
wire IBusCachedPlugin_cache_io_cpu_fetch_isValid;
wire IBusCachedPlugin_cache_io_cpu_fetch_isStuck;
wire IBusCachedPlugin_cache_io_cpu_fetch_isRemoved;
wire IBusCachedPlugin_cache_io_cpu_decode_isValid;
wire IBusCachedPlugin_cache_io_cpu_decode_isStuck;
wire IBusCachedPlugin_cache_io_cpu_decode_isUser;
reg IBusCachedPlugin_cache_io_cpu_fill_valid;
wire dataCache_1_io_cpu_execute_isValid;
wire [31:0] dataCache_1_io_cpu_execute_address;
wire dataCache_1_io_cpu_memory_isValid;
wire [31:0] dataCache_1_io_cpu_memory_address;
reg dataCache_1_io_cpu_memory_mmuRsp_isIoAccess;
reg dataCache_1_io_cpu_writeBack_isValid;
wire dataCache_1_io_cpu_writeBack_isUser;
wire [31:0] dataCache_1_io_cpu_writeBack_storeData;
wire [31:0] dataCache_1_io_cpu_writeBack_address;
wire dataCache_1_io_cpu_writeBack_fence_SW;
wire dataCache_1_io_cpu_writeBack_fence_SR;
wire dataCache_1_io_cpu_writeBack_fence_SO;
wire dataCache_1_io_cpu_writeBack_fence_SI;
wire dataCache_1_io_cpu_writeBack_fence_PW;
wire dataCache_1_io_cpu_writeBack_fence_PR;
wire dataCache_1_io_cpu_writeBack_fence_PO;
wire dataCache_1_io_cpu_writeBack_fence_PI;
wire [3:0] dataCache_1_io_cpu_writeBack_fence_FM;
wire dataCache_1_io_cpu_flush_valid;
wire dataCache_1_io_cpu_flush_payload_singleLine;
wire [6:0] dataCache_1_io_cpu_flush_payload_lineId;
reg [31:0] _zz_RegFilePlugin_regFile_port0;
reg [31:0] _zz_RegFilePlugin_regFile_port1;
wire IBusCachedPlugin_cache_io_cpu_prefetch_haltIt;
wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_data;
wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress;
wire IBusCachedPlugin_cache_io_cpu_decode_error;
wire IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling;
wire IBusCachedPlugin_cache_io_cpu_decode_mmuException;
wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_data;
wire IBusCachedPlugin_cache_io_cpu_decode_cacheMiss;
wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_physicalAddress;
wire IBusCachedPlugin_cache_io_mem_cmd_valid;
wire [31:0] IBusCachedPlugin_cache_io_mem_cmd_payload_address;
wire [2:0] IBusCachedPlugin_cache_io_mem_cmd_payload_size;
wire dataCache_1_io_cpu_execute_haltIt;
wire dataCache_1_io_cpu_execute_refilling;
wire dataCache_1_io_cpu_memory_isWrite;
wire dataCache_1_io_cpu_writeBack_haltIt;
wire [31:0] dataCache_1_io_cpu_writeBack_data;
wire dataCache_1_io_cpu_writeBack_mmuException;
wire dataCache_1_io_cpu_writeBack_unalignedAccess;
wire dataCache_1_io_cpu_writeBack_accessError;
wire dataCache_1_io_cpu_writeBack_isWrite;
wire dataCache_1_io_cpu_writeBack_keepMemRspData;
wire dataCache_1_io_cpu_writeBack_exclusiveOk;
wire dataCache_1_io_cpu_flush_ready;
wire dataCache_1_io_cpu_redo;
wire dataCache_1_io_cpu_writesPending;
wire dataCache_1_io_mem_cmd_valid;
wire dataCache_1_io_mem_cmd_payload_wr;
wire dataCache_1_io_mem_cmd_payload_uncached;
wire [31:0] dataCache_1_io_mem_cmd_payload_address;
wire [31:0] dataCache_1_io_mem_cmd_payload_data;
wire [3:0] dataCache_1_io_mem_cmd_payload_mask;
wire [2:0] dataCache_1_io_mem_cmd_payload_size;
wire dataCache_1_io_mem_cmd_payload_last;
wire [51:0] _zz_memory_MUL_LOW;
wire [51:0] _zz_memory_MUL_LOW_1;
wire [51:0] _zz_memory_MUL_LOW_2;
wire [32:0] _zz_memory_MUL_LOW_3;
wire [51:0] _zz_memory_MUL_LOW_4;
wire [49:0] _zz_memory_MUL_LOW_5;
wire [51:0] _zz_memory_MUL_LOW_6;
wire [49:0] _zz_memory_MUL_LOW_7;
wire [31:0] _zz_execute_SHIFT_RIGHT;
wire [32:0] _zz_execute_SHIFT_RIGHT_1;
wire [32:0] _zz_execute_SHIFT_RIGHT_2;
wire [30:0] _zz_decode_DO_EBREAK;
wire [30:0] _zz_decode_DO_EBREAK_1;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_1;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_2;
wire _zz_decode_LEGAL_INSTRUCTION_3;
wire [0:0] _zz_decode_LEGAL_INSTRUCTION_4;
wire [12:0] _zz_decode_LEGAL_INSTRUCTION_5;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_6;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_7;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_8;
wire _zz_decode_LEGAL_INSTRUCTION_9;
wire [0:0] _zz_decode_LEGAL_INSTRUCTION_10;
wire [6:0] _zz_decode_LEGAL_INSTRUCTION_11;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_12;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_13;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_14;
wire _zz_decode_LEGAL_INSTRUCTION_15;
wire [0:0] _zz_decode_LEGAL_INSTRUCTION_16;
wire [0:0] _zz_decode_LEGAL_INSTRUCTION_17;
wire [3:0] _zz__zz_IBusCachedPlugin_jump_pcLoad_payload_1;
reg [31:0] _zz_IBusCachedPlugin_jump_pcLoad_payload_5;
wire [1:0] _zz_IBusCachedPlugin_jump_pcLoad_payload_6;
wire [31:0] _zz_IBusCachedPlugin_fetchPc_pc;
wire [2:0] _zz_IBusCachedPlugin_fetchPc_pc_1;
wire [11:0] _zz__zz_IBusCachedPlugin_decodePrediction_cmd_hadBranch;
wire [31:0] _zz_IBusCachedPlugin_decodePrediction_cmd_hadBranch_2;
wire [19:0] _zz__zz_2;
wire [11:0] _zz__zz_4;
wire [31:0] _zz__zz_6;
wire [31:0] _zz__zz_6_1;
wire [19:0] _zz__zz_IBusCachedPlugin_predictionJumpInterface_payload;
wire [11:0] _zz__zz_IBusCachedPlugin_predictionJumpInterface_payload_2;
wire _zz_IBusCachedPlugin_predictionJumpInterface_payload_4;
wire _zz_IBusCachedPlugin_predictionJumpInterface_payload_5;
wire _zz_IBusCachedPlugin_predictionJumpInterface_payload_6;
wire [26:0] _zz_io_cpu_flush_payload_lineId;
wire [26:0] _zz_io_cpu_flush_payload_lineId_1;
wire [2:0] _zz_DBusCachedPlugin_exceptionBus_payload_code;
wire [2:0] _zz_DBusCachedPlugin_exceptionBus_payload_code_1;
reg [7:0] _zz_writeBack_DBusCachedPlugin_rspShifted;
wire [1:0] _zz_writeBack_DBusCachedPlugin_rspShifted_1;
reg [7:0] _zz_writeBack_DBusCachedPlugin_rspShifted_2;
wire [0:0] _zz_writeBack_DBusCachedPlugin_rspShifted_3;
wire _zz__zz_decode_IS_RS2_SIGNED;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_1;
wire _zz__zz_decode_IS_RS2_SIGNED_2;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_3;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_4;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_5;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_6;
wire [25:0] _zz__zz_decode_IS_RS2_SIGNED_7;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_8;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_9;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_10;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_11;
wire _zz__zz_decode_IS_RS2_SIGNED_12;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_13;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_14;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_15;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_16;
wire [21:0] _zz__zz_decode_IS_RS2_SIGNED_17;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_18;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_19;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_20;
wire _zz__zz_decode_IS_RS2_SIGNED_21;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_22;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_23;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_24;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_25;
wire [17:0] _zz__zz_decode_IS_RS2_SIGNED_26;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_27;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_28;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_29;
wire _zz__zz_decode_IS_RS2_SIGNED_30;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_31;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_32;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_33;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_34;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_35;
wire _zz__zz_decode_IS_RS2_SIGNED_36;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_37;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_38;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_39;
wire [13:0] _zz__zz_decode_IS_RS2_SIGNED_40;
wire _zz__zz_decode_IS_RS2_SIGNED_41;
wire [4:0] _zz__zz_decode_IS_RS2_SIGNED_42;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_43;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_44;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_45;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_46;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_47;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_48;
wire _zz__zz_decode_IS_RS2_SIGNED_49;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_50;
wire _zz__zz_decode_IS_RS2_SIGNED_51;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_52;
wire _zz__zz_decode_IS_RS2_SIGNED_53;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_54;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_55;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_56;
wire [2:0] _zz__zz_decode_IS_RS2_SIGNED_57;
wire _zz__zz_decode_IS_RS2_SIGNED_58;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_59;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_60;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_61;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_62;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_63;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_64;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_65;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_66;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_67;
wire [4:0] _zz__zz_decode_IS_RS2_SIGNED_68;
wire _zz__zz_decode_IS_RS2_SIGNED_69;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_70;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_71;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_72;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_73;
wire [2:0] _zz__zz_decode_IS_RS2_SIGNED_74;
wire _zz__zz_decode_IS_RS2_SIGNED_75;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_76;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_77;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_78;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_79;
wire [9:0] _zz__zz_decode_IS_RS2_SIGNED_80;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_81;
wire _zz__zz_decode_IS_RS2_SIGNED_82;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_83;
wire _zz__zz_decode_IS_RS2_SIGNED_84;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_85;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_86;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_87;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_88;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_89;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_90;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_91;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_92;
wire [6:0] _zz__zz_decode_IS_RS2_SIGNED_93;
wire _zz__zz_decode_IS_RS2_SIGNED_94;
wire _zz__zz_decode_IS_RS2_SIGNED_95;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_96;
wire [4:0] _zz__zz_decode_IS_RS2_SIGNED_97;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_98;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_99;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_100;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_101;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_102;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_103;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_104;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_105;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_106;
wire [4:0] _zz__zz_decode_IS_RS2_SIGNED_107;
wire _zz__zz_decode_IS_RS2_SIGNED_108;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_109;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_110;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_111;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_112;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_113;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_114;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_115;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_116;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_117;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_118;
wire [2:0] _zz__zz_decode_IS_RS2_SIGNED_119;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_120;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_121;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_122;
wire _zz__zz_decode_IS_RS2_SIGNED_123;
wire _zz__zz_decode_IS_RS2_SIGNED_124;
wire _zz__zz_decode_IS_RS2_SIGNED_125;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_126;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_127;
wire _zz_RegFilePlugin_regFile_port;
wire _zz_decode_RegFilePlugin_rs1Data;
wire _zz_RegFilePlugin_regFile_port_1;
wire _zz_decode_RegFilePlugin_rs2Data;
wire [0:0] _zz__zz_execute_REGFILE_WRITE_DATA;
wire [2:0] _zz__zz_execute_SRC1;
wire [4:0] _zz__zz_execute_SRC1_1;
wire [11:0] _zz__zz_execute_SRC2_2;
wire [31:0] _zz_execute_SrcPlugin_addSub;
wire [31:0] _zz_execute_SrcPlugin_addSub_1;
wire [31:0] _zz_execute_SrcPlugin_addSub_2;
wire [31:0] _zz_execute_SrcPlugin_addSub_3;
wire [31:0] _zz_execute_SrcPlugin_addSub_4;
wire [19:0] _zz__zz_execute_BranchPlugin_missAlignedTarget_2;
wire [11:0] _zz__zz_execute_BranchPlugin_missAlignedTarget_4;
wire [31:0] _zz__zz_execute_BranchPlugin_missAlignedTarget_6;
wire [31:0] _zz__zz_execute_BranchPlugin_missAlignedTarget_6_1;
wire [31:0] _zz__zz_execute_BranchPlugin_missAlignedTarget_6_2;
wire [19:0] _zz__zz_execute_BranchPlugin_branch_src2_2;
wire [11:0] _zz__zz_execute_BranchPlugin_branch_src2_4;
wire _zz_execute_BranchPlugin_branch_src2_6;
wire _zz_execute_BranchPlugin_branch_src2_7;
wire _zz_execute_BranchPlugin_branch_src2_8;
wire [2:0] _zz_execute_BranchPlugin_branch_src2_9;
wire [1:0] _zz__zz_CsrPlugin_exceptionPortCtrl_exceptionContext_code_1;
wire [1:0] _zz__zz_CsrPlugin_exceptionPortCtrl_exceptionContext_code_1_1;
wire _zz_when;
wire [65:0] _zz_writeBack_MulPlugin_result;
wire [65:0] _zz_writeBack_MulPlugin_result_1;
wire [31:0] _zz__zz_decode_RS2_2;
wire [31:0] _zz__zz_decode_RS2_2_1;
wire [5:0] _zz_memory_DivPlugin_div_counter_valueNext;
wire [0:0] _zz_memory_DivPlugin_div_counter_valueNext_1;
wire [32:0] _zz_memory_DivPlugin_div_stage_0_remainderMinusDenominator;
wire [31:0] _zz_memory_DivPlugin_div_stage_0_outRemainder;
wire [31:0] _zz_memory_DivPlugin_div_stage_0_outRemainder_1;
wire [32:0] _zz_memory_DivPlugin_div_stage_0_outNumerator;
wire [32:0] _zz_memory_DivPlugin_div_result_1;
wire [32:0] _zz_memory_DivPlugin_div_result_2;
wire [32:0] _zz_memory_DivPlugin_div_result_3;
wire [32:0] _zz_memory_DivPlugin_div_result_4;
wire [0:0] _zz_memory_DivPlugin_div_result_5;
wire [32:0] _zz_memory_DivPlugin_rs1_2;
wire [0:0] _zz_memory_DivPlugin_rs1_3;
wire [31:0] _zz_memory_DivPlugin_rs2_1;
wire [0:0] _zz_memory_DivPlugin_rs2_2;
wire [26:0] _zz_iBusWishbone_ADR_1;
wire [51:0] memory_MUL_LOW;
wire [33:0] memory_MUL_HH;
wire [33:0] execute_MUL_HH;
wire [33:0] execute_MUL_HL;
wire [33:0] execute_MUL_LH;
wire [31:0] execute_MUL_LL;
wire [31:0] execute_BRANCH_CALC;
wire execute_BRANCH_DO;
wire [31:0] execute_SHIFT_RIGHT;
wire [31:0] execute_REGFILE_WRITE_DATA;
wire [31:0] memory_MEMORY_STORE_DATA_RF;
wire [31:0] execute_MEMORY_STORE_DATA_RF;
wire decode_DO_EBREAK;
wire decode_CSR_READ_OPCODE;
wire decode_CSR_WRITE_OPCODE;
wire decode_PREDICTION_HAD_BRANCHED2;
wire decode_SRC2_FORCE_ZERO;
wire decode_IS_RS2_SIGNED;
wire decode_IS_RS1_SIGNED;
wire decode_IS_DIV;
wire memory_IS_MUL;
wire execute_IS_MUL;
wire decode_IS_MUL;
wire [1:0] _zz_memory_to_writeBack_ENV_CTRL;
wire [1:0] _zz_memory_to_writeBack_ENV_CTRL_1;
wire [1:0] _zz_execute_to_memory_ENV_CTRL;
wire [1:0] _zz_execute_to_memory_ENV_CTRL_1;
wire [1:0] decode_ENV_CTRL;
wire [1:0] _zz_decode_ENV_CTRL;
wire [1:0] _zz_decode_to_execute_ENV_CTRL;
wire [1:0] _zz_decode_to_execute_ENV_CTRL_1;
wire decode_IS_CSR;
wire [1:0] _zz_decode_to_execute_BRANCH_CTRL;
wire [1:0] _zz_decode_to_execute_BRANCH_CTRL_1;
wire [1:0] _zz_execute_to_memory_SHIFT_CTRL;
wire [1:0] _zz_execute_to_memory_SHIFT_CTRL_1;
wire [1:0] decode_SHIFT_CTRL;
wire [1:0] _zz_decode_SHIFT_CTRL;
wire [1:0] _zz_decode_to_execute_SHIFT_CTRL;
wire [1:0] _zz_decode_to_execute_SHIFT_CTRL_1;
wire [1:0] decode_ALU_BITWISE_CTRL;
wire [1:0] _zz_decode_ALU_BITWISE_CTRL;
wire [1:0] _zz_decode_to_execute_ALU_BITWISE_CTRL;
wire [1:0] _zz_decode_to_execute_ALU_BITWISE_CTRL_1;
wire decode_SRC_LESS_UNSIGNED;
wire decode_MEMORY_MANAGMENT;
wire memory_MEMORY_WR;
wire decode_MEMORY_WR;
wire execute_BYPASSABLE_MEMORY_STAGE;
wire decode_BYPASSABLE_MEMORY_STAGE;
wire decode_BYPASSABLE_EXECUTE_STAGE;
wire [1:0] decode_SRC2_CTRL;
wire [1:0] _zz_decode_SRC2_CTRL;
wire [1:0] _zz_decode_to_execute_SRC2_CTRL;
wire [1:0] _zz_decode_to_execute_SRC2_CTRL_1;
wire [1:0] decode_ALU_CTRL;
wire [1:0] _zz_decode_ALU_CTRL;
wire [1:0] _zz_decode_to_execute_ALU_CTRL;
wire [1:0] _zz_decode_to_execute_ALU_CTRL_1;
wire [1:0] decode_SRC1_CTRL;
wire [1:0] _zz_decode_SRC1_CTRL;
wire [1:0] _zz_decode_to_execute_SRC1_CTRL;
wire [1:0] _zz_decode_to_execute_SRC1_CTRL_1;
wire decode_MEMORY_FORCE_CONSTISTENCY;
wire [31:0] writeBack_FORMAL_PC_NEXT;
wire [31:0] memory_FORMAL_PC_NEXT;
wire [31:0] execute_FORMAL_PC_NEXT;
wire [31:0] decode_FORMAL_PC_NEXT;
wire [31:0] memory_PC;
wire execute_DO_EBREAK;
wire decode_IS_EBREAK;
wire execute_IS_RS1_SIGNED;
wire execute_IS_DIV;
wire execute_IS_RS2_SIGNED;
wire memory_IS_DIV;
wire writeBack_IS_MUL;
wire [33:0] writeBack_MUL_HH;
wire [51:0] writeBack_MUL_LOW;
wire [33:0] memory_MUL_HL;
wire [33:0] memory_MUL_LH;
wire [31:0] memory_MUL_LL;
wire execute_CSR_READ_OPCODE;
wire execute_CSR_WRITE_OPCODE;
wire execute_IS_CSR;
wire [1:0] memory_ENV_CTRL;
wire [1:0] _zz_memory_ENV_CTRL;
wire [1:0] execute_ENV_CTRL;
wire [1:0] _zz_execute_ENV_CTRL;
wire [1:0] writeBack_ENV_CTRL;
wire [1:0] _zz_writeBack_ENV_CTRL;
wire [31:0] memory_BRANCH_CALC;
wire memory_BRANCH_DO;
wire [31:0] execute_PC;
wire execute_PREDICTION_HAD_BRANCHED2;
wire execute_BRANCH_COND_RESULT;
wire [1:0] execute_BRANCH_CTRL;
wire [1:0] _zz_execute_BRANCH_CTRL;
wire decode_RS2_USE;
wire decode_RS1_USE;
reg [31:0] _zz_decode_RS2;
wire execute_REGFILE_WRITE_VALID;
wire execute_BYPASSABLE_EXECUTE_STAGE;
wire memory_REGFILE_WRITE_VALID;
wire [31:0] memory_INSTRUCTION;
wire memory_BYPASSABLE_MEMORY_STAGE;
wire writeBack_REGFILE_WRITE_VALID;
reg [31:0] decode_RS2;
reg [31:0] decode_RS1;
wire [31:0] memory_SHIFT_RIGHT;
reg [31:0] _zz_decode_RS2_1;
wire [1:0] memory_SHIFT_CTRL;
wire [1:0] _zz_memory_SHIFT_CTRL;
wire [1:0] execute_SHIFT_CTRL;
wire [1:0] _zz_execute_SHIFT_CTRL;
wire execute_SRC_LESS_UNSIGNED;
wire execute_SRC2_FORCE_ZERO;
wire execute_SRC_USE_SUB_LESS;
wire [31:0] _zz_execute_to_memory_PC;
wire [1:0] execute_SRC2_CTRL;
wire [1:0] _zz_execute_SRC2_CTRL;
wire [1:0] execute_SRC1_CTRL;
wire [1:0] _zz_execute_SRC1_CTRL;
wire decode_SRC_USE_SUB_LESS;
wire decode_SRC_ADD_ZERO;
wire [31:0] execute_SRC_ADD_SUB;
wire execute_SRC_LESS;
wire [1:0] execute_ALU_CTRL;
wire [1:0] _zz_execute_ALU_CTRL;
wire [31:0] execute_SRC2;
wire [31:0] execute_SRC1;
wire [1:0] execute_ALU_BITWISE_CTRL;
wire [1:0] _zz_execute_ALU_BITWISE_CTRL;
wire [31:0] _zz_lastStageRegFileWrite_payload_address;
wire _zz_lastStageRegFileWrite_valid;
reg _zz_1;
wire [31:0] decode_INSTRUCTION_ANTICIPATED;
reg decode_REGFILE_WRITE_VALID;
wire decode_LEGAL_INSTRUCTION;
wire [1:0] _zz_decode_ENV_CTRL_1;
wire [1:0] _zz_decode_BRANCH_CTRL;
wire [1:0] _zz_decode_SHIFT_CTRL_1;
wire [1:0] _zz_decode_ALU_BITWISE_CTRL_1;
wire [1:0] _zz_decode_SRC2_CTRL_1;
wire [1:0] _zz_decode_ALU_CTRL_1;
wire [1:0] _zz_decode_SRC1_CTRL_1;
reg [31:0] _zz_decode_RS2_2;
wire writeBack_MEMORY_WR;
wire [31:0] writeBack_MEMORY_STORE_DATA_RF;
wire [31:0] writeBack_REGFILE_WRITE_DATA;
wire writeBack_MEMORY_ENABLE;
wire [31:0] memory_REGFILE_WRITE_DATA;
wire memory_MEMORY_ENABLE;
wire execute_MEMORY_FORCE_CONSTISTENCY;
(* keep , syn_keep *) wire [31:0] execute_RS1 /* synthesis syn_keep = 1 */ ;
wire execute_MEMORY_MANAGMENT;
(* keep , syn_keep *) wire [31:0] execute_RS2 /* synthesis syn_keep = 1 */ ;
wire execute_MEMORY_WR;
wire [31:0] execute_SRC_ADD;
wire execute_MEMORY_ENABLE;
wire [31:0] execute_INSTRUCTION;
wire decode_MEMORY_ENABLE;
wire decode_FLUSH_ALL;
reg IBusCachedPlugin_rsp_issueDetected_4;
reg IBusCachedPlugin_rsp_issueDetected_3;
reg IBusCachedPlugin_rsp_issueDetected_2;
reg IBusCachedPlugin_rsp_issueDetected_1;
wire [1:0] decode_BRANCH_CTRL;
wire [1:0] _zz_decode_BRANCH_CTRL_1;
wire [31:0] decode_INSTRUCTION;
reg [31:0] _zz_memory_to_writeBack_FORMAL_PC_NEXT;
reg [31:0] _zz_decode_to_execute_FORMAL_PC_NEXT;
wire [31:0] decode_PC;
wire [31:0] writeBack_PC;
wire [31:0] writeBack_INSTRUCTION;
reg decode_arbitration_haltItself;
reg decode_arbitration_haltByOther;
reg decode_arbitration_removeIt;
wire decode_arbitration_flushIt;
reg decode_arbitration_flushNext;
reg decode_arbitration_isValid;
wire decode_arbitration_isStuck;
wire decode_arbitration_isStuckByOthers;
wire decode_arbitration_isFlushed;
wire decode_arbitration_isMoving;
wire decode_arbitration_isFiring;
reg execute_arbitration_haltItself;
reg execute_arbitration_haltByOther;
reg execute_arbitration_removeIt;
reg execute_arbitration_flushIt;
reg execute_arbitration_flushNext;
reg execute_arbitration_isValid;
wire execute_arbitration_isStuck;
wire execute_arbitration_isStuckByOthers;
wire execute_arbitration_isFlushed;
wire execute_arbitration_isMoving;
wire execute_arbitration_isFiring;
reg memory_arbitration_haltItself;
wire memory_arbitration_haltByOther;
reg memory_arbitration_removeIt;
wire memory_arbitration_flushIt;
reg memory_arbitration_flushNext;
reg memory_arbitration_isValid;
wire memory_arbitration_isStuck;
wire memory_arbitration_isStuckByOthers;
wire memory_arbitration_isFlushed;
wire memory_arbitration_isMoving;
wire memory_arbitration_isFiring;
reg writeBack_arbitration_haltItself;
wire writeBack_arbitration_haltByOther;
reg writeBack_arbitration_removeIt;
reg writeBack_arbitration_flushIt;
reg writeBack_arbitration_flushNext;
reg writeBack_arbitration_isValid;
wire writeBack_arbitration_isStuck;
wire writeBack_arbitration_isStuckByOthers;
wire writeBack_arbitration_isFlushed;
wire writeBack_arbitration_isMoving;
wire writeBack_arbitration_isFiring;
wire [31:0] lastStageInstruction /* verilator public */ ;
wire [31:0] lastStagePc /* verilator public */ ;
wire lastStageIsValid /* verilator public */ ;
wire lastStageIsFiring /* verilator public */ ;
reg IBusCachedPlugin_fetcherHalt;
wire IBusCachedPlugin_forceNoDecodeCond;
reg IBusCachedPlugin_incomingInstruction;
wire IBusCachedPlugin_predictionJumpInterface_valid;
(* keep , syn_keep *) wire [31:0] IBusCachedPlugin_predictionJumpInterface_payload /* synthesis syn_keep = 1 */ ;
reg IBusCachedPlugin_decodePrediction_cmd_hadBranch;
wire IBusCachedPlugin_decodePrediction_rsp_wasWrong;
wire IBusCachedPlugin_pcValids_0;
wire IBusCachedPlugin_pcValids_1;
wire IBusCachedPlugin_pcValids_2;
wire IBusCachedPlugin_pcValids_3;
reg IBusCachedPlugin_decodeExceptionPort_valid;
reg [3:0] IBusCachedPlugin_decodeExceptionPort_payload_code;
wire [31:0] IBusCachedPlugin_decodeExceptionPort_payload_badAddr;
wire IBusCachedPlugin_mmuBus_cmd_0_isValid;
wire IBusCachedPlugin_mmuBus_cmd_0_isStuck;
wire [31:0] IBusCachedPlugin_mmuBus_cmd_0_virtualAddress;
wire IBusCachedPlugin_mmuBus_cmd_0_bypassTranslation;
wire [31:0] IBusCachedPlugin_mmuBus_rsp_physicalAddress;
wire IBusCachedPlugin_mmuBus_rsp_isIoAccess;
wire IBusCachedPlugin_mmuBus_rsp_isPaging;
wire IBusCachedPlugin_mmuBus_rsp_allowRead;
wire IBusCachedPlugin_mmuBus_rsp_allowWrite;
wire IBusCachedPlugin_mmuBus_rsp_allowExecute;
wire IBusCachedPlugin_mmuBus_rsp_exception;
wire IBusCachedPlugin_mmuBus_rsp_refilling;
wire IBusCachedPlugin_mmuBus_rsp_bypassTranslation;
wire IBusCachedPlugin_mmuBus_end;
wire IBusCachedPlugin_mmuBus_busy;
wire dBus_cmd_valid;
wire dBus_cmd_ready;
wire dBus_cmd_payload_wr;
wire dBus_cmd_payload_uncached;
wire [31:0] dBus_cmd_payload_address;
wire [31:0] dBus_cmd_payload_data;
wire [3:0] dBus_cmd_payload_mask;
wire [2:0] dBus_cmd_payload_size;
wire dBus_cmd_payload_last;
wire dBus_rsp_valid;
wire dBus_rsp_payload_last;
wire [31:0] dBus_rsp_payload_data;
wire dBus_rsp_payload_error;
wire DBusCachedPlugin_mmuBus_cmd_0_isValid;
wire DBusCachedPlugin_mmuBus_cmd_0_isStuck;
wire [31:0] DBusCachedPlugin_mmuBus_cmd_0_virtualAddress;
wire DBusCachedPlugin_mmuBus_cmd_0_bypassTranslation;
wire [31:0] DBusCachedPlugin_mmuBus_rsp_physicalAddress;
wire DBusCachedPlugin_mmuBus_rsp_isIoAccess;
wire DBusCachedPlugin_mmuBus_rsp_isPaging;
wire DBusCachedPlugin_mmuBus_rsp_allowRead;
wire DBusCachedPlugin_mmuBus_rsp_allowWrite;
wire DBusCachedPlugin_mmuBus_rsp_allowExecute;
wire DBusCachedPlugin_mmuBus_rsp_exception;
wire DBusCachedPlugin_mmuBus_rsp_refilling;
wire DBusCachedPlugin_mmuBus_rsp_bypassTranslation;
wire DBusCachedPlugin_mmuBus_end;
wire DBusCachedPlugin_mmuBus_busy;
reg DBusCachedPlugin_redoBranch_valid;
wire [31:0] DBusCachedPlugin_redoBranch_payload;
reg DBusCachedPlugin_exceptionBus_valid;
reg [3:0] DBusCachedPlugin_exceptionBus_payload_code;
wire [31:0] DBusCachedPlugin_exceptionBus_payload_badAddr;
reg _zz_when_DBusCachedPlugin_l472;
wire decodeExceptionPort_valid;
wire [3:0] decodeExceptionPort_payload_code;
wire [31:0] decodeExceptionPort_payload_badAddr;
wire BranchPlugin_jumpInterface_valid;
wire [31:0] BranchPlugin_jumpInterface_payload;
wire BranchPlugin_branchExceptionPort_valid;
wire [3:0] BranchPlugin_branchExceptionPort_payload_code;
wire [31:0] BranchPlugin_branchExceptionPort_payload_badAddr;
reg BranchPlugin_inDebugNoFetchFlag;
wire [31:0] CsrPlugin_csrMapping_readDataSignal;
wire [31:0] CsrPlugin_csrMapping_readDataInit;
wire [31:0] CsrPlugin_csrMapping_writeDataSignal;
reg CsrPlugin_csrMapping_allowCsrSignal;
wire CsrPlugin_csrMapping_hazardFree;
wire CsrPlugin_csrMapping_doForceFailCsr;
wire CsrPlugin_inWfi /* verilator public */ ;
reg CsrPlugin_thirdPartyWake;
reg CsrPlugin_jumpInterface_valid;
reg [31:0] CsrPlugin_jumpInterface_payload;
wire CsrPlugin_exceptionPendings_0;
wire CsrPlugin_exceptionPendings_1;
wire CsrPlugin_exceptionPendings_2;
wire CsrPlugin_exceptionPendings_3;
wire externalInterrupt;
wire contextSwitching;
reg [1:0] CsrPlugin_privilege;
reg CsrPlugin_forceMachineWire;
reg CsrPlugin_selfException_valid;
reg [3:0] CsrPlugin_selfException_payload_code;
wire [31:0] CsrPlugin_selfException_payload_badAddr;
reg CsrPlugin_allowInterrupts;
reg CsrPlugin_allowException;
reg CsrPlugin_allowEbreakException;
wire CsrPlugin_xretAwayFromMachine;
reg DebugPlugin_injectionPort_valid;
reg DebugPlugin_injectionPort_ready;
wire [31:0] DebugPlugin_injectionPort_payload;
wire IBusCachedPlugin_externalFlush;
wire IBusCachedPlugin_jump_pcLoad_valid;
wire [31:0] IBusCachedPlugin_jump_pcLoad_payload;
wire [3:0] _zz_IBusCachedPlugin_jump_pcLoad_payload;
wire [3:0] _zz_IBusCachedPlugin_jump_pcLoad_payload_1;
wire _zz_IBusCachedPlugin_jump_pcLoad_payload_2;
wire _zz_IBusCachedPlugin_jump_pcLoad_payload_3;
wire _zz_IBusCachedPlugin_jump_pcLoad_payload_4;
wire IBusCachedPlugin_fetchPc_output_valid;
wire IBusCachedPlugin_fetchPc_output_ready;
wire [31:0] IBusCachedPlugin_fetchPc_output_payload;
reg [31:0] IBusCachedPlugin_fetchPc_pcReg /* verilator public */ ;
reg IBusCachedPlugin_fetchPc_correction;
reg IBusCachedPlugin_fetchPc_correctionReg;
wire IBusCachedPlugin_fetchPc_output_fire;
wire IBusCachedPlugin_fetchPc_corrected;
reg IBusCachedPlugin_fetchPc_pcRegPropagate;
reg IBusCachedPlugin_fetchPc_booted;
reg IBusCachedPlugin_fetchPc_inc;
wire when_Fetcher_l133;
wire when_Fetcher_l133_1;
reg [31:0] IBusCachedPlugin_fetchPc_pc;
wire IBusCachedPlugin_fetchPc_redo_valid;
wire [31:0] IBusCachedPlugin_fetchPc_redo_payload;
reg IBusCachedPlugin_fetchPc_flushed;
wire when_Fetcher_l160;
reg IBusCachedPlugin_iBusRsp_redoFetch;
wire IBusCachedPlugin_iBusRsp_stages_0_input_valid;
wire IBusCachedPlugin_iBusRsp_stages_0_input_ready;
wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_input_payload;
wire IBusCachedPlugin_iBusRsp_stages_0_output_valid;
wire IBusCachedPlugin_iBusRsp_stages_0_output_ready;
wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_output_payload;
reg IBusCachedPlugin_iBusRsp_stages_0_halt;
wire IBusCachedPlugin_iBusRsp_stages_1_input_valid;
wire IBusCachedPlugin_iBusRsp_stages_1_input_ready;
wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_input_payload;
wire IBusCachedPlugin_iBusRsp_stages_1_output_valid;
wire IBusCachedPlugin_iBusRsp_stages_1_output_ready;
wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_output_payload;
reg IBusCachedPlugin_iBusRsp_stages_1_halt;
wire IBusCachedPlugin_iBusRsp_stages_2_input_valid;
wire IBusCachedPlugin_iBusRsp_stages_2_input_ready;
wire [31:0] IBusCachedPlugin_iBusRsp_stages_2_input_payload;
wire IBusCachedPlugin_iBusRsp_stages_2_output_valid;
wire IBusCachedPlugin_iBusRsp_stages_2_output_ready;
wire [31:0] IBusCachedPlugin_iBusRsp_stages_2_output_payload;
reg IBusCachedPlugin_iBusRsp_stages_2_halt;
wire _zz_IBusCachedPlugin_iBusRsp_stages_0_input_ready;
wire _zz_IBusCachedPlugin_iBusRsp_stages_1_input_ready;
wire _zz_IBusCachedPlugin_iBusRsp_stages_2_input_ready;
wire IBusCachedPlugin_iBusRsp_flush;
wire _zz_IBusCachedPlugin_iBusRsp_stages_0_output_ready;
wire _zz_IBusCachedPlugin_iBusRsp_stages_1_input_valid;
reg _zz_IBusCachedPlugin_iBusRsp_stages_1_input_valid_1;
wire IBusCachedPlugin_iBusRsp_stages_1_output_m2sPipe_valid;
wire IBusCachedPlugin_iBusRsp_stages_1_output_m2sPipe_ready;
wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_output_m2sPipe_payload;
reg _zz_IBusCachedPlugin_iBusRsp_stages_1_output_m2sPipe_valid;
reg [31:0] _zz_IBusCachedPlugin_iBusRsp_stages_1_output_m2sPipe_payload;
reg IBusCachedPlugin_iBusRsp_readyForError;
wire IBusCachedPlugin_iBusRsp_output_valid;
wire IBusCachedPlugin_iBusRsp_output_ready;
wire [31:0] IBusCachedPlugin_iBusRsp_output_payload_pc;
wire IBusCachedPlugin_iBusRsp_output_payload_rsp_error;
wire [31:0] IBusCachedPlugin_iBusRsp_output_payload_rsp_inst;
wire IBusCachedPlugin_iBusRsp_output_payload_isRvc;
wire when_Fetcher_l242;
wire when_Fetcher_l322;
reg IBusCachedPlugin_injector_nextPcCalc_valids_0;
wire when_Fetcher_l331;
reg IBusCachedPlugin_injector_nextPcCalc_valids_1;
wire when_Fetcher_l331_1;
reg IBusCachedPlugin_injector_nextPcCalc_valids_2;
wire when_Fetcher_l331_2;
reg IBusCachedPlugin_injector_nextPcCalc_valids_3;
wire when_Fetcher_l331_3;
reg IBusCachedPlugin_injector_nextPcCalc_valids_4;
wire when_Fetcher_l331_4;
wire _zz_IBusCachedPlugin_decodePrediction_cmd_hadBranch;
reg [18:0] _zz_IBusCachedPlugin_decodePrediction_cmd_hadBranch_1;
wire _zz_2;
reg [10:0] _zz_3;
wire _zz_4;
reg [18:0] _zz_5;
reg _zz_6;
wire _zz_IBusCachedPlugin_predictionJumpInterface_payload;
reg [10:0] _zz_IBusCachedPlugin_predictionJumpInterface_payload_1;
wire _zz_IBusCachedPlugin_predictionJumpInterface_payload_2;
reg [18:0] _zz_IBusCachedPlugin_predictionJumpInterface_payload_3;
wire iBus_cmd_valid;
wire iBus_cmd_ready;
reg [31:0] iBus_cmd_payload_address;
wire [2:0] iBus_cmd_payload_size;
wire iBus_rsp_valid;
wire [31:0] iBus_rsp_payload_data;
wire iBus_rsp_payload_error;
reg [31:0] IBusCachedPlugin_rspCounter;
wire IBusCachedPlugin_s0_tightlyCoupledHit;
reg IBusCachedPlugin_s1_tightlyCoupledHit;
reg IBusCachedPlugin_s2_tightlyCoupledHit;
wire IBusCachedPlugin_rsp_iBusRspOutputHalt;
wire IBusCachedPlugin_rsp_issueDetected;
reg IBusCachedPlugin_rsp_redoFetch;
wire when_IBusCachedPlugin_l245;
wire when_IBusCachedPlugin_l250;
wire when_IBusCachedPlugin_l256;
wire when_IBusCachedPlugin_l262;
wire when_IBusCachedPlugin_l273;
wire toplevel_dataCache_1_io_mem_cmd_s2mPipe_valid;
reg toplevel_dataCache_1_io_mem_cmd_s2mPipe_ready;
wire toplevel_dataCache_1_io_mem_cmd_s2mPipe_payload_wr;
wire toplevel_dataCache_1_io_mem_cmd_s2mPipe_payload_uncached;
wire [31:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_payload_address;
wire [31:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_payload_data;
wire [3:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_payload_mask;
wire [2:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_payload_size;
wire toplevel_dataCache_1_io_mem_cmd_s2mPipe_payload_last;
reg toplevel_dataCache_1_io_mem_cmd_rValidN;
reg toplevel_dataCache_1_io_mem_cmd_rData_wr;
reg toplevel_dataCache_1_io_mem_cmd_rData_uncached;
reg [31:0] toplevel_dataCache_1_io_mem_cmd_rData_address;
reg [31:0] toplevel_dataCache_1_io_mem_cmd_rData_data;
reg [3:0] toplevel_dataCache_1_io_mem_cmd_rData_mask;
reg [2:0] toplevel_dataCache_1_io_mem_cmd_rData_size;
reg toplevel_dataCache_1_io_mem_cmd_rData_last;
wire toplevel_dataCache_1_io_mem_cmd_s2mPipe_m2sPipe_valid;
wire toplevel_dataCache_1_io_mem_cmd_s2mPipe_m2sPipe_ready;
wire toplevel_dataCache_1_io_mem_cmd_s2mPipe_m2sPipe_payload_wr;
wire toplevel_dataCache_1_io_mem_cmd_s2mPipe_m2sPipe_payload_uncached;
wire [31:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_m2sPipe_payload_address;
wire [31:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_m2sPipe_payload_data;
wire [3:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_m2sPipe_payload_mask;
wire [2:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_m2sPipe_payload_size;
wire toplevel_dataCache_1_io_mem_cmd_s2mPipe_m2sPipe_payload_last;
reg toplevel_dataCache_1_io_mem_cmd_s2mPipe_rValid;
reg toplevel_dataCache_1_io_mem_cmd_s2mPipe_rData_wr;
reg toplevel_dataCache_1_io_mem_cmd_s2mPipe_rData_uncached;
reg [31:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_rData_address;
reg [31:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_rData_data;
reg [3:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_rData_mask;
reg [2:0] toplevel_dataCache_1_io_mem_cmd_s2mPipe_rData_size;
reg toplevel_dataCache_1_io_mem_cmd_s2mPipe_rData_last;
wire when_Stream_l369;
reg [31:0] DBusCachedPlugin_rspCounter;
wire when_DBusCachedPlugin_l352;
wire [1:0] execute_DBusCachedPlugin_size;
reg [31:0] _zz_execute_MEMORY_STORE_DATA_RF;
wire toplevel_dataCache_1_io_cpu_flush_isStall;
wire when_DBusCachedPlugin_l394;
wire when_DBusCachedPlugin_l410;
wire when_DBusCachedPlugin_l472;
wire when_DBusCachedPlugin_l533;
wire when_DBusCachedPlugin_l553;
wire [31:0] writeBack_DBusCachedPlugin_rspData;
wire [7:0] writeBack_DBusCachedPlugin_rspSplits_0;
wire [7:0] writeBack_DBusCachedPlugin_rspSplits_1;
wire [7:0] writeBack_DBusCachedPlugin_rspSplits_2;
wire [7:0] writeBack_DBusCachedPlugin_rspSplits_3;
reg [31:0] writeBack_DBusCachedPlugin_rspShifted;
wire [31:0] writeBack_DBusCachedPlugin_rspRf;
wire [1:0] switch_Misc_l232;
wire _zz_writeBack_DBusCachedPlugin_rspFormated;
reg [31:0] _zz_writeBack_DBusCachedPlugin_rspFormated_1;
wire _zz_writeBack_DBusCachedPlugin_rspFormated_2;
reg [31:0] _zz_writeBack_DBusCachedPlugin_rspFormated_3;
reg [31:0] writeBack_DBusCachedPlugin_rspFormated;
wire when_DBusCachedPlugin_l580;
wire [32:0] _zz_decode_IS_RS2_SIGNED;
wire _zz_decode_IS_RS2_SIGNED_1;
wire _zz_decode_IS_RS2_SIGNED_2;
wire _zz_decode_IS_RS2_SIGNED_3;
wire _zz_decode_IS_RS2_SIGNED_4;
wire _zz_decode_IS_RS2_SIGNED_5;
wire [1:0] _zz_decode_SRC1_CTRL_2;
wire [1:0] _zz_decode_ALU_CTRL_2;
wire [1:0] _zz_decode_SRC2_CTRL_2;
wire [1:0] _zz_decode_ALU_BITWISE_CTRL_2;
wire [1:0] _zz_decode_SHIFT_CTRL_2;
wire [1:0] _zz_decode_BRANCH_CTRL_2;
wire [1:0] _zz_decode_ENV_CTRL_2;
wire when_RegFilePlugin_l63;
wire [4:0] decode_RegFilePlugin_regFileReadAddress1;
wire [4:0] decode_RegFilePlugin_regFileReadAddress2;
wire [31:0] decode_RegFilePlugin_rs1Data;
wire [31:0] decode_RegFilePlugin_rs2Data;
reg lastStageRegFileWrite_valid /* verilator public */ ;
reg [4:0] lastStageRegFileWrite_payload_address /* verilator public */ ;
reg [31:0] lastStageRegFileWrite_payload_data /* verilator public */ ;
reg _zz_10;
reg [31:0] execute_IntAluPlugin_bitwise;
reg [31:0] _zz_execute_REGFILE_WRITE_DATA;
reg [31:0] _zz_execute_SRC1;
wire _zz_execute_SRC2;
reg [19:0] _zz_execute_SRC2_1;
wire _zz_execute_SRC2_2;
reg [19:0] _zz_execute_SRC2_3;
reg [31:0] _zz_execute_SRC2_4;
reg [31:0] execute_SrcPlugin_addSub;
wire execute_SrcPlugin_less;
wire [4:0] execute_FullBarrelShifterPlugin_amplitude;
reg [31:0] _zz_execute_FullBarrelShifterPlugin_reversed;
wire [31:0] execute_FullBarrelShifterPlugin_reversed;
reg [31:0] _zz_decode_RS2_3;
reg HazardSimplePlugin_src0Hazard;
reg HazardSimplePlugin_src1Hazard;
wire HazardSimplePlugin_writeBackWrites_valid;
wire [4:0] HazardSimplePlugin_writeBackWrites_payload_address;
wire [31:0] HazardSimplePlugin_writeBackWrites_payload_data;
reg HazardSimplePlugin_writeBackBuffer_valid;
reg [4:0] HazardSimplePlugin_writeBackBuffer_payload_address;
reg [31:0] HazardSimplePlugin_writeBackBuffer_payload_data;
wire HazardSimplePlugin_addr0Match;
wire HazardSimplePlugin_addr1Match;
wire when_HazardSimplePlugin_l47;
wire when_HazardSimplePlugin_l48;
wire when_HazardSimplePlugin_l51;
wire when_HazardSimplePlugin_l45;
wire when_HazardSimplePlugin_l57;
wire when_HazardSimplePlugin_l58;
wire when_HazardSimplePlugin_l48_1;
wire when_HazardSimplePlugin_l51_1;
wire when_HazardSimplePlugin_l45_1;
wire when_HazardSimplePlugin_l57_1;
wire when_HazardSimplePlugin_l58_1;
wire when_HazardSimplePlugin_l48_2;
wire when_HazardSimplePlugin_l51_2;
wire when_HazardSimplePlugin_l45_2;
wire when_HazardSimplePlugin_l57_2;
wire when_HazardSimplePlugin_l58_2;
wire when_HazardSimplePlugin_l105;
wire when_HazardSimplePlugin_l108;
wire when_HazardSimplePlugin_l113;
wire execute_BranchPlugin_eq;
wire [2:0] switch_Misc_l232_1;
reg _zz_execute_BRANCH_COND_RESULT;
reg _zz_execute_BRANCH_COND_RESULT_1;
wire _zz_execute_BranchPlugin_missAlignedTarget;
reg [19:0] _zz_execute_BranchPlugin_missAlignedTarget_1;
wire _zz_execute_BranchPlugin_missAlignedTarget_2;
reg [10:0] _zz_execute_BranchPlugin_missAlignedTarget_3;
wire _zz_execute_BranchPlugin_missAlignedTarget_4;
reg [18:0] _zz_execute_BranchPlugin_missAlignedTarget_5;
reg _zz_execute_BranchPlugin_missAlignedTarget_6;
wire execute_BranchPlugin_missAlignedTarget;
reg [31:0] execute_BranchPlugin_branch_src1;
reg [31:0] execute_BranchPlugin_branch_src2;
wire _zz_execute_BranchPlugin_branch_src2;
reg [19:0] _zz_execute_BranchPlugin_branch_src2_1;
wire _zz_execute_BranchPlugin_branch_src2_2;
reg [10:0] _zz_execute_BranchPlugin_branch_src2_3;
wire _zz_execute_BranchPlugin_branch_src2_4;
reg [18:0] _zz_execute_BranchPlugin_branch_src2_5;
wire [31:0] execute_BranchPlugin_branchAdder;
wire [1:0] CsrPlugin_misa_base;
wire [25:0] CsrPlugin_misa_extensions;
reg [1:0] CsrPlugin_mtvec_mode;
reg [29:0] CsrPlugin_mtvec_base;
reg [31:0] CsrPlugin_mepc;
reg CsrPlugin_mstatus_MIE;
reg CsrPlugin_mstatus_MPIE;
reg [1:0] CsrPlugin_mstatus_MPP;
reg CsrPlugin_mip_MEIP;
reg CsrPlugin_mip_MTIP;
reg CsrPlugin_mip_MSIP;
reg CsrPlugin_mie_MEIE;
reg CsrPlugin_mie_MTIE;
reg CsrPlugin_mie_MSIE;
reg CsrPlugin_mcause_interrupt;
reg [3:0] CsrPlugin_mcause_exceptionCode;
reg [31:0] CsrPlugin_mtval;
reg [63:0] CsrPlugin_mcycle;
reg [63:0] CsrPlugin_minstret;
wire _zz_when_CsrPlugin_l1302;
wire _zz_when_CsrPlugin_l1302_1;
wire _zz_when_CsrPlugin_l1302_2;
reg CsrPlugin_exceptionPortCtrl_exceptionValids_decode;
reg CsrPlugin_exceptionPortCtrl_exceptionValids_execute;
reg CsrPlugin_exceptionPortCtrl_exceptionValids_memory;
reg CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack;
reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode;
reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute;
reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory;
reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack;
reg [3:0] CsrPlugin_exceptionPortCtrl_exceptionContext_code;
reg [31:0] CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr;
wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped;
wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege;
wire [1:0] _zz_CsrPlugin_exceptionPortCtrl_exceptionContext_code;
wire _zz_CsrPlugin_exceptionPortCtrl_exceptionContext_code_1;
wire when_CsrPlugin_l1259;
wire when_CsrPlugin_l1259_1;
wire when_CsrPlugin_l1259_2;
wire when_CsrPlugin_l1259_3;
wire when_CsrPlugin_l1272;
reg CsrPlugin_interrupt_valid;
reg [3:0] CsrPlugin_interrupt_code /* verilator public */ ;
reg [1:0] CsrPlugin_interrupt_targetPrivilege;
wire when_CsrPlugin_l1296;
wire when_CsrPlugin_l1302;
wire when_CsrPlugin_l1302_1;
wire when_CsrPlugin_l1302_2;
wire CsrPlugin_exception;
wire CsrPlugin_lastStageWasWfi;
reg CsrPlugin_pipelineLiberator_pcValids_0;
reg CsrPlugin_pipelineLiberator_pcValids_1;
reg CsrPlugin_pipelineLiberator_pcValids_2;
wire CsrPlugin_pipelineLiberator_active;
wire when_CsrPlugin_l1335;
wire when_CsrPlugin_l1335_1;
wire when_CsrPlugin_l1335_2;