Popular in Course
verified elite notetaker
Popular in ComputerScienence
This 33 page Class Notes was uploaded by Jonas Bartell on Monday October 26, 2015. The Class Notes belongs to CS0447 at University of Pittsburgh taught by Staff in Fall. Since its upload, it has received 40 views. For similar materials see /class/229391/cs0447-university-of-pittsburgh in ComputerScienence at University of Pittsburgh.
Reviews for COMPUTRORGZTN&ASSMBLYLANG
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/26/15
Getting Started with PCSpim Getting Started with P CS p1 m If you are going to use PCSp i m on Microsoft Windows this is the rst section to read If you are going to use xspi m on UNIX go back to the previous section and start there After you read this section be sure to take a look at the quotSPIM Command7Line Optionsquot section to see how to accomplish the same thing with S p i m commands You may need to install PC Spi m on your computer before you rst run it Your instructor should tell you Where to get a copy of the program and how to install it When PCSp i m is installed it adds an entry to your start menu called PCSpi m Click on it and PCSp i m will start running When PC Sp i m starts it pops up a large window on your screen see Figure A92 The window is diVided into four panes l The top pane shows the Values of all registers in the MIPS CPU and FPU This display is updated whenever your program stops running The next pane displays instructions from both your program and the system code that is loaded automatically when PCSp i m starts running Each instruc7 tion is displayed on a line that looks like 0x00400000 0x8fa40000 lw 4 OZ9 89 lw a0 OSp Sp fiat m Wm 100 110 339 El 4amp1 it PL 00000000 Status 7 mmfflu 111 00000000 LU EulerA1 Register 10 7 00000000 Ra to 7 00000000 R15 50 7 00000000 R24 ta 7 00000000 9 00000000 R17 lt1 7 00000000 R75 re 7 00000000 1001 7 00000000 n10 t2 7 00000000 11111 1521 7 00000000 R26 km 7 00000000 000000 KJ J L53 7 00000000 112 kl 7 00000000 a0 7 00000000 R12 4 7 00000000 R20 54 7 00000000 R211 111 7 10001000 0x00400000 mammm 111134 aim 174 in San 0651 u al g g 0x00400004 mman addm 115 m 4 171 addill 121 w 4 a argv 1010040000111 0x24a60004 aamu re 55 4 175 aamu saz 5a 4 4 amp rx0040000c1 Uxuuualuau 511 1 14 2 m 511 1V0 110 2 100400010 mmcmzi 20m 6 36 2 1n aaau saz saz 3110 0100400014 OXOKWWW ja 0x00000000 min 17 Jdi mm 01004000111 0x00000000 mp 110 quotup nxnmmmr mmymna OH 117 m 10 1117 11 m 10 1mm 0x10000000 0x10040000 0x00000000 sum Loxinrenu 0x00000000 KERNEL 111111 Val51m 7 0 ma 1 of March 14 2004 npyr 1tj1t 199077004 by in R 1am Harman Mir em 11 R1005 Reserved 5 and W005 Dons by 01010 A mmey mmcsmmmu DYMmt 1997 by Mor39aan Kaufllann Pubilsher s 111 e me we REAmE 0139 A 0111 Wyn19111 Home 1031131 0 Lal39usSoftwal39 f msi xqt1u1s s m Hsrr 177m 1 FIGURE A92 SPIM s Microsoft Windows interface PCSpi m1 Getting Started with PCSpim The rst number on the line in square brackets is the hexadecimal meme ory address of the instruction The second number is the instruction s numerical encoding again displayed as a hexadecimal number The third item is the instructions mnemonic description Everything following the semicolon is the actual line from your assembly le that produced the instruction The number 89 is the line number in that le Sometimes nothing is on the line after the semicolon This means that the instruction was produced by SPIM as part oftranslating a pseudoinstruction into more than one actual MIPS instruction The third pane displays the data loaded into your program s memory and the data on the program s stack The bottom pane is where PCSpim writes messages This is where error messages appear Let s see how to load and run a program You can either go to the Pi l e menu at the top left of PC Sp i m s window and click on Op e n or you can click on the open icon right below Either way PCSpi m opens up a familar dialog box which lets you nd the le that you want to load After you ve selected the le click on the Op en button and PC Spi m will load the le If you change your mind click on the C a n C el button and nothing will happen When you click on ope n PC Spi m gets rid of the prompt window then loads your program and redraws the screen to display its instructions and data Now move the mouse to put the cursor over the scrollbar to the right of the second pane and move the bar down so you can nd the instructions from your program To run your program you can either go to the S i mul a to r menu and click on GO or just click on the GO icon Either way PC Spi m pops up a dialog box with two entries and two buttons Most of the time these entries contain the correct values to run your program so you can ignore them and just click on OK This button tells PCSpim to run your program Notice that when your program is running PC Sp i m does not update the register display pane because the registers are contine ually changing You can always tell whether PC Sp i m is running by looking at this pane or the title bar at the top of PC Sp i m s window If you want to stop your program go to the Simul ato r menu and click on Break This causes PCSpim to pop up a dialog box with two buttons Before clicking on either button you can look at registers and memory to nd out what your program was doing when you stopped it When you understand what hap pened you can either continue the program by clicking on Y e S or stop your pro gram by clicking on N 0 If your program reads or writes from the terminal PCSpi m pops up another window called the console All characters that your program writes appear on the Getting Started with PCSpim console and everything that you type as input to your program should be typed in this window Suppose your program does not do what you expect What can you do SPIM has two features that help debug your program The rst and perhaps the most useful is singleestepping which allows you to run your program an instruction at a time Open the Si mul ato r menu and click on Si ngl e Step Everytime you do this PCSpim will execute one instruction and update its display so that you can see what the instruction changed in the registers or memor What do you do ifyour program runs for a long time before the bug arises You could singleestep until you get to the bug but that can take a long time and it is easy to get so bored and inattentive that you step past the problem A better alter native is to use a breakpoint which tells PCSpi m to stop your program immedie ately before it executes a particular instruction In the S i mul ato r menu there is an entry called B rea kpoi n ts Click on it and the PCSpi m program pops up a dialog box with an entry box and a list Type into this box the address of the instruction at which PCSp i m should stop Or if the instruction has a global label you can just type the name of the label Labeled breakpoints are a particularly convenient way to stop at the rst instruction of a procedure To actually set the breakpoint click the Add button The breakpoint will then appear in the list of active breakpoints You can set as many breakpoints as you want To remove a breakpoint select it in the list and click on Remove After you have set your breakpoints Cl OS e the dialog and run your program When SPIM is about to execute the breakpointed instruction PC Sp 1 m pops up a dialog with the instruction s address and two buttons The Y e S button continues running your program and NO stops your program Before you click on either button you can examine the display to see the values in registers or memory or you can add or remove breakpoints Singleestepping and setting breakpoints will probably help you nd a bug in your program quickly How do you x it Go back to the editor that you used to create your program and change it To run the program again you need a fresh copy of PCSpim which you get in one of two ways Either you can exit from PCSp i m by clicking on the Exi t entry in the PH e menu or you can just reload your program When you reload your program PCSp i m will ask if you want to reinitialize the simulator The answer is yes if you have changed your program and want to try it again CSCOE0447 Computer Organization and HDDCIIIIJIy Language vyl v 39 Dept of Computer Science University of Pittsburgh Five classic components lam like a pack of file folders lam like a control I exchange information with outside world lam like a conveyor belt service stations El I I El 0mm CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Sounds scary So far we studied Instruction set architecture basic MIPS architecture amp assembly language We will review binary arithmetic algorithms and t eir implementations Binary arithmetic will form the basis for CPU39s WWW my ytu mw mantrumanaarananammw language Umvm yofhltsbmdi Binary number representations We looked at how to represent a number in fact the value represented by a number in bina Unsigned numbers 7 eventhing is positive We will deal with more complicated cases Negative numbers Real numbers aka lloallngspolnl numbers The first question How do we re resent a negative number in decimal ytu mw mantrumanaarananammw language Umvm yofhltsbmdi Method 1 signmagnitude This is the same method we use for decimal numbers sign bit absolute value magnitude Sign bit 0 positive my Examples assume 4bit representation 0000 0011 39 o A O O A 1111 1000 Properties Two Os a positive 0 and a negative 0 There are equal of positive and negative numbers CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Method 2 one39 cm 2N 1 number A A 2N 1 Given a number A it s negation is done by 1111 1111 A In fact simple bitbybit inversion will give the samemagnitude number with a different sign Examples assume 4bit representation 0 0000 o 0011 1001 1111 1000 7 39 Propertles There are two Os There are equal of positive and negative numbers CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Method 3 two39s complement 2N number A A 2N Given a number A it s negation is done by 1111 1111 A 1 In fact simple bitbybit inversion followed by adding 1 will give the samemagnitude number Witn a dITTerent Sign Examples assume 4bit representation 0 0000 o 0011 1001 1111 o 1000 7 39 Propertles There is a single 0 There are unequal of positive and negative numbers CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Summary Code SignMagnitude 139s Complement 2 s Complement 000 0 0 0 001 1 1 1 010 2 2 2 011 3 3 3 100 0 3 4 101 1 2 3 110 2 1 2 111 3 0 1 Issues 0 of zeros Balance Arithmetic algorithm implementation CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh When N If we use the two s complement method 0000 0000 0000 0000 0000 0000 0000 0000 0 0000 0000 0000 0000 0000 0000 0000 0001 1 0000 0000 0000 0000 0000 0000 0000 0010 2 01111111111111111111111111111110 2147483646 01111111111111111111111111111111 2147483647 1000 0000 OOOU UUUU UUUU UUUU UUUU UUUU 4 I47403o4o 1000 0000 0000 0000 0000 0000 0000 0001 2147483647 1000 0000 0000 0000 0000 0000 0000 0010 2147483646 11111111111111111111111111111101 3 11111111111111111111111111111110 2 11111111111111111111111111111111 1 CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Two39s complement operations Ne39atin39 Invert all bits and add 1 This operation is equivalent to subtracting the number from 2N why Converting an Nbit number into an Mbit number MgtN Eg MIPS 16bit immediate it39s a signed number converted into a 32bit number This operation is called signextension Eg from 4bit encoding to 8bit encoding 0010 2 o 1010 2 What is zeroextension CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Addition We are uite familiar with adding two numbers in decimal what about adding two binan numbers Ifwe use the twu39s Luinpiement methuu LU represent umaiy numbers addition can be done in a straightforward way Examples 4bit representation 0010 2 0011 3 1111 71 01004 01117 00102 Let39s talk aboutuvemuvv Iiuw ymzmi ampurtruwmm andAxxemDN ungui Umvus ym39nttsbugi Ove rflow Because we use a limited number of digits to re resent a number the result of an operation may not fit No overflow when We add two numbers with different signs We subtract a number from another number having the samesign Overflow detection Adding two ositive numbers ields a negative number Adding two negative numbers yields a positive number How about subtraction ymzmi ampurtruwmm andAxxemDN ungui Umvus ym39nttsbugi What happ The CPU can Generate an exception what is an exception Set a flag in the status register what is the status register Do nothing Languages may have different notions about overflow Do we have overflows in the case of unsigned always positive numbers Example addu addiu subu CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh MIPS example I looked at the MIPSBZ instruction set manual ADD ADDI instructions generate an exception on overflow ADDU ADDIU are silent CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh C anguag GCDEMIW ampurs organizmmn and Assembiy Language Unmmiyarmgmgh Subtraction We know how to add We know how to negate a number We will use the above two known operations to perform subtraction A 7 B A B The hardware used for addition can be extended to handle subtraction GCDEMIW ampursr Organizmmn and Assembiy Language Unmmiyarmgmgh 1bit adde We will look at a singlerbit adder Wlll bulld on Ms adder to deslgn a 3239blt adda 2 outputs 5 sum CM carryout sKazmn mm aamm a may Lawng mm mm lt1 Nbit adder An N bit adder can be constructed with N singlerbil adders A carry out gmerated W a stage l5 propagated to the next rlpplercarry Edda 3inputs A Nrblt lnrnput B Nrblt mmput Cm arrymput 2 outputs 5 Nrbltsum CM carryout sKazmn mm aamm a may Lawng mm mum a Nbit ripp at each stage 0 o o 1 1 1 u o o 1 1 o cam out at each stage CSCuEOM7 Computer Orgamzao on and Aamgxy Language Umvaaw afpmsburgh Describing a singlebit adder A quottruthquot table will tell us about the o eration of a singlebit adder cscggom cgmgme crgamangn and Aaamewy Language Umvaaw afpmsbmgh Multiplicat More complicated than addition A straightforward implementation will involve addition and shifting I A quotmore complex Uperduunquot Implles More area on silicon andor More time more clock cycles or longer clock cycle time Let s begin from a simple straightforward method For now consider onl unsigned numbers CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Straightforward algorithm 01010010 multiplicand x 01101101 multiplier CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Mmmm ZVbil shift legi el AL numpb mow eresul P39ndh n he MAW mm mm 3 5mm F wllp rmglslau htforward but he ve desi n CSCOE 0447 Computer Orgam mom and Assemb y Lan gu age Unmmty cf ymsbmgh Hardware design 2 m m mm 4r it I Shi legi e39 gth legblel m m vlullyhuuu m a u Tenmduc u Hece heres n u We um 44 m x Wm WM Wm mjl mam Me 6445 1 sum m w mm r rwmnmu my ll m 2 WWW a 9 32bit ALU instead of 64bit ALU CSCOE 0447 Computer Orgam mom and Assemb y Lan gu age Unwmny cf ymsbmgh Hardware bit shift register am right Pracucl W I a Removed a 32bit shift revister CSCOEOM7 computer orgamzauon and Assemb y Language Example Let39s do OO10gtltO11O 2X6 unsigned 32nd repemmn Yes 32 rezew Umversxty of Pmsburgh Implementation 3 Iteration Multiplicand Step Product 0 0010 mma va ues 0000 0110 1 O rgt no op 0000 0110 1 0010 2 shxft nght 0000 0011 1 17gt product 0010 0011 2 0010 product mumphcand 2 shxft nght 0001 0001 1 17gt product 0011 0001 3 0010 product mumphcand 2 shxft nght 0001 1000 1 O rgt no op 0001 1000 4 0010 2 shxft nght 0000 1100 CSCOEOM7 computer orgamzauon and Assemb y Language Umversxty of Pmsburgh Booth39s encoding Three symbols to represent a binary number 1 01 Examples 8bit encoding 1 11111111 two39s complement u 00000001 BUULII39 ullLquIIg 0 00001110 two39s complement 00010010 Booth39s encoding Bit transitions in number in two39s complement encoding show how Booth39s encoding works 0t00from rigw c c 0 0 to 1 1 1 to 1 0 1 to 0 1 CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Booth39s encoding Ke oint A quot1quot in he multiplier implies an addition operation If you have many quot1quots that means many addition operations Booth39s encoding is useful because it can reduce the number of addition operations you have to perform With Booth39s encoding partial results are obtained by Addin multi licand Adding 0 Subtracting multiplicand CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Booth39s alg Let39s do 0010x1101 2gtlt3 Booth s algorithm Iteration 394 39 Step Product 0 0010 initialvalues 000011010 10 gt product 1110 1101 0 1 0010 product multiplicand shiftriiht 111101101 01 gt product 0001 0110 1 2 0010 product multiplicand shift right 000010110 39 quot39 111010110 3 0010 product shift right 11110101 1 11gtnoop 111101011 4 0010 shift right 111110101 CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Booth39s algorithm in action Booth s Iteration Multiplicand Prod uct CSCoE0447 Computer Organization and Assembly Language University ofpmsburgh Logic design Di ital hardware is im lemented b1 wa39 of logic design Digital circuits process and produce two discrete values 0 CSCOE0447 Computer Organization andr and Assembly Language Example 1 bit full adder FA Logic Desig n Review Sa ngyeu n Cho De t of Computer Science University of Pittsburgh CSCOE l 541 lntro to ComputerArthitetture Umvgmty ufpmsburgh Layered design approach Transistor as a switch X X X Logic design is done using logic gates Often we design desired function using high level languages I and somewhat higher level than logic gates G 31 30 Two approaches in design I TOP down Nquot type TR Y Y 0 Bottom up Y X X X G 3 0 3 1 gt 7 i l P type TR Y CSCoEiSM intro to Computer Arthitenure Unwers yummmgh CSCoEWS H intro to omnuterArtHitecture Universityufpmsburgh 3 An inverter Pquot ty pe TR Nquot type TR CSC0E1541 mm to Computer Armnenure When A 0 Pquot ty pe TR Nquot type TR CSC0E1541 mm to Computer Armnenure 1 n 0 n 1 n 0 ON OFF University uf nasburgh 1 Umversxty uf Pmsburgh WhenA 1 Pquot type TR A1 N quotty pe TR CSCOHSM Who to ComputerAnhnenure Abstraction Pquot type TR N quotty pe TR CSCOHSM mm to ComputerAnhnenure 1 n 0 n 1 n u OFF ON Umversxty umesburgh University umesburgh Logic gates 2input AND 2input OR 2input NAND 2input NOR CSC0E1541 Who to Computer Anhnenure Truth table YAampB YAB YA amp B A B University uf nasburgh CSC0E1541 Who to Computer Anhnenure Umversxty uf Pmsburgh Describing a function OutputA OutputB OutputC Methods 0 Truth table 0 Sum of products 0 Product of sums Fnput0 Input1 F39nput0 Input1 F nput0 Input1 CSCOHSM Who to ComputerAnhnenure Sum of products S C InputN71 InputN71 InputN71 Umversxty umesburgh out ll quotquotn 39cin39 AB39Cin A39Bcin AB39Cin ABCin39 ABCin CSCOHSM mm to ComputerAnhnenure 39 ABCin University umesburgh Combinational vs sequential logic Combinational logic Combinational logic function 0 Afunction whose outputs are dependent only on the current inputs 0 As soon as inputs are known outputs can be determined Sequential logic combinational logic memory 0 Some memory elements ie quotstatequot inputs outputs o Outputs are dependent on the current state and the current inputs 0 Next state is dependent on the current state and the current inputs CSCoElSM intro to Computer Arthitenure Unwers yufp mbmgh CSCOHSM intro to ComputerArthitetture Un ve ty fp nsbufgh 13 Sequential logic Combinational logic An39 combinational lo39ic can be im lemented usin39 sum of products or product of sums Input output relationship can be defined in the truth table format inputs outputs From the truth table each output function can be derived Boolean expressions can be further manipulated eg to reduce cost using various Boolean algebraic rules yacmsm intro to Computer Arthitenure Unwas yufpmbmgh CSComsm intro to Computerimmature Universityumesburgh 15 Boolean algebra Boolean algebra Boole George 18151864 mathematician and Binard o erations AND gtlt OR philosopher inventor of Boolean Algebra the basis of a Idempotent computer arithmetic aa aa a o Commutative ab ba Binary values 01 81 ba Two binary operations AND gtlt OR Associative One unary operation NOT all a39b39c abc abc o Distributive abc ab ac abc abac CSCoElsM intro to Computer Architecture Un ve ty fp nsburgh cscOEisM intro to ComputerArchitecture Un ve ty fp nsbufgh l7 Boolean algebra Expresswe power De Morgan39s laws With ANDORNOT we can ex ress an39 function in Boolean ab ab algebra o ab ab 0 Sum of products More 0 aaba o aaba What if we have NANDNORNOT What if we have NAND only What if we have NOR only a a o aa1 aao CSCoElsM intro to Computer Architecture Unwers yumnsmgh SCOHSM intro to ComputerArthitetture Unwersnyufpmbmgh 1 Multiplexor aka MUX A 32bit MUX SeiECl Select A A 32 M A31 M u 32 C U C31 32 x Y B 331 B A30 u C30 Ban gt 5 AU 4 u CO x BU 4 Y S BA m m 4 4H i r r 3f 32 17bit mui piexors CSC0E1541 intro to Computer Arthitenure Unwers yummbmgh CSCOHSM intro to ComputerArthitetture Un ve rs tnyp nsbuth Simplifying expressions Karnaugh map ACin BCin AB I I I cout in AB cin ABCin ABCin C0th BCin ACin AB cout BCinABACin CSC0E1541 intro to Computer Arthitenure Unwers yummmgh CSC0E1541 intro to ComputerArthitetture Unwers yufpmbmgh Building a 1bit ALU Building a 32bit ALU ALU arithmetic logic unit arithmetic unit logic unit WW m mmmmm mam emu mm mwmmm mmmw Implementing quotsubquot Implementing NAND and NOR W M emu mm mmmw Implementing SLT setlessthan Hunnu fur bios n3n Hunnu m him Supporting BEQ and BNE May me May me Implementing SLT setlessthan Abstracting ALU m u quot a mm mm mm mm mum mm mum mm RS latch RS latch Ol Beware of the feed back vaICII I v J I CSCoElsM mm to Computer Archltenure Unwers yumnsbmgh SCOHSM mm to ComputerArthltecture Unwers yufpmbmgh RS latch RS latch OS When R1SO ne vJ vuult wwv CSCoElSM lntro to Computer Arthltenure Unwers yummmgh CSC0E1541 lntro to ComputerArtH tecture Umversxtyumesburgh RS latch RS latch 18 39 vvncn I v J V LAIIM lt vvua I vvllut Ilurlrlclla u I J I CSCoElsM rm to Computer Archltenure Unwers yumnsbmgh CSCoElSM mm to ComputerArchltecture Unwers yufpmbmgh D latch D latch c Q 5 D Note that R S inputs always get opposite values when C1 When CO SRO 3 RS latch remembers the previous Note that we have an RS latch In the back end of thIs deSIgn value CSCoElsM lntro to Computer Arthltenure Unwers yummmgh cscwsm lntro to ComputerArchltecture Unwersnyufpmbugh D latch quottransparent modequot cytomsm intro to Computer Architecture D flipflop DFF University uf Pittsburgh Two cascaded D latches C input of the second is inverted This is a negative edge triggered D FF cytomsm intro to Computer Architecture University uf Pittsburgh D latch CSCOHSM intro to ComputerArchitecture D flipflop CSCOHSM intro to ComputerArchitecture I Latch University umesburgh University ufpinsbuigh Finite state machine FSM cm nut Clulvul mm mm nwmmmnw meme Traffic light control example me n i new 1 0 Win Vntynhnk Traffic light control example Two states NShte green mm on NortnSOutn road EWhte green ngnton EemWegtroee Cunent state goes for 30 seconds then Swltth to tne other state mnere l5 5 ar wamng Current state gas for another 20 Setondi w not We use 130 Hz lock wast mememmm hummu Traffic light control example newquot zvuqeen Nscm Msw wast mememmm hummu Traffic light control example How do implement a logic design Let39s assign quotOquot to NSIite and quot1quot to EWIite initially Various wa39 s to im lement 1 our desi39n NextState CurrentState39EWcar CurrentStateNScar Use 74 chips you may need many of those for even a very NSIite CurrentState39 Simple deSlgn EWIite CurrentState Use PLA Pro ramming Lo ic Arrar Use FPGA Field Programmable Gate Array ASIC Application Specific Integrated Circuits 0 Most capable approach in terms of design size and performance however there is a large fixed development cost Ihls approach IS Justmed only Tor volume products CSCoElsM intro to Computer Architecture Unwers yufnmbmgh SCOHSM intro to ComputerArchitecture Unwers yufpmbmgh Using 74 chips Using 74 chips DM74L500 Quad 2Input NAND Gate General Description m came mm hurmdecer enlgmes mm mm M t w mmimm Ordering Code quotBreadboardquot74 chips CSCoElSM intro to Computer Architecture Unwers yummmgh CSC0E1541 intro to ComputerArtHitecture Umversltyumeleurgh Using a PLA PLA design of ALU control logic It39s a ro39 rammable device Inputs 0 You can implement your own complex combinational logic function using a single PLA products A PLA device is much more capable than individual 74 chips l w MWU39M 0 Much denser that means you can implement many functions Internally PLA implements a function of the quotsum of prod uctquot format 0 quotANDquot plane ifor product terms 0 OR plane 7 for summing products pemhmi su m s CSCoElSM intro to Computer Architecture Unwers yufnmbmgh SCOHSM intro to ComputerArchitecture Unwers yufpmbmgh 53 FPGA To wrap up FPGA is even more capable millions of gates o Combinational logic 0 Sequential logic 0 Memory arrays 0 Even some embedded microprocessor cores 0 IO support such as Ethernet MAC media access control block In di39 ital lo39ic transistors are used as sim le switches Logic gates are an abstraction of a transistor network A combinational logic block has inputs and outputs whose values are immediately determined as inputs become known A se ruential lo ic block is com osed of a combinational logic block and memory elements Best of all it39s field programmable and affordable yacmsm intro to Computer Architecture Unwas yufpmbmgh CSComsm intro to Computerimmature Universityumesburgh SS To wrap up To wrap up Boolean al39ebra rovides a theoretical foundation for dig ital Flip flo s FFs were used as a memor39 element logic 39 Starting from tWO tranSlStors N39type and Ptype WQ39Ve A finite state machine FSM can be implemented using FFs built logic gates and more complex structures bottom up and some combinationa ogic An ALU for the MIPS architecture has been built CSCoElSM intro to Computer Architecture Unwers yufnmbmgh CSCoElSM intro to ComputerArchitecture Unwers yufpmbmgh s