Skip to content

Does avenir support a program like my small modification to the hello example? #13

@jafingerhut

Description

@jafingerhut

I copied the directory synthesis/hello to a new synthesis/hello2 directory and modified the files target.p4 and fvs in my hello2 directory, as shown in the attached hello2.zip file.

I then ran the avenir command below, and was expecting that for a single table add to ipv4_fwd in abstract.p4, there would be 16 adds to my modified ipv4_fwd table in my target.p4 program, one for each of the 16 possible values of hdr.ivp4.ihl, but instead it seems to only create one such table entry, as shown below.

 ../avenir synth abstract.p4 target.p4 inserts.csv no_edits.csv fvs -b 1000 -e 10 -data inserts.csv -I1 includes -I2 includes -P4 -p --hint mask --cache-edits 1
solver child (pid 19370), exited with return code 0, exited
solver child (pid 19373), exited with return code 0, exited
Target operations:
ADD,ipv4_rewrite,hdr.ipv4.dstAddr ~ 0x0#32 ,0x0#48,0
ADD,ipv4_fwd,hdr.ipv4.dstAddr ~ 0x0#32 ,0x1#9,0

Is this a bug in avenir? A limitation based on some assumption in its design? Something else?

hello2.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions