P4C
The P4 Compiler
Loading...
Searching...
No Matches
InsertParserCounterStall Struct Reference
Inheritance diagram for InsertParserCounterStall:
[legend]

Public Member Functions

bool has_counter_load (const IR::BFN::ParserState *state)
 
bool has_counter_select (const IR::BFN::ParserState *state)
 
void insert_stall_state (IR::BFN::Transition *t)
 
IR::BFN::Transition * postorder (IR::BFN::Transition *t) override
 

Public Attributes

std::map< cstring, int > stall_counts
 

Detailed Description

The counter zero and negative flags are always zero in the cycle immediately following a load via the Counter Initialization RAM. Therefore the compiler needs to insert a stall state if is_zero/is_negative is used in the cycle immediately following the load.