Judge the 0-1 of a and B respectively

Time:2022-4-16

If the upper eight bits are not greater than, it is possible that the second eight bits are still a large. It should have output 1, but 0 is output. This is wrong, so it is necessary to judge whether the upper eight bits are equal to,StarpoolIf equal, continue to judge the last eight digits and cycle on. This is why eight LUTS are required for every eight bits to be divided into two groups to judge greater than or equal to. That is, if the upper eight digits are not greater than, if the judgment is equal to, it will judge the last eight digits. Here we need to use the carry4 structure to obtain the comparison results of the last eight bits.

If the lowest two bits are still equal, the output value is determined by cynt. Since the comparator outputs 1 if (a > b) and other outputs 0, cynt is 0,StarpoolThat is, the two numbers are equal. If the comparator outputs 1 if (a > = b) and other outputs 0, then cynt is set to 1. Here you can run and see by yourself, and you can compare the differences.