• <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.

            Wires

            You can transmit a single bit on a wire. The purpose of a wire is to allow information to be transmitted.

            It's useful to think of the wire like a pipe which you can send soda. Let's pretend a device can send two kinds of soda. If a device pumps red soda, then the wire is transmitting a 0. If a device pumps green soda, the wire is transmitting a 1.

            A device can also pump no soda at all. In this case, the wire is at high impedance, which means it has neither value 0 or 1 (or perhaps more precisely, it has a random value of 0 or 1, which changes depending on when it is read).

            When a device is pumping soda into the pipe, it can only pump red or green soda. No other device is allowed to pump soda onto the same wire. If some other device attempts to pump soda, then the wire will contain a garbage value. We assume there is a garbage value even if two devices are pumping soda of the same color.

            The device that is pumping the soda is said to write a a value to the wire. We want to guarantee that there is, at most, single writer (there may be none).

            Devices may "read" the wire as well. The device can "sample" the soda, and determine if it's red or green. If the device attempts to read the value of a pipe when it is empty, or if the device attempts to read the value when two or more devices attempt to pump soda, then we assume the value read is random. That is, it can either be a 0 or a 1, but we don't know which, and this value can change.

            In order for us to make a stable system, we want devices reading when a pipe contains soda pumped by a single device.

            More than one device can read from the wire, but at most one device can write to the wire.

            Why the Soda Analogy?

            You probably think it's weird to view a wire like a pipe containing soda. However, it gives us some insight into the working of a wire.

            When you learn to program, you often think of values in discrete units. For example, suppose you want to run the statement: z = foo( x + y ). You think of x + y being computed, then this value sent to foo, then foo computing a return value, and this return value being stored in z.

            Each event occurs in a discrete step.

            However, it's better to think of a wire like water being sent to your home, or like electricity flowing down the wires. It's constantly flowing. This creates a more accurate image of what's happening in a circuit.

            In reality, electrons are floating at some potential of either 0 or 5 volts (though these days, it's sometimes 3.3 volts) where 0 volts represents the bit 0, and 5 volts represents the value 1. If no voltage is asserted on the wire, the the voltage is ambiguous and essentially "floats".

            These electrons are flowing through the wire, and devices can measure the potential of the wire to determine if there is a 0 or 1 on the wire.

            We want to avoid two devices trying to assert (i.e. "write") voltages on the wires.

            Specifying Behavior

            It's useful to specify the behavior of the wire, using two devices attempting to write a value to a wire. Each device can do one of three things: write a 0, write a 1, or not write at all. When a device does not write a value, we'll use the letter Z, which is the symbol for "high impedance" (i.e., no output).

            The following chart describes the behavior.

            DeviceOneDeviceTwoWire Value
            0 0 ?
            0 1 ?
            0 Z 0
            1 0 ?
            1 1 ?
            1 Z 1
            Z 0 0
            Z 1 1
            Z Z Z

            The output is one of four values: 0, 1, Z, and ?. 0 and 1 should be obvious.

            ? occurs when two devices attempt to write to the wire at the same time. When a device reads from the bus it reads a value that's either 0 or 1, so it's unknown. We want to avoid having two devices write at the same time.

            Z means that no device is writing to the wire. Reading a value from the wire also results in a value that's 0 or 1, but it's not known which. We want to avoid having a device read the wire when no device is writing to a wire.

            Other Issues

            In reality, we've avoided a few issues. In particular, we haven't discussed how fast we can change values on the wire. This can affect how fast the CPU works, but since this is not such an important issue, we won't discuss it much.
            posted on 2007-01-23 14:17 Charles 閱讀(175) 評(píng)論(0)  編輯 收藏 引用 所屬分類: 拿來(lái)主義
            <2007年1月>
            31123456
            78910111213
            14151617181920
            21222324252627
            28293031123
            45678910

            決定開(kāi)始寫工作日記,記錄一下自己的軌跡...

            常用鏈接

            留言簿(4)

            隨筆分類(70)

            隨筆檔案(71)

            charles推薦訪問(wèn)

            搜索

            •  

            積分與排名

            • 積分 - 50948
            • 排名 - 448

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            99久久精品午夜一区二区| 免费精品久久久久久中文字幕| 狠狠色丁香久久婷婷综合蜜芽五月 | 久久久91人妻无码精品蜜桃HD| 久久青青草原精品国产不卡| 亚洲色欲久久久综合网| 国产精品久久国产精品99盘| 久久97久久97精品免视看| 欧美黑人激情性久久| 国产精品一区二区久久精品无码| 亚洲国产精品狼友中文久久久| 亚洲精品无码久久千人斩| 久久久久久国产精品美女| 久久久老熟女一区二区三区| 老司机午夜网站国内精品久久久久久久久| 99久久精品免费看国产一区二区三区 | 久久久久亚洲AV无码永不| 久久精品女人天堂AV麻| 72种姿势欧美久久久久大黄蕉| 久久强奷乱码老熟女网站| av无码久久久久久不卡网站| 亚洲欧美一级久久精品| 国产精品免费看久久久香蕉| 精品永久久福利一区二区| 狠狠综合久久综合88亚洲| 久久综合九色欧美综合狠狠| 99久久无码一区人妻| 久久免费小视频| 久久久久综合国产欧美一区二区| 婷婷综合久久中文字幕蜜桃三电影 | 无码人妻少妇久久中文字幕| 久久国产高清字幕中文| 久久精品国产网红主播| 熟妇人妻久久中文字幕| 久久男人Av资源网站无码软件| 无码国内精品久久人妻麻豆按摩 | 人人狠狠综合久久亚洲婷婷| 99久久精品毛片免费播放| 99久久777色| 久久99免费视频| 久久精品国产亚洲一区二区三区|