You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second simulation for the Arithmetic lab simulates a simple 8-bit adder. Running this simulation with the default code and default simulation input as is generates this error:
Compiling
###########################################################################################
b'Input (18446744073709551495) on line 8 too large. Expected 8 bit value.\nEnabling waves into logs/vlt_dump.vcd...\n'
zero:
co : "▔▔▔╲▁▁▁▁▁▁▁▁▁▁▁"
two:
cin : "▁▁▁▁▁▁▁▁▁▁▁▁╱▔▔"
co : "▁▁▁▁▁▁▁▁▁╱▔▔╲▁▁"
three:
co : "▁▁▁╱▔▔╲▁▁╱▔▔╲▁▁"
four:
co : "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"
six:
cin : "▁▁▁▁▁▁╱▔▔▔▔▔╲▁▁"
...
and the simulation of all the signals prints only half-way from left to right. The values on line 8 are cin = 0, a = 100, and b = -121.
Taking out all the negative values in the simulation code area gets rid of this problem, and the entire simulation prints out normally, ex:
Compiling
###########################################################################################
b'Enabling waves into logs/vlt_dump.vcd...\n'
zero:
co : "▔▔▔╲▁▁▁▁▁▁▁▁▁▁▁▁▁▁╱▔▔▔▔▔▔▔▔╲▁▁▁▁▁╱▔▔╲▁▁╱▔▔▔▔▔▔▔▔"
two:
cin : "▁▁▁▁▁▁▁▁▁▁▁▁╱▔▔╲▁▁▁▁▁╱▔▔╲▁▁▁▁▁▁▁▁╱▔▔▔▔▔╲▁▁▁▁▁╱▔▔"
co : "▁▁▁▁▁▁▁▁▁╱▔▔╲▁▁▁▁▁▁▁▁╱▔▔╲▁▁▁▁▁▁▁▁╱▔▔╲▁▁▁▁▁▁▁▁╱▔▔"
three:
co : "▁▁▁╱▔▔╲▁▁╱▔▔╲▁▁▁▁▁▁▁▁╱▔▔╲▁▁╱▔▔╲▁▁╱▔▔╲▁▁▁▁▁▁▁▁╱▔▔"
four:
co : "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁╱▔▔╲▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁╱▔▔"
six:
cin : "▁▁▁▁▁▁╱▔▔▔▔▔╲▁▁╱▔▔╲▁▁▁▁▁▁▁▁▁▁▁╱▔▔▔▔▔╲▁▁╱▔▔╲▁▁▁▁▁"
...
Currently, the code is assuming the numbers in the simulation are all unsigned and not two's complement. The question I have is this: do we want to change all the default values in the simulation to be positive, or do we want to change the code to additionally calculate the number of bits needed for two's complement numbers on top of unsigned numbers?
The text was updated successfully, but these errors were encountered:
The second simulation for the Arithmetic lab simulates a simple 8-bit adder. Running this simulation with the default code and default simulation input as is generates this error:
and the simulation of all the signals prints only half-way from left to right. The values on line 8 are cin = 0, a = 100, and b = -121.
Taking out all the negative values in the simulation code area gets rid of this problem, and the entire simulation prints out normally, ex:
Currently, the code is assuming the numbers in the simulation are all unsigned and not two's complement. The question I have is this: do we want to change all the default values in the simulation to be positive, or do we want to change the code to additionally calculate the number of bits needed for two's complement numbers on top of unsigned numbers?
The text was updated successfully, but these errors were encountered: