Whats your question?
What do you not understand?
> But why in the first place they need
> c(0) <= not c(0);
If you pick any stage in the middle of the code and do a slightliy
reformatting, then you see
1 | :
|
2 | c(2) <= c(2) xor carry(1);
|
3 | carry(2) := c(2) and carry(1);
|
4 | c(3) <= c(3) xor carry(2);
|
5 | carry(3) := c(3) and carry(2);
|
6 | :
|
Each stage refers to the previous stage.
So for a 212 bit witdh the last entries will be
1 |
|
2 | :
|
3 | c(210) <= c(210) xor carry(209);
|
4 | carry(210) := c(210) and carry(209);
|
5 | c(211) <= c(211) xor carry(210);
|
6 | carry(211) := c(211) and carry(210);
|
Its easy, isn't it?
And now: what to do with stage 0?
1 | c(0) <= c(0) xor carry(-1);
|
2 | carry(0) := c(0) and carry(-1);
|
3 | c(1) <= c(1) xor carry(0);
|
4 | carry(1) := c(1) and carry(0);
|
5 | :
|
And because we don't have a stage '-1' we substitute it with a logic
'1':
1 | c(0) <= c(0) xor '1';
|
2 | carry(0) := c(0) and '1';
|
3 | c(1) <= c(1) xor carry(0);
|
4 | carry(1) := c(1) and carry(0);
|
5 | :
|
And now a little bit boolean equation magic:
What is XX AND '1'?
Correct answer: XX
What is YY XOR '1'?
Correct answer: NOT YY
And if you take this knowledge into your code it results in:
1 | c(0) <= NOT c(0);
|
2 | carry(0) := c(0);
|
3 | c(1) <= c(1) xor carry(0);
|
4 | carry(1) := c(1) and carry(0);
|
5 | :
|