-
Notifications
You must be signed in to change notification settings - Fork 0
/
ysys_chenxi.v
3247 lines (3237 loc) · 157 KB
/
ysys_chenxi.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
`define RANDOMIZE_DELAY 0
module cx_Pre_TOP(
input clock,
input reset,
input io_fs_ready,
output io_fs_valid,
output [63:0] io_fs_bits_PC,
output io_fs_bits_offset,
input io_imem_req_ready,
output io_imem_req_valid,
output [63:0] io_imem_req_bits_addr,
input io_br_taken,
input [63:0] io_br_target,
input [63:0] io_br_old_PC,
output [1:0] io_insts_sent_after_br
);
`ifdef RANDOMIZE_REG_INIT
reg [31:0] _RAND_0;
reg [63:0] _RAND_1;
reg [31:0] _RAND_2;
reg [63:0] _RAND_3;
reg [31:0] _RAND_4;
`endif // RANDOMIZE_REG_INIT
reg pre_ready_go; // @[Pre_TOP.scala 25:34]
wire _GEN_0 = io_fs_ready & io_fs_valid ? 1'h0 : pre_ready_go; // @[Pre_TOP.scala 27:48 Pre_TOP.scala 27:63 Pre_TOP.scala 25:34]
wire _GEN_1 = io_imem_req_ready | _GEN_0; // @[Pre_TOP.scala 26:48 Pre_TOP.scala 26:63]
reg [63:0] pre_pc; // @[Reg.scala 27:20]
reg buf_valid; // @[Pre_TOP.scala 71:28]
reg [63:0] buf_npc; // @[Reg.scala 27:20]
wire [63:0] seq_pc = pre_pc + 64'h4; // @[Pre_TOP.scala 38:26]
wire [63:0] nextpc = buf_valid ? buf_npc : seq_pc; // @[Mux.scala 98:16]
reg imem_req_r; // @[Pre_TOP.scala 41:29]
wire _GEN_3 = io_fs_ready | imem_req_r; // @[Pre_TOP.scala 44:28 Pre_TOP.scala 45:20 Pre_TOP.scala 41:29]
wire _GEN_4 = io_imem_req_ready ? 1'h0 : _GEN_3; // @[Pre_TOP.scala 42:29 Pre_TOP.scala 43:20]
wire [63:0] _io_imem_req_bits_addr_T_1 = nextpc & 64'hfffffffffffffff8; // @[Pre_TOP.scala 49:69]
wire [63:0] _T_3 = nextpc - io_br_old_PC; // @[Pre_TOP.scala 64:25]
wire [63:0] diff = {{2'd0}, _T_3[63:2]}; // @[Pre_TOP.scala 64:37]
wire [63:0] _insts_sent_after_br_T_2 = diff - 64'h1; // @[Pre_TOP.scala 66:46]
wire [63:0] _insts_sent_after_br_T_3 = diff > 64'h0 ? _insts_sent_after_br_T_2 : 64'h0; // @[Pre_TOP.scala 66:31]
wire [63:0] _insts_sent_after_br_T_4 = io_imem_req_ready ? diff : _insts_sent_after_br_T_3; // @[Pre_TOP.scala 65:31]
wire _GEN_6 = io_br_taken | buf_valid; // @[Pre_TOP.scala 76:45 Pre_TOP.scala 76:57 Pre_TOP.scala 71:28]
assign io_fs_valid = pre_ready_go; // @[Pre_TOP.scala 32:30]
assign io_fs_bits_PC = pre_pc; // @[Pre_TOP.scala 84:19]
assign io_fs_bits_offset = pre_pc[2]; // @[Pre_TOP.scala 85:32]
assign io_imem_req_valid = imem_req_r; // @[Pre_TOP.scala 48:29]
assign io_imem_req_bits_addr = nextpc >= 64'h80000000 ? _io_imem_req_bits_addr_T_1 : nextpc; // @[Pre_TOP.scala 49:35]
assign io_insts_sent_after_br = _insts_sent_after_br_T_4[1:0]; // @[Pre_TOP.scala 67:28]
always @(posedge clock) begin
if (reset) begin // @[Pre_TOP.scala 25:34]
pre_ready_go <= 1'h0; // @[Pre_TOP.scala 25:34]
end else begin
pre_ready_go <= _GEN_1;
end
if (reset) begin // @[Reg.scala 27:20]
pre_pc <= 64'h3ffffffc; // @[Reg.scala 27:20]
end else if (io_imem_req_ready) begin // @[Reg.scala 28:19]
if (buf_valid) begin // @[Mux.scala 98:16]
pre_pc <= buf_npc;
end else begin
pre_pc <= seq_pc;
end
end
if (reset) begin // @[Pre_TOP.scala 71:28]
buf_valid <= 1'h0; // @[Pre_TOP.scala 71:28]
end else if (buf_valid & io_imem_req_ready) begin // @[Pre_TOP.scala 74:45]
buf_valid <= 1'h0; // @[Pre_TOP.scala 74:57]
end else begin
buf_valid <= _GEN_6;
end
if (reset) begin // @[Reg.scala 27:20]
buf_npc <= 64'h0; // @[Reg.scala 27:20]
end else if (io_br_taken) begin // @[Reg.scala 28:19]
buf_npc <= io_br_target; // @[Reg.scala 28:23]
end
imem_req_r <= reset | _GEN_4; // @[Pre_TOP.scala 41:29 Pre_TOP.scala 41:29]
end
// Register and memory initialization
`ifdef RANDOMIZE_GARBAGE_ASSIGN
`define RANDOMIZE
`endif
`ifdef RANDOMIZE_INVALID_ASSIGN
`define RANDOMIZE
`endif
`ifdef RANDOMIZE_REG_INIT
`define RANDOMIZE
`endif
`ifdef RANDOMIZE_MEM_INIT
`define RANDOMIZE
`endif
`ifndef RANDOM
`define RANDOM $random
`endif
`ifdef RANDOMIZE_MEM_INIT
integer initvar;
`endif
`ifndef SYNTHESIS
`ifdef FIRRTL_BEFORE_INITIAL
`FIRRTL_BEFORE_INITIAL
`endif
initial begin
`ifdef RANDOMIZE
`ifdef INIT_RANDOM
`INIT_RANDOM
`endif
`ifndef VERILATOR
`ifdef RANDOMIZE_DELAY
#`RANDOMIZE_DELAY begin end
`else
#0.002 begin end
`endif
`endif
`ifdef RANDOMIZE_REG_INIT
_RAND_0 = {1{`RANDOM}};
pre_ready_go = _RAND_0[0:0];
_RAND_1 = {2{`RANDOM}};
pre_pc = _RAND_1[63:0];
_RAND_2 = {1{`RANDOM}};
buf_valid = _RAND_2[0:0];
_RAND_3 = {2{`RANDOM}};
buf_npc = _RAND_3[63:0];
_RAND_4 = {1{`RANDOM}};
imem_req_r = _RAND_4[0:0];
`endif // RANDOMIZE_REG_INIT
`endif // RANDOMIZE
end // initial
`ifdef FIRRTL_AFTER_INITIAL
`FIRRTL_AFTER_INITIAL
`endif
`endif // SYNTHESIS
endmodule
module cx_IF_TOP(
input clock,
input reset,
output io_pres_ready,
input io_pres_valid,
input [63:0] io_pres_bits_PC,
input io_pres_bits_offset,
input io_ds_ready,
output io_ds_valid,
output [63:0] io_ds_bits_PC,
output [31:0] io_ds_bits_inst,
input io_imem_resp_valid,
input [63:0] io_imem_resp_bits_data
);
`ifdef RANDOMIZE_REG_INIT
reg [63:0] _RAND_0;
reg [31:0] _RAND_1;
reg [31:0] _RAND_2;
reg [31:0] _RAND_3;
reg [31:0] _RAND_4;
`endif // RANDOMIZE_REG_INIT
wire _T = io_pres_valid & io_pres_ready; // @[IF_TOP.scala 19:92]
reg [63:0] from_pre_r_PC; // @[Reg.scala 27:20]
reg from_pre_r_offset; // @[Reg.scala 27:20]
reg fs_ready_go; // @[IF_TOP.scala 22:33]
wire _GEN_2 = io_ds_ready & io_ds_valid ? 1'h0 : fs_ready_go; // @[IF_TOP.scala 24:49 IF_TOP.scala 24:63 IF_TOP.scala 22:33]
wire _GEN_3 = io_imem_resp_valid | _GEN_2; // @[IF_TOP.scala 23:49 IF_TOP.scala 23:63]
reg fs_valid; // @[Reg.scala 27:20]
reg [31:0] io_ds_bits_inst_r; // @[Reg.scala 27:20]
assign io_pres_ready = ~fs_valid | fs_ready_go & io_ds_ready; // @[IF_TOP.scala 30:32]
assign io_ds_valid = fs_valid & fs_ready_go; // @[IF_TOP.scala 32:32]
assign io_ds_bits_PC = from_pre_r_PC; // @[IF_TOP.scala 37:19]
assign io_ds_bits_inst = io_ds_bits_inst_r; // @[IF_TOP.scala 36:21]
always @(posedge clock) begin
if (reset) begin // @[Reg.scala 27:20]
from_pre_r_PC <= 64'h0; // @[Reg.scala 27:20]
end else if (_T) begin // @[Reg.scala 28:19]
from_pre_r_PC <= io_pres_bits_PC; // @[Reg.scala 28:23]
end
if (reset) begin // @[Reg.scala 27:20]
from_pre_r_offset <= 1'h0; // @[Reg.scala 27:20]
end else if (_T) begin // @[Reg.scala 28:19]
from_pre_r_offset <= io_pres_bits_offset; // @[Reg.scala 28:23]
end
if (reset) begin // @[IF_TOP.scala 22:33]
fs_ready_go <= 1'h0; // @[IF_TOP.scala 22:33]
end else begin
fs_ready_go <= _GEN_3;
end
if (reset) begin // @[Reg.scala 27:20]
fs_valid <= 1'h0; // @[Reg.scala 27:20]
end else if (io_pres_ready) begin // @[Reg.scala 28:19]
fs_valid <= io_pres_valid; // @[Reg.scala 28:23]
end
if (reset) begin // @[Reg.scala 27:20]
io_ds_bits_inst_r <= 32'h0; // @[Reg.scala 27:20]
end else if (io_imem_resp_valid) begin // @[Reg.scala 28:19]
if (from_pre_r_offset) begin // @[IF_TOP.scala 35:23]
io_ds_bits_inst_r <= io_imem_resp_bits_data[63:32];
end else begin
io_ds_bits_inst_r <= io_imem_resp_bits_data[31:0];
end
end
end
// Register and memory initialization
`ifdef RANDOMIZE_GARBAGE_ASSIGN
`define RANDOMIZE
`endif
`ifdef RANDOMIZE_INVALID_ASSIGN
`define RANDOMIZE
`endif
`ifdef RANDOMIZE_REG_INIT
`define RANDOMIZE
`endif
`ifdef RANDOMIZE_MEM_INIT
`define RANDOMIZE
`endif
`ifndef RANDOM
`define RANDOM $random
`endif
`ifdef RANDOMIZE_MEM_INIT
integer initvar;
`endif
`ifndef SYNTHESIS
`ifdef FIRRTL_BEFORE_INITIAL
`FIRRTL_BEFORE_INITIAL
`endif
initial begin
`ifdef RANDOMIZE
`ifdef INIT_RANDOM
`INIT_RANDOM
`endif
`ifndef VERILATOR
`ifdef RANDOMIZE_DELAY
#`RANDOMIZE_DELAY begin end
`else
#0.002 begin end
`endif
`endif
`ifdef RANDOMIZE_REG_INIT
_RAND_0 = {2{`RANDOM}};
from_pre_r_PC = _RAND_0[63:0];
_RAND_1 = {1{`RANDOM}};
from_pre_r_offset = _RAND_1[0:0];
_RAND_2 = {1{`RANDOM}};
fs_ready_go = _RAND_2[0:0];
_RAND_3 = {1{`RANDOM}};
fs_valid = _RAND_3[0:0];
_RAND_4 = {1{`RANDOM}};
io_ds_bits_inst_r = _RAND_4[31:0];
`endif // RANDOMIZE_REG_INIT
`endif // RANDOMIZE
end // initial
`ifdef FIRRTL_AFTER_INITIAL
`FIRRTL_AFTER_INITIAL
`endif
`endif // SYNTHESIS
endmodule
module cx_RegFile(
input clock,
input [4:0] io_rs1_addr,
output [63:0] io_rs1_data,
input [4:0] io_rs2_addr,
output [63:0] io_rs2_data,
input [4:0] io_waddr,
input [63:0] io_wdata,
input io_wen
);
`ifdef RANDOMIZE_MEM_INIT
reg [63:0] _RAND_0;
`endif // RANDOMIZE_MEM_INIT
reg [63:0] regfile [0:31]; // @[RegFile.scala 20:22]
wire [63:0] regfile_io_rs1_data_MPORT_data; // @[RegFile.scala 20:22]
wire [4:0] regfile_io_rs1_data_MPORT_addr; // @[RegFile.scala 20:22]
wire [63:0] regfile_io_rs2_data_MPORT_data; // @[RegFile.scala 20:22]
wire [4:0] regfile_io_rs2_data_MPORT_addr; // @[RegFile.scala 20:22]
wire [63:0] regfile_MPORT_data; // @[RegFile.scala 20:22]
wire [4:0] regfile_MPORT_addr; // @[RegFile.scala 20:22]
wire regfile_MPORT_mask; // @[RegFile.scala 20:22]
wire regfile_MPORT_en; // @[RegFile.scala 20:22]
assign regfile_io_rs1_data_MPORT_addr = io_rs1_addr;
assign regfile_io_rs1_data_MPORT_data = regfile[regfile_io_rs1_data_MPORT_addr]; // @[RegFile.scala 20:22]
assign regfile_io_rs2_data_MPORT_addr = io_rs2_addr;
assign regfile_io_rs2_data_MPORT_data = regfile[regfile_io_rs2_data_MPORT_addr]; // @[RegFile.scala 20:22]
assign regfile_MPORT_data = io_wdata;
assign regfile_MPORT_addr = io_waddr;
assign regfile_MPORT_mask = 1'h1;
assign regfile_MPORT_en = io_wen;
assign io_rs1_data = io_rs1_addr != 5'h0 ? regfile_io_rs1_data_MPORT_data : 64'h0; // @[RegFile.scala 23:23]
assign io_rs2_data = io_rs2_addr != 5'h0 ? regfile_io_rs2_data_MPORT_data : 64'h0; // @[RegFile.scala 24:23]
always @(posedge clock) begin
if(regfile_MPORT_en & regfile_MPORT_mask) begin
regfile[regfile_MPORT_addr] <= regfile_MPORT_data; // @[RegFile.scala 20:22]
end
end
// Register and memory initialization
`ifdef RANDOMIZE_GARBAGE_ASSIGN
`define RANDOMIZE
`endif
`ifdef RANDOMIZE_INVALID_ASSIGN
`define RANDOMIZE
`endif
`ifdef RANDOMIZE_REG_INIT
`define RANDOMIZE
`endif
`ifdef RANDOMIZE_MEM_INIT
`define RANDOMIZE
`endif
`ifndef RANDOM
`define RANDOM $random
`endif
`ifdef RANDOMIZE_MEM_INIT
integer initvar;
`endif
`ifndef SYNTHESIS
`ifdef FIRRTL_BEFORE_INITIAL
`FIRRTL_BEFORE_INITIAL
`endif
initial begin
`ifdef RANDOMIZE
`ifdef INIT_RANDOM
`INIT_RANDOM
`endif
`ifndef VERILATOR
`ifdef RANDOMIZE_DELAY
#`RANDOMIZE_DELAY begin end
`else
#0.002 begin end
`endif
`endif
`ifdef RANDOMIZE_MEM_INIT
_RAND_0 = {2{`RANDOM}};
for (initvar = 0; initvar < 32; initvar = initvar+1)
regfile[initvar] = _RAND_0[63:0];
`endif // RANDOMIZE_MEM_INIT
`endif // RANDOMIZE
end // initial
`ifdef FIRRTL_AFTER_INITIAL
`FIRRTL_AFTER_INITIAL
`endif
`endif // SYNTHESIS
endmodule
module cx_ForwardUnit(
input clock,
input [4:0] io_rs1_addr,
input [4:0] io_rs2_addr,
input io_ws_res_rf_we,
input [4:0] io_ws_res_wr_addr,
input [63:0] io_ws_res_wr_data,
input [1:0] io_ws_res_wb_sel,
output [63:0] io_rs1_data,
output [63:0] io_rs2_data,
output io_wr_stall,
input io_es_res_rf_we,
input [4:0] io_es_res_wr_addr,
input [63:0] io_es_res_wr_data,
input [1:0] io_es_res_wb_sel,
input io_ms_res_rf_we,
input [4:0] io_ms_res_wr_addr,
input [63:0] io_ms_res_wr_data,
input [1:0] io_ms_res_wb_sel,
input io_ldrt
);
wire rf_clock; // @[Forward.scala 36:20]
wire [4:0] rf_io_rs1_addr; // @[Forward.scala 36:20]
wire [63:0] rf_io_rs1_data; // @[Forward.scala 36:20]
wire [4:0] rf_io_rs2_addr; // @[Forward.scala 36:20]
wire [63:0] rf_io_rs2_data; // @[Forward.scala 36:20]
wire [4:0] rf_io_waddr; // @[Forward.scala 36:20]
wire [63:0] rf_io_wdata; // @[Forward.scala 36:20]
wire rf_io_wen; // @[Forward.scala 36:20]
wire es_addr1 = io_es_res_wr_addr == io_rs1_addr; // @[Forward.scala 45:35]
wire es_addr2 = io_es_res_wr_addr == io_rs2_addr; // @[Forward.scala 46:35]
wire ms_addr1 = io_ms_res_wr_addr == io_rs1_addr; // @[Forward.scala 47:35]
wire ms_addr2 = io_ms_res_wr_addr == io_rs2_addr; // @[Forward.scala 48:35]
wire ws_addr1 = io_ws_res_wr_addr == io_rs1_addr; // @[Forward.scala 49:35]
wire ws_addr2 = io_ws_res_wr_addr == io_rs2_addr; // @[Forward.scala 50:35]
wire is_load = io_es_res_wb_sel == 2'h1; // @[Forward.scala 52:33]
wire _io_rs1_data_T_1 = ~is_load; // @[Forward.scala 54:38]
wire _io_rs1_data_T_2 = io_es_res_rf_we & es_addr1 & ~is_load; // @[Forward.scala 54:35]
wire _io_rs1_data_T_3 = io_ms_res_rf_we & ms_addr1; // @[Forward.scala 55:23]
wire _io_rs1_data_T_4 = io_ws_res_rf_we & ws_addr1; // @[Forward.scala 56:23]
wire [63:0] _io_rs1_data_T_5 = _io_rs1_data_T_4 ? io_ws_res_wr_data : rf_io_rs1_data; // @[Mux.scala 98:16]
wire [63:0] _io_rs1_data_T_6 = _io_rs1_data_T_3 ? io_ms_res_wr_data : _io_rs1_data_T_5; // @[Mux.scala 98:16]
wire _io_rs2_data_T_2 = io_es_res_rf_we & es_addr2 & _io_rs1_data_T_1; // @[Forward.scala 59:35]
wire _io_rs2_data_T_3 = io_ms_res_rf_we & ms_addr2; // @[Forward.scala 60:23]
wire _io_rs2_data_T_4 = io_ws_res_rf_we & ws_addr2; // @[Forward.scala 61:23]
wire [63:0] _io_rs2_data_T_5 = _io_rs2_data_T_4 ? io_ws_res_wr_data : rf_io_rs2_data; // @[Mux.scala 98:16]
wire [63:0] _io_rs2_data_T_6 = _io_rs2_data_T_3 ? io_ms_res_wr_data : _io_rs2_data_T_5; // @[Mux.scala 98:16]
wire _T = es_addr1 | es_addr2; // @[Forward.scala 66:44]
wire load_data_not_returned = (es_addr1 | es_addr2) & is_load & ~io_ldrt; // @[Forward.scala 66:68]
wire csrr_at_ws = io_ws_res_wb_sel == 2'h3; // @[Forward.scala 68:36]
wire _T_6 = ~csrr_at_ws; // @[Forward.scala 69:76]
wire is_csrr_es = _T & io_es_res_wb_sel == 2'h3 & ~csrr_at_ws; // @[Forward.scala 69:73]
wire is_csrr_ms = (ms_addr1 | ms_addr2) & io_ms_res_wb_sel == 2'h3 & _T_6; // @[Forward.scala 70:73]
wire csrr_stall = is_csrr_es | is_csrr_ms; // @[Forward.scala 79:33]
cx_RegFile rf ( // @[Forward.scala 36:20]
.clock(rf_clock),
.io_rs1_addr(rf_io_rs1_addr),
.io_rs1_data(rf_io_rs1_data),
.io_rs2_addr(rf_io_rs2_addr),
.io_rs2_data(rf_io_rs2_data),
.io_waddr(rf_io_waddr),
.io_wdata(rf_io_wdata),
.io_wen(rf_io_wen)
);
assign io_rs1_data = _io_rs1_data_T_2 ? io_es_res_wr_data : _io_rs1_data_T_6; // @[Mux.scala 98:16]
assign io_rs2_data = _io_rs2_data_T_2 ? io_es_res_wr_data : _io_rs2_data_T_6; // @[Mux.scala 98:16]
assign io_wr_stall = load_data_not_returned | csrr_stall; // @[Forward.scala 82:43]
assign rf_clock = clock;
assign rf_io_rs1_addr = io_rs1_addr; // @[Forward.scala 37:21]
assign rf_io_rs2_addr = io_rs2_addr; // @[Forward.scala 38:21]
assign rf_io_waddr = io_ws_res_wr_addr; // @[Forward.scala 40:21]
assign rf_io_wdata = io_ws_res_wr_data; // @[Forward.scala 41:21]
assign rf_io_wen = io_ws_res_rf_we; // @[Forward.scala 39:21]
endmodule
module cx_IDU(
input [31:0] io_inst,
output [3:0] io_ctrl_br_type,
output [1:0] io_ctrl_op1_sel,
output [1:0] io_ctrl_op2_sel,
output [5:0] io_ctrl_alu_op,
output [1:0] io_ctrl_wb_sel,
output io_ctrl_rf_wen,
output io_ctrl_mem_en,
output io_ctrl_mem_wr,
output [2:0] io_ctrl_mem_msk,
output [2:0] io_ctrl_csr_cmd
);
wire [31:0] _T = io_inst & 32'h707f; // @[Lookup.scala 31:38]
wire _T_1 = 32'h2003 == _T; // @[Lookup.scala 31:38]
wire _T_3 = 32'h3 == _T; // @[Lookup.scala 31:38]
wire _T_5 = 32'h4003 == _T; // @[Lookup.scala 31:38]
wire _T_7 = 32'h1003 == _T; // @[Lookup.scala 31:38]
wire _T_9 = 32'h5003 == _T; // @[Lookup.scala 31:38]
wire _T_11 = 32'h2023 == _T; // @[Lookup.scala 31:38]
wire _T_13 = 32'h23 == _T; // @[Lookup.scala 31:38]
wire _T_15 = 32'h1023 == _T; // @[Lookup.scala 31:38]
wire [31:0] _T_16 = io_inst & 32'h7f; // @[Lookup.scala 31:38]
wire _T_17 = 32'h17 == _T_16; // @[Lookup.scala 31:38]
wire _T_19 = 32'h37 == _T_16; // @[Lookup.scala 31:38]
wire _T_21 = 32'h13 == _T; // @[Lookup.scala 31:38]
wire _T_23 = 32'h7013 == _T; // @[Lookup.scala 31:38]
wire _T_25 = 32'h6013 == _T; // @[Lookup.scala 31:38]
wire _T_27 = 32'h4013 == _T; // @[Lookup.scala 31:38]
wire _T_29 = 32'h2013 == _T; // @[Lookup.scala 31:38]
wire _T_31 = 32'h3013 == _T; // @[Lookup.scala 31:38]
wire [31:0] _T_32 = io_inst & 32'hfc00707f; // @[Lookup.scala 31:38]
wire _T_33 = 32'h1013 == _T_32; // @[Lookup.scala 31:38]
wire _T_35 = 32'h40005013 == _T_32; // @[Lookup.scala 31:38]
wire _T_37 = 32'h5013 == _T_32; // @[Lookup.scala 31:38]
wire [31:0] _T_38 = io_inst & 32'hfe00707f; // @[Lookup.scala 31:38]
wire _T_39 = 32'h1033 == _T_38; // @[Lookup.scala 31:38]
wire _T_41 = 32'h33 == _T_38; // @[Lookup.scala 31:38]
wire _T_43 = 32'h40000033 == _T_38; // @[Lookup.scala 31:38]
wire _T_45 = 32'h2033 == _T_38; // @[Lookup.scala 31:38]
wire _T_47 = 32'h3033 == _T_38; // @[Lookup.scala 31:38]
wire _T_49 = 32'h7033 == _T_38; // @[Lookup.scala 31:38]
wire _T_51 = 32'h6033 == _T_38; // @[Lookup.scala 31:38]
wire _T_53 = 32'h4033 == _T_38; // @[Lookup.scala 31:38]
wire _T_55 = 32'h40005033 == _T_38; // @[Lookup.scala 31:38]
wire _T_57 = 32'h5033 == _T_38; // @[Lookup.scala 31:38]
wire _T_59 = 32'h6f == _T_16; // @[Lookup.scala 31:38]
wire _T_61 = 32'h67 == _T; // @[Lookup.scala 31:38]
wire _T_63 = 32'h63 == _T; // @[Lookup.scala 31:38]
wire _T_65 = 32'h1063 == _T; // @[Lookup.scala 31:38]
wire _T_67 = 32'h5063 == _T; // @[Lookup.scala 31:38]
wire _T_69 = 32'h7063 == _T; // @[Lookup.scala 31:38]
wire _T_71 = 32'h4063 == _T; // @[Lookup.scala 31:38]
wire _T_73 = 32'h6063 == _T; // @[Lookup.scala 31:38]
wire _T_75 = 32'h6003 == _T; // @[Lookup.scala 31:38]
wire _T_77 = 32'h3003 == _T; // @[Lookup.scala 31:38]
wire _T_79 = 32'h3023 == _T; // @[Lookup.scala 31:38]
wire _T_81 = 32'h1b == _T; // @[Lookup.scala 31:38]
wire _T_83 = 32'h101b == _T_38; // @[Lookup.scala 31:38]
wire _T_85 = 32'h501b == _T_38; // @[Lookup.scala 31:38]
wire _T_87 = 32'h4000501b == _T_38; // @[Lookup.scala 31:38]
wire _T_89 = 32'h3b == _T_38; // @[Lookup.scala 31:38]
wire _T_91 = 32'h4000003b == _T_38; // @[Lookup.scala 31:38]
wire _T_93 = 32'h103b == _T_38; // @[Lookup.scala 31:38]
wire _T_95 = 32'h503b == _T_38; // @[Lookup.scala 31:38]
wire _T_97 = 32'h4000503b == _T_38; // @[Lookup.scala 31:38]
wire _T_99 = 32'h5073 == _T; // @[Lookup.scala 31:38]
wire _T_101 = 32'h6073 == _T; // @[Lookup.scala 31:38]
wire _T_103 = 32'h7073 == _T; // @[Lookup.scala 31:38]
wire _T_105 = 32'h1073 == _T; // @[Lookup.scala 31:38]
wire _T_107 = 32'h2073 == _T; // @[Lookup.scala 31:38]
wire _T_109 = 32'h3073 == _T; // @[Lookup.scala 31:38]
wire _T_111 = 32'h73 == io_inst; // @[Lookup.scala 31:38]
wire _T_113 = 32'h30200073 == io_inst; // @[Lookup.scala 31:38]
wire _T_115 = 32'h100073 == io_inst; // @[Lookup.scala 31:38]
wire _T_117 = 32'h10500073 == io_inst; // @[Lookup.scala 31:38]
wire _T_119 = 32'h100f == _T; // @[Lookup.scala 31:38]
wire _T_121 = 32'hf == _T; // @[Lookup.scala 31:38]
wire _T_123 = 32'h200503b == _T_38; // @[Lookup.scala 31:38]
wire _T_125 = 32'h200703b == _T_38; // @[Lookup.scala 31:38]
wire [3:0] _T_214 = _T_73 ? 4'h6 : 4'h0; // @[Lookup.scala 33:37]
wire [3:0] _T_215 = _T_71 ? 4'h5 : _T_214; // @[Lookup.scala 33:37]
wire [3:0] _T_216 = _T_69 ? 4'h4 : _T_215; // @[Lookup.scala 33:37]
wire [3:0] _T_217 = _T_67 ? 4'h3 : _T_216; // @[Lookup.scala 33:37]
wire [3:0] _T_218 = _T_65 ? 4'h1 : _T_217; // @[Lookup.scala 33:37]
wire [3:0] _T_219 = _T_63 ? 4'h2 : _T_218; // @[Lookup.scala 33:37]
wire [3:0] _T_220 = _T_61 ? 4'h8 : _T_219; // @[Lookup.scala 33:37]
wire [3:0] _T_221 = _T_59 ? 4'h7 : _T_220; // @[Lookup.scala 33:37]
wire [3:0] _T_222 = _T_57 ? 4'h0 : _T_221; // @[Lookup.scala 33:37]
wire [3:0] _T_223 = _T_55 ? 4'h0 : _T_222; // @[Lookup.scala 33:37]
wire [3:0] _T_224 = _T_53 ? 4'h0 : _T_223; // @[Lookup.scala 33:37]
wire [3:0] _T_225 = _T_51 ? 4'h0 : _T_224; // @[Lookup.scala 33:37]
wire [3:0] _T_226 = _T_49 ? 4'h0 : _T_225; // @[Lookup.scala 33:37]
wire [3:0] _T_227 = _T_47 ? 4'h0 : _T_226; // @[Lookup.scala 33:37]
wire [3:0] _T_228 = _T_45 ? 4'h0 : _T_227; // @[Lookup.scala 33:37]
wire [3:0] _T_229 = _T_43 ? 4'h0 : _T_228; // @[Lookup.scala 33:37]
wire [3:0] _T_230 = _T_41 ? 4'h0 : _T_229; // @[Lookup.scala 33:37]
wire [3:0] _T_231 = _T_39 ? 4'h0 : _T_230; // @[Lookup.scala 33:37]
wire [3:0] _T_232 = _T_37 ? 4'h0 : _T_231; // @[Lookup.scala 33:37]
wire [3:0] _T_233 = _T_35 ? 4'h0 : _T_232; // @[Lookup.scala 33:37]
wire [3:0] _T_234 = _T_33 ? 4'h0 : _T_233; // @[Lookup.scala 33:37]
wire [3:0] _T_235 = _T_31 ? 4'h0 : _T_234; // @[Lookup.scala 33:37]
wire [3:0] _T_236 = _T_29 ? 4'h0 : _T_235; // @[Lookup.scala 33:37]
wire [3:0] _T_237 = _T_27 ? 4'h0 : _T_236; // @[Lookup.scala 33:37]
wire [3:0] _T_238 = _T_25 ? 4'h0 : _T_237; // @[Lookup.scala 33:37]
wire [3:0] _T_239 = _T_23 ? 4'h0 : _T_238; // @[Lookup.scala 33:37]
wire [3:0] _T_240 = _T_21 ? 4'h0 : _T_239; // @[Lookup.scala 33:37]
wire [3:0] _T_241 = _T_19 ? 4'h0 : _T_240; // @[Lookup.scala 33:37]
wire [3:0] _T_242 = _T_17 ? 4'h0 : _T_241; // @[Lookup.scala 33:37]
wire [3:0] _T_243 = _T_15 ? 4'h0 : _T_242; // @[Lookup.scala 33:37]
wire [3:0] _T_244 = _T_13 ? 4'h0 : _T_243; // @[Lookup.scala 33:37]
wire [3:0] _T_245 = _T_11 ? 4'h0 : _T_244; // @[Lookup.scala 33:37]
wire [3:0] _T_246 = _T_9 ? 4'h0 : _T_245; // @[Lookup.scala 33:37]
wire [3:0] _T_247 = _T_7 ? 4'h0 : _T_246; // @[Lookup.scala 33:37]
wire [3:0] _T_248 = _T_5 ? 4'h0 : _T_247; // @[Lookup.scala 33:37]
wire [3:0] _T_249 = _T_3 ? 4'h0 : _T_248; // @[Lookup.scala 33:37]
wire [1:0] _T_261 = _T_103 ? 2'h2 : 2'h0; // @[Lookup.scala 33:37]
wire [1:0] _T_262 = _T_101 ? 2'h2 : _T_261; // @[Lookup.scala 33:37]
wire [1:0] _T_263 = _T_99 ? 2'h2 : _T_262; // @[Lookup.scala 33:37]
wire [1:0] _T_264 = _T_97 ? 2'h0 : _T_263; // @[Lookup.scala 33:37]
wire [1:0] _T_265 = _T_95 ? 2'h0 : _T_264; // @[Lookup.scala 33:37]
wire [1:0] _T_266 = _T_93 ? 2'h0 : _T_265; // @[Lookup.scala 33:37]
wire [1:0] _T_267 = _T_91 ? 2'h0 : _T_266; // @[Lookup.scala 33:37]
wire [1:0] _T_268 = _T_89 ? 2'h0 : _T_267; // @[Lookup.scala 33:37]
wire [1:0] _T_269 = _T_87 ? 2'h0 : _T_268; // @[Lookup.scala 33:37]
wire [1:0] _T_270 = _T_85 ? 2'h0 : _T_269; // @[Lookup.scala 33:37]
wire [1:0] _T_271 = _T_83 ? 2'h0 : _T_270; // @[Lookup.scala 33:37]
wire [1:0] _T_272 = _T_81 ? 2'h0 : _T_271; // @[Lookup.scala 33:37]
wire [1:0] _T_273 = _T_79 ? 2'h0 : _T_272; // @[Lookup.scala 33:37]
wire [1:0] _T_274 = _T_77 ? 2'h0 : _T_273; // @[Lookup.scala 33:37]
wire [1:0] _T_275 = _T_75 ? 2'h0 : _T_274; // @[Lookup.scala 33:37]
wire [1:0] _T_276 = _T_73 ? 2'h0 : _T_275; // @[Lookup.scala 33:37]
wire [1:0] _T_277 = _T_71 ? 2'h0 : _T_276; // @[Lookup.scala 33:37]
wire [1:0] _T_278 = _T_69 ? 2'h0 : _T_277; // @[Lookup.scala 33:37]
wire [1:0] _T_279 = _T_67 ? 2'h0 : _T_278; // @[Lookup.scala 33:37]
wire [1:0] _T_280 = _T_65 ? 2'h0 : _T_279; // @[Lookup.scala 33:37]
wire [1:0] _T_281 = _T_63 ? 2'h0 : _T_280; // @[Lookup.scala 33:37]
wire [1:0] _T_282 = _T_61 ? 2'h0 : _T_281; // @[Lookup.scala 33:37]
wire [1:0] _T_283 = _T_59 ? 2'h0 : _T_282; // @[Lookup.scala 33:37]
wire [1:0] _T_284 = _T_57 ? 2'h0 : _T_283; // @[Lookup.scala 33:37]
wire [1:0] _T_285 = _T_55 ? 2'h0 : _T_284; // @[Lookup.scala 33:37]
wire [1:0] _T_286 = _T_53 ? 2'h0 : _T_285; // @[Lookup.scala 33:37]
wire [1:0] _T_287 = _T_51 ? 2'h0 : _T_286; // @[Lookup.scala 33:37]
wire [1:0] _T_288 = _T_49 ? 2'h0 : _T_287; // @[Lookup.scala 33:37]
wire [1:0] _T_289 = _T_47 ? 2'h0 : _T_288; // @[Lookup.scala 33:37]
wire [1:0] _T_290 = _T_45 ? 2'h0 : _T_289; // @[Lookup.scala 33:37]
wire [1:0] _T_291 = _T_43 ? 2'h0 : _T_290; // @[Lookup.scala 33:37]
wire [1:0] _T_292 = _T_41 ? 2'h0 : _T_291; // @[Lookup.scala 33:37]
wire [1:0] _T_293 = _T_39 ? 2'h0 : _T_292; // @[Lookup.scala 33:37]
wire [1:0] _T_294 = _T_37 ? 2'h0 : _T_293; // @[Lookup.scala 33:37]
wire [1:0] _T_295 = _T_35 ? 2'h0 : _T_294; // @[Lookup.scala 33:37]
wire [1:0] _T_296 = _T_33 ? 2'h0 : _T_295; // @[Lookup.scala 33:37]
wire [1:0] _T_297 = _T_31 ? 2'h0 : _T_296; // @[Lookup.scala 33:37]
wire [1:0] _T_298 = _T_29 ? 2'h0 : _T_297; // @[Lookup.scala 33:37]
wire [1:0] _T_299 = _T_27 ? 2'h0 : _T_298; // @[Lookup.scala 33:37]
wire [1:0] _T_300 = _T_25 ? 2'h0 : _T_299; // @[Lookup.scala 33:37]
wire [1:0] _T_301 = _T_23 ? 2'h0 : _T_300; // @[Lookup.scala 33:37]
wire [1:0] _T_302 = _T_21 ? 2'h0 : _T_301; // @[Lookup.scala 33:37]
wire [1:0] _T_303 = _T_19 ? 2'h1 : _T_302; // @[Lookup.scala 33:37]
wire [1:0] _T_304 = _T_17 ? 2'h1 : _T_303; // @[Lookup.scala 33:37]
wire [1:0] _T_305 = _T_15 ? 2'h0 : _T_304; // @[Lookup.scala 33:37]
wire [1:0] _T_306 = _T_13 ? 2'h0 : _T_305; // @[Lookup.scala 33:37]
wire [1:0] _T_307 = _T_11 ? 2'h0 : _T_306; // @[Lookup.scala 33:37]
wire [1:0] _T_308 = _T_9 ? 2'h0 : _T_307; // @[Lookup.scala 33:37]
wire [1:0] _T_309 = _T_7 ? 2'h0 : _T_308; // @[Lookup.scala 33:37]
wire [1:0] _T_310 = _T_5 ? 2'h0 : _T_309; // @[Lookup.scala 33:37]
wire [1:0] _T_311 = _T_3 ? 2'h0 : _T_310; // @[Lookup.scala 33:37]
wire [1:0] _T_331 = _T_87 ? 2'h1 : 2'h0; // @[Lookup.scala 33:37]
wire [1:0] _T_332 = _T_85 ? 2'h1 : _T_331; // @[Lookup.scala 33:37]
wire [1:0] _T_333 = _T_83 ? 2'h1 : _T_332; // @[Lookup.scala 33:37]
wire [1:0] _T_334 = _T_81 ? 2'h1 : _T_333; // @[Lookup.scala 33:37]
wire [1:0] _T_335 = _T_79 ? 2'h2 : _T_334; // @[Lookup.scala 33:37]
wire [1:0] _T_336 = _T_77 ? 2'h1 : _T_335; // @[Lookup.scala 33:37]
wire [1:0] _T_337 = _T_75 ? 2'h1 : _T_336; // @[Lookup.scala 33:37]
wire [1:0] _T_338 = _T_73 ? 2'h0 : _T_337; // @[Lookup.scala 33:37]
wire [1:0] _T_339 = _T_71 ? 2'h0 : _T_338; // @[Lookup.scala 33:37]
wire [1:0] _T_340 = _T_69 ? 2'h0 : _T_339; // @[Lookup.scala 33:37]
wire [1:0] _T_341 = _T_67 ? 2'h0 : _T_340; // @[Lookup.scala 33:37]
wire [1:0] _T_342 = _T_65 ? 2'h0 : _T_341; // @[Lookup.scala 33:37]
wire [1:0] _T_343 = _T_63 ? 2'h0 : _T_342; // @[Lookup.scala 33:37]
wire [1:0] _T_344 = _T_61 ? 2'h1 : _T_343; // @[Lookup.scala 33:37]
wire [1:0] _T_345 = _T_59 ? 2'h0 : _T_344; // @[Lookup.scala 33:37]
wire [1:0] _T_346 = _T_57 ? 2'h0 : _T_345; // @[Lookup.scala 33:37]
wire [1:0] _T_347 = _T_55 ? 2'h0 : _T_346; // @[Lookup.scala 33:37]
wire [1:0] _T_348 = _T_53 ? 2'h0 : _T_347; // @[Lookup.scala 33:37]
wire [1:0] _T_349 = _T_51 ? 2'h0 : _T_348; // @[Lookup.scala 33:37]
wire [1:0] _T_350 = _T_49 ? 2'h0 : _T_349; // @[Lookup.scala 33:37]
wire [1:0] _T_351 = _T_47 ? 2'h0 : _T_350; // @[Lookup.scala 33:37]
wire [1:0] _T_352 = _T_45 ? 2'h0 : _T_351; // @[Lookup.scala 33:37]
wire [1:0] _T_353 = _T_43 ? 2'h0 : _T_352; // @[Lookup.scala 33:37]
wire [1:0] _T_354 = _T_41 ? 2'h0 : _T_353; // @[Lookup.scala 33:37]
wire [1:0] _T_355 = _T_39 ? 2'h0 : _T_354; // @[Lookup.scala 33:37]
wire [1:0] _T_356 = _T_37 ? 2'h1 : _T_355; // @[Lookup.scala 33:37]
wire [1:0] _T_357 = _T_35 ? 2'h1 : _T_356; // @[Lookup.scala 33:37]
wire [1:0] _T_358 = _T_33 ? 2'h1 : _T_357; // @[Lookup.scala 33:37]
wire [1:0] _T_359 = _T_31 ? 2'h1 : _T_358; // @[Lookup.scala 33:37]
wire [1:0] _T_360 = _T_29 ? 2'h1 : _T_359; // @[Lookup.scala 33:37]
wire [1:0] _T_361 = _T_27 ? 2'h1 : _T_360; // @[Lookup.scala 33:37]
wire [1:0] _T_362 = _T_25 ? 2'h1 : _T_361; // @[Lookup.scala 33:37]
wire [1:0] _T_363 = _T_23 ? 2'h1 : _T_362; // @[Lookup.scala 33:37]
wire [1:0] _T_364 = _T_21 ? 2'h1 : _T_363; // @[Lookup.scala 33:37]
wire [1:0] _T_365 = _T_19 ? 2'h0 : _T_364; // @[Lookup.scala 33:37]
wire [1:0] _T_366 = _T_17 ? 2'h3 : _T_365; // @[Lookup.scala 33:37]
wire [1:0] _T_367 = _T_15 ? 2'h2 : _T_366; // @[Lookup.scala 33:37]
wire [1:0] _T_368 = _T_13 ? 2'h2 : _T_367; // @[Lookup.scala 33:37]
wire [1:0] _T_369 = _T_11 ? 2'h2 : _T_368; // @[Lookup.scala 33:37]
wire [1:0] _T_370 = _T_9 ? 2'h1 : _T_369; // @[Lookup.scala 33:37]
wire [1:0] _T_371 = _T_7 ? 2'h1 : _T_370; // @[Lookup.scala 33:37]
wire [1:0] _T_372 = _T_5 ? 2'h1 : _T_371; // @[Lookup.scala 33:37]
wire [1:0] _T_373 = _T_3 ? 2'h1 : _T_372; // @[Lookup.scala 33:37]
wire [5:0] _T_374 = _T_125 ? 6'h3e : 6'h0; // @[Lookup.scala 33:37]
wire [5:0] _T_375 = _T_123 ? 6'h3f : _T_374; // @[Lookup.scala 33:37]
wire [5:0] _T_376 = _T_121 ? 6'h0 : _T_375; // @[Lookup.scala 33:37]
wire [5:0] _T_377 = _T_119 ? 6'h0 : _T_376; // @[Lookup.scala 33:37]
wire [5:0] _T_378 = _T_117 ? 6'h0 : _T_377; // @[Lookup.scala 33:37]
wire [5:0] _T_379 = _T_115 ? 6'h0 : _T_378; // @[Lookup.scala 33:37]
wire [5:0] _T_380 = _T_113 ? 6'h0 : _T_379; // @[Lookup.scala 33:37]
wire [5:0] _T_381 = _T_111 ? 6'h0 : _T_380; // @[Lookup.scala 33:37]
wire [5:0] _T_382 = _T_109 ? 6'h8 : _T_381; // @[Lookup.scala 33:37]
wire [5:0] _T_383 = _T_107 ? 6'h8 : _T_382; // @[Lookup.scala 33:37]
wire [5:0] _T_384 = _T_105 ? 6'h8 : _T_383; // @[Lookup.scala 33:37]
wire [5:0] _T_385 = _T_103 ? 6'h8 : _T_384; // @[Lookup.scala 33:37]
wire [5:0] _T_386 = _T_101 ? 6'h8 : _T_385; // @[Lookup.scala 33:37]
wire [5:0] _T_387 = _T_99 ? 6'h8 : _T_386; // @[Lookup.scala 33:37]
wire [5:0] _T_388 = _T_97 ? 6'h26 : _T_387; // @[Lookup.scala 33:37]
wire [5:0] _T_389 = _T_95 ? 6'h25 : _T_388; // @[Lookup.scala 33:37]
wire [5:0] _T_390 = _T_93 ? 6'h24 : _T_389; // @[Lookup.scala 33:37]
wire [5:0] _T_391 = _T_91 ? 6'h30 : _T_390; // @[Lookup.scala 33:37]
wire [5:0] _T_392 = _T_89 ? 6'h20 : _T_391; // @[Lookup.scala 33:37]
wire [5:0] _T_393 = _T_87 ? 6'h26 : _T_392; // @[Lookup.scala 33:37]
wire [5:0] _T_394 = _T_85 ? 6'h25 : _T_393; // @[Lookup.scala 33:37]
wire [5:0] _T_395 = _T_83 ? 6'h24 : _T_394; // @[Lookup.scala 33:37]
wire [5:0] _T_396 = _T_81 ? 6'h20 : _T_395; // @[Lookup.scala 33:37]
wire [5:0] _T_397 = _T_79 ? 6'h0 : _T_396; // @[Lookup.scala 33:37]
wire [5:0] _T_398 = _T_77 ? 6'h0 : _T_397; // @[Lookup.scala 33:37]
wire [5:0] _T_399 = _T_75 ? 6'h0 : _T_398; // @[Lookup.scala 33:37]
wire [5:0] _T_400 = _T_73 ? 6'h12 : _T_399; // @[Lookup.scala 33:37]
wire [5:0] _T_401 = _T_71 ? 6'h11 : _T_400; // @[Lookup.scala 33:37]
wire [5:0] _T_402 = _T_69 ? 6'h12 : _T_401; // @[Lookup.scala 33:37]
wire [5:0] _T_403 = _T_67 ? 6'h11 : _T_402; // @[Lookup.scala 33:37]
wire [5:0] _T_404 = _T_65 ? 6'h10 : _T_403; // @[Lookup.scala 33:37]
wire [5:0] _T_405 = _T_63 ? 6'h10 : _T_404; // @[Lookup.scala 33:37]
wire [5:0] _T_406 = _T_61 ? 6'h0 : _T_405; // @[Lookup.scala 33:37]
wire [5:0] _T_407 = _T_59 ? 6'h0 : _T_406; // @[Lookup.scala 33:37]
wire [5:0] _T_408 = _T_57 ? 6'h5 : _T_407; // @[Lookup.scala 33:37]
wire [5:0] _T_409 = _T_55 ? 6'h6 : _T_408; // @[Lookup.scala 33:37]
wire [5:0] _T_410 = _T_53 ? 6'h1 : _T_409; // @[Lookup.scala 33:37]
wire [5:0] _T_411 = _T_51 ? 6'h2 : _T_410; // @[Lookup.scala 33:37]
wire [5:0] _T_412 = _T_49 ? 6'h3 : _T_411; // @[Lookup.scala 33:37]
wire [5:0] _T_413 = _T_47 ? 6'h12 : _T_412; // @[Lookup.scala 33:37]
wire [5:0] _T_414 = _T_45 ? 6'h11 : _T_413; // @[Lookup.scala 33:37]
wire [5:0] _T_415 = _T_43 ? 6'h10 : _T_414; // @[Lookup.scala 33:37]
wire [5:0] _T_416 = _T_41 ? 6'h0 : _T_415; // @[Lookup.scala 33:37]
wire [5:0] _T_417 = _T_39 ? 6'h4 : _T_416; // @[Lookup.scala 33:37]
wire [5:0] _T_418 = _T_37 ? 6'h5 : _T_417; // @[Lookup.scala 33:37]
wire [5:0] _T_419 = _T_35 ? 6'h6 : _T_418; // @[Lookup.scala 33:37]
wire [5:0] _T_420 = _T_33 ? 6'h4 : _T_419; // @[Lookup.scala 33:37]
wire [5:0] _T_421 = _T_31 ? 6'h12 : _T_420; // @[Lookup.scala 33:37]
wire [5:0] _T_422 = _T_29 ? 6'h11 : _T_421; // @[Lookup.scala 33:37]
wire [5:0] _T_423 = _T_27 ? 6'h1 : _T_422; // @[Lookup.scala 33:37]
wire [5:0] _T_424 = _T_25 ? 6'h2 : _T_423; // @[Lookup.scala 33:37]
wire [5:0] _T_425 = _T_23 ? 6'h3 : _T_424; // @[Lookup.scala 33:37]
wire [5:0] _T_426 = _T_21 ? 6'h0 : _T_425; // @[Lookup.scala 33:37]
wire [5:0] _T_427 = _T_19 ? 6'h8 : _T_426; // @[Lookup.scala 33:37]
wire [5:0] _T_428 = _T_17 ? 6'h0 : _T_427; // @[Lookup.scala 33:37]
wire [5:0] _T_429 = _T_15 ? 6'h0 : _T_428; // @[Lookup.scala 33:37]
wire [5:0] _T_430 = _T_13 ? 6'h0 : _T_429; // @[Lookup.scala 33:37]
wire [5:0] _T_431 = _T_11 ? 6'h0 : _T_430; // @[Lookup.scala 33:37]
wire [5:0] _T_432 = _T_9 ? 6'h0 : _T_431; // @[Lookup.scala 33:37]
wire [5:0] _T_433 = _T_7 ? 6'h0 : _T_432; // @[Lookup.scala 33:37]
wire [5:0] _T_434 = _T_5 ? 6'h0 : _T_433; // @[Lookup.scala 33:37]
wire [5:0] _T_435 = _T_3 ? 6'h0 : _T_434; // @[Lookup.scala 33:37]
wire [1:0] _T_444 = _T_109 ? 2'h3 : 2'h0; // @[Lookup.scala 33:37]
wire [1:0] _T_445 = _T_107 ? 2'h3 : _T_444; // @[Lookup.scala 33:37]
wire [1:0] _T_446 = _T_105 ? 2'h3 : _T_445; // @[Lookup.scala 33:37]
wire [1:0] _T_447 = _T_103 ? 2'h3 : _T_446; // @[Lookup.scala 33:37]
wire [1:0] _T_448 = _T_101 ? 2'h3 : _T_447; // @[Lookup.scala 33:37]
wire [1:0] _T_449 = _T_99 ? 2'h3 : _T_448; // @[Lookup.scala 33:37]
wire [1:0] _T_450 = _T_97 ? 2'h0 : _T_449; // @[Lookup.scala 33:37]
wire [1:0] _T_451 = _T_95 ? 2'h0 : _T_450; // @[Lookup.scala 33:37]
wire [1:0] _T_452 = _T_93 ? 2'h0 : _T_451; // @[Lookup.scala 33:37]
wire [1:0] _T_453 = _T_91 ? 2'h0 : _T_452; // @[Lookup.scala 33:37]
wire [1:0] _T_454 = _T_89 ? 2'h0 : _T_453; // @[Lookup.scala 33:37]
wire [1:0] _T_455 = _T_87 ? 2'h0 : _T_454; // @[Lookup.scala 33:37]
wire [1:0] _T_456 = _T_85 ? 2'h0 : _T_455; // @[Lookup.scala 33:37]
wire [1:0] _T_457 = _T_83 ? 2'h0 : _T_456; // @[Lookup.scala 33:37]
wire [1:0] _T_458 = _T_81 ? 2'h0 : _T_457; // @[Lookup.scala 33:37]
wire [1:0] _T_459 = _T_79 ? 2'h0 : _T_458; // @[Lookup.scala 33:37]
wire [1:0] _T_460 = _T_77 ? 2'h1 : _T_459; // @[Lookup.scala 33:37]
wire [1:0] _T_461 = _T_75 ? 2'h1 : _T_460; // @[Lookup.scala 33:37]
wire [1:0] _T_462 = _T_73 ? 2'h0 : _T_461; // @[Lookup.scala 33:37]
wire [1:0] _T_463 = _T_71 ? 2'h0 : _T_462; // @[Lookup.scala 33:37]
wire [1:0] _T_464 = _T_69 ? 2'h0 : _T_463; // @[Lookup.scala 33:37]
wire [1:0] _T_465 = _T_67 ? 2'h0 : _T_464; // @[Lookup.scala 33:37]
wire [1:0] _T_466 = _T_65 ? 2'h0 : _T_465; // @[Lookup.scala 33:37]
wire [1:0] _T_467 = _T_63 ? 2'h0 : _T_466; // @[Lookup.scala 33:37]
wire [1:0] _T_468 = _T_61 ? 2'h2 : _T_467; // @[Lookup.scala 33:37]
wire [1:0] _T_469 = _T_59 ? 2'h2 : _T_468; // @[Lookup.scala 33:37]
wire [1:0] _T_470 = _T_57 ? 2'h0 : _T_469; // @[Lookup.scala 33:37]
wire [1:0] _T_471 = _T_55 ? 2'h0 : _T_470; // @[Lookup.scala 33:37]
wire [1:0] _T_472 = _T_53 ? 2'h0 : _T_471; // @[Lookup.scala 33:37]
wire [1:0] _T_473 = _T_51 ? 2'h0 : _T_472; // @[Lookup.scala 33:37]
wire [1:0] _T_474 = _T_49 ? 2'h0 : _T_473; // @[Lookup.scala 33:37]
wire [1:0] _T_475 = _T_47 ? 2'h0 : _T_474; // @[Lookup.scala 33:37]
wire [1:0] _T_476 = _T_45 ? 2'h0 : _T_475; // @[Lookup.scala 33:37]
wire [1:0] _T_477 = _T_43 ? 2'h0 : _T_476; // @[Lookup.scala 33:37]
wire [1:0] _T_478 = _T_41 ? 2'h0 : _T_477; // @[Lookup.scala 33:37]
wire [1:0] _T_479 = _T_39 ? 2'h0 : _T_478; // @[Lookup.scala 33:37]
wire [1:0] _T_480 = _T_37 ? 2'h0 : _T_479; // @[Lookup.scala 33:37]
wire [1:0] _T_481 = _T_35 ? 2'h0 : _T_480; // @[Lookup.scala 33:37]
wire [1:0] _T_482 = _T_33 ? 2'h0 : _T_481; // @[Lookup.scala 33:37]
wire [1:0] _T_483 = _T_31 ? 2'h0 : _T_482; // @[Lookup.scala 33:37]
wire [1:0] _T_484 = _T_29 ? 2'h0 : _T_483; // @[Lookup.scala 33:37]
wire [1:0] _T_485 = _T_27 ? 2'h0 : _T_484; // @[Lookup.scala 33:37]
wire [1:0] _T_486 = _T_25 ? 2'h0 : _T_485; // @[Lookup.scala 33:37]
wire [1:0] _T_487 = _T_23 ? 2'h0 : _T_486; // @[Lookup.scala 33:37]
wire [1:0] _T_488 = _T_21 ? 2'h0 : _T_487; // @[Lookup.scala 33:37]
wire [1:0] _T_489 = _T_19 ? 2'h0 : _T_488; // @[Lookup.scala 33:37]
wire [1:0] _T_490 = _T_17 ? 2'h0 : _T_489; // @[Lookup.scala 33:37]
wire [1:0] _T_491 = _T_15 ? 2'h0 : _T_490; // @[Lookup.scala 33:37]
wire [1:0] _T_492 = _T_13 ? 2'h0 : _T_491; // @[Lookup.scala 33:37]
wire [1:0] _T_493 = _T_11 ? 2'h0 : _T_492; // @[Lookup.scala 33:37]
wire [1:0] _T_494 = _T_9 ? 2'h1 : _T_493; // @[Lookup.scala 33:37]
wire [1:0] _T_495 = _T_7 ? 2'h1 : _T_494; // @[Lookup.scala 33:37]
wire [1:0] _T_496 = _T_5 ? 2'h1 : _T_495; // @[Lookup.scala 33:37]
wire [1:0] _T_497 = _T_3 ? 2'h1 : _T_496; // @[Lookup.scala 33:37]
wire _T_500 = _T_121 ? 1'h0 : _T_123 | _T_125; // @[Lookup.scala 33:37]
wire _T_501 = _T_119 ? 1'h0 : _T_500; // @[Lookup.scala 33:37]
wire _T_502 = _T_117 ? 1'h0 : _T_501; // @[Lookup.scala 33:37]
wire _T_503 = _T_115 ? 1'h0 : _T_502; // @[Lookup.scala 33:37]
wire _T_504 = _T_113 ? 1'h0 : _T_503; // @[Lookup.scala 33:37]
wire _T_505 = _T_111 ? 1'h0 : _T_504; // @[Lookup.scala 33:37]
wire _T_521 = _T_79 ? 1'h0 : _T_81 | (_T_83 | (_T_85 | (_T_87 | (_T_89 | (_T_91 | (_T_93 | (_T_95 | (_T_97 | (_T_99
| (_T_101 | (_T_103 | (_T_105 | (_T_107 | (_T_109 | _T_505)))))))))))))); // @[Lookup.scala 33:37]
wire _T_524 = _T_73 ? 1'h0 : _T_75 | (_T_77 | _T_521); // @[Lookup.scala 33:37]
wire _T_525 = _T_71 ? 1'h0 : _T_524; // @[Lookup.scala 33:37]
wire _T_526 = _T_69 ? 1'h0 : _T_525; // @[Lookup.scala 33:37]
wire _T_527 = _T_67 ? 1'h0 : _T_526; // @[Lookup.scala 33:37]
wire _T_528 = _T_65 ? 1'h0 : _T_527; // @[Lookup.scala 33:37]
wire _T_529 = _T_63 ? 1'h0 : _T_528; // @[Lookup.scala 33:37]
wire _T_553 = _T_15 ? 1'h0 : _T_17 | (_T_19 | (_T_21 | (_T_23 | (_T_25 | (_T_27 | (_T_29 | (_T_31 | (_T_33 | (_T_35
| (_T_37 | (_T_39 | (_T_41 | (_T_43 | (_T_45 | (_T_47 | (_T_49 | (_T_51 | (_T_53 | (_T_55 | (_T_57 | (_T_59 | (
_T_61 | _T_529)))))))))))))))))))))); // @[Lookup.scala 33:37]
wire _T_554 = _T_13 ? 1'h0 : _T_553; // @[Lookup.scala 33:37]
wire _T_555 = _T_11 ? 1'h0 : _T_554; // @[Lookup.scala 33:37]
wire _T_563 = _T_119 ? 1'h0 : _T_121; // @[Lookup.scala 33:37]
wire _T_564 = _T_117 ? 1'h0 : _T_563; // @[Lookup.scala 33:37]
wire _T_565 = _T_115 ? 1'h0 : _T_564; // @[Lookup.scala 33:37]
wire _T_566 = _T_113 ? 1'h0 : _T_565; // @[Lookup.scala 33:37]
wire _T_567 = _T_111 ? 1'h0 : _T_566; // @[Lookup.scala 33:37]
wire _T_568 = _T_109 ? 1'h0 : _T_567; // @[Lookup.scala 33:37]
wire _T_569 = _T_107 ? 1'h0 : _T_568; // @[Lookup.scala 33:37]
wire _T_570 = _T_105 ? 1'h0 : _T_569; // @[Lookup.scala 33:37]
wire _T_571 = _T_103 ? 1'h0 : _T_570; // @[Lookup.scala 33:37]
wire _T_572 = _T_101 ? 1'h0 : _T_571; // @[Lookup.scala 33:37]
wire _T_573 = _T_99 ? 1'h0 : _T_572; // @[Lookup.scala 33:37]
wire _T_574 = _T_97 ? 1'h0 : _T_573; // @[Lookup.scala 33:37]
wire _T_575 = _T_95 ? 1'h0 : _T_574; // @[Lookup.scala 33:37]
wire _T_576 = _T_93 ? 1'h0 : _T_575; // @[Lookup.scala 33:37]
wire _T_577 = _T_91 ? 1'h0 : _T_576; // @[Lookup.scala 33:37]
wire _T_578 = _T_89 ? 1'h0 : _T_577; // @[Lookup.scala 33:37]
wire _T_579 = _T_87 ? 1'h0 : _T_578; // @[Lookup.scala 33:37]
wire _T_580 = _T_85 ? 1'h0 : _T_579; // @[Lookup.scala 33:37]
wire _T_581 = _T_83 ? 1'h0 : _T_580; // @[Lookup.scala 33:37]
wire _T_582 = _T_81 ? 1'h0 : _T_581; // @[Lookup.scala 33:37]
wire _T_586 = _T_73 ? 1'h0 : _T_75 | (_T_77 | (_T_79 | _T_582)); // @[Lookup.scala 33:37]
wire _T_587 = _T_71 ? 1'h0 : _T_586; // @[Lookup.scala 33:37]
wire _T_588 = _T_69 ? 1'h0 : _T_587; // @[Lookup.scala 33:37]
wire _T_589 = _T_67 ? 1'h0 : _T_588; // @[Lookup.scala 33:37]
wire _T_590 = _T_65 ? 1'h0 : _T_589; // @[Lookup.scala 33:37]
wire _T_591 = _T_63 ? 1'h0 : _T_590; // @[Lookup.scala 33:37]
wire _T_592 = _T_61 ? 1'h0 : _T_591; // @[Lookup.scala 33:37]
wire _T_593 = _T_59 ? 1'h0 : _T_592; // @[Lookup.scala 33:37]
wire _T_594 = _T_57 ? 1'h0 : _T_593; // @[Lookup.scala 33:37]
wire _T_595 = _T_55 ? 1'h0 : _T_594; // @[Lookup.scala 33:37]
wire _T_596 = _T_53 ? 1'h0 : _T_595; // @[Lookup.scala 33:37]
wire _T_597 = _T_51 ? 1'h0 : _T_596; // @[Lookup.scala 33:37]
wire _T_598 = _T_49 ? 1'h0 : _T_597; // @[Lookup.scala 33:37]
wire _T_599 = _T_47 ? 1'h0 : _T_598; // @[Lookup.scala 33:37]
wire _T_600 = _T_45 ? 1'h0 : _T_599; // @[Lookup.scala 33:37]
wire _T_601 = _T_43 ? 1'h0 : _T_600; // @[Lookup.scala 33:37]
wire _T_602 = _T_41 ? 1'h0 : _T_601; // @[Lookup.scala 33:37]
wire _T_603 = _T_39 ? 1'h0 : _T_602; // @[Lookup.scala 33:37]
wire _T_604 = _T_37 ? 1'h0 : _T_603; // @[Lookup.scala 33:37]
wire _T_605 = _T_35 ? 1'h0 : _T_604; // @[Lookup.scala 33:37]
wire _T_606 = _T_33 ? 1'h0 : _T_605; // @[Lookup.scala 33:37]
wire _T_607 = _T_31 ? 1'h0 : _T_606; // @[Lookup.scala 33:37]
wire _T_608 = _T_29 ? 1'h0 : _T_607; // @[Lookup.scala 33:37]
wire _T_609 = _T_27 ? 1'h0 : _T_608; // @[Lookup.scala 33:37]
wire _T_610 = _T_25 ? 1'h0 : _T_609; // @[Lookup.scala 33:37]
wire _T_611 = _T_23 ? 1'h0 : _T_610; // @[Lookup.scala 33:37]
wire _T_612 = _T_21 ? 1'h0 : _T_611; // @[Lookup.scala 33:37]
wire _T_613 = _T_19 ? 1'h0 : _T_612; // @[Lookup.scala 33:37]
wire _T_614 = _T_17 ? 1'h0 : _T_613; // @[Lookup.scala 33:37]
wire _T_646 = _T_77 ? 1'h0 : _T_79; // @[Lookup.scala 33:37]
wire _T_647 = _T_75 ? 1'h0 : _T_646; // @[Lookup.scala 33:37]
wire _T_648 = _T_73 ? 1'h0 : _T_647; // @[Lookup.scala 33:37]
wire _T_649 = _T_71 ? 1'h0 : _T_648; // @[Lookup.scala 33:37]
wire _T_650 = _T_69 ? 1'h0 : _T_649; // @[Lookup.scala 33:37]
wire _T_651 = _T_67 ? 1'h0 : _T_650; // @[Lookup.scala 33:37]
wire _T_652 = _T_65 ? 1'h0 : _T_651; // @[Lookup.scala 33:37]
wire _T_653 = _T_63 ? 1'h0 : _T_652; // @[Lookup.scala 33:37]
wire _T_654 = _T_61 ? 1'h0 : _T_653; // @[Lookup.scala 33:37]
wire _T_655 = _T_59 ? 1'h0 : _T_654; // @[Lookup.scala 33:37]
wire _T_656 = _T_57 ? 1'h0 : _T_655; // @[Lookup.scala 33:37]
wire _T_657 = _T_55 ? 1'h0 : _T_656; // @[Lookup.scala 33:37]
wire _T_658 = _T_53 ? 1'h0 : _T_657; // @[Lookup.scala 33:37]
wire _T_659 = _T_51 ? 1'h0 : _T_658; // @[Lookup.scala 33:37]
wire _T_660 = _T_49 ? 1'h0 : _T_659; // @[Lookup.scala 33:37]
wire _T_661 = _T_47 ? 1'h0 : _T_660; // @[Lookup.scala 33:37]
wire _T_662 = _T_45 ? 1'h0 : _T_661; // @[Lookup.scala 33:37]
wire _T_663 = _T_43 ? 1'h0 : _T_662; // @[Lookup.scala 33:37]
wire _T_664 = _T_41 ? 1'h0 : _T_663; // @[Lookup.scala 33:37]
wire _T_665 = _T_39 ? 1'h0 : _T_664; // @[Lookup.scala 33:37]
wire _T_666 = _T_37 ? 1'h0 : _T_665; // @[Lookup.scala 33:37]
wire _T_667 = _T_35 ? 1'h0 : _T_666; // @[Lookup.scala 33:37]
wire _T_668 = _T_33 ? 1'h0 : _T_667; // @[Lookup.scala 33:37]
wire _T_669 = _T_31 ? 1'h0 : _T_668; // @[Lookup.scala 33:37]
wire _T_670 = _T_29 ? 1'h0 : _T_669; // @[Lookup.scala 33:37]
wire _T_671 = _T_27 ? 1'h0 : _T_670; // @[Lookup.scala 33:37]
wire _T_672 = _T_25 ? 1'h0 : _T_671; // @[Lookup.scala 33:37]
wire _T_673 = _T_23 ? 1'h0 : _T_672; // @[Lookup.scala 33:37]
wire _T_674 = _T_21 ? 1'h0 : _T_673; // @[Lookup.scala 33:37]
wire _T_675 = _T_19 ? 1'h0 : _T_674; // @[Lookup.scala 33:37]
wire _T_676 = _T_17 ? 1'h0 : _T_675; // @[Lookup.scala 33:37]
wire _T_680 = _T_9 ? 1'h0 : _T_11 | (_T_13 | (_T_15 | _T_676)); // @[Lookup.scala 33:37]
wire _T_681 = _T_7 ? 1'h0 : _T_680; // @[Lookup.scala 33:37]
wire _T_682 = _T_5 ? 1'h0 : _T_681; // @[Lookup.scala 33:37]
wire _T_683 = _T_3 ? 1'h0 : _T_682; // @[Lookup.scala 33:37]
wire [2:0] _T_707 = _T_79 ? 3'h4 : 3'h0; // @[Lookup.scala 33:37]
wire [2:0] _T_708 = _T_77 ? 3'h4 : _T_707; // @[Lookup.scala 33:37]
wire [2:0] _T_709 = _T_75 ? 3'h7 : _T_708; // @[Lookup.scala 33:37]
wire [2:0] _T_710 = _T_73 ? 3'h0 : _T_709; // @[Lookup.scala 33:37]
wire [2:0] _T_711 = _T_71 ? 3'h0 : _T_710; // @[Lookup.scala 33:37]
wire [2:0] _T_712 = _T_69 ? 3'h0 : _T_711; // @[Lookup.scala 33:37]
wire [2:0] _T_713 = _T_67 ? 3'h0 : _T_712; // @[Lookup.scala 33:37]
wire [2:0] _T_714 = _T_65 ? 3'h0 : _T_713; // @[Lookup.scala 33:37]
wire [2:0] _T_715 = _T_63 ? 3'h0 : _T_714; // @[Lookup.scala 33:37]
wire [2:0] _T_716 = _T_61 ? 3'h0 : _T_715; // @[Lookup.scala 33:37]
wire [2:0] _T_717 = _T_59 ? 3'h0 : _T_716; // @[Lookup.scala 33:37]
wire [2:0] _T_718 = _T_57 ? 3'h0 : _T_717; // @[Lookup.scala 33:37]
wire [2:0] _T_719 = _T_55 ? 3'h0 : _T_718; // @[Lookup.scala 33:37]
wire [2:0] _T_720 = _T_53 ? 3'h0 : _T_719; // @[Lookup.scala 33:37]
wire [2:0] _T_721 = _T_51 ? 3'h0 : _T_720; // @[Lookup.scala 33:37]
wire [2:0] _T_722 = _T_49 ? 3'h0 : _T_721; // @[Lookup.scala 33:37]
wire [2:0] _T_723 = _T_47 ? 3'h0 : _T_722; // @[Lookup.scala 33:37]
wire [2:0] _T_724 = _T_45 ? 3'h0 : _T_723; // @[Lookup.scala 33:37]
wire [2:0] _T_725 = _T_43 ? 3'h0 : _T_724; // @[Lookup.scala 33:37]
wire [2:0] _T_726 = _T_41 ? 3'h0 : _T_725; // @[Lookup.scala 33:37]
wire [2:0] _T_727 = _T_39 ? 3'h0 : _T_726; // @[Lookup.scala 33:37]
wire [2:0] _T_728 = _T_37 ? 3'h0 : _T_727; // @[Lookup.scala 33:37]
wire [2:0] _T_729 = _T_35 ? 3'h0 : _T_728; // @[Lookup.scala 33:37]
wire [2:0] _T_730 = _T_33 ? 3'h0 : _T_729; // @[Lookup.scala 33:37]
wire [2:0] _T_731 = _T_31 ? 3'h0 : _T_730; // @[Lookup.scala 33:37]
wire [2:0] _T_732 = _T_29 ? 3'h0 : _T_731; // @[Lookup.scala 33:37]
wire [2:0] _T_733 = _T_27 ? 3'h0 : _T_732; // @[Lookup.scala 33:37]
wire [2:0] _T_734 = _T_25 ? 3'h0 : _T_733; // @[Lookup.scala 33:37]
wire [2:0] _T_735 = _T_23 ? 3'h0 : _T_734; // @[Lookup.scala 33:37]
wire [2:0] _T_736 = _T_21 ? 3'h0 : _T_735; // @[Lookup.scala 33:37]
wire [2:0] _T_737 = _T_19 ? 3'h0 : _T_736; // @[Lookup.scala 33:37]
wire [2:0] _T_738 = _T_17 ? 3'h0 : _T_737; // @[Lookup.scala 33:37]
wire [2:0] _T_739 = _T_15 ? 3'h2 : _T_738; // @[Lookup.scala 33:37]
wire [2:0] _T_740 = _T_13 ? 3'h1 : _T_739; // @[Lookup.scala 33:37]
wire [2:0] _T_741 = _T_11 ? 3'h3 : _T_740; // @[Lookup.scala 33:37]
wire [2:0] _T_742 = _T_9 ? 3'h6 : _T_741; // @[Lookup.scala 33:37]
wire [2:0] _T_743 = _T_7 ? 3'h2 : _T_742; // @[Lookup.scala 33:37]
wire [2:0] _T_744 = _T_5 ? 3'h5 : _T_743; // @[Lookup.scala 33:37]
wire [2:0] _T_745 = _T_3 ? 3'h1 : _T_744; // @[Lookup.scala 33:37]
wire [2:0] _T_751 = _T_115 ? 3'h6 : 3'h0; // @[Lookup.scala 33:37]
wire [2:0] _T_752 = _T_113 ? 3'h4 : _T_751; // @[Lookup.scala 33:37]
wire [2:0] _T_753 = _T_111 ? 3'h5 : _T_752; // @[Lookup.scala 33:37]
wire [2:0] _T_754 = _T_109 ? 3'h3 : _T_753; // @[Lookup.scala 33:37]
wire [2:0] _T_755 = _T_107 ? 3'h2 : _T_754; // @[Lookup.scala 33:37]
wire [2:0] _T_756 = _T_105 ? 3'h1 : _T_755; // @[Lookup.scala 33:37]
wire [2:0] _T_757 = _T_103 ? 3'h3 : _T_756; // @[Lookup.scala 33:37]
wire [2:0] _T_758 = _T_101 ? 3'h2 : _T_757; // @[Lookup.scala 33:37]
wire [2:0] _T_759 = _T_99 ? 3'h1 : _T_758; // @[Lookup.scala 33:37]
wire [2:0] _T_760 = _T_97 ? 3'h0 : _T_759; // @[Lookup.scala 33:37]
wire [2:0] _T_761 = _T_95 ? 3'h0 : _T_760; // @[Lookup.scala 33:37]
wire [2:0] _T_762 = _T_93 ? 3'h0 : _T_761; // @[Lookup.scala 33:37]
wire [2:0] _T_763 = _T_91 ? 3'h0 : _T_762; // @[Lookup.scala 33:37]
wire [2:0] _T_764 = _T_89 ? 3'h0 : _T_763; // @[Lookup.scala 33:37]
wire [2:0] _T_765 = _T_87 ? 3'h0 : _T_764; // @[Lookup.scala 33:37]
wire [2:0] _T_766 = _T_85 ? 3'h0 : _T_765; // @[Lookup.scala 33:37]
wire [2:0] _T_767 = _T_83 ? 3'h0 : _T_766; // @[Lookup.scala 33:37]
wire [2:0] _T_768 = _T_81 ? 3'h0 : _T_767; // @[Lookup.scala 33:37]
wire [2:0] _T_769 = _T_79 ? 3'h0 : _T_768; // @[Lookup.scala 33:37]
wire [2:0] _T_770 = _T_77 ? 3'h0 : _T_769; // @[Lookup.scala 33:37]
wire [2:0] _T_771 = _T_75 ? 3'h0 : _T_770; // @[Lookup.scala 33:37]
wire [2:0] _T_772 = _T_73 ? 3'h0 : _T_771; // @[Lookup.scala 33:37]
wire [2:0] _T_773 = _T_71 ? 3'h0 : _T_772; // @[Lookup.scala 33:37]
wire [2:0] _T_774 = _T_69 ? 3'h0 : _T_773; // @[Lookup.scala 33:37]
wire [2:0] _T_775 = _T_67 ? 3'h0 : _T_774; // @[Lookup.scala 33:37]
wire [2:0] _T_776 = _T_65 ? 3'h0 : _T_775; // @[Lookup.scala 33:37]
wire [2:0] _T_777 = _T_63 ? 3'h0 : _T_776; // @[Lookup.scala 33:37]
wire [2:0] _T_778 = _T_61 ? 3'h0 : _T_777; // @[Lookup.scala 33:37]
wire [2:0] _T_779 = _T_59 ? 3'h0 : _T_778; // @[Lookup.scala 33:37]
wire [2:0] _T_780 = _T_57 ? 3'h0 : _T_779; // @[Lookup.scala 33:37]
wire [2:0] _T_781 = _T_55 ? 3'h0 : _T_780; // @[Lookup.scala 33:37]
wire [2:0] _T_782 = _T_53 ? 3'h0 : _T_781; // @[Lookup.scala 33:37]
wire [2:0] _T_783 = _T_51 ? 3'h0 : _T_782; // @[Lookup.scala 33:37]
wire [2:0] _T_784 = _T_49 ? 3'h0 : _T_783; // @[Lookup.scala 33:37]
wire [2:0] _T_785 = _T_47 ? 3'h0 : _T_784; // @[Lookup.scala 33:37]
wire [2:0] _T_786 = _T_45 ? 3'h0 : _T_785; // @[Lookup.scala 33:37]
wire [2:0] _T_787 = _T_43 ? 3'h0 : _T_786; // @[Lookup.scala 33:37]
wire [2:0] _T_788 = _T_41 ? 3'h0 : _T_787; // @[Lookup.scala 33:37]
wire [2:0] _T_789 = _T_39 ? 3'h0 : _T_788; // @[Lookup.scala 33:37]
wire [2:0] _T_790 = _T_37 ? 3'h0 : _T_789; // @[Lookup.scala 33:37]
wire [2:0] _T_791 = _T_35 ? 3'h0 : _T_790; // @[Lookup.scala 33:37]
wire [2:0] _T_792 = _T_33 ? 3'h0 : _T_791; // @[Lookup.scala 33:37]
wire [2:0] _T_793 = _T_31 ? 3'h0 : _T_792; // @[Lookup.scala 33:37]
wire [2:0] _T_794 = _T_29 ? 3'h0 : _T_793; // @[Lookup.scala 33:37]
wire [2:0] _T_795 = _T_27 ? 3'h0 : _T_794; // @[Lookup.scala 33:37]
wire [2:0] _T_796 = _T_25 ? 3'h0 : _T_795; // @[Lookup.scala 33:37]
wire [2:0] _T_797 = _T_23 ? 3'h0 : _T_796; // @[Lookup.scala 33:37]
wire [2:0] _T_798 = _T_21 ? 3'h0 : _T_797; // @[Lookup.scala 33:37]
wire [2:0] _T_799 = _T_19 ? 3'h0 : _T_798; // @[Lookup.scala 33:37]
wire [2:0] _T_800 = _T_17 ? 3'h0 : _T_799; // @[Lookup.scala 33:37]
wire [2:0] _T_801 = _T_15 ? 3'h0 : _T_800; // @[Lookup.scala 33:37]
wire [2:0] _T_802 = _T_13 ? 3'h0 : _T_801; // @[Lookup.scala 33:37]
wire [2:0] _T_803 = _T_11 ? 3'h0 : _T_802; // @[Lookup.scala 33:37]
wire [2:0] _T_804 = _T_9 ? 3'h0 : _T_803; // @[Lookup.scala 33:37]
wire [2:0] _T_805 = _T_7 ? 3'h0 : _T_804; // @[Lookup.scala 33:37]
wire [2:0] _T_806 = _T_5 ? 3'h0 : _T_805; // @[Lookup.scala 33:37]
wire [2:0] _T_807 = _T_3 ? 3'h0 : _T_806; // @[Lookup.scala 33:37]
assign io_ctrl_br_type = _T_1 ? 4'h0 : _T_249; // @[Lookup.scala 33:37]
assign io_ctrl_op1_sel = _T_1 ? 2'h0 : _T_311; // @[Lookup.scala 33:37]
assign io_ctrl_op2_sel = _T_1 ? 2'h1 : _T_373; // @[Lookup.scala 33:37]
assign io_ctrl_alu_op = _T_1 ? 6'h0 : _T_435; // @[Lookup.scala 33:37]
assign io_ctrl_wb_sel = _T_1 ? 2'h1 : _T_497; // @[Lookup.scala 33:37]
assign io_ctrl_rf_wen = _T_1 | (_T_3 | (_T_5 | (_T_7 | (_T_9 | _T_555)))); // @[Lookup.scala 33:37]
assign io_ctrl_mem_en = _T_1 | (_T_3 | (_T_5 | (_T_7 | (_T_9 | (_T_11 | (_T_13 | (_T_15 | _T_614))))))); // @[Lookup.scala 33:37]
assign io_ctrl_mem_wr = _T_1 ? 1'h0 : _T_683; // @[Lookup.scala 33:37]
assign io_ctrl_mem_msk = _T_1 ? 3'h3 : _T_745; // @[Lookup.scala 33:37]
assign io_ctrl_csr_cmd = _T_1 ? 3'h0 : _T_807; // @[Lookup.scala 33:37]
endmodule
module cx_ID_TOP(
input clock,
input reset,
output io_fs_ready,
input io_fs_valid,
input [63:0] io_fs_bits_PC,
input [31:0] io_fs_bits_inst,
input io_es_ready,
output io_es_valid,
output [63:0] io_es_bits_PC,
output [31:0] io_es_bits_inst,
output [1:0] io_es_bits_decode_op1_sel,
output [1:0] io_es_bits_decode_op2_sel,
output [5:0] io_es_bits_decode_alu_op,
output [1:0] io_es_bits_decode_wb_sel,
output io_es_bits_decode_rf_wen,
output io_es_bits_decode_mem_en,
output io_es_bits_decode_mem_wr,
output [2:0] io_es_bits_decode_mem_msk,
output [2:0] io_es_bits_decode_csr_cmd,
output [63:0] io_es_bits_rs1_data,
output [63:0] io_es_bits_rs2_data,
input io_wb_rf_we,
input [4:0] io_wb_wr_addr,
input [63:0] io_wb_wr_data,
input [1:0] io_wb_wb_sel,
output io_br_taken,
output [63:0] io_br_target,
output [63:0] io_br_old_PC,
input [1:0] io_insts_sent_after_br,
input io_es_res_rf_we,
input [4:0] io_es_res_wr_addr,
input [63:0] io_es_res_wr_data,
input [1:0] io_es_res_wb_sel,
input io_ms_res_rf_we,
input [4:0] io_ms_res_wr_addr,
input [63:0] io_ms_res_wr_data,
input [1:0] io_ms_res_wb_sel,
input io_ldrt,
input [63:0] io_mepc,
input [63:0] io_exc_addr,
input io_exception
);
`ifdef RANDOMIZE_REG_INIT
reg [63:0] _RAND_0;
reg [31:0] _RAND_1;
reg [31:0] _RAND_2;
reg [31:0] _RAND_3;
reg [31:0] _RAND_4;
`endif // RANDOMIZE_REG_INIT
wire rf_clock; // @[ID_TOP.scala 32:20]
wire [4:0] rf_io_rs1_addr; // @[ID_TOP.scala 32:20]
wire [4:0] rf_io_rs2_addr; // @[ID_TOP.scala 32:20]
wire rf_io_ws_res_rf_we; // @[ID_TOP.scala 32:20]
wire [4:0] rf_io_ws_res_wr_addr; // @[ID_TOP.scala 32:20]
wire [63:0] rf_io_ws_res_wr_data; // @[ID_TOP.scala 32:20]
wire [1:0] rf_io_ws_res_wb_sel; // @[ID_TOP.scala 32:20]
wire [63:0] rf_io_rs1_data; // @[ID_TOP.scala 32:20]