| View previous topic :: View next topic |
| Author |
Message |
Jan Bruns Guest
|
Posted: Fri Nov 14, 2008 7:42 pm Post subject: purpose of MULTAND |
|
|
Hallo.
I don't remeber the purpose of the MULTAND (found in many xilinx fpgas), and
I hate not understanding such simple things.
I've read somewhere about the MULTAND allowing to build an adder with
an additional enable input for one of the summands.
But it seems to me this can still be done without the MULTAND using this setup:
LUT(a,b,ben) := a xor (b and ben);
CYMUX(sel,d1,d0) := (sel) ? d1 : d0;
SUM(a,b,ben,cin) := LUT(a,b,ben) xor cin;
COUT(a,b,ben,cin) := CYMUX(LUT(a,b,ben),cin,a);
So the main purpose probably is to allow for an adder with enable bits
for both summands, but I actually don't see how this would aid in
building multipliers, except maybe for the outer, initial stage
(am I missing something, or is this really the main purpose?).
Gruss
Jan Bruns |
|
| |
|
Back to top |
Andreas Ehliar Guest
|
Posted: Fri Nov 14, 2008 7:42 pm Post subject: Re: purpose of MULTAND |
|
|
On 2008-11-14, Jan Bruns <testzugang_janbruns@arcor.de> wrote:
| Quote: | I've read somewhere about the MULTAND allowing to build an adder with
an additional enable input for one of the summands.
|
I haven't looked into the MULTAND usage for multipliers much, but I
have seen some other nice usage examples of it:
It allows you to implement (a&b) + (c&d) using only one lut / bit.
This can be good if you want to implement an adder with two possible
inputs for each operand. (Assuming that you can arrange the unused
input to be set to 1 using for example the set signal of the flip-flops
in the previous pipeline stage.)
I saw another neat use case on the fpga-cpu mailing list at
http://www.embeddedrelated.com/groups/fpga-cpu/show/2801.php where
Göran Bilski explains how the ALU in the microblaze works. By using
MULTAND it is possible to get the following functionality using only
one lut per bit: B+A, B-A, B and A
Has anyone seen any other nice use case for MULTAND?
/Andreas |
|
| |
|
Back to top |
Jan Bruns Guest
|
Posted: Sat Nov 15, 2008 2:31 am Post subject: Re: purpose of MULTAND |
|
|
"Andreas Ehliar":
| Quote: | Has anyone seen any other nice use case for MULTAND?
|
Not tested:
Let BX=0, F= -(f3 & f4).
XB = (f1 & f2) & (f3 & f4)
giving the option to route a partial, inverted and2, when using an and4,
where the and4 can optionally be xored with lutG.
BTW, I'm not sure about the polarity of Spartan3 F5MUX (from the
FPGA-Editor, it isn't clear if it's sel-polarity can be chosen
independent of the programmable BX inverter, and what the actual
polarity chooses).
Gruss
Jan Bruns |
|
| |
|
Back to top |
Andreas Ehliar Guest
|
Posted: Mon Nov 17, 2008 8:20 am Post subject: Re: purpose of MULTAND |
|
|
On 2008-11-17, Kolja Sulimma <ksulimma@googlemail.com> wrote:
| Quote: | Not very impressive, given that Jan Gray explained years ago how to do
that without the MULTAND. There is even space for a second boolean
function of A, B.
|
This seems quite interesting, do you have a reference to this?
I searched around for this one and could only find this one:
http://www.fpgacpu.org/log/nov00.html#001112
In this post MULT_AND is heavily used as far as I can see though.
/Andreas |
|
| |
|
Back to top |
Kolja Sulimma Guest
|
Posted: Mon Nov 17, 2008 9:59 am Post subject: Re: purpose of MULTAND |
|
|
On 14 Nov., 12:00, Andreas Ehliar <ehliar-nos...@isy.liu.se> wrote:
| Quote: | Göran Bilski explains how the ALU in the microblaze works. By using
MULTAND it is possible to get the following functionality using only
one lut per bit: B+A, B-A, B and A
|
Not very impressive, given that Jan Gray explained years ago how to do
that without the MULTAND. There is even space for a second boolean
function of A, B.
Kolja Sulimma |
|
| |
|
Back to top |
Kolja Sulimma Guest
|
Posted: Mon Nov 17, 2008 1:11 pm Post subject: Re: purpose of MULTAND |
|
|
On 17 Nov., 09:20, Andreas Ehliar <ehliar-nos...@isy.liu.se> wrote:
| Quote: | This seems quite interesting, do you have a reference to this?
I searched around for this one and could only find this one:http://www.fpgacpu.org/log/nov00.html#001112
In this post MULT_AND is heavily used as far as I can see though.
|
You can implement A+B, A-B and two special boolean functions of A and
B.
The requirement for the functions is, that they must return 1 whenever
A is 1. Possible functions
f(A, B) are:
f = 1
f = A
f = A | B
f = A | not B
f = not(not A and B)
you can also do a left shift:
f = A<<1
I must correct myself, A and B is not in the list, you need the
MULT_AND for that.
Kolja |
|
| |
|
Back to top |
|