|
| RandomNumber (cstring rand, cstring act, le_bitrange range) |
|
bool | can_merge (const Parameter *ad) const override |
|
void | dbprint (std::ostream &out) const override |
|
bool | equiv_value (const Parameter *ad, bool check_cond=true) const override |
|
bool | from_p4_program () const override |
|
const Parameter * | get_extended_param (uint32_t extension, const Parameter *ad) const override |
|
bool | is_next_bit_of_param (const Parameter *ad, bool same_alias) const override |
|
bool | is_subset_of (const Parameter *ad) const override |
|
const Parameter * | merge (const Parameter *ad) const override |
|
cstring | name () const override |
|
bool | only_one_overlap_solution () const override |
|
const Parameter * | overlap (const Parameter *ad, bool only_one_overlap_solution, le_bitrange *my_overlap, le_bitrange *ad_overlap) const override |
|
bool | rand_nums_overlap_into (const RandomNumber *rn) const |
|
int | size () const override |
|
const Parameter * | split (int lo, int hi) const override |
|
bool | can_overlap_ranges (le_bitrange my_range, le_bitrange ad_range, le_bitrange &overlap, le_bitrange *my_overlap, le_bitrange *ad_overlap) const |
|
cstring | cond_name () const |
|
bool | equiv_cond (const Parameter *p) const |
|
template<typename T > |
bool | is () const |
|
bool | is_cond_type (ModConditionally_t type) const |
|
void | set_cond (const Parameter *p) |
|
void | set_cond (ModConditionally_t ct, cstring n) |
|
template<typename T > |
const T * | to () const |
|
void | print () const |
|
Represents an output from the Random Number Generator. Up to 32 bits possible per logical table, as this is the size of the immediate bits maximum position.
Because all Random Numbers across all actions can possibly be merged, a set of random numbers (in the initial case a single entry) represent all of the data at those particular bits. Because the bits are always random, there is not lo-hi, only size.
Each action in a table is mutually exclusive, thus random externs that are used in different actions can share the same bits in the immediate, as these bits will be mutually exclusive. Random externs used in the same actions can not overlap, in order to guarantee that each random bit is unique.
Previously checked before this pass is run, a random extern can only be used once per action, as the infrastucture cannot tell what bits are supposed to be shared, vs. what bits will be different.
Bits that are not headed directly to an ALU operation can be overlaid:
action a1() { f1 = random1.get(); f2 = random2.get(); }
where f1 and f2 are two 4 bit fields in different 8 bit containers. In this case, because the random numbers output byte by byte, each random number impact is actually 8 bits. But because each of these operands only use 4 bits, each random number can overlap with each other.
Because these bits can always overlap, just return the max size position
Implements ActionData::Parameter.