+ conds = {0: edge}
+ else:
+ conds = [{idx: 'e'} for idx in has_channels]
+
+ # Pre-determine which input data to strip off, the width of
+ # individual items and multiplexed words, as well as format
+ # strings here. This simplifies call sites which run in tight
+ # loops later.
+ idx_strip = max_connected + 1
+ num_item_bits = idx_strip - 1
+ num_word_items = self.options['wordsize']
+ num_word_bits = num_item_bits * num_word_items
+ num_digits = (num_item_bits + 3) // 4
+ self.fmt_item = "{{:0{}x}}".format(num_digits)
+ num_digits = (num_word_bits + 3) // 4
+ self.fmt_word = "{{:0{}x}}".format(num_digits)
+
+ # Keep processing the input stream. Assume "always zero" for
+ # not-connected input lines. Pass data bits (all inputs except
+ # clock) to the handle_bits() method.