【正文】
PLD(如 PAL/GAL)等,向高密度的 CPLD發(fā)展。 已具備的條件和尚需解決的問題 ① 電路的設計已經(jīng)完成,仿真結果也正確,說明總電路圖不但正確而且具備了應有的功能 。 指導教師意見 指導教師簽名: 年 月 日 教研室(學科組、研究所)意見 該生查閱了大量的相關資料,設計方案合理,同意開題。 by parison, in the case of random access memory (RAM), you can load new values into it and read these values back out again later. The term “bus” is used to refer to a group of signals that carry similar information and perform a mon function. A puter actually makes use of three buses called the control bus, address bus, and data bus. The CPU uses its address bus to “point” to other ponents in the system。 and it uses the data bus to convey information back and forth between itself and the other ponents. Our virtual puter is equipped with a data bus that is eight bits wide and an address bus that is 16 address bus to point to 216 = 65,536 different memory locations, which are numbered from 0 to 65,535 in decimal。 two wires can represent four binary values: 00, 01, 10, and 11。 and so on. As our virtual puter has an 8bit data bus, this can be used to represent 256 different binary values numbered from 0 to 255 in decimal or %00000000 to %11111111 in binary(where the “%” symbol is used to indicate a binary value). The problem is that humans tend to find it difficult to think in terms of long strings of 0s or 1s. Thus, when working with puters, we tend to prefer the hexadecimal number system, which prises 16 digits: 0 through 9 and A through F as shown in Figure 2. Figure 2. Binary and hexadecimal In this case, we use “$” characters to indicate hexadecimal values. Each hexadecimal digit directly maps onto four binary digits (and vice versa of course). This explains why we noted earlier that our 16 bit address bus could be used to point to 216 = 65,536 different memory locations, which are numbered from $0000 to $FFFF in hexadecimal. The Accumulator (ACC) and Status Register (SR) There are just a couple more things we need to know before we plunge head first into the fray. Amongst other things, our CPU contains two 8bit registers called the accumulator (ACC) and the status register (SR). (In this context, the term “register” refers to a group of memory elements, each of which can store a single binary digit.) As its name implies, the accumulator is where the CPU gathers, or “accumulates”, intermediate results. In the case of the status register, each of its bits is called a status bit, but they are also monly referred to as status flags or condition codes, because they serve to signal (flag) that certain conditions have occurred. We will only concern ourselves with the carry(C) flag for the purposes of our example program. Since we may sometimes wish to load the status register from (or store it to) the memory, it is usual to regard this register as being the same width as the data bus (eight bits in the case of our virtual system). However, our CPU employs only five status flags, which occupy the five leastsignificant bits of the status register. This means that the three mostsignificant bits of the register exist only in our imaginations, so their nonexistent contents are, by definition, undefined. The Program Itself For the purposes of this article, we’re going to create a simple program that first clears the calculator’s main display, and then loops around waiting for us to click one or buttons on the keypad. If any of these buttons are part of the “0” through “9” or “A” through “F” set, we’re going to display these value on the main display. Let’s walk through this code stepbystep. The first thing we do is to declare some constant labels and associated them with certain values using. In the case of this program, the CLRCODE label is associated with a hexadecimal value of $10, which is a special code that will clear the calculator’s main display. By parison, the MAINDISP label is associated with the hexadecimal value $F031, which happens to be the address of the output port that drives the calculator’s main display. Similarly, the KEYPAD label is associated with the hexadecimal value $F011, which is the address of the input port that is connected to the calculator’s keypad. (Note