p4fpga / p4fpga

P4-14/16 Bluespec Compiler
BSD 2-Clause "Simplified" License
83 stars 26 forks source link

how to use p4fpga compile p4 source program? #26

Open SStriver opened 7 years ago

SStriver commented 7 years ago

when i compile a p4 program then show:

root@ubuntu:/mnt/sda3/p4c/build# ./p4fpga -o 111 --p4-14 01-BigMatch.p4 terminate called after throwing an instance of 'Util::CompilerBug' what(): COMPILER BUG: ../lib/crash.cpp:226 Exiting with SIGSEGV

how to solve this problem?

blizzardplus commented 7 years ago

I am running into the same issue, is there a working example of a P4 code that can be compiled with p4fpga? Also, I am not sure if I am missing some parameters in the command line or my code can't be compiled using p4fpga, so a few examples or a tutorial would be useful.

mzj14 commented 7 years ago

So do I. A set of workable examples and explanations on makefiles would be highly appreciated.

blizzardplus commented 7 years ago

Unfortunately, it seems like this project is undermaintained...

zjuan22 commented 7 years ago

See an example into a Makefile of 09-l2forwarding example (https://github.com/hanw/p4fpga/blob/master/examples/09-l2forwarding/Makefile):

p4fpga -o generatedbsv --p4-14 -v --top4 Evaluator -Tfcontrol:1,fparser:1 $(P4FILE)

SStriver commented 7 years ago

@zjuan22 when make this example shows that: error: lookahead not handled yet Seems to be missing something. Can you tell me how to set up the environment in detail? Is there a tutorial?

zjuan22 commented 7 years ago

Hi @SStriver I don't found any tutorial about this. Are you compiled p4fpga with p4c, it seem that wasn't installed or you need to do a link of p4fpga binary file, it should be in the folder p4c/build.

hanw commented 7 years ago

Hi, guys, my sincere apology for not being able to keep up with the support requests for p4fpga. As suggested by @zjuan22 's academic advisor, I have created an email list using google group to manage the development activities, gather support requests and host discussions. Please join us at https://groups.google.com/forum/#!forum/p4fpga-dev Hopefully, with the help of an email list, we can scale up our capability to support this open source project by helping out each other.