MAC-unit Syntax for CF V1

cancel
Showing results for 
Search instead for 
Did you mean: 

MAC-unit Syntax for CF V1

212 Views
wadehassler
Contributor II

The Coldire  V1's multiplier/accumulator is described as having a multiply/accumulate/load mode to speed up MAC-operations.

It also can implement  circular addressing, so that no overhead is incurred for address-checking.

 

I can't figure out the syntax, however: it seems that one must write:

mac.w  D0.L, D1.L, (A0)+&  ,  D0 ;

 ... in order to

       word-multiply D0 and D1,

       add their product to the accumulator,

       increment A0,

       'and' A0's address with the MASK-register,

       load the value newly-indicated by A0 into D0

 

But I cannot have both the '-' and '&' in the line at the same time. This seems odd, as if A0 must be separately incremented OR it must be separately masked.

What have I missed?

 

Wade Hassler

Labels (1)
Tags (1)
0 Kudos
1 Reply

70 Views
kef
Specialist I
  • But I cannot have both the '-' and '&' in the line at the same time.

As I understand it, you can:

 

mac.w  D0.L, D1.L, -(A0)&  ,  D0

 

If you look at other CF instructions and addressing modes available, postincrement (Ax)+ and predecrement -(Ax) are available, but not +(Ax) or (Ax)-.

 

D0 in your list of steps should be loaded with data at (A0 & mask) frist, and only then A0 should be incremented to point to the next data. In -(Ax) case, A0 is first decremented, and then D0 is loaded.

0 Kudos