Problem with a WiteM bit in CPU CHIP

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

Problem with a WiteM bit in CPU CHIP

osma78
Hi ,
  I have a problem with the bit WireM , i have write a code HDL who can determine the destination of the output of an instruction , by simplification i have deduce that the d3 is the only bit to determine the memory destination , but in the tst file i have found the first instruction @12345 , have a 111 for d1d2d3 , in this case the destination is AMD , but in the tst file the writeM bit is set to 0 , so this is a contradiction which i don't found a solution .
 i need a help , please .
 
Reply | Threaded
Open this post in threaded view
|

Re: Problem with a WiteM bit in CPU CHIP

cadet1620
Administrator
What you are missing is that the 'd3' bit (an all the other named bits) is only relevant in C-instructions.
During A-instructions, none of the C-instructions actions—writing to registers/memory, jumping, etc.—should occur.

The easiest way to handle this is to make two signals, aInst and cInst, that are active only during their type of instruction.

cInst will be False during A-instructions so you can use it to make sure that writeM will never be True except during C-instructions.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with a WiteM bit in CPU CHIP

osma78
Thank you