seblovett / VLSI

VLSI design project
0 stars 1 forks source link

ADC / SUC behaviour #35

Closed seblovett closed 10 years ago

seblovett commented 10 years ago

@mw92 - can you clarify the behaviour of the ADC instruction. Should it be A + B + 1 or A + B + c where c is the carry from the status register?

mw92 commented 10 years ago

it should be with carry status flag, a program using the instruction wont necessarily know what the carry from first calculation will be

seblovett commented 10 years ago

Okay thanks. @ashleyjr - I've started this fix. Will complete tonight.

seblovett commented 10 years ago

Fixed, but not tested. Will close when fully verified

seblovett commented 10 years ago

Can I clarify this behaviour. Mainly for SUC It's written as Op1 - Op2 - ~Cin However, putting Cin = 0will actually add 1 to the result. Is this correct?

mw92 commented 10 years ago

yeah thats correct as its 2's compliment subtraction

seblovett commented 10 years ago

Ah, yes. I understand now! Cheers.