Example: (i have added the '-' just to display it correctly in column)Design a sequential circuit with one input x and two outputs z1 and z0. The exit z1 must equal 1 if the last three input bits contain at least two 0s, while z0 must be 1 if the last 3 bits are equal. Do not consider overlapping. Use a ROM for the combinational part and a JK-FF for the MSB. Draw the obtained circuit.
Overlapping basically is considering previous bits when doing the initial analysisI'm not sure what they mean by "Do not consider overlapping" though.
I didn't present that well enough. So please find the update below.Hi,
Verify this:
z1[n]=0 if z1[n-1]=1 or z1[n-2]=1 else z1[n]=Q[n], where Q is the output of the J-K flipflop. So the J-K flipflop would have an active-high RESET pin that is derived as RESET[n]=(z1[n-1] OR z1[n-2]). If this is verified correct, then we can proceed to derive what feeds the J and K inputs. J and K inputs can then be fed by ROM LUT whose selected address depends on x[n], x[n-1], x[n-2] or so.
Looking back at the question, considering that the question stipulates that you use a ROM for the combinational part, "RESET[n]=(z1[n] OR z1[n-1])" also has to be implemented in ROM. This would mean that the ROM address will be 5 bits, namely, x[n-2], x[n-1], x[n], z1[n-1] and z[n]. The ROM data will be two bits J1 and K1. J1 and K1 will feed the J and K inputs, respectively, of the J-K FF that generates z1. At ROM locations where z1[n]=1, make J1=0 and K1=1. This will make Q[n+1]=0. Also at ROM locations where z1[n-1]=1, make J1=0 and K1=1 so that Q[n+1]=0. Notice that the event that z1[n]=1 and z1[n-1]=1 will never occur together, so there is no need to bother about the content of those ROM locations. Those are effectively don't-care conditions. At ROM locations where z1[n]=0 and z1[n-1]=0 and x[n-2], x[n-1] and x[n] respectively equal 000, 001, 010 or 100, make J1=1 and K1=0 so that Q[n+1]=1.I didn't present that well enough. So please find the update below.
Update:
z1[n+1]=0 if z1[n]=1 or z1[n-1]=1 else z1[n+1]=Q[n+1], where Q is the output of the J-K flipflop. So the J-K flipflop would have an active-high RESET signal that is derived as RESET[n]=(z1[n] OR z1[n-1]).
If the above is verified correct, then we can proceed to derive what feeds the J and K inputs. J and K inputs can then be fed from the ROM LUT whose selected address depends on x[n], x[n-1], x[n-2] or so.
However, this might provide result in a subsequent clock cycle, and, as have been pointed out, you may need to look again at the "-" that you inserted.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?