Skip to content

Commit

Permalink
Fix broken output text in Code Snippets
Browse files Browse the repository at this point in the history
Signed-off-by: Adarsh <[email protected]>
  • Loading branch information
AdarshRawat1 committed Oct 1, 2024
1 parent 6b5e688 commit 0b4df58
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backends/dpdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ To load the 'spec' file in dpdk follow the instructions in the
- Currently, programs written for DPDK target should limit the functionality in Ingress blocks, in case non empty Egress blocks are present it will be ignored by default unless Hidden temporary option `--enableEgress` used. When egress block support gets added to the DPDK target, and compiler can generate separate spec file for non empty ingress and egress blocks then option `--enableEgress` will be removed.
- DPDK architecture assumes the following signatures for programmable block of PSA. P4C-DPDK converts the input program to this form.

```P4
``` P4
parser IngressParser (packet_in buffer, out H parsed_hdr, inout M user_meta);
control Ingress (inout H hdr, inout M user_meta);
Expand Down
4 changes: 2 additions & 2 deletions backends/p4tools/modules/testgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ P4Testgen supports the use of custom externs to restrict the breadth of possible

#### Restricted Tests
`testgen_assume(expr)` will add `expr` as a necessary path constraints to all subsequent execution. For example, for the following snippet
```p4
``` P4
state parse_ethernet {
packet.extract(headers.ethernet);
testgen_assume(headers.ethernet.ether_type == 0x800);
Expand All @@ -130,7 +130,7 @@ only inputs which have `0x800` as Ethertype will be generated. This mode is enab
#### Finding Assertion Violations
Conversely, `testgen_assert(expr)` can be used to find violations in a particular P4 program. By default, `testgen_assert` behaves like `testgen_assume`. If the flag `--assertion-mode` is enabled, P4Testgen will only generate tests that will cause `expr` to be false and, hence, violate the assertion.
For example, for
```p4
``` P4
state parse_ethernet {
packet.extract(headers.ethernet);
transition select(headers.ethernet.ether_type) {
Expand Down
2 changes: 1 addition & 1 deletion docs/CodingStandardPhilosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ the `boost::format` for the format argument, which has some
compatibility for `printf` arguments. These functions handle IR and
SourceInfo objects smartly. Here is an example:

```C++
``` C++
IR::NamedRef *ref;
error(ErrorType::ERR_INVALID,
"%1%: No header or metadata named '%2%'", ref->srcInfo, ref->name);
Expand Down
4 changes: 2 additions & 2 deletions docs/IR.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ IR tree and accumulates information about the tree but does not modify
it, while a Transform pass visits every node, possibly modifying the
node or replacing it with some other node

```C++
``` C++
/* pseudo-code for basic Transform visitor */
visit(node, context=ROOT, visited={}) {
if (node in visited) {
Expand Down Expand Up @@ -152,7 +152,7 @@ As an example for how these are used in the IR visitor routines, the IR::If clas
three children to visit -- a predicate and two consequents, with the value of the
predicate deciding which consequent to execute. The child visitor for `IR::If` is
```C++
``` C++
visitor.visit(predicate);
clone = visitor.flow_clone();
visitor.visit(ifTrue);
Expand Down

0 comments on commit 0b4df58

Please sign in to comment.