11

# Hey, fellow dRs. I may need some help regarding this circuit. It is about an 8 Bit multifunctional shift register with a 2 Bit instruction set. These work: If "Sel" is 0x00, the circuit loads data into its 8 D flip flops. If "Sel" is 0x03, the circuit replaces all data with 0s. These don't work (they do, but they do it in a very strange way and end up filling 1s instead): If "Sel" is 0x01, it is supposed to ringshift bitwise to the right. If "Sel" is 0x02, it is supposed to ringshift to the left. As mentioned above. They do it in a very strange way. If we have 10000000, it will shift to the left or right depending on the "Sel"'s binary value. Let us say we want to shift it right. The output will turn from 10000000 to 01000000 (which is what we want), BUT after that it adds another 1 to it: 01100000. It keeps doing it until every single Bit is a 1. Same thing happens with the left ringshift. I will include the other circuits used in this circuit in the comment section.

• 2
Parallel shift register
• 1
1 of all the other 8 D flip flops
• 1
Yup that's black magic. Learn to control it and Intel's got a job for you.
• 1
Is this logic you created or a stock item? If I remember right a shift might need a way to get output to an input to shift things. I used to have a TTL logic book, but I have no idea where it went.
• 1
@Demolishun 1. I created this logic.
2 Exactly. For left shifts, I use the n+1th component's output for the nth component's input.
For right shifts, I do the opposite of that. I redirect the output of nth component's output to the n+1th component's input.
• 0
• 0
@-ANGRY-STUDENT- Now create an input/output that is connectable for external. Then loop external.
• 0
What software is this and what are those symbols lmao
• 1
Looks like after the intended shift, there's "half" of another shift cycle happening. It's long since, but IIRC, such effects happen when the logic has a loophole with regard to the clock cycle, i.e. that shit happens while the clock flank changes state.

You know, glitches like what happens when you have a Karnaugh map and you cross over between disjoint regions.
• 2
@Fast-Nop I completely forgot about the existence of hazards. Thanks for the reminder! :)
• 2
@arcsector it's called "Digital".
You can find it on github.
• 0
What is the name of the app?
• 1
@Fast-Nop It turns out the hazard was way deeper than I thought.
It is in my d flip flop. Apparently, I used a different version of the d flip flop than I had to use.
• 1
This is the version that fixed the hazard
• 1
You don't have the single NOT component. You redirect the "D NAND Clock" component's output. Thus no delay and therefore no glitch.
• 1
@-ANGRY-STUDENT- Ah good catch, that was a tricky bug!
• 3
@-ANGRY-STUDENT-
Use master slave flip flop
if you are going to use clock
• 0
@Gregozor2121 why is that?
• 2
@-ANGRY-STUDENT- The upside is that you have a defined point within your clock cycle where the data acquisition happens - that is, not at any time where the levels are changing and may cause transient output spikes.

The downside is that you need twice the amount of FFs.

Another downside is that changes will only propagate with each clock cycle so that your shifter chain would need several clock cycles.

However, if your shifter is faster than the clock, then you could wire only the master FFs in the shifter and use the slave FFs as stabilised output stage.
• 2
@Fast-Nop that makes sense. Thanks
• 0
That certainly makes no sense, but okay. Cool.

Btw have you seen @Haxk20 's sword?
• 0
@confusionsays Do you really have to tell entire devRant about my fucking sword ? Im not the only one here with 3D printer. Lot of people do have them. Lot of people here can print the same exact sword i did. And yes its massive but still you dont have to tell everyone about it.
• 2
@confusionsays that's a big long sword. I wonder if he can handle it
• 1
@Haxk20 I just thought maybe if more people were interested you'd make it actually look good. -_-
• 1
@Haxk20 mate, you sound a little bit too aggressive in the comment sections. Wanna talk about what caused it?
• 1
@-ANGRY-STUDENT- just stressed out over the last few days. I need to really take some break from family and just out of the fucking world but well idk how. I will try to be more calm in the comments tho.
• 1
@-ANGRY-STUDENT- The easiest way to become a grumpy old man is starting as grumpy young man.