{'fraction_non_alphanumeric': 0.027965284474445518, 'fraction_numerical': 0.003857280617164899, 'mean_word_length': 5.034883720930233, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Efficient Metastability-Containing Gray Code 2-Sort

It is well-established that unsynchronized communication across clock domains can result in metastable upsets and that this cannot be avoided deterministically. This, however, does not preclude the possibility that metastability can be contained deterministically, in the sense that meaningful and precise computations can be performed despite metastability of some bits. In this work, we provide evidence that this is not only possible, but can also be done efficiently. We propose a circuit of size O(B2) and depth O(B) that computes the minimum and maximum of two B-bit Gray code inputs, where each input may contain one metastable bit (introducing uncertainty regarding whether it encodes some value x or rather x + 1). This is achieved by combining the results of a recursive call on the (B - 1)-bit suffixes in a metastability-containing way. This overcomes the problem posed by possible metastability of the logic controlling the recursion, which must occur in some executions.