Skip to content

Problems using Compare and Multiplier chips between two 32bit values. #23

@RufiS

Description

@RufiS

Noticed that if I compare FFFFFFFFh and (8->F)h ( represents DONTCARE value) with a comparator chip, they are equal. Also if i use a multiplier with no constant declared and no overflow bits, multiplying (00000001h x FFFFFFFFh) = 7FFFFFFFh, instead of FFFFFFFFh Also multiplying (7FFFFFFFh x FFFFFFFF) = 00000001 instead of 80000001. Also with the multiplier, (8*h x FFFFFFFFh) = 00000001h instead of 80000000.

compare: input pins 31->0: 1*******************************
input pins 63->32: 11111111111111111111111111111111
output pin 0: 0
output pin 1: 1
output pin 2: 0
Multiplier
32
input pins 31->0: 0*****************************1
input pins 63->32: 11111111111111111111111111111111
output pins 31->0: 0**
****************************

signed int used as a variable in the plugin as opposed to an unsigned int??

I came across this while the computer i built with your plugin was doing a compare for the Bresenham's line algorithm function i wrote into the program memory. Also while I was multiplying DY x FFFFFFFFh (-1), the DY problem was however solved by inverting and adding 1. However the compare trouble has me stumped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions