Re: CPU implementation

Administrator

The first thing to realize about the PC is that its default operations is to increment every clock cycle. Jumping and Reset are special cases. Also, remember the priority on the PC's control signals: reset overrides load overrides increment.

There are several control signals that are only active only during a-instructions or only during c-instructions so it is handy to create 'aInst' and 'cInst' signals that can be used to enable those signals.

For example, think about when the CPU should jump. It only jumps when it is executing a c-instruction and a jump bit in the instruction and its corresponding ALU status bit are both set. (Hint: make an aluPos status signal from aluZr and aluNg.)

If you want to, you can email me your CPU and I'll send you back comments. Be sure to include any helper chips you may have made for its implementation.

Re: CPU implementation

you're correct, fixing those takes me to my screwy jump logic now... Now I feel better about what I've done so far, so I'll take a closer look at my jump logic and see if I can redo it. I've probably misread my truth tables and boolean expressions.

thanks so much for reviewing my code. and thanks for the program flow animation tip too.

Re: CPU implementation

yay !! I did it. It passed all the testcases. Thanks so much for your help.

Omitting the output pins was really tripping me up. There were so many connections to make, is was a bit confusing and overwhelming.

Thanks for the tip about me trying to AND together my jump logic. Replaced that with a Mux (once I figured out what to base the select on), and a few more tweaks and changes -- replacing a NOR with a NAND and an OR with an AND in various places, etc. (those basic truth tables get all mixed up in my head). I probably still have some extra unneeded AND's that are probably duplicating what my Mux is doing -- but it passes, so I think its close enough for now.

Its a good thing I was way ahead of schedule on the first 4 week's projects, because this one took nearly as long (yet, I'm still ahead of schedule overall).