Alu

Joined
Dec 9, 2009
Messages
18
Reaction score
0
Hello
I need to write a vhdl code for an 8 bit ALU..the problem is that i must implement a multiplier in this ALU(that has an output of 16 bits) which means that my mutliplexer in the ALU has an output of 16 bits..I also hav to implement an adder...i want to know how can i do the adder if u know what i mean?
ex:

suppose my sum is 10110000 i have to make it 1111111110110000 because 10110000 is negative number and i have to make the output 16 bits..
thank you
 
Joined
Dec 9, 2009
Messages
18
Reaction score
0
please help me when i test the thing it doesn't work for the bits(from 15 downto 0) i get something like UUUUUUUU1000 or XXXXXX100..
is this statement right?

g2: for j in 8 to 15 generate
U2:S(j)<='1' when S(7)='1';
end generate;

g3: for j in 8 to 15 generate
U3:S(j)<='0' when S(j)<='0' ;
end generate;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top