Need a Mux8Way, is that a problem ?

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

Need a Mux8Way, is that a problem ?

Saroupille
Hi,
I'm not sure to have complety understood the problem. For the CPU, and especially, for the part with the PC, I need to put something in "load" (when the value of load is 1). I guess that I put 1 in load if we jump.

So I have to compute a jump function. On a C instruction, they are 7 cases (or 8 but always 1 input to 0). So I thought to use a Mux8Way but only with 1 bit. The sel is the jump bits and the inputs are the results of all the expressions booleans. Is that correct, or it exists a better way ?

Thanks you,
Good bye ;)
Reply | Threaded
Open this post in threaded view
|

Re: Need a Mux8Way, is that a problem ?

cadet1620
Administrator
Correct.  The load input should be 1 when the conditions for jumping are met. The logic to do this is simpler that what you are thinking about.

Next to the Jump Bit table on page 110 (at the end of 6.2.2) write down for each line what combination of true status bits will cause the jump to occur.  Pretend that there is a positive status bit and include it in your table.  Look for a pattern that will let you implement the jump logic with a two-level and-or circuit. You'll need to generate the po status flag from zr and ng.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Need a Mux8Way, is that a problem ?

Saroupille
I am a bit confused now, but I am gonna fixed this. I missed a detail on the figure 5.9 (one output of the ALU).
Thanks !
Reply | Threaded
Open this post in threaded view
|

Re: Need a Mux8Way, is that a problem ?

Becca
In reply to this post by cadet1620
Would you be able to elaborate on this?  I too was going in the direction of an 8-way Mux, but would like to find a better solution if possible.  However, when I look at the pattern of zr, ng, and po control bits and compare them to the jjj bits, I am unable to find a pattern that makes more sense than the 8-way Mux.  Any advice that you could give would be appreciated.

Thanks!

Becca
Reply | Threaded
Open this post in threaded view
|

Re: Need a Mux8Way, is that a problem ?

cadet1620
Administrator
Try looking at it this way.

opcodejump if set
JGT001po
JEQ010zr
JGE011zrpo
JLT100ng
JNE101ngpo
JLE110ngzr
JMP111ngzrpo

--Mark

Reply | Threaded
Open this post in threaded view
|

Re: Need a Mux8Way, is that a problem ?

Becca
Hi Mark,

Thanks so much for the response.  I think that I'm getting there... but am still stuck on the fact that, as far as I understand it, only one control bit can be set at a time, which makes it difficult to understand how to compre them to the jjj bits.  

For example, if jjj = 110 (JLE), the PC should jump if ng = 1 OR zr = 1, but there won't be a condition where both will be true.  

Thanks again for your patience in going through this with me, I really appreciate it :)

Becca
Reply | Threaded
Open this post in threaded view
|

Re: Need a Mux8Way, is that a problem ?

Becca
Actually I think I answered my own question :)  Thanks again for your help!