chipmunk-project / chipmunk-tofino

12 stars 2 forks source link

Testing strategy for --target-tofino #18

Open taegyunkim opened 4 years ago

taegyunkim commented 4 years ago
  1. First define a common header file, probably in .h or using ProtocolBuffer, to capture StructAndPacket in sketch files and UDP packet definition in tofino-boilerplate.
  2. When converting .c file to .sk file in domino-compiler, use that header, and generate both .h (which should contain the spec function implementation using the common header file) and .sk files.
  3. Compile .sk file using iterative_solver --target-tofino.
  4. Modify the tofino-boilerplate's control plane program to link with modified .h file from step 2, and call the spec function for each packet and compare the output.