Lines Matching refs:hlircounter
13 def __init__(self, hlircounter, program): argument
14 assert isinstance(hlircounter, p4_counter)
17 self.name = hlircounter.name
18 self.hlircounter = hlircounter
20 width = hlircounter.min_width
26 "{0}: Counters with {1} bits", hlircounter, width)
30 if ((hlircounter.binding is None) or
31 (hlircounter.binding[0] != P4_DIRECT)):
33 "{0}: counter which is not direct", hlircounter)
35 self.autoIncrement = (hlircounter.binding != None and
36 hlircounter.binding[0] == P4_DIRECT)
38 if hlircounter.type is P4_COUNTER_BYTES:
44 if self.hlircounter.instance_count is not None:
45 return self.hlircounter.instance_count
49 "{0} does not specify a max_size; using 1024", self.hlircounter)
53 table = program.getTable(self.hlircounter.binding[1].name)