青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

posts - 71,  comments - 41,  trackbacks - 0
? 2003 by Charles C. Lin. All rights reserved.

Introduction

The goal of any computer organization course, in my mind, is to give you the understanding of how a computer works.

In particular, I want to show you how to build a computer. This isn't a real computer, but it's not exactly fake either. A real computer requires many features to make it run fast, to interact with the keyboard, the mouse, the Internet, and so forth. All of those peripherals are very important when it comes to using a computer, and yet, they are really only secondary when it comes to understanding how a computer fundamentally works.

The computer we'll build is not one you can buy from a store, or from someplace online. You'll never play a game, or watch a video, or write and compile a program on this computer.

The purpose is to "build" a very rudimentary computer, and to make you believe that this computer could possibly work. Many details are left out. For example, we don't worry about very low level details. Silicon and semiconductor physics are not the point of this exercise.

We'll work at a more abstract level, concerning ourselves with registers, wires, combinational and sequential logic devices. While these may not make any sense to you know, they should become clearer later on.

We're not going to worry about how to make a computer run fast either. So our system doesn't include any caches, or pipelines. Nevertheless, by understanding the computer we build, you should have enough understanding to see how a more efficient computer can be built.

Our goal is to build a CPU that can run a small subset MIPS32 ISA. Why MIPS32? Of all ISAs, MIPS32 is very simple. Simple doesn't mean bad. In fact, simple, in this case, means it can be efficient. It's also great for instruction purposes because it's easier to understand than IA32 (the instruction set for x86).

We pick one ISA because this makes life simple. I could talk about half a dozen different ISAs, but that's like discussing half a dozen different programming languages. In the end, you know 6 programming languages badly, instead of one programming language well. By concetrating on one example, you learn how it works, and then you have something to compare it to when you learn other ISAs.

What is a Computer?

For us, a computer is going to consist of two devices: a CPU (central processing unit) and memory. These two devices are connected by a bus.

The CPU consists of several parts.

  • registers

    Registers are very fast memory on the CPU. The CPU we're considering consists of 32 32-bit registers. We'll label them $r0 through $r31.

  • ALU

What Does a Computer Do?

A computer's purpose is to run programs. A program is a large number of machine code instructions (written in binary).

Instructions are part of an ISA (instruction set architecture). An ISA tells you a valid set of instructions. The actual CPU runs those instructions. Think of an ISA as a kind of specification and the actual CPU as the implementation of the specifications.

The individual steps for running a single instructions is:

  • Fetch an instrution

    We assume all programs are stored in memory. We get an instruction, one at a time, and copy it from memory to the CPU. This instruction is copied to a special register called the instruction register, or IR, for short.

    A typical ISA instruction is add $r2, $r3, $r4 which adds the contents of register 3 to the contents of register 4, and stores the result into register 2 (overwriting the previous contents of register 2).

    Note that this instruction is written in pseudo-English, much like C++ code is written in pseudo-English. The CPU processes a binary translation of this instruction. The actual instruction is really a 32-bit bitstring which stands for the add instruction.

  • Decode an instrution/Operand Fetch

    Once the instruction is in the CPU, the CPU has to figure out what instruction was fetched. Based on the binary pattern of the instruction, the CPU begins to fetch operands.

    Think of an instruction as a function. The operands are the arguments to the function. For the most part, the operands are stored in registers, so the CPU must get the data from the registers so it can be processed.

  • Execute instruction using ALU

    The ALU (arithmetic-logic unit) is a combinational logic device that performs operations based on some control inputs. For example, an ALU can add, subtract, do bitwise operations, and so forth. You tell the ALU what to do by setting the control bits correctly. If you change the control bits, the operation of the ALU also changes.

    The ALU has two 32-bit inputs. The inputs of the ALU can come from anywhere, but in the CPU we're talking about, it comes from two registers from the register file.

    For example, the contents of $r3 and $r4 can be fed in as inputs into the ALU. The ALU also has control inputs to tell it what to do. The CPU can set the control inputs so the ALU performs, say, addition, on its inputs.

    The ALU has a 32-bit output, which is the result of performing the operation on the input.

  • Memory Access (for loads and stores)

    The only instructions that interact with memory are load and store. This occurs at this step. This step is skipped for other instructions. However, load and stores are important enough to mention them at this step. We'll see why it has to be at this step.

  • Write Back to Register File

    The result of the ALU is stored at some register specified by the instruction. For example, in the instruction add $r2, $r3, $r4, the result is stored in the first register, which is $r2

  • Update PC

    The PC (program counter) stores the address of the next instruction to be fetched. Normally this is the address of the old instruction plus 4.

These steps are repeated over and over until the program concludes.

Understanding the Pieces

Initially, our goal is to understand the various parts of the computer. In particular:
  • hidden registers: PC (program counter) and IR (instruction register) plus a few more registers.
  • the register file this device contains the user-visible registers, i.e., registers $r0 through $r31.
  • memory this is where the instructions and data are stored
  • ALU this performs arithmetic or logical operations on data stored in the register.
  • various parts We'll also use wires, other registers, multiplexers, and a few other devices.

We begin by understanding the following parts:

  • What a wire is
  • What a bus is
  • What a clock is
  • What a register is
  • What a register file is
  • What an ALU is
We'll talk about how to connect the various parts together and how these parts can execute instructions.

Review Questions

  • What is a computer?
  • What are registers?
  • What is an ALU?
  • What is memory?
posted on 2007-01-23 14:28 Charles 閱讀(352) 評論(0)  編輯 收藏 引用 所屬分類: 拿來主義
<2025年9月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

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

常用鏈接

留言簿(4)

隨筆分類(70)

隨筆檔案(71)

charles推薦訪問

搜索

  •  

積分與排名

  • 積分 - 51563
  • 排名 - 449

最新評論

閱讀排行榜

評論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            欧美日韩在线电影| 久久香蕉精品| 午夜精品久久久久久久99樱桃 | 亚洲每日更新| 国产精品综合久久久| 久久久7777| 国产欧美一区二区三区在线老狼| 麻豆精品视频在线观看| 欧美专区在线观看| 亚洲男人av电影| 欧美岛国在线观看| 亚洲国产天堂久久综合| 欧美激情欧美激情在线五月| 久久精品国产精品亚洲综合| 亚洲免费影院| 午夜精品一区二区在线观看| 一区二区在线看| 国产精品扒开腿做爽爽爽软件 | 欧美午夜精品| 久久av在线看| 亚洲缚视频在线观看| 亚洲精品一区二区三区四区高清| 亚洲婷婷国产精品电影人久久| 欧美一区二区在线视频| 亚洲午夜极品| 老司机67194精品线观看| 欧美激情综合网| 国产亚洲综合在线| 一二三区精品| 久久人人爽人人| 日韩视频三区| 欧美日韩视频在线一区二区| 性一交一乱一区二区洋洋av| 国产精品专区h在线观看| 这里只有视频精品| 久色成人在线| 午夜国产精品视频免费体验区| 欧美视频三区在线播放| 艳女tv在线观看国产一区| 久久久不卡网国产精品一区| 亚洲精品国产视频| 久久久久久一区| 欧美精品日韩精品| 欧美日韩亚洲精品内裤| 国产亚洲欧美另类中文| 亚洲欧美制服另类日韩| 免费影视亚洲| 欧美一级久久久久久久大片| 欧美激情久久久| 国产区精品视频| 久久―日本道色综合久久| 亚洲性线免费观看视频成熟| 欧美一区二区在线免费观看| 国产精品二区在线| 亚洲精品免费在线观看| 一区二区欧美视频| 国产精品最新自拍| 欧美在线亚洲在线| 亚洲综合首页| 国产精品毛片a∨一区二区三区|国 | 欧美电影专区| 久久精品91久久久久久再现| 欧美亚洲一区二区三区| 亚洲第一精品福利| 欧美1区2区视频| 久久久久99| 亚洲精品乱码久久久久久蜜桃91| 狂野欧美一区| 久久米奇亚洲| 一本大道av伊人久久综合| 亚洲一区二区欧美| 国产亚洲制服色| 日韩视频在线免费| 国产欧亚日韩视频| 看欧美日韩国产| 欧美日韩国产小视频在线观看| 亚洲免费观看视频| 久久婷婷一区| 毛片基地黄久久久久久天堂| 久热精品视频在线观看| 亚洲综合视频网| 亚洲欧美日韩天堂| 一区二区三区三区在线| 久久精品视频网| 亚洲视频一起| 欧美黄色免费网站| 亚洲国产综合在线看不卡| 精品999久久久| 亚洲精选在线观看| 136国产福利精品导航| 欧美电影免费| 久久久久欧美| 国产日韩欧美综合精品| 亚洲精品一区二区在线| 久久激情中文| 国产精品v亚洲精品v日韩精品| 亚洲激情电影在线| 最新国产成人av网站网址麻豆| 欧美极品aⅴ影院| 欧美1区2区3区| 91久久久久久久久| 欧美aⅴ99久久黑人专区| 午夜精品福利一区二区三区av| 国产女主播一区| 久久福利毛片| 久久久久网址| 韩国一区二区在线观看| 免费成人高清在线视频| 亚洲第一天堂av| 国产精品美女在线| 免费视频一区| 久久久久看片| 欧美怡红院视频| 亚洲综合欧美日韩| 一区二区三区黄色| 亚洲精品乱码久久久久久久久| 久久性色av| 久久国产精品99国产| 亚洲欧美一区二区视频| 一本一本a久久| 亚洲一区二区黄色| 亚洲一区二区三区三| 日韩写真视频在线观看| 日韩视频―中文字幕| 亚洲日本视频| 在线视频一区二区| 欧美亚洲一区二区在线观看| 亚洲一区二区三区免费在线观看| 亚洲视频一区二区免费在线观看| 日韩一级在线| 欧美一区二区三区成人| 久久久九九九九| 欧美黄色一级视频| 一区二区三区黄色| 久久国产精品72免费观看| 久久这里有精品视频| 欧美日韩卡一卡二| 国内精品免费在线观看| 亚洲精品小视频| 久久久免费av| 亚洲一区二区三区高清 | 国产日韩亚洲欧美综合| 国产精品成人aaaaa网站| 激情久久婷婷| 午夜视频一区| 久久久精品国产99久久精品芒果| 国产亚洲欧美日韩精品| 噜噜噜噜噜久久久久久91 | 久久久午夜精品| 亚洲毛片在线观看.| 亚洲一区免费网站| 亚洲国产精品热久久| 99精品视频免费观看视频| 亚洲精品国产欧美| 久久精品91久久久久久再现| 欧美另类极品videosbest最新版本| 一区在线观看视频| 欧美99久久| 欧美区亚洲区| 亚洲主播在线| 午夜日韩在线观看| 在线色欧美三级视频| 女人色偷偷aa久久天堂| 美日韩精品视频| 亚洲黑丝一区二区| 99re66热这里只有精品3直播| 欧美日韩精品伦理作品在线免费观看| 亚洲精品国产精品乱码不99| 一区二区三区免费网站| 国产手机视频一区二区| 久久综合五月| 欧美先锋影音| 美女脱光内衣内裤视频久久网站| 欧美国产精品久久| 欧美一区二区视频在线观看| 久久久一区二区| 亚洲欧美日韩一区二区三区在线观看 | 在线视频一区二区| 伊人久久婷婷色综合98网| 一本色道88久久加勒比精品| 国语精品一区| 亚洲一区三区在线观看| 日韩一级视频免费观看在线| 久久精品国产99国产精品澳门| 亚洲精品一区二区三区av| 在线性视频日韩欧美| 欧美色偷偷大香| 亚洲日韩中文字幕在线播放| 亚洲国产精品精华液2区45| 亚洲天堂视频在线观看| 性欧美激情精品| 久久深夜福利免费观看| 一本综合久久| 麻豆精品在线视频| 亚洲国产成人tv| 日韩手机在线导航| 欧美中文在线观看| 亚洲欧美成人网| 黄色一区三区| 日韩午夜一区|