-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnine_long_example.p4
3493 lines (3080 loc) · 113 KB
/
nine_long_example.p4
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
#include <core.p4>
#if __TARGET_TOFINO__ == 2
#include <t2na.p4>
#else
#include <tna.p4>
#endif
#define SENSOR_COUNT 1000
#define HISTORY_SIZE 5
// HEADERS AND TYPES ************************************************************
header ethernet_t {
bit<48> dstAddr;
bit<48> srcAddr;
bit<16> etherType;
}
header ipv4_t {
bit<4> version;
bit<4> ihl;
bit<8> diffserv;
bit<16> totalLen;
bit<16> identification;
bit<1> _reserved;
bit<1> dont_fragment;
bit<1> more_fragments;
bit<13> fragOffset;
bit<8> ttl;
bit<8> protocol;
bit<16> hdrChecksum;
bit<32> srcAddr;
bit<32> dstAddr;
}
header udp_t{
bit<16> srcPort;
bit<16> dstPort;
bit<16> len;
bit<16> csum;
}
header sensor_t {
bit<32> sensorId;
bit<32> sensorValue;
}
// #meta
struct ingress_metadata_t {
bit<32> historical_value;
bit<32> new_map;
bit<32> conj_value_1;
bit<32> disj_value_1;
bit<32> disj_map_1;
bit<32> upper_bound_1;
bit<32> conj_value_2;
bit<32> disj_value_2;
bit<32> disj_map_2;
bit<32> upper_bound_2;
bit<32> conj_value_3;
bit<32> disj_value_3;
bit<32> disj_map_3;
bit<32> upper_bound_3;
bit<32> conj_value_4;
bit<32> disj_value_4;
bit<32> disj_map_4;
bit<32> upper_bound_4;
bit<32> conj_value_5;
bit<32> disj_value_5;
bit<32> disj_map_5;
bit<32> upper_bound_5;
bit<32> conj_value_6;
bit<32> disj_value_6;
bit<32> disj_map_6;
bit<32> upper_bound_6;
bit<32> conj_value_7;
bit<32> disj_value_7;
bit<32> disj_map_7;
bit<32> upper_bound_7;
bit<32> conj_value_8;
bit<32> disj_value_8;
bit<32> disj_map_8;
bit<32> upper_bound_8;
bit<32> conj_value_9;
bit<32> disj_value_9;
bit<32> disj_map_9;
bit<32> upper_bound_9;
bit<32> disj_op_1;
bool disj_1;
bit<32> toCheck_1;
bit<32> sensorValue_copy_1;
bit<32> disj_op_2;
bool disj_2;
bit<32> toCheck_2;
bit<32> sensorValue_copy_2;
bit<32> disj_op_3;
bool disj_3;
bit<32> toCheck_3;
bit<32> sensorValue_copy_3;
bit<32> disj_op_4;
bool disj_4;
bit<32> toCheck_4;
bit<32> sensorValue_copy_4;
bit<32> disj_op_5;
bool disj_5;
bit<32> toCheck_5;
bit<32> sensorValue_copy_5;
bit<32> disj_op_6;
bool disj_6;
bit<32> toCheck_6;
bit<32> sensorValue_copy_6;
bit<32> disj_op_7;
bool disj_7;
bit<32> toCheck_7;
bit<32> sensorValue_copy_7;
bit<32> disj_op_8;
bool disj_8;
bit<32> toCheck_8;
bit<32> sensorValue_copy_8;
bit<32> disj_op_9;
bool disj_9;
bit<32> toCheck_9;
bit<32> sensorValue_copy_9;
bool summed_conj;
}
struct egress_metadata_t {
}
struct header_t {
ethernet_t ethernet;
ipv4_t ipv4;
udp_t udp;
sensor_t sensor;
}
// INGRESS ************************************************************
parser TofinoIngressParser(
packet_in pkt,
out header_t hdr,
out ingress_intrinsic_metadata_t ig_intr_md) {
state start {
pkt.extract(ig_intr_md);
transition select(ig_intr_md.resubmit_flag) {
0 : parse_port_metadata;
}
}
state parse_port_metadata {
#if __TARGET_TOFINO__ == 2
pkt.advance(192);
#else
pkt.advance(64);
#endif
transition accept;
}
}
parser TofinoEgressParser(
packet_in pkt,
out egress_intrinsic_metadata_t eg_intr_md) {
state start {
pkt.extract(eg_intr_md);
transition accept;
}
}
parser SwitchIngressParser(
packet_in pkt,
out header_t hdr,
out ingress_metadata_t ig_md,
out ingress_intrinsic_metadata_t ig_intr_md) {
TofinoIngressParser() tofino_parser;
state start {
tofino_parser.apply(pkt, hdr, ig_intr_md);
transition parse_ethernet;
}
state parse_ethernet {
pkt.extract(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x800: parse_ipv4;
default: accept;
}
}
state parse_ipv4 {
pkt.extract(hdr.ipv4);
transition select(hdr.ipv4.protocol){
//6: parse_tcp;
17: parse_udp;
default: accept;
}
}
state parse_udp{
pkt.extract(hdr.udp);
pkt.extract(hdr.sensor);
transition accept;
}
}
control SwitchIngress(
inout header_t hdr,
inout ingress_metadata_t ig_md,
in ingress_intrinsic_metadata_t ig_intr_md,
in ingress_intrinsic_metadata_from_parser_t ig_prsr_md,
inout ingress_intrinsic_metadata_for_deparser_t ig_dprsr_md,
inout ingress_intrinsic_metadata_for_tm_t ig_tm_md) {
Register<bit<32>,bit<32>>(SENSOR_COUNT) map_register_1;
Register<bit<32>,bit<32>>(SENSOR_COUNT) map_register_2;
Register<bit<32>,bit<32>>(SENSOR_COUNT) map_register_3;
Register<bit<32>,bit<32>>(SENSOR_COUNT) map_register_4;
Register<bit<32>,bit<32>>(SENSOR_COUNT*2) disj_map_register_1;
Register<bit<32>,bit<32>>(SENSOR_COUNT*2) disj_map_register_2;
Register<bit<32>,bit<32>>(SENSOR_COUNT*2) disj_map_register_3;
Register<bit<32>,bit<32>>(SENSOR_COUNT*2) disj_map_register_4;
Register<bit<32>,bit<32>>(SENSOR_COUNT*2) disj_map_register_5;
Register<bit<32>,bit<32>>(SENSOR_COUNT*2) disj_map_register_6;
Register<bit<32>,bit<32>>(SENSOR_COUNT*2) disj_map_register_7;
Register<bit<32>,bit<32>>(SENSOR_COUNT*2) disj_map_register_8;
Register<bit<32>,bit<32>>(SENSOR_COUNT*2) disj_map_register_9;
Hash<bit<32>>(HashAlgorithm_t.IDENTITY) identity_hash;
action copy1(){
ig_md.sensorValue_copy_1 = identity_hash.get(hdr.sensor.sensorValue);
ig_md.sensorValue_copy_2 = identity_hash.get(hdr.sensor.sensorValue);
ig_md.sensorValue_copy_3 = identity_hash.get(hdr.sensor.sensorValue);
ig_md.sensorValue_copy_4 = identity_hash.get(hdr.sensor.sensorValue);
ig_md.sensorValue_copy_5 = identity_hash.get(hdr.sensor.sensorValue);
ig_md.sensorValue_copy_6 = identity_hash.get(hdr.sensor.sensorValue);
ig_md.sensorValue_copy_7 = identity_hash.get(hdr.sensor.sensorValue);
ig_md.sensorValue_copy_8 = identity_hash.get(hdr.sensor.sensorValue);
ig_md.sensorValue_copy_9 = identity_hash.get(hdr.sensor.sensorValue);
}
table assign_data {
actions = { copy1; }
const default_action = copy1();
}
RegisterAction<bit<32>,_,bit<32>>(map_register_1) get_map_1 = {
void apply(inout bit<32> register_data, out bit<32> result){
result = register_data;
register_data = hdr.sensor.sensorValue;
}
};
RegisterAction<bit<32>,_,bit<32>>(map_register_2) get_map_2 = {
void apply(inout bit<32> register_data, out bit<32> result){
result = register_data;
register_data = ig_md.historical_value;
}
};
RegisterAction<bit<32>,_,bit<32>>(map_register_3) get_map_3 = {
void apply(inout bit<32> register_data, out bit<32> result){
result = register_data;
register_data = ig_md.historical_value;
}
};
RegisterAction<bit<32>,_,bit<32>>(map_register_4) get_map_4 = {
void apply(inout bit<32> register_data, out bit<32> result){
result = register_data;
register_data = ig_md.historical_value;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_1) set_disj_map_1_register_false = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data & ig_md.disj_map_1;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_1) set_disj_map_1_register_true = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data | ig_md.disj_map_1;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_2) set_disj_map_2_register_false = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data & ig_md.disj_map_2;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_2) set_disj_map_2_register_true = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data | ig_md.disj_map_2;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_3) set_disj_map_3_register_false = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data & ig_md.disj_map_3;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_3) set_disj_map_3_register_true = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data | ig_md.disj_map_3;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_4) set_disj_map_4_register_false = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data & ig_md.disj_map_4;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_4) set_disj_map_4_register_true = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data | ig_md.disj_map_4;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_5) set_disj_map_5_register_false = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data & ig_md.disj_map_5;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_5) set_disj_map_5_register_true = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data | ig_md.disj_map_5;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_6) set_disj_map_6_register_false = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data & ig_md.disj_map_6;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_6) set_disj_map_6_register_true = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data | ig_md.disj_map_6;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_7) set_disj_map_7_register_false = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data & ig_md.disj_map_7;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_7) set_disj_map_7_register_true = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data | ig_md.disj_map_7;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_8) set_disj_map_8_register_false = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data & ig_md.disj_map_8;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_8) set_disj_map_8_register_true = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data | ig_md.disj_map_8;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_9) set_disj_map_9_register_false = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data & ig_md.disj_map_9;
result = register_data;
}
};
RegisterAction<bit<32>,_,bit<32>>(disj_map_register_9) set_disj_map_9_register_true = {
void apply(inout bit<32> register_data, out bit<32> result){
register_data = register_data | ig_md.disj_map_9;
result = register_data;
}
};
Lpf<bit<32>, bit<32>>(size=SENSOR_COUNT) lpf_1;
bit<32> lpf_input;
bit<32> lpf_output_1;
action set_conj_value_1(bit<32> conj_v, bit<32> disj_v, bit<32> disj_op, bit<32> upper_bound){
ig_md.conj_value_1 = conj_v;
ig_md.disj_op_1 = disj_op;
ig_md.disj_value_1 = disj_v;
ig_md.upper_bound_1 = upper_bound;
}
table conj_table_1{
actions = {
set_conj_value_1;
}
key = {
hdr.sensor.sensorId: exact;
}
size = SENSOR_COUNT;
const default_action = set_conj_value_1(0,0,0,0);
const entries = {
{0} : set_conj_value_1(3,100,2,0);
{1} : set_conj_value_1(1,400,2,0);
}
}
action set_conj_value_2(bit<32> conj_v, bit<32> disj_v, bit<32> disj_op, bit<32> upper_bound){
ig_md.conj_value_2 = conj_v;
ig_md.disj_op_2 = disj_op;
ig_md.disj_value_2 = disj_v;
ig_md.upper_bound_2 = upper_bound;
}
table conj_table_2{
actions = {
set_conj_value_2;
}
key = {
hdr.sensor.sensorId: exact;
}
size = SENSOR_COUNT;
const default_action = set_conj_value_2(0,0,0,0);
const entries = {
{0} : set_conj_value_2(3,100,2,0);
{1} : set_conj_value_2(1,400,2,0);
}
}
action set_conj_value_3(bit<32> conj_v, bit<32> disj_v, bit<32> disj_op, bit<32> upper_bound){
ig_md.conj_value_3 = conj_v;
ig_md.disj_op_3 = disj_op;
ig_md.disj_value_3 = disj_v;
ig_md.upper_bound_3 = upper_bound;
}
table conj_table_3{
actions = {
set_conj_value_3;
}
key = {
hdr.sensor.sensorId: exact;
}
size = SENSOR_COUNT;
const default_action = set_conj_value_3(0,0,0,0);
const entries = {
{0} : set_conj_value_3(3,100,2,0);
{1} : set_conj_value_3(1,400,2,0);
}
}
action set_conj_value_4(bit<32> conj_v, bit<32> disj_v, bit<32> disj_op, bit<32> upper_bound){
ig_md.conj_value_4 = conj_v;
ig_md.disj_op_4 = disj_op;
ig_md.disj_value_4 = disj_v;
ig_md.upper_bound_4 = upper_bound;
}
table conj_table_4{
actions = {
set_conj_value_4;
}
key = {
hdr.sensor.sensorId: exact;
}
size = SENSOR_COUNT;
const default_action = set_conj_value_4(0,0,0,0);
const entries = {
{0} : set_conj_value_4(3,100,2,0);
{1} : set_conj_value_4(1,400,2,0);
}
}
action set_conj_value_5(bit<32> conj_v, bit<32> disj_v, bit<32> disj_op, bit<32> upper_bound){
ig_md.conj_value_5 = conj_v;
ig_md.disj_op_5 = disj_op;
ig_md.disj_value_5 = disj_v;
ig_md.upper_bound_5 = upper_bound;
}
table conj_table_5{
actions = {
set_conj_value_5;
}
key = {
hdr.sensor.sensorId: exact;
}
size = SENSOR_COUNT;
const default_action = set_conj_value_5(0,0,0,0);
const entries = {
{0} : set_conj_value_5(3,100,2,0);
{1} : set_conj_value_5(1,400,2,0);
}
}
action set_conj_value_6(bit<32> conj_v, bit<32> disj_v, bit<32> disj_op, bit<32> upper_bound){
ig_md.conj_value_6 = conj_v;
ig_md.disj_op_6 = disj_op;
ig_md.disj_value_6 = disj_v;
ig_md.upper_bound_6 = upper_bound;
}
table conj_table_6{
actions = {
set_conj_value_6;
}
key = {
hdr.sensor.sensorId: exact;
}
size = SENSOR_COUNT;
const default_action = set_conj_value_6(0,0,0,0);
const entries = {
{0} : set_conj_value_6(3,100,2,0);
{1} : set_conj_value_6(1,400,2,0);
}
}
action set_conj_value_7(bit<32> conj_v, bit<32> disj_v, bit<32> disj_op, bit<32> upper_bound){
ig_md.conj_value_7 = conj_v;
ig_md.disj_op_7 = disj_op;
ig_md.disj_value_7 = disj_v;
ig_md.upper_bound_7 = upper_bound;
}
table conj_table_7{
actions = {
set_conj_value_7;
}
key = {
hdr.sensor.sensorId: exact;
}
size = SENSOR_COUNT;
const default_action = set_conj_value_7(0,0,0,0);
const entries = {
{0} : set_conj_value_7(3,100,2,0);
{1} : set_conj_value_7(1,400,2,0);
}
}
action set_conj_value_8(bit<32> conj_v, bit<32> disj_v, bit<32> disj_op, bit<32> upper_bound){
ig_md.conj_value_8 = conj_v;
ig_md.disj_op_8 = disj_op;
ig_md.disj_value_8 = disj_v;
ig_md.upper_bound_8 = upper_bound;
}
table conj_table_8{
actions = {
set_conj_value_8;
}
key = {
hdr.sensor.sensorId: exact;
}
size = SENSOR_COUNT;
const default_action = set_conj_value_8(0,0,0,0);
const entries = {
{0} : set_conj_value_8(3,100,2,0);
{1} : set_conj_value_8(1,400,2,0);
}
}
action set_conj_value_9(bit<32> conj_v, bit<32> disj_v, bit<32> disj_op, bit<32> upper_bound){
ig_md.conj_value_9 = conj_v;
ig_md.disj_op_9 = disj_op;
ig_md.disj_value_9 = disj_v;
ig_md.upper_bound_9 = upper_bound;
}
table conj_table_9{
actions = {
set_conj_value_9;
}
key = {
hdr.sensor.sensorId: exact;
}
size = SENSOR_COUNT;
const default_action = set_conj_value_9(0,0,0,0);
const entries = {
{0} : set_conj_value_9(3,100,2,0);
{1} : set_conj_value_9(1,400,2,0);
}
}
action subtraction_1(){
ig_md.toCheck_1 = ig_md.disj_value_1 - ig_md.sensorValue_copy_1;
}
table subtract_table_1{
actions = {
subtraction_1;
}
key = {
ig_md.disj_op_1: exact;
}
size = 4;
const entries = {
{1} : subtraction_1();
{2} : subtraction_1();
{3} : subtraction_1();
{4} : subtraction_1();
}
}
action subtraction_upper_1(){
ig_md.upper_bound_1 = ig_md.upper_bound_1 - ig_md.sensorValue_copy_1;
}
table subtract_table_upper_1{
actions = {
subtraction_upper_1;
}
key = {
ig_md.disj_op_1: exact;
}
size = 1;
const entries = {
{5} : subtraction_upper_1();
}
}
action subtraction_2(){
ig_md.toCheck_2 = ig_md.disj_value_2 - ig_md.sensorValue_copy_2;
}
table subtract_table_2{
actions = {
subtraction_2;
}
key = {
ig_md.disj_op_2: exact;
}
size = 4;
const entries = {
{1} : subtraction_2();
{2} : subtraction_2();
{3} : subtraction_2();
{4} : subtraction_2();
}
}
action subtraction_upper_2(){
ig_md.upper_bound_2 = ig_md.upper_bound_2 - ig_md.sensorValue_copy_2;
}
table subtract_table_upper_2{
actions = {
subtraction_upper_2;
}
key = {
ig_md.disj_op_2: exact;
}
size = 1;
const entries = {
{5} : subtraction_upper_2();
}
}
action subtraction_3(){
ig_md.toCheck_3 = ig_md.disj_value_3 - ig_md.sensorValue_copy_3;
}
table subtract_table_3{
actions = {
subtraction_3;
}
key = {
ig_md.disj_op_3: exact;
}
size = 4;
const entries = {
{1} : subtraction_3();
{2} : subtraction_3();
{3} : subtraction_3();
{4} : subtraction_3();
}
}
action subtraction_upper_3(){
ig_md.upper_bound_3 = ig_md.upper_bound_3 - ig_md.sensorValue_copy_3;
}
table subtract_table_upper_3{
actions = {
subtraction_upper_3;
}
key = {
ig_md.disj_op_3: exact;
}
size = 1;
const entries = {
{5} : subtraction_upper_3();
}
}
action subtraction_4(){
ig_md.toCheck_4 = ig_md.disj_value_4 - ig_md.sensorValue_copy_4;
}
table subtract_table_4{
actions = {
subtraction_4;
}
key = {
ig_md.disj_op_4: exact;
}
size = 4;
const entries = {
{1} : subtraction_4();
{2} : subtraction_4();
{3} : subtraction_4();
{4} : subtraction_4();
}
}
action subtraction_upper_4(){
ig_md.upper_bound_4 = ig_md.upper_bound_4 - ig_md.sensorValue_copy_4;
}
table subtract_table_upper_4{
actions = {
subtraction_upper_4;
}
key = {
ig_md.disj_op_4: exact;
}
size = 1;
const entries = {
{5} : subtraction_upper_4();
}
}
action subtraction_5(){
ig_md.toCheck_5 = ig_md.disj_value_5 - ig_md.sensorValue_copy_5;
}
table subtract_table_5{
actions = {
subtraction_5;
}
key = {
ig_md.disj_op_5: exact;
}
size = 4;
const entries = {
{1} : subtraction_5();
{2} : subtraction_5();
{3} : subtraction_5();
{4} : subtraction_5();
}
}
action subtraction_upper_5(){
ig_md.upper_bound_5 = ig_md.upper_bound_5 - ig_md.sensorValue_copy_5;
}
table subtract_table_upper_5{
actions = {
subtraction_upper_5;
}
key = {
ig_md.disj_op_5: exact;
}
size = 1;
const entries = {
{5} : subtraction_upper_5();
}
}
action subtraction_6(){
ig_md.toCheck_6 = ig_md.disj_value_6 - ig_md.sensorValue_copy_6;
}
table subtract_table_6{
actions = {
subtraction_6;
}
key = {
ig_md.disj_op_6: exact;
}
size = 4;
const entries = {
{1} : subtraction_6();
{2} : subtraction_6();
{3} : subtraction_6();
{4} : subtraction_6();
}
}
action subtraction_upper_6(){
ig_md.upper_bound_6 = ig_md.upper_bound_6 - ig_md.sensorValue_copy_6;
}
table subtract_table_upper_6{
actions = {
subtraction_upper_6;
}
key = {
ig_md.disj_op_6: exact;
}
size = 1;
const entries = {
{5} : subtraction_upper_6();
}
}
action subtraction_7(){
ig_md.toCheck_7 = ig_md.disj_value_7 - ig_md.sensorValue_copy_7;
}
table subtract_table_7{
actions = {
subtraction_7;
}
key = {
ig_md.disj_op_7: exact;
}
size = 4;
const entries = {
{1} : subtraction_7();
{2} : subtraction_7();
{3} : subtraction_7();
{4} : subtraction_7();
}
}
action subtraction_upper_7(){
ig_md.upper_bound_7 = ig_md.upper_bound_7 - ig_md.sensorValue_copy_7;
}
table subtract_table_upper_7{
actions = {
subtraction_upper_7;
}
key = {
ig_md.disj_op_7: exact;
}
size = 1;
const entries = {
{5} : subtraction_upper_7();
}
}
action subtraction_8(){
ig_md.toCheck_8 = ig_md.disj_value_8 - ig_md.sensorValue_copy_8;
}
table subtract_table_8{
actions = {
subtraction_8;
}
key = {
ig_md.disj_op_8: exact;
}
size = 4;
const entries = {
{1} : subtraction_8();
{2} : subtraction_8();
{3} : subtraction_8();
{4} : subtraction_8();
}
}
action subtraction_upper_8(){
ig_md.upper_bound_8 = ig_md.upper_bound_8 - ig_md.sensorValue_copy_8;
}
table subtract_table_upper_8{
actions = {
subtraction_upper_8;
}
key = {
ig_md.disj_op_8: exact;
}
size = 1;
const entries = {
{5} : subtraction_upper_8();
}
}
action subtraction_9(){
ig_md.toCheck_9 = ig_md.disj_value_9 - ig_md.sensorValue_copy_9;
}
table subtract_table_9{
actions = {
subtraction_9;
}
key = {
ig_md.disj_op_9: exact;
}
size = 4;
const entries = {
{1} : subtraction_9();
{2} : subtraction_9();
{3} : subtraction_9();
{4} : subtraction_9();
}
}
action subtraction_upper_9(){
ig_md.upper_bound_9 = ig_md.upper_bound_9 - ig_md.sensorValue_copy_9;
}
table subtract_table_upper_9{
actions = {
subtraction_upper_9;
}
key = {
ig_md.disj_op_9: exact;
}
size = 1;
const entries = {
{5} : subtraction_upper_9();
}
}
action set_disj_1_true(){
ig_md.disj_1 = true;
}
action set_disj_1_false(){
ig_md.disj_1 = false;
}
action and_disj_1(bool upper){
ig_md.disj_1 = upper;
}
table eval_greater_disj_1{