Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 352 Digital System Fundamentals

Similar presentations


Presentation on theme: "ECE 352 Digital System Fundamentals"— Presentation transcript:

1 ECE 352 Digital System Fundamentals
Serial Transfers In this presentation, we will look at a different way of transferring and processing information.

2 Serial Transfers The register transfer operations we have seen so far have been parallel All bits in a register (the data word) are transferred and/or operated on at once An alternative is use a serial approach In a serial transfer, a data word is transferred one bit at a time, eventually transferring the entire data word A serial operation is performed on one bit of the data word at a time, eventually completing the operation on the entire data word In the register circuits we’ve looked at so far, all operations have been done in parallel – that is, they have operated on all bits of the operands simultaneously. Alternatively, we can perform operations on only one bit position at a time. In a serial data transfer, a word is transferred from one register to another one bit at a time, until the entire word has been transferred. In a serial operation, the operation is performed on one bit of a data word at a time, until the operation has been completed on all bits.

3 Why Do It Serially? A serial data transfer reduces the number of interconnections between registers Data can be transferred between n-bit registers using a single data connection instead of n data connections For transfers between devices, this reduces the number of interconnections between device and the number of pins required on the devices Serial operations reduce the hardware costs For example, an n-bit addition can be completed with only a single full adder So why do something serially? One reason is to use a single bit connection to transfer N bits of data, instead of using N connections to transfer the data in parallel. This reduces the number of pins per device, and the number of interconnections between those devices. In a world full of very small and complex electronic devices, reducing the pins and connections is often crucial to achieving a small final product. Another advantage is that we can complete an operation with fewer hardware resources, such as doing an N-bit addition with only a single full adder. This helps to reduce the size of a circuit because there are fewer gates.

4 At What Cost? The trade-off is speed
Of course, if the data is being transferred serially, operating on it serially isn’t any slower In reality, it is even more complicated… A serial operation takes longer than the corresponding parallel operation n 1-bit transfers versus a single n-bit transfer n 1-bit additions versus a single n-bit addition Serial data transfers and operations are appropriate when reduced speed is not an issue, or other factors are more important Serial data transfers are extremely common in practice But as you should have already noticed, most improvements are actually trade-offs, where we improve one parameter at the expense of others. The primary cost is in speed – we are doing things in sequence instead of all at once. Sometimes this isn’t an issue, such as when we serially process data that is also received serially. The reality of trading off serial versus parallel operations is actually even more complicated, but those issues will wait for another course. In general, a serial operation on an N bit word requires N small operations instead of a single, larger, parallel operation. Serial operations are a good choice when speed is not the dominant factor, or other factors are more important. In fact, serial data transfers are extremely common in circuit design.

5 Serial Transfer Example
Shift registers are used at both ends The same clock must be used at both ends! Load the parallel data into the source shift register Simultaneously shift data out of the source register and into the destination register After n clock cycles, the parallel data can be read from the destination shift register What’s missing? A simple circuit to do a serial data transfer consists of two N-bit shift registers. Note that both shift registers must use the same clock, or it becomes a MUCH more complicated problem. The source shift register, also called the transmit shift register or TSR, is loaded in parallel with the complete N-bit data word that will be transferred. Then, on each clock edge, the data is shifted out of the TSR and into the receive shift register, or RSR. After N clocks, the N-bit data word can be read from the parallel output of the RSR. Now that you’ve seen the basic idea, have you noticed what’s missing to make it useful? Well, the RSR does not know when the TSR loaded the data word, so it doesn’t know when the transferred word begins or ends. We need a signal to notify the receive end when the data is valid. Every serial communication scheme must have some way to identify when a complete word has been received.

6 Serial Operation Example
Use one full adder to perform an n-bit addition Load the operands into two n-bit shift registers Do the addition one bit at a time, starting from the least significant bit Need to know the carry from the previous addition Shift the operands right one bit at each clock Store each bit of the result in a shift register, shifting in at the most significant bit Can use an operand register to store the result! After n clocks, addition is complete and the result is available in the shift register What happens when we perform an operation serially? Let’s look at serial addition as an example of a serial operation. We’ll use a single full adder to compute the sum of two N-bit operands. We begin by parallel loading the two operands into two shift registers. We then send the least significant bit of each operand register to the full adder. At each clock, we shift the operands right, so the next bit is sent to the adder, along with the carry-out that we saved from the PREVIOUS bit’s addition. As each bit of the result is generated, we store it in a shift register, shifting in at the most significant bit. We can even use one of the operand registers to hold the result, since as we shift the operand out of the register, it makes room for the result. After N clocks, the operation is complete, and the sum of the operands is now available in the register into which it was shifted.

7 Serial Adder Circuit Use one full adder to perform an n-bit addition
Load the operands into two n-bit shift registers Now, let’s look at the serial adder circuit. The circuit has a single full adder. The A and B inputs of the adder are connected to the least significant bits of the shift registers. The operation begins by loading two operands into the shift registers. While the LD signal is asserted to load the registers, the SH signal is NOT asserted. When SH is 0, the carry flip-flop reset signal is asserted, so the carry-in to the first addition will be 0. 1

8 Serial Adder Circuit Do the addition one bit at a time, starting from the least significant bit Once the operands are loaded, we assert the SH signal to do the addition one bit at a time. Asserting SH also releases the reset signal on the carry flip-flop. One bit comes from each shift register, and the carry-in comes from the carry flip-flop.

9 Serial Adder Circuit Store each bit of the result in a shift register, shifting in at the most significant bit The sum and carry results are computed for the current bit position. The sum bit is right-shifted into one of the shift registers that initially holds one of the operands. It enters at the most significant bit. The carry bit is stored into the carry flip-flop, so it will be available for the next bit of the operation.

10 Serial Adder Circuit After n clocks, addition is complete and the result is available in the shift register When the circuit has been clocked N times, all N bits of the operands have been shifted out of the shift registers, and the N-bit result has been shifted in. The full sum word is then available at the circuit output.

11 Serial Adder Circuit So, how do you control this circuit?
Design a control unit FSM! This circuit is in fact a simple datapath capable of doing serial addition, but something needs to tell it what to do and when. So, we would need to create a control unit to determine when to do an operation, control the datapath during the operation, and provide an additional output that indicates when the SUM output is valid.

12 ECE 352 Digital System Fundamentals
Serial Transfers This video demonstrated how we can serially transfer and process data to reduce the area and connectivity requirements of our circuits.


Download ppt "ECE 352 Digital System Fundamentals"

Similar presentations


Ads by Google