You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include <core.p4>
// Architecture
parser P();
control C();
package S(P p);
extern BoolReg {
BoolReg();
bool get();
void flip();
}
extern WrapControl {
WrapControl(C c);
void execute();
}
// User Program
BoolReg() r;
parser Loop()(WrapControl c1, WrapControl c2) {
state start {
r.flip();
transition select(r.get()) {
true: q1;
false: q2;
default: accept;
}
}
state q1 {
c1.execute();
transition start;
}
state q2 {
c2.execute();
transition start;
}
}
control MyC1() {
apply {
// Code for Control 1
}
}
control MyC2() {
apply {
// Code for Control 2
}
}
S(Loop(WrapControl(MyC1()), WrapControl(MyC2()))) main;
has a mysterious error
cyclic.p4(50): error: Could not find declaration for tmp_0
S(Loop(WrapControl(MyC1()), WrapControl(MyC2()))) main;
^^^^^^
cyclic.p4(50): error: Could not find declaration for tmp_1
S(Loop(WrapControl(MyC1()), WrapControl(MyC2()))) main;
^^^^^^
The text was updated successfully, but these errors were encountered:
This rather silly program
has a mysterious error
The text was updated successfully, but these errors were encountered: