id = 'counter'
name = 'Counter'
longname = 'Edge counter'
- desc = 'Count number of edges.'
+ desc = 'Count the number of edges in a signal.'
license = 'gplv2+'
inputs = ['logic']
outputs = []
+ tags = ['Util']
channels = (
{'id': 'data', 'name': 'Data', 'desc': 'Data line'},
)
self.putc(ROW_EDGE, edge_start, ["{:d}".format(edge_count)])
edge_start = now
- if divider and (edge_count % divider) == 0:
+ word_edge_count = edge_count - int(self.options['edge_off'])
+ if divider and (word_edge_count % divider) == 0:
word_count += 1
self.putc(ROW_WORD, word_start, ["{:d}".format(word_count)])
word_start = now