Activity 21:
Going to try to
get the ALU working now with my custom chips and see if it works the way I want
it to.
I think figuring
out how to add overflow detection is very important when creating the ALU.
Because when I go to create it in real hardware I will need to know when I get
an overflow. I did create overflow detection in my adder but for the time being
I am using the one the book made. Then if need be I will switch to mine.
This ALU does
not do multiplication or division also it cannot do floating point math.
After reading
the chapter I am not sure I understand what needs to happen. I first thought I
would use a bunch of Mux’s but it doesn’t seem like it’s going to work out.
After working it
out I figured most of it out but I still have to figure out how to check if the
output is zero or negative.
My issue was the
syntax of splitting up the pins. I think the book should cover this more
clearly.
You can split
the output pin as many times as you want when outputting but can not split the
out put and use it for input if that makes since.
Here’s an example
Mux16(a=AddAnd,b=NEgOut,sel=no,out[0..7]=out3,out[8..15]=out4,out[15]=out5,out=out);
Or8Way(in=out3,out=out1);
Or8Way(in=out4,out=out2);
But you cant
Or8Way(in=out[8..15],out=out);
This blog led me
in the right direction.
With only one Mux input switched around I got it working and now to see
on optimization.
This is the one that took the longest by far.
No comments:
Post a Comment