Hints on Implementing ALU

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Hints on Implementing ALU

The Gigabiter
I am looking for ny hints at all on how to implement the ALU. It says it's nontrivial and what's more IDK WHERE TO START! Can you give me some information and, if it is allowed, a less-stubby hdl file?
Hello, I am The Gigabiter(my official Net pseudonym because if you give out your real name on the Net you're hosed), also known as Major_Monogram, ElectroPaint and lightsofpahrump(and daniel-g-cs50 on GitHub but dont go poking around my repos 'cause there's nothing there). I enrolled because I was recommended the course....it may be a bit above my pay grade. I live in Pahrump, Nevada, which is basically the middle of nowhere. I like technology; electric stuff including lighting, telephones and electric clocks; and books. DONT EMAIL ME OR ASK FOR MY ADDRESS, PHYSICAL OR EMAIL!
Reply | Threaded
Open this post in threaded view
|

Re: Hints on Implementing ALU

WBahn
Administrator
Break it down into pieces.

You have two input signals. Each signal gets conditionally modified by two of the control bits. Those modified signals are then fed to two different 16-bit operations (AND and ADD) and one of the remaining control signals is used to select which of those two us used to produce the output, while the final control signal conditionally modifies it to produce the ultimate output.

Implement things incrementally. There are multiple paths you can take to get there. You might start by figuring out how you can take an input and, based on a single control signal (zx, for instance), either produce an all-zero signal or a signal that is the same as the input. The see if you can figure out how to use another control signal (nx) and either produce a signal that is the opposite of the input, or one that is the same.
Reply | Threaded
Open this post in threaded view
|

Re: Hints on Implementing ALU

The Gigabiter
OK
Hello, I am The Gigabiter(my official Net pseudonym because if you give out your real name on the Net you're hosed), also known as Major_Monogram, ElectroPaint and lightsofpahrump(and daniel-g-cs50 on GitHub but dont go poking around my repos 'cause there's nothing there). I enrolled because I was recommended the course....it may be a bit above my pay grade. I live in Pahrump, Nevada, which is basically the middle of nowhere. I like technology; electric stuff including lighting, telephones and electric clocks; and books. DONT EMAIL ME OR ASK FOR MY ADDRESS, PHYSICAL OR EMAIL!
Reply | Threaded
Open this post in threaded view
|

Re: Hints on Implementing ALU

The Gigabiter
I will try to implement zx and zy with muxes.
Hello, I am The Gigabiter(my official Net pseudonym because if you give out your real name on the Net you're hosed), also known as Major_Monogram, ElectroPaint and lightsofpahrump(and daniel-g-cs50 on GitHub but dont go poking around my repos 'cause there's nothing there). I enrolled because I was recommended the course....it may be a bit above my pay grade. I live in Pahrump, Nevada, which is basically the middle of nowhere. I like technology; electric stuff including lighting, telephones and electric clocks; and books. DONT EMAIL ME OR ASK FOR MY ADDRESS, PHYSICAL OR EMAIL!
Reply | Threaded
Open this post in threaded view
|

Re: Hints on Implementing ALU

The Gigabiter
Implemented and works. Now on to nx and ny.
Hello, I am The Gigabiter(my official Net pseudonym because if you give out your real name on the Net you're hosed), also known as Major_Monogram, ElectroPaint and lightsofpahrump(and daniel-g-cs50 on GitHub but dont go poking around my repos 'cause there's nothing there). I enrolled because I was recommended the course....it may be a bit above my pay grade. I live in Pahrump, Nevada, which is basically the middle of nowhere. I like technology; electric stuff including lighting, telephones and electric clocks; and books. DONT EMAIL ME OR ASK FOR MY ADDRESS, PHYSICAL OR EMAIL!