Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In BMv2, Translate architecture-dependent boolean parameter to JSON expression #4994

Conversation

rupesh-chiluka-marvell
Copy link
Contributor

@rupesh-chiluka-marvell rupesh-chiluka-marvell commented Nov 2, 2024

Tried to solve the bug mentioned in the issue: #4985.

} else if (PnaProgramStructure::isStandardMetadata(ptName)) { // check if its pna metadata
auto jsn = new Util::JsonObject();
// encode the metadata type and field in json
jsn->emplace("type"_cs, "field");
auto a = mkArrayField(jsn, "value"_cs);
a->append(ptName.exceptLast(2));
a->append(fieldName);
return jsn;

In the above code, If the parameter is part of architecture's standard metadata, it generates the JSON expression like:

"expression" : {
  "type" : "field",
  "value" : ["pna_main_input_metadata", "recirculated"]
}

Tried to tackle the case of a parameter being both architecture-dependent and a boolean.

…xpression

Signed-off-by: Rupesh Chiluka <rchiluka@marvell.com>
@rupesh-chiluka-marvell
Copy link
Contributor Author

Manually checked with both PSA and PNA example programs. Generated the JSON files as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant