• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 71,  comments - 41,  trackbacks - 0
            ? 2003 by Charles C. Lin. All rights reserved.

            Pipes

            Early on, we came up with an analogy for a wire. We said a wire is like a pipe that can either send red soda (which we said was 0), or green soda (which we said was 1), or no soda (which is Z, whicch is high impedance), or garbage, which occurs when two devices attempt to "pump soda" on the wire.

            We claim that garbage would occur, even if two devices attempt to pump the same kind of soda (i.e., both red or both green). This probably doesn't happen in reality. That is, if two devices attempt to set the value of a wire to 1, the wire is most likely transmitting a 1 without problem.

            Nevertheless, we want to avoid this situation. It should be the case that only one device writes a value to the wire, at any given time. There should be no reason for two devices writing to a wire or bus at the same time. Certainly, we expect devices to write to the wire at different times. The idea of a bus, after all, is that it is a shared medium of communication, to be used by all devices connected to the bus.

            Controlling Registers

            Also, recall from our discussion on registers, that a register is always generating output. Once a value gets loaded into a register (which only occurs at a positive clock edge, during a parallel load operation), the value inside the register is sent to the output.

            The outputs of registers are going to be connected to busses, and often there may be more than one register connected to a bus. We want to be able to control when a register writes a value to a bus.

            How can we do this? Let's think of our analogy. Suppose we have many small pipes hooked to a much larger pipe. For example, we might have 3 small pipes hooked up to a large pupe.

            Suppose each small pipe is connected to a device which pumps soda. We want to make sure only one device is pumping soda into the large pipe. Unfortunately, each device is always pumping soda, which means all three devices are trying to pump soda.

            If we can't turn off the device, how do we prevent the soda from being pumped into the large pipe?

            One idea is to have some sort of device in the small pipe which can be opened or closed. When the device is closed, even though the device attempts to pump soda, it can't make it to the large pipe.

            This device is usually called a valve. If the valve is open, soda can be pumped through. If the valve is closed, no soda can be pumped through.

            Here's a diagram to illustrate the concept.

            Introducing a Tri-State Buffer

            There is an electronic equivalent to a valve. It's called a tri-state buffer. The following is a symbol for a tri-state buffer.

            It looks very much like an inverter (a NOT gate) except it's missing a circle at the right side (where z is located). This tiny circle usually indicates that the device is inverting the input, x.

            Unlike an inverter, a tri-state buffer has two inputs. It has a data input (labelled x) and a control input (labelled c).

            When c = 1, the valve is open, and the output z is the same as the input x. Essentially, it lets the input value flow to the output. This input value can be 0, 1, Z, or ? (garbage).

            When c = 0, the valve is closed, and the output z = Z, which means no electrical current (i.e., no 0's and 1's) is flowing through.

            Regular Buffers

            There are buffers which do not have a control input. Thus, the output is exactly the same as the input. It's the same as a tri-state buffer where c is always 1. Does that seem silly to you? The reason for such a device is to strengthen the signal. For example, when you make a phone call, the signal is sent over a wire, or perhaps a fiber optic cable.

            Over distance, a signal begins to lose strength. There are devices called repeaters which are meant to boost the strength of the signal. That's essentially what a plain buffer is.

            However, we're interested in tri-state buffers, primarily because they behave like valves. They allow us to control which devices can write to a bus.

            Chart for Tri-State Buffer

            ? c? ? x ? ? z ?
            0 0 Z
            0 1 Z
            0 Z Z
            1 0 0
            1 1 1
            1 Z Z

            x is the data input. c is the control input, which turns on and off the valve. z is the output. Z (which is capitalized), means "no current", which, in our analogy, is "no soda" being pumped through.

            A 32-bit Tri-State Buffer

            Most of the times, we're not interested in controlling the output of one bit to one wire. We're interested in 32 bits to 32 wires. We treat the 32 bits as one grouping of data.

            We'd like to be able to use a single bit to control when, say, a register is allowed to write its 32 bit contents to a bus. If this bit is 1, then all 32 bits are written to the bus. If the bit is 0, then none of the bits are sent to the bus.

            This can be easily implemented using 32 tri-state buffers.

            The example below shows how to implement a 4-bit tri-state buffer using 4 1-bit tri-state buffers. It's easy to extend this idea to 32 bits.

            There is a bus containing 4 wires going into the "black box" (we get to see the inside of the black box) labelled x3..0.

            Inside the black box, we split the bus into individual wires labelled x0 through x3. Each wire goes through a 1-bit tri-state buffer.

            There's a single control bit c coming from the outside world, and this one bit is attached to each of the four tri-state buffers. So, either all four tri-state buffers let the input values go through or none of them go through.

            As you can see, the implementation is pretty simple.

            Summary

            There are some hardware devices that always generate some output, such as registers. Many of these devices are often hooked to a bus, where only one device should write to at a time. Tri-state buffers allow us to control which device outputs its value to the bus, by allowing us to selectively control the control bit of the tri-state buffer.

            Usually, we use 32-bit tri-state buffers, which have 32 data inputs, 32 outputs, but a single control bit. The implementation is shown above.

            posted on 2007-01-23 17:55 Charles 閱讀(407) 評論(0)  編輯 收藏 引用 所屬分類: 拿來主義
            <2007年1月>
            31123456
            78910111213
            14151617181920
            21222324252627
            28293031123
            45678910

            決定開始寫工作日記,記錄一下自己的軌跡...

            常用鏈接

            留言簿(4)

            隨筆分類(70)

            隨筆檔案(71)

            charles推薦訪問

            搜索

            •  

            積分與排名

            • 積分 - 50470
            • 排名 - 449

            最新評論

            閱讀排行榜

            評論排行榜

            久久777国产线看观看精品| 久久青青草原亚洲av无码app| 久久久无码精品亚洲日韩蜜臀浪潮| 国内精品伊人久久久久777| 国产精品久久久久久五月尺| 亚洲欧美另类日本久久国产真实乱对白| 一本久久a久久精品综合香蕉| 色88久久久久高潮综合影院| 国产精品gz久久久| 一本色道久久综合狠狠躁| 国产69精品久久久久99尤物| 亚洲国产成人久久综合碰| 精品熟女少妇av免费久久| 久久亚洲色一区二区三区| 久久精品水蜜桃av综合天堂| 精品无码久久久久久久动漫| 久久无码人妻一区二区三区午夜| 精品多毛少妇人妻AV免费久久| 新狼窝色AV性久久久久久| 人人狠狠综合88综合久久| 久久精品视频网| 久久久亚洲欧洲日产国码是AV| 国内精品欧美久久精品| 精品无码久久久久国产| 久久精品国产精品亚洲精品| 久久综合九色综合久99| 91久久精品国产91性色也| 91久久婷婷国产综合精品青草 | 无码人妻精品一区二区三区久久| 久久亚洲欧美日本精品| 久久精品蜜芽亚洲国产AV| 久久精品国产色蜜蜜麻豆| 久久九九久精品国产免费直播| 久久精品国产一区二区三区日韩| 亚洲精品国产美女久久久| 伊人久久大香线蕉AV色婷婷色| 亚洲国产小视频精品久久久三级 | 中文字幕无码av激情不卡久久 | 91麻豆国产精品91久久久| 97久久精品午夜一区二区| 伊人久久大香线蕉亚洲|