@@ -26,7 +26,7 @@ This repository also contains a version of BMv2 compatible with the forked p4c,
2626
2727### 1. Install dependencies and download μP4
2828#### 1.1 Dependencies
29- The dependencies for μP4 as the same as those required for P4 . We list the steps here for Ubuntu 18.04:
29+ The dependencies for μP4 are the same as those required for the reference P4 compiler . We list the steps here for Ubuntu 18.04:
3030``` bash
3131sudo apt-get install cmake g++ git automake libtool libgc-dev bison flex libfl-dev libgmp-dev \
3232 libboost-dev libboost-iostreams-dev libboost-graph-dev llvm pkg-config python python-scapy \
@@ -119,12 +119,12 @@ Follow the [README](https://github.com/cornell-netlab/MicroP4/tree/master/extens
119119
120120
121121### 4. How to write μP4 programs
122- Every μP4 Program must implemet at least one of the interfaces defined as a part of
122+ Every μP4 Program must implement at least one of the interfaces defined as a part of
123123μPA in [ extensions/csa/p4include/msa.up4] ( https://github.com/cornell-netlab/MicroP4/blob/master/extensions/csa/p4include/msa.up4 ) .
124124μPA provides 3 interfaces, Unicast, Multicast and Orchestration. By implementing a μPA interface, a user-defined package type can be created.
125125
126126#### A quick introduction to μP4 program structure
127- ```
127+ ``` p4
128128// In the following example, MyProg is a user-defined package type.
129129// cpackage is a keyword to indicate MyProg is a composable package
130130// with in-built `apply` method.
@@ -159,33 +159,33 @@ cpackage MyProg : implements Unicast<h_t, m_t, i_t, o_t, io_t> {
159159}
160160```
161161
162- How to instantiate cpackage types
163- 1 . Instantiating MyProg in micro_control block
162+ How to instantiate cpackage types:
163+ 1 . Instantiating ` MyProg ` in ` micro_control ` block
164164 ```
165- MyProg() inst_my_prog; // () is constructor parameter for future designs.
165+ MyProg() inst_my_prog; // () is constructor parameter for future designs.
166166 ```
167- 2. Instantiating as main at file scope.
167+ 2. Instantiating as ` main` at file scope.
168168 ```
169169 MyProg() main;
170170 ```
171171
172- How to invoke an instance of cpackage type
172+ How to invoke an instance of ` cpackage` type:
173173
174- 1. Invoking MyProg using 5 runtime parameters.
175- First two are instances of of concrete types declared in μPA.
176- The last three are instances of user-defined types used
174+ 1. Invoking ` MyProg` using 5 runtime parameters.
175+ First two (`p` and `im`) are instances of concrete types declared in μPA.
176+ The last three (`i`, `o`, and `io`) are instances of user-defined types used
177177 to specialize generic types I, O and IO.
178178 ```
179179 inst_my_prog.apply(p, im, i, o, io);
180180 ```
181181
182- 2. main instances can not be invoked explicitly.
182+ 2. ` main` instances can not be invoked explicitly.
183183
184184#### An example
185- There are example programs at ` extensions/csa/msa-examples` path.
185+ There are example programs at [ extensions/csa/msa-examples] path.
186186For more details, have a look at
187- 1. ` lib-src/ipv4.up4` a very simple IPv4 cpackage
188- 2. ` main-programs/routerv4_main.up4` the `main` cpackage that uses IPv4 cpackage
187+ 1. [ lib-src/ipv4.up4](extensions/csa/msa-examples/lib-src/ipv4.up4): a very simple IPv4 cpackage, and
188+ 2. [ main-programs/routerv4_main.up4](extensions/csa/msa-examples/main-programs/routerv4_main.up4) the `main` cpackage that uses IPv4 cpackage.
189189
190190
191191### 5. How to Use μP4C
0 commit comments