Skip to content

P4 Compiler must invoke the assembler by default #54

@vgurevich

Description

@vgurevich

p4lang/p4c#5070 introduced a new command-line parameter designed to prevent the compiler driver from running the Tofino assembler (bfas) by default.

While @fruffy explained the technical reason behind it (bfas is not included in https://github.com/p4lang/p4c), it is critical to always run the assembler when compiling a P4 program for Tofino. Without doing it, it is not even possible to be sure that the program compiled successfully, since it is the assembler that checks that the compiler output can fit into the number of stages that is actually available on the device.

I recommend replacing the flag --enable-bf-asm with --disable-bf-asm and similarly replacing the environment variable ENABLE_BF_ASM with DISABLE_BF_ASM.

I know, this sounds like a compiler issue -- will be happy to move it to p4lang/p4c, but it definitely affects open-p4studio users a lot more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions