-
Notifications
You must be signed in to change notification settings - Fork 39
/
VexRiscv_IMA.v
7900 lines (7650 loc) · 384 KB
/
VexRiscv_IMA.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.6.1 git head : 9e5c59f90bab017bb3c27775f9312dc325468803
// Component : VexRiscv_IMA
// Git hash : dd845d0e74a88b313e8864c8f949c8ba86e7cedf
`timescale 1ns/1ps
module VexRiscv_IMA (
input [31:0] externalResetVector,
input timerInterrupt,
input softwareInterrupt,
input [31:0] externalInterruptArray,
output reg iBusWishbone_CYC,
output reg iBusWishbone_STB,
input iBusWishbone_ACK,
output iBusWishbone_WE,
output [29:0] iBusWishbone_ADR,
input [31:0] iBusWishbone_DAT_MISO,
output [31:0] iBusWishbone_DAT_MOSI,
output [3:0] iBusWishbone_SEL,
input iBusWishbone_ERR,
output [2:0] iBusWishbone_CTI,
output [1:0] iBusWishbone_BTE,
output dBusWishbone_CYC,
output dBusWishbone_STB,
input dBusWishbone_ACK,
output dBusWishbone_WE,
output [29:0] dBusWishbone_ADR,
input [31:0] dBusWishbone_DAT_MISO,
output [31:0] dBusWishbone_DAT_MOSI,
output [3:0] dBusWishbone_SEL,
input dBusWishbone_ERR,
output [2:0] dBusWishbone_CTI,
output [1:0] dBusWishbone_BTE,
input clk,
input reset
);
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_WFI = 2'd2;
localparam EnvCtrlEnum_ECALL = 2'd3;
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;
localparam execute_PmpPlugin_fsm_enumDef_BOOT = 3'd0;
localparam execute_PmpPlugin_fsm_enumDef_stateIdle = 3'd1;
localparam execute_PmpPlugin_fsm_enumDef_stateWrite = 3'd2;
localparam execute_PmpPlugin_fsm_enumDef_stateCfg = 3'd3;
localparam execute_PmpPlugin_fsm_enumDef_stateAddr = 3'd4;
reg [31:0] PmpPlugin_setter_io_addr;
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_io_cpu_execute_isValid;
wire [31:0] dataCache_io_cpu_execute_address;
reg dataCache_io_cpu_execute_args_isLrsc;
wire dataCache_io_cpu_execute_args_amoCtrl_swap;
wire [2:0] dataCache_io_cpu_execute_args_amoCtrl_alu;
wire dataCache_io_cpu_memory_isValid;
wire [31:0] dataCache_io_cpu_memory_address;
reg dataCache_io_cpu_memory_mmuRsp_isIoAccess;
reg dataCache_io_cpu_writeBack_isValid;
wire dataCache_io_cpu_writeBack_isUser;
wire [31:0] dataCache_io_cpu_writeBack_storeData;
wire [31:0] dataCache_io_cpu_writeBack_address;
wire dataCache_io_cpu_writeBack_fence_SW;
wire dataCache_io_cpu_writeBack_fence_SR;
wire dataCache_io_cpu_writeBack_fence_SO;
wire dataCache_io_cpu_writeBack_fence_SI;
wire dataCache_io_cpu_writeBack_fence_PW;
wire dataCache_io_cpu_writeBack_fence_PR;
wire dataCache_io_cpu_writeBack_fence_PO;
wire dataCache_io_cpu_writeBack_fence_PI;
wire [3:0] dataCache_io_cpu_writeBack_fence_FM;
wire dataCache_io_cpu_flush_valid;
wire dataCache_io_mem_cmd_ready;
reg [53:0] _zz_IBusCachedPlugin_predictor_history_port1;
wire [31:0] _zz_PmpPlugin_pmpaddr_port0;
wire [31:0] _zz_PmpPlugin_pmpaddr_port2;
reg [31:0] _zz_RegFilePlugin_regFile_port0;
reg [31:0] _zz_RegFilePlugin_regFile_port1;
wire [20:0] PmpPlugin_setter_io_base;
wire [20:0] PmpPlugin_setter_io_mask;
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_io_cpu_execute_haltIt;
wire dataCache_io_cpu_execute_refilling;
wire dataCache_io_cpu_memory_isWrite;
wire dataCache_io_cpu_writeBack_haltIt;
wire [31:0] dataCache_io_cpu_writeBack_data;
wire dataCache_io_cpu_writeBack_mmuException;
wire dataCache_io_cpu_writeBack_unalignedAccess;
wire dataCache_io_cpu_writeBack_accessError;
wire dataCache_io_cpu_writeBack_isWrite;
wire dataCache_io_cpu_writeBack_keepMemRspData;
wire dataCache_io_cpu_writeBack_exclusiveOk;
wire dataCache_io_cpu_flush_ready;
wire dataCache_io_cpu_redo;
wire dataCache_io_mem_cmd_valid;
wire dataCache_io_mem_cmd_payload_wr;
wire dataCache_io_mem_cmd_payload_uncached;
wire [31:0] dataCache_io_mem_cmd_payload_address;
wire [31:0] dataCache_io_mem_cmd_payload_data;
wire [3:0] dataCache_io_mem_cmd_payload_mask;
wire [2:0] dataCache_io_mem_cmd_payload_size;
wire dataCache_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 [51:0] _zz_memory_MUL_LOW_3;
wire [32:0] _zz_memory_MUL_LOW_4;
wire [51:0] _zz_memory_MUL_LOW_5;
wire [49:0] _zz_memory_MUL_LOW_6;
wire [51:0] _zz_memory_MUL_LOW_7;
wire [49:0] _zz_memory_MUL_LOW_8;
wire [31:0] _zz_execute_SHIFT_RIGHT;
wire [32:0] _zz_execute_SHIFT_RIGHT_1;
wire [32:0] _zz_execute_SHIFT_RIGHT_2;
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 [16: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 [10: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 [4:0] _zz_decode_LEGAL_INSTRUCTION_17;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_18;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_19;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_20;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_21;
wire [31:0] _zz_decode_LEGAL_INSTRUCTION_22;
wire [2:0] _zz__zz_IBusCachedPlugin_jump_pcLoad_payload_1;
reg [31:0] _zz_IBusCachedPlugin_jump_pcLoad_payload_4;
wire [1:0] _zz_IBusCachedPlugin_jump_pcLoad_payload_5;
wire [31:0] _zz_IBusCachedPlugin_fetchPc_pc;
wire [2:0] _zz_IBusCachedPlugin_fetchPc_pc_1;
wire [53:0] _zz_IBusCachedPlugin_predictor_history_port;
wire [9:0] _zz_IBusCachedPlugin_predictor_history_port_1;
wire [9:0] _zz__zz_IBusCachedPlugin_predictor_buffer_line_source_1;
wire [9:0] _zz_IBusCachedPlugin_predictor_buffer_hazard;
wire [29:0] _zz_IBusCachedPlugin_predictor_buffer_hazard_1;
wire [19:0] _zz_IBusCachedPlugin_predictor_hit;
wire [1:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish;
wire [1:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish_1;
wire [0:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish_2;
wire [1:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish_3;
wire [0:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish_4;
wire [1:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish_5;
wire [1:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish_6;
wire [0:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish_7;
wire [1:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish_8;
wire [0:0] _zz_IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish_9;
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 [0:0] _zz_writeBack_DBusCachedPlugin_rspRf;
reg [7:0] _zz_when_PmpPlugin_l246;
reg [20:0] _zz_PmpPlugin_dGuard_hits_0_1;
wire [1:0] _zz_PmpPlugin_dGuard_hits_0_2;
reg [20:0] _zz_PmpPlugin_dGuard_hits_0_3;
wire [1:0] _zz_PmpPlugin_dGuard_hits_0_4;
reg [20:0] _zz_PmpPlugin_dGuard_hits_1;
wire [1:0] _zz_PmpPlugin_dGuard_hits_1_1;
reg [20:0] _zz_PmpPlugin_dGuard_hits_1_2;
wire [1:0] _zz_PmpPlugin_dGuard_hits_1_3;
reg [20:0] _zz_PmpPlugin_dGuard_hits_2;
wire [1:0] _zz_PmpPlugin_dGuard_hits_2_1;
reg [20:0] _zz_PmpPlugin_dGuard_hits_2_2;
wire [1:0] _zz_PmpPlugin_dGuard_hits_2_3;
reg [20:0] _zz_PmpPlugin_dGuard_hits_3;
wire [1:0] _zz_PmpPlugin_dGuard_hits_3_1;
reg [20:0] _zz_PmpPlugin_dGuard_hits_3_2;
wire [1:0] _zz_PmpPlugin_dGuard_hits_3_3;
wire [3:0] _zz__zz_DBusCachedPlugin_mmuBus_rsp_allowRead_1;
reg _zz_DBusCachedPlugin_mmuBus_rsp_allowRead_5;
wire [1:0] _zz_DBusCachedPlugin_mmuBus_rsp_allowRead_6;
wire [3:0] _zz__zz_DBusCachedPlugin_mmuBus_rsp_allowWrite_1;
reg _zz_DBusCachedPlugin_mmuBus_rsp_allowWrite_5;
wire [1:0] _zz_DBusCachedPlugin_mmuBus_rsp_allowWrite_6;
reg [20:0] _zz_PmpPlugin_iGuard_hits_0_1;
wire [1:0] _zz_PmpPlugin_iGuard_hits_0_2;
reg [20:0] _zz_PmpPlugin_iGuard_hits_0_3;
wire [1:0] _zz_PmpPlugin_iGuard_hits_0_4;
reg [20:0] _zz_PmpPlugin_iGuard_hits_1;
wire [1:0] _zz_PmpPlugin_iGuard_hits_1_1;
reg [20:0] _zz_PmpPlugin_iGuard_hits_1_2;
wire [1:0] _zz_PmpPlugin_iGuard_hits_1_3;
reg [20:0] _zz_PmpPlugin_iGuard_hits_2;
wire [1:0] _zz_PmpPlugin_iGuard_hits_2_1;
reg [20:0] _zz_PmpPlugin_iGuard_hits_2_2;
wire [1:0] _zz_PmpPlugin_iGuard_hits_2_3;
reg [20:0] _zz_PmpPlugin_iGuard_hits_3;
wire [1:0] _zz_PmpPlugin_iGuard_hits_3_1;
reg [20:0] _zz_PmpPlugin_iGuard_hits_3_2;
wire [1:0] _zz_PmpPlugin_iGuard_hits_3_3;
wire [3:0] _zz__zz_IBusCachedPlugin_mmuBus_rsp_allowExecute_1;
reg _zz_IBusCachedPlugin_mmuBus_rsp_allowExecute_5;
wire [1:0] _zz_IBusCachedPlugin_mmuBus_rsp_allowExecute_6;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_1;
wire _zz__zz_decode_IS_RS2_SIGNED_2;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_3;
wire _zz__zz_decode_IS_RS2_SIGNED_4;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_5;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_6;
wire _zz__zz_decode_IS_RS2_SIGNED_7;
wire _zz__zz_decode_IS_RS2_SIGNED_8;
wire [26:0] _zz__zz_decode_IS_RS2_SIGNED_9;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_10;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_11;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_12;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_13;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_14;
wire _zz__zz_decode_IS_RS2_SIGNED_15;
wire _zz__zz_decode_IS_RS2_SIGNED_16;
wire _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 [31:0] _zz__zz_decode_IS_RS2_SIGNED_20;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_21;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_22;
wire [31: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 [22:0] _zz__zz_decode_IS_RS2_SIGNED_26;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_27;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_28;
wire _zz__zz_decode_IS_RS2_SIGNED_29;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_30;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_31;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_32;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_33;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_34;
wire [19:0] _zz__zz_decode_IS_RS2_SIGNED_35;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_36;
wire _zz__zz_decode_IS_RS2_SIGNED_37;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_38;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_39;
wire _zz__zz_decode_IS_RS2_SIGNED_40;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_41;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_42;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_43;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_44;
wire [31: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 [16:0] _zz__zz_decode_IS_RS2_SIGNED_48;
wire _zz__zz_decode_IS_RS2_SIGNED_49;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_50;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_51;
wire _zz__zz_decode_IS_RS2_SIGNED_52;
wire _zz__zz_decode_IS_RS2_SIGNED_53;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_54;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_55;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_56;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_57;
wire [3:0] _zz__zz_decode_IS_RS2_SIGNED_58;
wire _zz__zz_decode_IS_RS2_SIGNED_59;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_60;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_61;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_62;
wire _zz__zz_decode_IS_RS2_SIGNED_63;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_64;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_65;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_66;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_67;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_68;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_69;
wire _zz__zz_decode_IS_RS2_SIGNED_70;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_71;
wire _zz__zz_decode_IS_RS2_SIGNED_72;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_73;
wire [12:0] _zz__zz_decode_IS_RS2_SIGNED_74;
wire [4:0] _zz__zz_decode_IS_RS2_SIGNED_75;
wire _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 [31:0] _zz__zz_decode_IS_RS2_SIGNED_80;
wire [2: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 [0:0] _zz__zz_decode_IS_RS2_SIGNED_84;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_85;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_86;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_87;
wire _zz__zz_decode_IS_RS2_SIGNED_88;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_89;
wire [3:0] _zz__zz_decode_IS_RS2_SIGNED_90;
wire _zz__zz_decode_IS_RS2_SIGNED_91;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_92;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_93;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_94;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_95;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_96;
wire _zz__zz_decode_IS_RS2_SIGNED_97;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_98;
wire _zz__zz_decode_IS_RS2_SIGNED_99;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_100;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_101;
wire [6:0] _zz__zz_decode_IS_RS2_SIGNED_102;
wire [0: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 [4:0] _zz__zz_decode_IS_RS2_SIGNED_106;
wire _zz__zz_decode_IS_RS2_SIGNED_107;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_108;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_109;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_110;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_111;
wire [2:0] _zz__zz_decode_IS_RS2_SIGNED_112;
wire _zz__zz_decode_IS_RS2_SIGNED_113;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_114;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_115;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_116;
wire [9:0] _zz__zz_decode_IS_RS2_SIGNED_117;
wire _zz__zz_decode_IS_RS2_SIGNED_118;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_119;
wire [0: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 [0:0] _zz__zz_decode_IS_RS2_SIGNED_123;
wire [1:0] _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 [7:0] _zz__zz_decode_IS_RS2_SIGNED_127;
wire _zz__zz_decode_IS_RS2_SIGNED_128;
wire _zz__zz_decode_IS_RS2_SIGNED_129;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_130;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_131;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_132;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_133;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_134;
wire [5:0] _zz__zz_decode_IS_RS2_SIGNED_135;
wire _zz__zz_decode_IS_RS2_SIGNED_136;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_137;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_138;
wire [3:0] _zz__zz_decode_IS_RS2_SIGNED_139;
wire _zz__zz_decode_IS_RS2_SIGNED_140;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_141;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_142;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_143;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_144;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_145;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_146;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_147;
wire [3:0] _zz__zz_decode_IS_RS2_SIGNED_148;
wire _zz__zz_decode_IS_RS2_SIGNED_149;
wire _zz__zz_decode_IS_RS2_SIGNED_150;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_151;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_152;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_153;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_154;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_155;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_156;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_157;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_158;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_159;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_160;
wire [1:0] _zz__zz_decode_IS_RS2_SIGNED_161;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_162;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_163;
wire [0:0] _zz__zz_decode_IS_RS2_SIGNED_164;
wire [31:0] _zz__zz_decode_IS_RS2_SIGNED_165;
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_3;
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 [31:0] _zz_execute_SrcPlugin_addSub_5;
wire [31:0] _zz_execute_SrcPlugin_addSub_6;
wire [19:0] _zz__zz_execute_BRANCH_SRC22;
wire [11:0] _zz__zz_execute_BRANCH_SRC22_4;
wire [1:0] _zz__zz_CsrPlugin_exceptionPortCtrl_exceptionContext_code_1;
wire [1:0] _zz__zz_CsrPlugin_exceptionPortCtrl_exceptionContext_code_1_1;
wire [1:0] _zz__zz_CsrPlugin_exceptionPortCtrl_exceptionContext_code_3;
wire [1:0] _zz__zz_CsrPlugin_exceptionPortCtrl_exceptionContext_code_3_1;
wire _zz_when;
wire _zz_when_1;
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 [31:0] _zz_PmpPlugin_pmpaddr_port;
reg [7:0] _zz_when_PmpPlugin_l209;
wire [1:0] _zz_when_PmpPlugin_l209_1;
reg [7:0] _zz_when_PmpPlugin_l209_1_1;
wire [1:0] _zz_when_PmpPlugin_l209_1_2;
reg [7:0] _zz_when_PmpPlugin_l209_2;
wire [1:0] _zz_when_PmpPlugin_l209_2_1;
reg [7:0] _zz_when_PmpPlugin_l209_3;
wire [1:0] _zz_when_PmpPlugin_l209_3_1;
reg [7:0] _zz_when_PmpPlugin_l216;
wire [31:0] _zz_CsrPlugin_csrMapping_readDataInit_25;
reg [7:0] _zz_CsrPlugin_csrMapping_readDataSignal;
wire [1:0] _zz_CsrPlugin_csrMapping_readDataSignal_1;
reg [7:0] _zz_CsrPlugin_csrMapping_readDataSignal_2;
wire [1:0] _zz_CsrPlugin_csrMapping_readDataSignal_3;
reg [7:0] _zz_CsrPlugin_csrMapping_readDataSignal_4;
wire [1:0] _zz_CsrPlugin_csrMapping_readDataSignal_5;
reg [7:0] _zz_CsrPlugin_csrMapping_readDataSignal_6;
wire [1:0] _zz_CsrPlugin_csrMapping_readDataSignal_7;
wire [26:0] _zz_iBusWishbone_ADR_1;
reg _zz_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_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_CSR_READ_OPCODE;
wire decode_CSR_WRITE_OPCODE;
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] decode_BRANCH_CTRL;
wire [1:0] _zz_decode_BRANCH_CTRL;
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_LRSC;
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 decode_PREDICTION_CONTEXT_hazard;
wire decode_PREDICTION_CONTEXT_hit;
wire [19:0] decode_PREDICTION_CONTEXT_line_source;
wire [1:0] decode_PREDICTION_CONTEXT_line_branchWish;
wire [31:0] decode_PREDICTION_CONTEXT_line_target;
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_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] execute_NEXT_PC2;
wire execute_TARGET_MISSMATCH2;
wire execute_BRANCH_DO;
wire [31:0] execute_BRANCH_CALC;
wire [31:0] execute_BRANCH_SRC22;
wire [31:0] execute_PC;
(* keep , syn_keep *) wire [31:0] execute_RS1 /* synthesis syn_keep = 1 */ ;
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_SRC2;
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_2;
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_1;
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_LRSC;
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_AMO;
wire execute_MEMORY_LRSC;
wire execute_MEMORY_FORCE_CONSTISTENCY;
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_AMO;
wire decode_MEMORY_LRSC;
reg _zz_decode_MEMORY_FORCE_CONSTISTENCY;
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 [31:0] decode_INSTRUCTION;
wire execute_PREDICTION_CONTEXT_hazard;
wire execute_PREDICTION_CONTEXT_hit;
wire [19:0] execute_PREDICTION_CONTEXT_line_source;
wire [1:0] execute_PREDICTION_CONTEXT_line_branchWish;
wire [31:0] execute_PREDICTION_CONTEXT_line_target;
reg _zz_3;
reg [31:0] _zz_execute_to_memory_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;
wire 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;
wire 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;
wire 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;
reg IBusCachedPlugin_incomingInstruction;
wire IBusCachedPlugin_fetchPrediction_cmd_hadBranch;
wire [31:0] IBusCachedPlugin_fetchPrediction_cmd_targetPc;
wire IBusCachedPlugin_fetchPrediction_rsp_wasRight;
wire [31:0] IBusCachedPlugin_fetchPrediction_rsp_finalPc;
wire [31:0] IBusCachedPlugin_fetchPrediction_rsp_sourceLastWord;
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;
reg 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;
reg DBusCachedPlugin_mmuBus_rsp_allowRead;
reg 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;
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;
reg BranchPlugin_branchExceptionPort_valid;
wire [3:0] BranchPlugin_branchExceptionPort_payload_code;
wire [31:0] BranchPlugin_branchExceptionPort_payload_badAddr;
reg [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;
reg CsrPlugin_inWfi /* verilator public */ ;
wire 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;
wire CsrPlugin_forceMachineWire;
reg CsrPlugin_selfException_valid;
reg [3:0] CsrPlugin_selfException_payload_code;
wire [31:0] CsrPlugin_selfException_payload_badAddr;
wire CsrPlugin_allowInterrupts;
wire CsrPlugin_allowException;
wire CsrPlugin_allowEbreakException;
wire IBusCachedPlugin_externalFlush;
wire IBusCachedPlugin_jump_pcLoad_valid;
wire [31:0] IBusCachedPlugin_jump_pcLoad_payload;
wire [2:0] _zz_IBusCachedPlugin_jump_pcLoad_payload;
wire [2:0] _zz_IBusCachedPlugin_jump_pcLoad_payload_1;
wire _zz_IBusCachedPlugin_jump_pcLoad_payload_2;
wire _zz_IBusCachedPlugin_jump_pcLoad_payload_3;
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;
wire IBusCachedPlugin_fetchPc_pcRegPropagate;
reg IBusCachedPlugin_fetchPc_booted;
reg IBusCachedPlugin_fetchPc_inc;
wire when_Fetcher_l131;
wire IBusCachedPlugin_fetchPc_output_fire_1;
wire when_Fetcher_l131_1;
reg [31:0] IBusCachedPlugin_fetchPc_pc;
wire IBusCachedPlugin_fetchPc_predictionPcLoad_valid;
wire [31:0] IBusCachedPlugin_fetchPc_predictionPcLoad_payload;
wire IBusCachedPlugin_fetchPc_redo_valid;
wire [31:0] IBusCachedPlugin_fetchPc_redo_payload;
reg IBusCachedPlugin_fetchPc_flushed;
wire when_Fetcher_l158;
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 IBusCachedPlugin_iBusRsp_stages_0_output_m2sPipe_valid;
wire IBusCachedPlugin_iBusRsp_stages_0_output_m2sPipe_ready;
wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_output_m2sPipe_payload;
reg _zz_IBusCachedPlugin_iBusRsp_stages_0_output_m2sPipe_valid;
reg [31:0] _zz_IBusCachedPlugin_iBusRsp_stages_0_output_m2sPipe_payload;
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_l240;
wire when_Fetcher_l320;
reg IBusCachedPlugin_injector_nextPcCalc_valids_0;
wire when_Fetcher_l329;
reg IBusCachedPlugin_injector_nextPcCalc_valids_1;
wire when_Fetcher_l329_1;
reg IBusCachedPlugin_injector_nextPcCalc_valids_2;
wire when_Fetcher_l329_2;
reg IBusCachedPlugin_injector_nextPcCalc_valids_3;
wire when_Fetcher_l329_3;
reg IBusCachedPlugin_injector_nextPcCalc_valids_4;
wire when_Fetcher_l329_4;
wire IBusCachedPlugin_predictor_historyWriteDelayPatched_valid;
wire [9:0] IBusCachedPlugin_predictor_historyWriteDelayPatched_payload_address;
wire [19:0] IBusCachedPlugin_predictor_historyWriteDelayPatched_payload_data_source;
wire [1:0] IBusCachedPlugin_predictor_historyWriteDelayPatched_payload_data_branchWish;
wire [31:0] IBusCachedPlugin_predictor_historyWriteDelayPatched_payload_data_target;
reg IBusCachedPlugin_predictor_historyWrite_valid;
wire [9:0] IBusCachedPlugin_predictor_historyWrite_payload_address;
wire [19:0] IBusCachedPlugin_predictor_historyWrite_payload_data_source;
reg [1:0] IBusCachedPlugin_predictor_historyWrite_payload_data_branchWish;
wire [31:0] IBusCachedPlugin_predictor_historyWrite_payload_data_target;
reg IBusCachedPlugin_predictor_writeLast_valid;
reg [9:0] IBusCachedPlugin_predictor_writeLast_payload_address;
reg [19:0] IBusCachedPlugin_predictor_writeLast_payload_data_source;
reg [1:0] IBusCachedPlugin_predictor_writeLast_payload_data_branchWish;
reg [31:0] IBusCachedPlugin_predictor_writeLast_payload_data_target;
wire [29:0] _zz_IBusCachedPlugin_predictor_buffer_line_source;
wire [19:0] IBusCachedPlugin_predictor_buffer_line_source;
wire [1:0] IBusCachedPlugin_predictor_buffer_line_branchWish;
wire [31:0] IBusCachedPlugin_predictor_buffer_line_target;
wire [53:0] _zz_IBusCachedPlugin_predictor_buffer_line_source_1;
reg IBusCachedPlugin_predictor_buffer_pcCorrected;
wire IBusCachedPlugin_predictor_buffer_hazard;
reg [19:0] IBusCachedPlugin_predictor_line_source;
reg [1:0] IBusCachedPlugin_predictor_line_branchWish;
reg [31:0] IBusCachedPlugin_predictor_line_target;
reg IBusCachedPlugin_predictor_buffer_hazard_regNextWhen;
wire IBusCachedPlugin_predictor_hazard;
wire IBusCachedPlugin_predictor_hit;
wire IBusCachedPlugin_predictor_fetchContext_hazard;
wire IBusCachedPlugin_predictor_fetchContext_hit;
wire [19:0] IBusCachedPlugin_predictor_fetchContext_line_source;
wire [1:0] IBusCachedPlugin_predictor_fetchContext_line_branchWish;
wire [31:0] IBusCachedPlugin_predictor_fetchContext_line_target;
reg IBusCachedPlugin_predictor_iBusRspContext_hazard;
reg IBusCachedPlugin_predictor_iBusRspContext_hit;
reg [19:0] IBusCachedPlugin_predictor_iBusRspContext_line_source;
reg [1:0] IBusCachedPlugin_predictor_iBusRspContext_line_branchWish;
reg [31:0] IBusCachedPlugin_predictor_iBusRspContext_line_target;
wire IBusCachedPlugin_predictor_iBusRspContextOutput_hazard;
wire IBusCachedPlugin_predictor_iBusRspContextOutput_hit;
wire [19:0] IBusCachedPlugin_predictor_iBusRspContextOutput_line_source;
wire [1:0] IBusCachedPlugin_predictor_iBusRspContextOutput_line_branchWish;
wire [31:0] IBusCachedPlugin_predictor_iBusRspContextOutput_line_target;
wire IBusCachedPlugin_predictor_injectorContext_hazard;
wire IBusCachedPlugin_predictor_injectorContext_hit;
wire [19:0] IBusCachedPlugin_predictor_injectorContext_line_source;
wire [1:0] IBusCachedPlugin_predictor_injectorContext_line_branchWish;
wire [31:0] IBusCachedPlugin_predictor_injectorContext_line_target;
wire when_Fetcher_l596;
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;
wire [31:0] _zz_IBusCachedPlugin_rspCounter;
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_l239;
wire when_IBusCachedPlugin_l244;
wire when_IBusCachedPlugin_l250;
wire when_IBusCachedPlugin_l256;
wire when_IBusCachedPlugin_l267;
wire dataCache_io_mem_cmd_s2mPipe_valid;
reg dataCache_io_mem_cmd_s2mPipe_ready;
wire dataCache_io_mem_cmd_s2mPipe_payload_wr;
wire dataCache_io_mem_cmd_s2mPipe_payload_uncached;
wire [31:0] dataCache_io_mem_cmd_s2mPipe_payload_address;
wire [31:0] dataCache_io_mem_cmd_s2mPipe_payload_data;
wire [3:0] dataCache_io_mem_cmd_s2mPipe_payload_mask;
wire [2:0] dataCache_io_mem_cmd_s2mPipe_payload_size;
wire dataCache_io_mem_cmd_s2mPipe_payload_last;
reg dataCache_io_mem_cmd_rValid;
reg dataCache_io_mem_cmd_rData_wr;
reg dataCache_io_mem_cmd_rData_uncached;
reg [31:0] dataCache_io_mem_cmd_rData_address;
reg [31:0] dataCache_io_mem_cmd_rData_data;
reg [3:0] dataCache_io_mem_cmd_rData_mask;
reg [2:0] dataCache_io_mem_cmd_rData_size;
reg dataCache_io_mem_cmd_rData_last;
wire dataCache_io_mem_cmd_s2mPipe_m2sPipe_valid;
wire dataCache_io_mem_cmd_s2mPipe_m2sPipe_ready;
wire dataCache_io_mem_cmd_s2mPipe_m2sPipe_payload_wr;
wire dataCache_io_mem_cmd_s2mPipe_m2sPipe_payload_uncached;
wire [31:0] dataCache_io_mem_cmd_s2mPipe_m2sPipe_payload_address;
wire [31:0] dataCache_io_mem_cmd_s2mPipe_m2sPipe_payload_data;
wire [3:0] dataCache_io_mem_cmd_s2mPipe_m2sPipe_payload_mask;
wire [2:0] dataCache_io_mem_cmd_s2mPipe_m2sPipe_payload_size;
wire dataCache_io_mem_cmd_s2mPipe_m2sPipe_payload_last;
reg dataCache_io_mem_cmd_s2mPipe_rValid;
reg dataCache_io_mem_cmd_s2mPipe_rData_wr;
reg dataCache_io_mem_cmd_s2mPipe_rData_uncached;
reg [31:0] dataCache_io_mem_cmd_s2mPipe_rData_address;
reg [31:0] dataCache_io_mem_cmd_s2mPipe_rData_data;
reg [3:0] dataCache_io_mem_cmd_s2mPipe_rData_mask;
reg [2:0] dataCache_io_mem_cmd_s2mPipe_rData_size;
reg dataCache_io_mem_cmd_s2mPipe_rData_last;
wire when_Stream_l342;
wire [31:0] _zz_DBusCachedPlugin_rspCounter;
reg [31:0] DBusCachedPlugin_rspCounter;
wire when_DBusCachedPlugin_l307;
wire when_DBusCachedPlugin_l315;
wire [1:0] execute_DBusCachedPlugin_size;
reg [31:0] _zz_execute_MEMORY_STORE_DATA_RF;
wire dataCache_io_cpu_flush_isStall;
wire when_DBusCachedPlugin_l347;
wire when_DBusCachedPlugin_l363;
wire when_DBusCachedPlugin_l390;
wire when_DBusCachedPlugin_l442;