i was wondering whats the supposed output for the case x=y=0. as their gcd is mathematically undefined. i get an error on the output. the same error also appears on the base template. when sending the file through the validation system i get the following message:
. At least one output in gcd returns a non-logical output for some
input values. This can happen if the blackbox design is modified
(either intentionally or inadvertently because of
addition/removal/modification of I/O ports). Output values can also be
non-logical if the circuit isn’t implemented at all, or is implemented
(very) incorrectly (e.g. shorted wires or other sources of X/Z
states). Please check why your output values are non-logical and try
again.
i think this error stems from the fact that the gcd of 0 and 0 cant be computed and returns the error mentioned above
According to Claim 1 in the PDF, \mathit{gcd}(0,0) = 0. Therefore, the correct set of outputs for x = 0000
, y = 0000
is base = 0000
, exponent = 0001
, which yields gcd = 0000
.
The error you are facing does not arise from the fact that the inputs represent zeros. Rather, it stems from exponent
being an all-zeros string. exponent
is supposed to be a string in one-hot encoding, i.e. it must contain exactly one 1
.