
This design implements the behaviour of a TI SN74LS194A-style 4-bit bidirectional universal shift register.
clkrst_nS1,S0:
00: Hold (no change)01: Shift right: QA<-SR, QB<-QA, QC<-QB, QD<-QC10: Shift left: QD<-SL, QC<-QD, QB<-QC, QA<-QB11: Parallel load: QA..QD <- A..Drst_n = 0 briefly to clear all outputs to 0, then set rst_n = 1.S1,S0:
0001 (provide data on SR_SER)10 (provide data on SL_SER)11 (set A..D then clock once)clk and observe outputs QA..QD.None required. (Optionally: switches for inputs and LEDs for outputs on a TinyTapeout demo board.)
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | S0 (mode select) | QA | |
| 1 | S1 (mode select) | QB | |
| 2 | SR (serial in for shift-right; enters QA) | QC | |
| 3 | SL (serial in for shift-left; enters QD) | QD | |
| 4 | A (parallel in) | ||
| 5 | B (parallel in) | ||
| 6 | C (parallel in) | ||
| 7 | D (parallel in) |