Support for Tofino pipeconfs in ECMP app

Change-Id: I34c16f5f349c480f53b1bfc6a1fd91ec5a328ee3
diff --git a/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/logs/pa.results.log b/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/logs/pa.results.log
new file mode 100644
index 0000000..b15a782
--- /dev/null
+++ b/tools/test/p4src/p4-14/p4c-out/tofino/ecmp/mavericks/logs/pa.results.log
@@ -0,0 +1,234 @@
++---------------------------------------------------------------------+
+|  Log file: pa.results.log                                           |
+|  Compiler version: 5.1.0 (fca32d1)                                  |
+|  Created on: Thu Sep  7 14:48:49 2017                               |
++---------------------------------------------------------------------+
+
+Program: ecmp
+
+Allocation state: Final Allocation
+------------------------------------------------------------------------------
+|       PHV Group        | Containers Used |   Bits Used   | Bits Available |
+| (container bit widths) |     (% used)    |    (% used)   |                |
+------------------------------------------------------------------------------
+|         0 (32)         |    6 (37.50%)   |  192 (37.50%) |      512       |
+|         1 (32)         |    0 (0.00%)    |   0 (0.00%)   |      512       |
+|         2 (32)         |    0 (0.00%)    |   0 (0.00%)   |      512       |
+|         3 (32)         |    0 (0.00%)    |   0 (0.00%)   |      512       |
+|    Total for 32 bit    |    6 (9.38%)    |  192 (9.38%)  |      2048      |
+|                        |                 |               |                |
+|         4 (8)          |    6 (37.50%)   |  42 (32.81%)  |      128       |
+|         5 (8)          |    3 (18.75%)   |  22 (17.19%)  |      128       |
+|         6 (8)          |    0 (0.00%)    |   0 (0.00%)   |      128       |
+|         7 (8)          |    0 (0.00%)    |   0 (0.00%)   |      128       |
+|    Total for 8 bit     |    9 (14.06%)   |  64 (12.50%)  |      512       |
+|                        |                 |               |                |
+|         8 (16)         |    8 (50.00%)   |  121 (47.27%) |      256       |
+|         9 (16)         |    3 (18.75%)   |  48 (18.75%)  |      256       |
+|        10 (16)         |    0 (0.00%)    |   0 (0.00%)   |      256       |
+|        11 (16)         |    0 (0.00%)    |   0 (0.00%)   |      256       |
+|        12 (16)         |    0 (0.00%)    |   0 (0.00%)   |      256       |
+|        13 (16)         |    0 (0.00%)    |   0 (0.00%)   |      256       |
+|    Total for 16 bit    |   11 (11.46%)   |  169 (11.00%) |      1536      |
+|                        |                 |               |                |
+|       14 (32) T        |   12 (75.00%)   |  384 (75.00%) |      512       |
+|       15 (32) T        |    0 (0.00%)    |   0 (0.00%)   |      512       |
+|    Total for 32 bit    |   12 (37.50%)   |  384 (37.50%) |      1024      |
+|                        |                 |               |                |
+|        16 (8) T        |    9 (56.25%)   |  72 (56.25%)  |      128       |
+|        17 (8) T        |    0 (0.00%)    |   0 (0.00%)   |      128       |
+|    Total for 8 bit     |    9 (28.12%)   |  72 (28.12%)  |      256       |
+|                        |                 |               |                |
+|       18 (16) T        |   14 (87.50%)   |  224 (87.50%) |      256       |
+|       19 (16) T        |    0 (0.00%)    |   0 (0.00%)   |      256       |
+|       20 (16) T        |    0 (0.00%)    |   0 (0.00%)   |      256       |
+|    Total for 16 bit    |   14 (29.17%)   |  224 (29.17%) |      768       |
+|                        |                 |               |                |
+|       MAU total        |   26 (11.61%)   |  425 (10.38%) |      4096      |
+|     Tagalong total     |   35 (31.25%)   |  680 (33.20%) |      2048      |
+|     Overall total      |   61 (18.15%)   | 1105 (17.99%) |      6144      |
+------------------------------------------------------------------------------
+
+--------------------------------------------
+PHV Allocation
+--------------------------------------------
+
+Allocations in Group 0 32 bits
+  32-bit PHV 0 (ingress): phv0[31:0] = --pov_reserved--_0[31:0] (deparsed)
+  32-bit PHV 1 (ingress): phv1[31:24] = ipv4.protocol[7:0] (tagalong capable) (deparsed)
+  32-bit PHV 1 (ingress): phv1[23:8] = ipv4.hdrChecksum[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 1 (ingress): phv1[7:0] = ipv4.srcAddr[31:24] (deparsed)
+  32-bit PHV 2 (ingress): phv2[31:0] = ipv4.dstAddr[31:0] (deparsed)
+  32-bit PHV 3 (ingress): phv3[31:0] = ethernet.dstAddr[39:8] (deparsed)
+  32-bit PHV 4 (ingress): phv4[31:0] = ethernet.srcAddr[31:0] (deparsed)
+  32-bit PHV 5 (ingress): phv5[31:16] = udp.srcPort[15:0] (deparsed)
+  32-bit PHV 5 (ingress): phv5[15:0] = udp.dstPort[15:0] (deparsed)
+  >> 6 in ingress and 0 in egress
+
+Allocations in Group 4 8 bits
+  8-bit PHV 64 (ingress): phv64[7:1] = -pad-0-[6:0] (tagalong capable)
+  8-bit PHV 64 (ingress): phv64[0:0] = ig_intr_md_for_tm.copy_to_cpu[0:0] (deparsed)
+  8-bit PHV 65 (ingress): phv65[7:0] = ipv4.srcAddr[23:16] (deparsed)
+  8-bit PHV 66 (ingress): phv66[7:0] = ethernet.dstAddr[47:40] (deparsed)
+  8-bit PHV 67 (ingress): phv67[7:0] = ethernet.srcAddr[39:32] (deparsed)
+  8-bit PHV 68 (ingress): phv68[6:6] = --validity_check--metadata_bridge[0:0] (deparsed)
+  8-bit PHV 68 (ingress): phv68[5:5] = --validity_check--udp[0:0] (deparsed)
+  8-bit PHV 68 (ingress): phv68[4:4] = --validity_check--tcp[0:0] (deparsed)
+  8-bit PHV 68 (ingress): phv68[3:3] = --validity_check--ipv4[0:0] (deparsed)
+  8-bit PHV 68 (ingress): phv68[2:2] = --validity_check--ethernet[0:0] (deparsed)
+  8-bit PHV 68 (ingress): phv68[1:1] = --validity_check--packet_out_hdr[0:0] (deparsed)
+  8-bit PHV 68 (ingress): phv68[0:0] = --validity_check--packet_in_hdr[0:0] (deparsed)
+  8-bit PHV 69 (ingress): phv69[7:5] = ig_intr_md_for_tm.drop_ctl[2:0] (deparsed)
+  >> 6 in ingress and 0 in egress
+
+Allocations in Group 5 8 bits
+  8-bit PHV 80 (egress): phv80[7:1] = -pad-0-[6:0] (tagalong capable)
+  8-bit PHV 80 (egress): phv80[0:0] = ig_intr_md_for_tm.copy_to_cpu[0:0] (deparsed)
+  8-bit PHV 81 (egress): phv81[7:3] = eg_intr_md._pad7[4:0]
+  8-bit PHV 81 (egress): phv81[2:0] = eg_intr_md.egress_cos[2:0] (deparsed)
+  8-bit PHV 82 (egress): phv82[5:5] = --validity_check--udp[0:0] (deparsed)
+  8-bit PHV 82 (egress): phv82[4:4] = --validity_check--tcp[0:0] (deparsed)
+  8-bit PHV 82 (egress): phv82[3:3] = --validity_check--ipv4[0:0] (deparsed)
+  8-bit PHV 82 (egress): phv82[2:2] = --validity_check--ethernet[0:0] (deparsed)
+  8-bit PHV 82 (egress): phv82[1:1] = --validity_check--packet_out_hdr[0:0] (deparsed)
+  8-bit PHV 82 (egress): phv82[0:0] = --validity_check--packet_in_hdr[0:0] (deparsed)
+  >> 0 in ingress and 3 in egress
+
+Allocations in Group 8 16 bits
+  16-bit PHV 128 (ingress): phv128[15:15] = ig_intr_md.resubmit_flag[0:0] (deparsed)
+  16-bit PHV 128 (ingress): phv128[14:14] = ig_intr_md._pad1[0:0] (deparsed)
+  16-bit PHV 128 (ingress): phv128[13:12] = ig_intr_md._pad2[1:0] (deparsed)
+  16-bit PHV 128 (ingress): phv128[11:9] = ig_intr_md._pad3[2:0] (deparsed)
+  16-bit PHV 128 (ingress): phv128[8:0] = ig_intr_md.ingress_port[8:0] (deparsed)
+  16-bit PHV 129 (ingress): phv129[15:7] = packet_out_hdr.egress_port[8:0] (deparsed)
+  16-bit PHV 129 (ingress): phv129[15:7] = packet_in_hdr.ingress_port[8:0] (tagalong capable) (deparsed)
+  16-bit PHV 129 (ingress): phv129[6:0] = packet_out_hdr._padding[6:0] (tagalong capable) (deparsed)
+  16-bit PHV 129 (ingress): phv129[6:0] = packet_in_hdr._padding[6:0] (tagalong capable) (deparsed)
+  16-bit PHV 130 (ingress): phv130[8:0] = ig_intr_md_for_tm.ucast_egress_port[8:0] (deparsed)
+  16-bit PHV 131 (ingress): phv131[15:0] = ipv4.srcAddr[15:0] (deparsed)
+  16-bit PHV 132 (ingress): phv132[15:8] = ethernet.dstAddr[7:0] (deparsed)
+  16-bit PHV 132 (ingress): phv132[7:0] = ethernet.srcAddr[47:40] (deparsed)
+  16-bit PHV 133 (ingress): phv133[15:0] = ethernet.etherType[15:0] (deparsed)
+  16-bit PHV 134 (ingress): phv134[15:0] = ecmp_metadata.groupId[15:0]
+  16-bit PHV 135 (ingress): phv135[15:0] = ecmp_metadata.selector[15:0]
+  >> 8 in ingress and 0 in egress
+
+Allocations in Group 9 16 bits
+  16-bit PHV 144 (egress): phv144[15:9] = -pad-1-[6:0] (tagalong capable)
+  16-bit PHV 144 (egress): phv144[8:0] = ig_intr_md.ingress_port[8:0] (deparsed)
+  16-bit PHV 145 (egress): phv145[15:7] = packet_in_hdr.ingress_port[8:0] (deparsed)
+  16-bit PHV 145 (egress): phv145[6:0] = packet_in_hdr._padding[6:0] (tagalong capable) (deparsed)
+  16-bit PHV 146 (egress): phv146[15:9] = eg_intr_md._pad0[6:0]
+  16-bit PHV 146 (egress): phv146[8:0] = eg_intr_md.egress_port[8:0] (deparsed)
+  >> 0 in ingress and 3 in egress
+
+Allocations in Group 14 32 bits (tagalong)
+  32-bit PHV 256 (ingress): phv256[31:24] = ipv4.identification[7:0] (tagalong capable) (deparsed)
+  32-bit PHV 256 (ingress): phv256[23:21] = ipv4.flags[2:0] (tagalong capable) (deparsed)
+  32-bit PHV 256 (ingress): phv256[20:8] = ipv4.fragOffset[12:0] (tagalong capable) (deparsed)
+  32-bit PHV 256 (ingress): phv256[7:0] = ipv4.ttl[7:0] (tagalong capable) (deparsed)
+  32-bit PHV 257 (ingress): phv257[31:0] = tcp.ackNo[31:0] (tagalong capable) (deparsed)
+  32-bit PHV 258 (ingress): phv258[31:28] = tcp.dataOffset[3:0] (tagalong capable) (deparsed)
+  32-bit PHV 258 (ingress): phv258[27:25] = tcp.res[2:0] (tagalong capable) (deparsed)
+  32-bit PHV 258 (ingress): phv258[24:22] = tcp.ecn[2:0] (tagalong capable) (deparsed)
+  32-bit PHV 258 (ingress): phv258[21:16] = tcp.ctrl[5:0] (tagalong capable) (deparsed)
+  32-bit PHV 258 (ingress): phv258[15:0] = tcp.window[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 259 (ingress): phv259[31:16] = tcp.checksum[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 259 (ingress): phv259[15:0] = tcp.urgentPtr[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 260 (egress): phv260[31:24] = ipv4.ttl[7:0] (tagalong capable) (deparsed)
+  32-bit PHV 260 (egress): phv260[23:16] = ipv4.protocol[7:0] (tagalong capable) (deparsed)
+  32-bit PHV 260 (egress): phv260[15:0] = ipv4.hdrChecksum[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 261 (egress): phv261[31:0] = ipv4.srcAddr[31:0] (tagalong capable) (deparsed)
+  32-bit PHV 262 (egress): phv262[31:0] = ipv4.dstAddr[31:0] (tagalong capable) (deparsed)
+  32-bit PHV 263 (egress): phv263[31:0] = tcp.ackNo[31:0] (tagalong capable) (deparsed)
+  32-bit PHV 263 (egress): phv263[31:16] = udp.length_[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 263 (egress): phv263[15:0] = udp.checksum[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 264 (egress): phv264[31:28] = tcp.dataOffset[3:0] (tagalong capable) (deparsed)
+  32-bit PHV 264 (egress): phv264[27:25] = tcp.res[2:0] (tagalong capable) (deparsed)
+  32-bit PHV 264 (egress): phv264[24:22] = tcp.ecn[2:0] (tagalong capable) (deparsed)
+  32-bit PHV 264 (egress): phv264[21:16] = tcp.ctrl[5:0] (tagalong capable) (deparsed)
+  32-bit PHV 264 (egress): phv264[15:0] = tcp.window[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 265 (egress): phv265[31:16] = tcp.checksum[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 265 (egress): phv265[15:0] = tcp.urgentPtr[15:0] (tagalong capable) (deparsed)
+  32-bit PHV 266 (egress): phv266[31:0] = ethernet.dstAddr[39:8] (tagalong capable) (deparsed)
+  32-bit PHV 267 (egress): phv267[31:0] = ethernet.srcAddr[31:0] (tagalong capable) (deparsed)
+  >> 4 in ingress and 8 in egress
+
+Allocations in Group 16 8 bits (tagalong)
+  8-bit PHV 288 (ingress): phv288[7:4] = ipv4.version[3:0] (tagalong capable) (deparsed)
+  8-bit PHV 288 (ingress): phv288[3:0] = ipv4.ihl[3:0] (tagalong capable) (deparsed)
+  8-bit PHV 289 (ingress): phv289[7:0] = tcp.srcPort[15:8] (tagalong capable) (deparsed)
+  8-bit PHV 289 (ingress): phv289[7:0] = udp.length_[15:8] (tagalong capable) (deparsed)
+  8-bit PHV 290 (ingress): phv290[7:0] = tcp.srcPort[7:0] (tagalong capable) (deparsed)
+  8-bit PHV 290 (ingress): phv290[7:0] = udp.length_[7:0] (tagalong capable) (deparsed)
+  8-bit PHV 292 (egress): phv292[7:4] = ipv4.version[3:0] (tagalong capable) (deparsed)
+  8-bit PHV 292 (egress): phv292[3:0] = ipv4.ihl[3:0] (tagalong capable) (deparsed)
+  8-bit PHV 293 (egress): phv293[7:0] = ipv4.diffserv[7:0] (tagalong capable) (deparsed)
+  8-bit PHV 294 (egress): phv294[7:0] = tcp.srcPort[15:8] (tagalong capable) (deparsed)
+  8-bit PHV 294 (egress): phv294[7:0] = udp.srcPort[15:8] (tagalong capable) (deparsed)
+  8-bit PHV 295 (egress): phv295[7:0] = tcp.srcPort[7:0] (tagalong capable) (deparsed)
+  8-bit PHV 295 (egress): phv295[7:0] = udp.srcPort[7:0] (tagalong capable) (deparsed)
+  8-bit PHV 296 (egress): phv296[7:0] = ethernet.dstAddr[47:40] (tagalong capable) (deparsed)
+  8-bit PHV 297 (egress): phv297[7:0] = ethernet.srcAddr[39:32] (tagalong capable) (deparsed)
+  >> 3 in ingress and 6 in egress
+
+Allocations in Group 18 16 bits (tagalong)
+  16-bit PHV 320 (ingress): phv320[15:8] = ipv4.diffserv[7:0] (tagalong capable) (deparsed)
+  16-bit PHV 320 (ingress): phv320[7:0] = ipv4.totalLen[15:8] (tagalong capable) (deparsed)
+  16-bit PHV 321 (ingress): phv321[15:8] = ipv4.totalLen[7:0] (tagalong capable) (deparsed)
+  16-bit PHV 321 (ingress): phv321[7:0] = ipv4.identification[15:8] (tagalong capable) (deparsed)
+  16-bit PHV 322 (ingress): phv322[15:0] = tcp.dstPort[15:0] (tagalong capable) (deparsed)
+  16-bit PHV 322 (ingress): phv322[15:0] = udp.checksum[15:0] (tagalong capable) (deparsed)
+  16-bit PHV 323 (ingress): phv323[15:0] = tcp.seqNo[31:16] (tagalong capable) (deparsed)
+  16-bit PHV 324 (ingress): phv324[15:0] = tcp.seqNo[15:0] (tagalong capable) (deparsed)
+  16-bit PHV 326 (egress): phv326[15:0] = ipv4.totalLen[15:0] (tagalong capable) (deparsed)
+  16-bit PHV 327 (egress): phv327[15:0] = ipv4.identification[15:0] (tagalong capable) (deparsed)
+  16-bit PHV 328 (egress): phv328[15:13] = ipv4.flags[2:0] (tagalong capable) (deparsed)
+  16-bit PHV 328 (egress): phv328[12:0] = ipv4.fragOffset[12:0] (tagalong capable) (deparsed)
+  16-bit PHV 329 (egress): phv329[15:0] = tcp.dstPort[15:0] (tagalong capable) (deparsed)
+  16-bit PHV 329 (egress): phv329[15:0] = udp.dstPort[15:0] (tagalong capable) (deparsed)
+  16-bit PHV 330 (egress): phv330[15:0] = tcp.seqNo[31:16] (tagalong capable) (deparsed)
+  16-bit PHV 331 (egress): phv331[15:0] = tcp.seqNo[15:0] (tagalong capable) (deparsed)
+  16-bit PHV 332 (egress): phv332[15:8] = ethernet.dstAddr[7:0] (tagalong capable) (deparsed)
+  16-bit PHV 332 (egress): phv332[7:0] = ethernet.srcAddr[47:40] (tagalong capable) (deparsed)
+  16-bit PHV 333 (egress): phv333[15:0] = ethernet.etherType[15:0] (tagalong capable) (deparsed)
+  16-bit PHV 334 (egress): phv334[15:7] = packet_out_hdr.egress_port[8:0] (tagalong capable) (deparsed)
+  16-bit PHV 334 (egress): phv334[6:0] = packet_out_hdr._padding[6:0] (tagalong capable) (deparsed)
+  >> 5 in ingress and 9 in egress
+
+
+Final POV layout (ingress):
+ 32: --validity_check--packet_in_hdr (ingress) in container 68
+ 33: --validity_check--packet_out_hdr (ingress) in container 68
+ 34: --validity_check--ethernet (ingress) in container 68
+ 35: --validity_check--ipv4 (ingress) in container 68
+ 36: --validity_check--tcp (ingress) in container 68
+ 37: --validity_check--udp (ingress) in container 68
+ 38: --validity_check--metadata_bridge (ingress) in container 68
+
+Final POV layout (egress):
+  0: --validity_check--packet_in_hdr (egress) in container 82
+  1: --validity_check--packet_out_hdr (egress) in container 82
+  2: --validity_check--ethernet (egress) in container 82
+  3: --validity_check--ipv4 (egress) in container 82
+  4: --validity_check--tcp (egress) in container 82
+  5: --validity_check--udp (egress) in container 82
+
+--------------------------------------------
+   Bridged metadata layout (9 bytes)
+--------------------------------------------
+Final ingress layout:
+  -pad-0-[6:0]
+  ig_intr_md_for_tm.copy_to_cpu[0:0]
+  ig_intr_md.resubmit_flag[0:0]
+  ig_intr_md._pad1[0:0]
+  ig_intr_md._pad2[1:0]
+  ig_intr_md._pad3[2:0]
+  ig_intr_md.ingress_port[8:0]
+
+Final egress layout:
+  -pad-0-[6:0]
+  ig_intr_md_for_tm.copy_to_cpu[0:0]
+  -pad-1-[6:0]
+  ig_intr_md.ingress_port[8:0]
+