Help implement cpu.hdl

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

Help implement cpu.hdl

shaheemppp
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Help implement cpu.hdl

dolomiti7
One thing that pops into my eyes is that in case of an A instruction bit 15 is 0. It appears that you are loading A when bit 15 is 1?!

Another observation: you are masking the ALU control bits in case of an A instruction. That is unnecessary since the output of the ALU will only be loaded into registers if the respective control bits are set. So the ALU output in case of an A instruction is meaningless and will just be ignored.
Reply | Threaded
Open this post in threaded view
|

Re: Help implement cpu.hdl

shaheemppp
thank you for that.
I see less differences now but still exists. most of them is due to D register being zero,i dont understand why
D register value is not loading.
Reply | Threaded
Open this post in threaded view
|

Re: Help implement cpu.hdl

dolomiti7
In order for the hardware simulator to recognise which register is your D register, you are supposed to use the internal part DRegister instead of your standard Register. Same goes for ARegister, however that is not necessary to pass the test since only the output address pins are compared, and not the A register itself. I believe that is mentioned in the book and the slides?

Please note that the online hardware simulator still seems to be sensitive to the order of the HDL instructions in some cases. You may want to check the old Java based tools to verify instead.