Giter Club home page Giter Club logo

Comments (2)

edgar-costa avatar edgar-costa commented on July 25, 2024 1

We do have the P4C class at https://github.com/nsg-ethz/p4-utils/blob/master/p4utils/utils/compiler.py

You should check where the P4C class is being used in the code and how you can change the p4_bin and opts to use your custom compiler.

If you are using the python interface, see examples that use network.py you can set the compiler options with : https://github.com/nsg-ethz/p4-utils/blob/master/p4utils/mininetlib/network_API.py#L950

Otherwise, you can use the compiler_module option to add your compiler. You can see the parsing code here:
https://github.com/nsg-ethz/p4-utils/blob/master/p4utils/p4run.py#L277

from p4-utils.

edgar-costa avatar edgar-costa commented on July 25, 2024 1

For the time being, if you do not manage to navigate the code you can simply modify this line (in your local code):

https://github.com/nsg-ethz/p4-utils/blob/master/p4utils/utils/compiler.py#L35

And replace p4c for p4c-bm2-ss, in the case you have different default compiler options than '--target bmv2 --arch v1model --std p4-16' you should also try to modify that.

I realized that with the p4app.json changing the compiler it has become a bit harder than before. When we find time we will try to make it simpler.

from p4-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.