Simple Computer 2010 (CS2010)

Size: px
Start display at page:

Download "Simple Computer 2010 (CS2010)"

Transcription

1 DEPARTAMENTO DE TECNOLOGÍA ELECTRÓNICA ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA INFORMÁTICA Simple Computer 2010 (CS2010) Computer Structure 1. Introduction and goals Session goals are the following: Using and programming the CS2010 Watching the control unit behaviour Watching the data unit behaviour Writing and testing a simple CS2010 program including input-output operations For this session, a CS2010 system has been implemented 1 Figure 1. The system includes de following components: using the Digilent Basys2 board shown in the CPU the code memory the data memory memory-mapped input-output devices a debug unit 1 The implementation has been carried out by Jonathan Ruiz Páez

2 Computer Structure 2 Figure 1: prototyping board used in this session The input-output devices have been mapped into data memory space as shown in the following table: ADDRESS DIRECTION DEVICE DESCRIPTION $80 input Switches Each of the bits of this location let us know if the corresponding switch is activated. So, bit 7 will be equal to 1 when switch 7 is active, bit 6 will be equal to 1 when switch 6 is active, and so on. $81 input Buttons The 4 least significant bits of this location let us know is the corresponding button is pressed. So, bit 3 will be equal to 1 when button 3 is active, bit 2 will be equal to 1 when button 2 is active, and so on. The 4 most significant bits of this location are always equal to 0. $82 output least significant digits of the display $83 output most significant digits of the display The content of this memory location is shown in the right part of the display in hexadecimal. The content of this memory location is shown in the left part of the display in hexadecimal. The debug unit communicates with the PC through the RS232 so it can read and write the program and data memories. providing these functionalities: Also, the debugging units makes it possible to debug the uploaded program by

3 Computer Structure 3 cycle by cycle execution instruction by instruction execution memory and register inspection control lines inspection enabling/disabling the CPU clock The user can interact with the debug unit by using the software described at the appendix. 2. Previous work 1. Read the appendix and learn about the CS2010 assembler format. 2. Write a CS2010 subrutine that writes in register R7 the product of R5 and R6 (using unsigned notation). 3. Write a CS2010 program that, by using the previous subrutine, calculates the product of 22 and 10 and writes the result in memory location Write a table describing which signals are activated and which register transfers are carried out in each clock cycle during the execution of the 2 first instructions of the previous program. 5. Using the previous subrutine, write a CS2010 implementing the following algorithm: DO WHILE BUTTON 0 IS NOT PRESSED DO NOTHING END WHILE R5<-NUMBER CODED BY THE SWITCHES WHILE BUTTON 3 IS NOT PRESSED DO NOTHING END WHILE R6<-NUMBER CODED BY THE SWITCHES R7<-R5*R6 SHOW R7 AT THE DISPLAY FOREVER 6. Make sure that the syntax of the programs you wrote is right by using the software available at the web page. WARNING: It is mandatory to bring the files with the programs to the laboratory session, and you must check the syntax by using the provided software before the session. 3. Lab work 1. Set the board Mode Jumper (JP3) to ROM.

4 Computer Structure 4 2. Connect the board to the PC RS232 port (look at Figure 1 to see how to connect the RS232 expansion to the board). 3. power the board by connecting it to the PC USB port. 4. Upload the program that calculates 22x10 to the CS2010 code memory as described at the appendix. 5. Execute the first 2 instructions cycle by cycle. Check if the register transfers and data transfers you expected are carried out. 6. Execute instruction by instruction the 2 following lines. Check if effect of the execution is what you expected. 7. Enable the clock to execute the remaining instructions. Disable it again to check the final result. 8. Upload the program implementing the algorithm of section 5 of the previous work and execute it enabling the clock. Check if the program works as expected by multiplying several numbers. NOTE: If the software warns you that it was not possible to carry out the connection despite you connected the RS232 extension properly, it may be possible that the prototyping board is not configured yet to implement the CS2010. Is so click on the icon configurar BASYS2 para CS2010 and, after the writing, turn the board off and turn it on again. Appendix 1: CS2010 assembler format The binary code executed by any processor is called machine code. Writting machine code directly is not practical. Instead, we will write the programs using a more easily readable language called assembler language. Programs written in assembler can be translated to machine code by using a tool that is also called assembler. This action is called assembling. A CS2010 assembler program can contain 3 types of lines: blanc lines: they contain just space characters, tab characters and/or comments. These lines are ignored by the assembler. instruction lines: they describe a CS2010 instruction by using the mnemonics described in class. If an instruction requires a numeric operand, it can be specified in any of the following ways: using a decimal numeral: in this case the numeral can be preceded by a sign (+ or -). using a binary numeral: in this case the numeral must be preceded by prefix 0B and must include exactly 8 bits. using an hexadecimal numeral: in this case the numeral must be preceded by prefix 0x or $ and must include one or two hexadecimal digits. using a tag: a tag is an alphanumeric string that is assigned an 8-bit value. The first character of the tag must must be a letter. We will see how to assign values to tags later. Examples of valid numerals are 1234, +2, -1, 0b , $4F, 0x32, $3. Examples of invalid numerals are 12F3, +0b , 0b , 0b10, 0x023. directive lines: they are used to order the assembler to carry out several actions. The CS2010

5 Computer Structure 5 assembler directives are the following: EQU directive: make it possible associating a value to a tag. Its syntax is.equ <tag> = <numeral>. After finding such a line, the assembler will substitute every occurrence of the tag in the instruction lines by the associated value. Note that this lines will not have any associated instruction in the resulting assembled program. OPCODE directive: make it possible inserting instructions by indicating its machine code explicitly. Its syntax is.opcode <most_significant_byte>, <least_significant_byte> w h e r e <most_significant_byte> must be a numeral and <least_significant_byte> can be a numeral or a tag. There is a second way to assign values to tags: instruction lines as well as lines using the OPCODE directive can be preceded by a prefix in the form <tag> :. This makes the assembler to assign the address of the memory location corresponding to the instruction of that line to the tag. Assembler programs using jump instructions can be make clearer by assigning tag values in this way. Another way to make programs more readable is adding comments at the end of lines. Comments start with character ';'. Any text between this character and the end of line will be ignored by the assembler. Finally you must take into account that the assembler is not case-sensitive, i.e. it does not distinguish between lowercase and uppercase letters. An example of CS2010 program written in assembler is shown bellow:

6 Computer Structure 6 ;this is a comment and will be ignored by the assembler LDI R0,15; this will write 15 in R0 ;space and tabs are ignored LDI R1,$0F ;this will write 15 in R1 LDI R2,-1 ;this will write 225 in R2 ;this is another comment followed by blanc lines.equ minus1=0b ; this will not generate machine code.equ one=1 LDI R3,0 loop: SUBI R0, one BRCS finishthis st (r3), r0 ; lowercase or uppercase: it doesn't matter ADDI R3, ONE jmp loop FINISHTHIS: STOP ;the 14 first memory locations will be written from 14 to 1 Appendix 2: Debugging and programming software For interacting with the debug unit we will use the software installed in the lab PCs. This software is available for download in the web page. To launch it just click on the corresponding icon of the desktop. The following window will appear: Figure 2: CS2010 debugging software The upper part of the window contains a set of controls to interact with the CS2010 debug unit: Puerto Serie field: This field contains the path for the PC RS232 port connected to the board. Do not change it. Código (BIN) field: This field must contain the path of the binary file whose content will be written in the program memory when the processor is initialized. After filling it, the code will be disassembled and shown on the Desensamblado field. We will not have to fill in this field since we will use assembler files.

7 Computer Structure 7 Código (ASM) field: This field must contain the path of the assembler file corresponding to the program that will be written in code memory when the processor is initialized. After filling it, the file will be assembled informing about possible mistakes and will write the path of the resulting binary file in the Código (BIN) field. We will use this field to check our programs. Memoria Datos field: if we want to initialize the data memory with the content of a binary file, we can write its path in this field. Conectar button: when this button is pressed the software establishes a connection with the debug unit through the RS232 port, orders to initialize the CS2010 and to write the program and data memories with the content of the specified files. Only after this we will be able to interact with the debug unit. Mostrar Unidad De Datos button: when this button is pressed the following window appears: Figure 3: CS2010 data unit During cycle-to-cycle execution the active (high) signals will be highlighted in this window. Habilitar Reloj / Deshabilitar Reloj button: If the CS2010 clock is disabled, pressing this button will enable it so the program can be executed autonomously. If the clock is enabled, pressing this button will disable to make it possible to inspect the state of the processor and memory. Activar Start button: When this button is pressed, an high pulse is generated in the start signal of the CS2010. Ejecutar Un Ciclo button: If this button is pressed the debug unit will enable the clock for just a cycle. Ejecutar Una Instrucción button: If this button is pressed the debug unit will enable the clock till the current instruction finishes or till the wait state is reached. When the CS2010 clock is disabled, the system state is shown, including:

8 Computer Structure 8 data memory content registers content control lines state value of the common data bus and of the buses connected to the ALU Also, the current instruction will be highlighted. The content of the data memory can be edited manually. It is also possible to save the content of the data memory in a file by pressing the Guardar Memoria Datos button.

Introduction to Verilog and XILINX

Introduction to Verilog and XILINX DEPARTAMENTO DE TECNOLOGÍA ELECTRÓNICA ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA INFORMÁTICA Introduction to Verilog and XILINX Lab Session Computer Structure WARNING: A written solution of the preliminary

More information

Introduction to AVR-STUDIO

Introduction to AVR-STUDIO DEPARTAMENTO DE TECNOLOGÍA ELECTRÓNICA ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA INFORMÁTICA Introduction to AVR-STUDIO Computer Structure 1.Introduction and goals The goals of this session are the following:

More information

Laboratory. Low-Level. Languages. Objective. References. Study simple machine language and assembly language programs.

Laboratory. Low-Level. Languages. Objective. References. Study simple machine language and assembly language programs. Laboratory Low-Level 7 Languages Objective Study simple machine language and assembly language programs. References Software needed: 1) A web browser (Internet Explorer or Netscape) 2) Applet from the

More information

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 2. PIC and Programming

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 2. PIC and Programming Laboratory: Introduction to Mechatronics Instructor TA: Edgar Martinez Soberanes (eem370@mail.usask.ca) 2015-01-12 Lab 2. PIC and Programming Lab Sessions Lab 1. Introduction Read manual and become familiar

More information

Assembly Language Fundamentals

Assembly Language Fundamentals Topics (Chapters 2 and 4) Mnemonics, OP codes Assembler Assembler Directives Assembly Process Object program Linker Loader Debugger 1 Turning C into Assembly C Program Compiler Assembly File Program in

More information

Gabriel Hugh Elkaim Spring CMPE 013/L: C Programming. CMPE 013/L: C Programming

Gabriel Hugh Elkaim Spring CMPE 013/L: C Programming. CMPE 013/L: C Programming 1 Literal Constants Definition A literal or a literal constant is a value, such as a number, character or string, which may be assigned to a variable or a constant. It may also be used directly as a function

More information

Computer Organization and Assembly Language. Lab Session 01

Computer Organization and Assembly Language. Lab Session 01 Objective: Lab Session 01 Introduction to Assembly Language Tools and Familiarization with Emu8086 environment To be able to understand Data Representation and perform conversions from one system to another

More information

Computer Organization and Assembly Language. Lab Session 3

Computer Organization and Assembly Language. Lab Session 3 Lab Session 3 Objective: To be familiar with Basic Elements of Assembly Language Understanding Constants, Identifiers, Directives and Instructions. Theory: Integer Constants An integer constant (or integer

More information

Assembly Language programming (1)

Assembly Language programming (1) EEE3410 Microcontroller Applications LABORATORY Experiment 1 Assembly Language programming (1) Name Class Date Class No. Marks Familiarisation and use of 8051 Simulation software Objectives To learn how

More information

Brock Wilcox CS470 Homework Assignment 2

Brock Wilcox CS470 Homework Assignment 2 Brock Wilcox CS470 Homework Assignment 2 Please complete the following exercises from Chapter 2 of Patterson & Hennessy, Computer Organization & Design: The Hardware/Software Interface, Fourth Edition,

More information

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming)

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Learning any imperative programming language involves mastering a number of common concepts: Variables: declaration/definition

More information

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Dec Hex Bin ORG ; ZERO. Introduction To Computing Dec Hex Bin 0 0 00000000 ORG ; ZERO Introduction To Computing OBJECTIVES this chapter enables the student to: Convert any number from base 2, base 10, or base 16 to any of the other two bases. Add and

More information

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630 Computers and Microprocessors Lecture 34 PHYS3360/AEP3630 1 Contents Computer architecture / experiment control Microprocessor organization Basic computer components Memory modes for x86 series of microprocessors

More information

1 Introduction to MARS

1 Introduction to MARS 1 Introduction to MARS 1.1 Objectives After completing this lab, you will: Get familiar with the MARS simulator Learn how to assemble, run, and debug a MIPS program 1.2 The MARS Simulator MARS, the MIPS

More information

CSC 101: Lab Manual#9 Machine Language and the CPU (largely based on the work of Prof. William Turkett) Lab due date: 5:00pm, day after lab session

CSC 101: Lab Manual#9 Machine Language and the CPU (largely based on the work of Prof. William Turkett) Lab due date: 5:00pm, day after lab session CSC 101: Lab Manual#9 Machine Language and the CPU (largely based on the work of Prof. William Turkett) Lab due date: 5:00pm, day after lab session Purpose: The purpose of this lab is to gain additional

More information

Department of Computer and Mathematical Sciences. Lab 4: Introduction to MARIE

Department of Computer and Mathematical Sciences. Lab 4: Introduction to MARIE Department of Computer and Mathematical Sciences CS 3401 Assembly Language 4 Lab 4: Introduction to MARIE Objectives: The main objective of this lab is to get you familiarized with MARIE a simple computer

More information

COE 205: Computer Organization & Assembly Language Introductory Experiment-B By Louai Al-Awami

COE 205: Computer Organization & Assembly Language Introductory Experiment-B By Louai Al-Awami COE 205: Computer Organization & Assembly Language Introductory Experiment-B By Louai Al-Awami Introduction A computer system consists mainly of three components: a Central Processing Unit (CPU), a memory

More information

This chapter introduces how to use the emulator of TOPICE quickly.

This chapter introduces how to use the emulator of TOPICE quickly. Quick Starting Summarization This chapter introduces how to use the emulator of TOPICE quickly. Compiling Source and Debugging Creating a New Project Select main menu Project, then choose the submenu New

More information

The Assembly Language of the Boz 5

The Assembly Language of the Boz 5 The Assembly Language of the Boz 5 The Boz 5 uses bits 31 27 of the IR as a five bit opcode. Of the possible 32 opcodes, only 26 are implemented. Op-Code Mnemonic Description 00000 HLT Halt the Computer

More information

CodeWarrior. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

CodeWarrior. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff CodeWarrior 1 Assembler An assembler is a program that translates assembly language into machine code. Machine code are the numbers that the CPU recognizes as instructions. $B6 $10 $00 Assembly language

More information

1. Computer Structure and Functioning.

1. Computer Structure and Functioning. 1. Computer Structure and Functioning. Informática Ingeniería en Electrónica y Automática Industrial Raúl Durán Díaz Juan Ignacio Pérez Sanz Álvaro Perales Eceiza Departamento de Automática Escuela Politécnica

More information

FALSIM. FALSIM is the name of the software application which consists of the FALCON-A assembler and the FALCON-A simulator. It runs under Windows XP.

FALSIM. FALSIM is the name of the software application which consists of the FALCON-A assembler and the FALCON-A simulator. It runs under Windows XP. Lecture Handouts Computer Architecture Appendix Reading Material Handouts Summary 1. Introduction to FALSIM 2. Preparing source files for FALSIM 3. Using FALSIM 4. FALCON-A assembly language techniques

More information

2.2 THE MARIE Instruction Set Architecture

2.2 THE MARIE Instruction Set Architecture 2.2 THE MARIE Instruction Set Architecture MARIE has a very simple, yet powerful, instruction set. The instruction set architecture (ISA) of a machine specifies the instructions that the computer can perform

More information

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics Chapter 4 Objectives Learn the components common to every modern computer system. Chapter 4 MARIE: An Introduction to a Simple Computer Be able to explain how each component contributes to program execution.

More information

CS61C Machine Structures. Lecture 13 - MIPS Instruction Representation I. 9/26/2007 John Wawrzynek. www-inst.eecs.berkeley.

CS61C Machine Structures. Lecture 13 - MIPS Instruction Representation I. 9/26/2007 John Wawrzynek. www-inst.eecs.berkeley. CS61C Machine Structures Lecture 13 - MIPS Instruction Representation I 9/26/2007 John Wawrzynek (www.cs.berkeley.edu/~johnw) www-inst.eecs.berkeley.edu/~cs61c/ CS 61C L13 MIPS Instruction Representation

More information

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved. C How to Program, 6/e 1992-2010 by Pearson Education, Inc. An important part of the solution to any problem is the presentation of the results. In this chapter, we discuss in depth the formatting features

More information

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad Introduction to MS-DOS Debugger DEBUG In this laboratory, we will use DEBUG program and learn how to: 1. Examine and modify the contents of the 8086 s internal registers, and dedicated parts of the memory

More information

MARIE: An Introduction to a Simple Computer

MARIE: An Introduction to a Simple Computer MARIE: An Introduction to a Simple Computer Outline Learn the components common to every modern computer system. Be able to explain how each component contributes to program execution. Understand a simple

More information

ELEG3924 Microprocessor

ELEG3924 Microprocessor Department of Electrical Engineering University of Arkansas ELEG3924 Microprocessor Ch.2 Assembly Language Programming Dr. Jing Yang jingyang@uark.edu 1 OUTLINE Inside 8051 Introduction to assembly programming

More information

ELEG3923 Microprocessor Ch.2 Assembly Language Programming

ELEG3923 Microprocessor Ch.2 Assembly Language Programming Department of Electrical Engineering University of Arkansas ELEG3923 Microprocessor Ch.2 Assembly Language Programming Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 Inside 8051 Introduction to assembly programming

More information

6.823 Computer System Architecture Datapath for DLX Problem Set #2

6.823 Computer System Architecture Datapath for DLX Problem Set #2 6.823 Computer System Architecture Datapath for DLX Problem Set #2 Spring 2002 Students are allowed to collaborate in groups of up to 3 people. A group hands in only one copy of the solution to a problem

More information

CC411: Introduction To Microprocessors

CC411: Introduction To Microprocessors CC411: Introduction To Microprocessors OBJECTIVES this chapter enables the student to: Use number { base 2, base 10, or base 16 }. Add and subtract binary/hex numbers. Represent any binary number in 2

More information

NEW CEIBO DEBUGGER. Menus and Commands

NEW CEIBO DEBUGGER. Menus and Commands NEW CEIBO DEBUGGER Menus and Commands Ceibo Debugger Menus and Commands D.1. Introduction CEIBO DEBUGGER is the latest software available from Ceibo and can be used with most of Ceibo emulators. You will

More information

sarm User Guide Note that a space must appear before the operation field because any word beginning in the first column is a label

sarm User Guide Note that a space must appear before the operation field because any word beginning in the first column is a label sarm User Guide The sarm is program that implements an experimental CPU simulator. It is called experimental because it is not yet complete, and it also incorporates facilities that are not conventionally

More information

COMPUTER ENGINEERING PROGRAM

COMPUTER ENGINEERING PROGRAM COMPUTER ENGINEERING PROGRAM California Polytechnic State University CPE 169 Experiment 1 Introduction to Basic Logic and the Digilent Development Board Learning Objectives 1. CPE 169 Hardware and Software

More information

Intro. to Computer Architecture Homework 4 CSE 240 Autumn 2005 DUE: Mon. 10 October 2005

Intro. to Computer Architecture Homework 4 CSE 240 Autumn 2005 DUE: Mon. 10 October 2005 Name: 1 Intro. to Computer Architecture Homework 4 CSE 24 Autumn 25 DUE: Mon. 1 October 25 Write your answers on these pages. Additional pages may be attached (with staple) if necessary. Please ensure

More information

PSIM: Processor SIMulator (version 4.2)

PSIM: Processor SIMulator (version 4.2) PSIM: Processor SIMulator (version 4.2) by Charles E. Stroud, Professor Dept. of Electrical & Computer Engineering Auburn University July 23, 2003 ABSTRACT A simulator for a basic stored program computer

More information

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт.

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт. SECOND шт. Assembly and С Programming forthefreescalehcs12 Microcontroller Fredrick M. Cady Department of Electrical and Computer Engineering Montana State University New York Oxford Oxford University

More information

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING CHAPTER 2 8051 ASSEMBLY LANGUAGE PROGRAMMING Registers Register are used to store information temporarily: A byte of data to be processed An address pointing to the data to be fetched The vast majority

More information

Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur

Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur Lecture - 09 8085 Microprocessors (Contd.) (Refer Slide Time:

More information

Programming (1.0hour)

Programming (1.0hour) COMPETITOR S INSTRUCTION:- Attempt all questions: Where applicable circle the letter that indicates the correct answer. Otherwise answer questions as instructed D1.1 Embedded code is used widely in modern

More information

Mark II Aiken Relay Calculator

Mark II Aiken Relay Calculator Introduction to Embedded Microcomputer Systems Lecture 6.1 Mark II Aiken Relay Calculator 2.12. Tutorial 2. Arithmetic and logical operations format descriptions examples h 8-bit unsigned hexadecimal $00

More information

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING Experiment PCO: Principles of Computer Operation Location: Part I Lab., CYC 102. Objective: The objective is to learn the basic

More information

Microcontroller Systems

Microcontroller Systems µcontroller systems 1 / 43 Microcontroller Systems Engineering Science 2nd year A2 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/2co Michaelmas 2014 µcontroller

More information

Intermediate Programming & Design (C++) Notation

Intermediate Programming & Design (C++) Notation Notation Byte = 8 bits (a sequence of 0 s and 1 s) To indicate larger amounts of storage, some prefixes taken from the metric system are used One kilobyte (KB) = 2 10 bytes = 1024 bytes 10 3 bytes One

More information

2010 Summer Answers [OS I]

2010 Summer Answers [OS I] CS2503 A-Z Accumulator o Register where CPU stores intermediate arithmetic results. o Speeds up process by not having to store these results in main memory. Addition o Carried out by the ALU. o ADD AX,

More information

COMPUTER ENGINEERING PROGRAM

COMPUTER ENGINEERING PROGRAM COMPUTER ENGINEERING PROGRAM California Polytechnic State University CPE 169 Experiment 1 Introduction to Basic Logic and the Digilent Development Board Learning Objectives 1. CPE 169 Hardware and Software

More information

Introduction ADSP-2100 FAMILY OF PROCESSORS

Introduction ADSP-2100 FAMILY OF PROCESSORS Introduction 1 1.1 OVERVIEW This book presents a compilation of routines for a variety of common digital signal processing applications based on the ADSP-2100 DSP microprocessor family. These routines

More information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

ORG ; TWO. Assembly Language Programming

ORG ; TWO. Assembly Language Programming Dec 2 Hex 2 Bin 00000010 ORG ; TWO Assembly Language Programming OBJECTIVES this chapter enables the student to: Explain the difference between Assembly language instructions and pseudo-instructions. Identify

More information

Computer Structure Lab. RESA b1monitor PROGRAM USER GUIDE

Computer Structure Lab. RESA b1monitor PROGRAM USER GUIDE Computer Structure Lab RESA b1monitor PROGRAM USER GUIDE Text Editor Compiler Hardware Monitor Simulator Graph Generator Hardware interface Software-hardware communication protocol FPGA Department of Systems

More information

Laboratory Single-Cycle MIPS CPU Design (3): 16-bits version One clock cycle per instruction

Laboratory Single-Cycle MIPS CPU Design (3): 16-bits version One clock cycle per instruction Laboratory 6 6. Single-Cycle MIPS CPU Design (3): 16-bits version One clock cycle per instruction 6.1. Objectives Study, design, implement and test Instruction Decode Unit for the 16-bit Single-Cycle MIPS

More information

Computer Organisation CS303

Computer Organisation CS303 Computer Organisation CS303 Module Period Assignments 1 Day 1 to Day 6 1. Write a program to evaluate the arithmetic statement: X=(A-B + C * (D * E-F))/G + H*K a. Using a general register computer with

More information

Grading: 3 pts each part. If answer is correct but uses more instructions, 1 pt off. Wrong answer 3pts off.

Grading: 3 pts each part. If answer is correct but uses more instructions, 1 pt off. Wrong answer 3pts off. Department of Electrical and Computer Engineering University of Wisconsin Madison ECE 552 Introductions to Computer Architecture Homework #2 (Suggested Solution) 1. (10 points) MIPS and C program translations

More information

Chapter 4. MARIE: An Introduction to a Simple Computer

Chapter 4. MARIE: An Introduction to a Simple Computer Chapter 4 MARIE: An Introduction to a Simple Computer Chapter 4 Objectives Learn the components common to every modern computer system. Be able to explain how each component contributes to program execution.

More information

Laboratory Exercise 1: Machine Language Instructions

Laboratory Exercise 1: Machine Language Instructions Laboratory Exercise 1: Machine Language Instructions Jan Eric Larsson / janeric@eit.lth.se Department of Electrical and Information Technology Lund University November 26, 2012 Goals After this laboratory

More information

LECTURE #21: G-CPU & Assembly Code EEL 3701: Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz

LECTURE #21: G-CPU & Assembly Code EEL 3701: Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz LECTURE #21: G-CPU & Assembly Code EEL 3701: Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz G-CPU Important Notes (see Schwartz s lecture for a general overview) - The

More information

Name: CMSC 313 Fall 2001 Computer Organization & Assembly Language Programming Exam 1. Question Points I. /34 II. /30 III.

Name: CMSC 313 Fall 2001 Computer Organization & Assembly Language Programming Exam 1. Question Points I. /34 II. /30 III. CMSC 313 Fall 2001 Computer Organization & Assembly Language Programming Exam 1 Name: Question Points I. /34 II. /30 III. /36 TOTAL: /100 Instructions: 1. This is a closed-book, closed-notes exam. 2. You

More information

Laboratory. Computer Cycling. Objective. References. Learn about the fetch-execute cycle of computers.

Laboratory. Computer Cycling. Objective. References. Learn about the fetch-execute cycle of computers. Laboratory Computer Cycling 5 Objective Learn about the fetch-execute cycle of computers. References Software needed: 1) A web browser (Internet Explorer or Netscape) 2) Applet from the CD-ROM: a) Super

More information

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system. CPU ARCHITECTURE QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system. ANSWER 1 Data Bus Width the width of the data bus determines the number

More information

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING Experiment PCO: Principles of Computer Operation Location: Part I Lab., CYC 102. Objective: The objective is to learn the basic

More information

The MARIE Architecture

The MARIE Architecture The MARIE Machine Architecture that is Really Intuitive and Easy. We now define the ISA (Instruction Set Architecture) of the MARIE. This forms the functional specifications for the CPU. Basic specifications

More information

Software Development. Integrated Software Environment

Software Development. Integrated Software Environment Software Development Integrated Software Environment Source Code vs. Machine Code What is source code? Source code and object code refer to the "before" and "after" versions of a computer program that

More information

Educational Simulation of the RiSC Processor

Educational Simulation of the RiSC Processor Educational Simulation of the RiSC Processor Marc Jaumain BEAMS department, Bio Electro and Mechanical Systems, Université Libre de Bruxelles, Belgium mjaumain@ulb.ac.be Michel Osée 1, Aliénor Richard

More information

The X86 Assembly Language Instruction Nop Means

The X86 Assembly Language Instruction Nop Means The X86 Assembly Language Instruction Nop Means As little as 1 CPU cycle is "wasted" to execute a NOP instruction (the exact and other "assembly tricks", as explained also in this thread on Programmers.

More information

Introduction to Computers - Chapter 4

Introduction to Computers - Chapter 4 Introduction to Computers - Chapter 4 Since the invention of the transistor and the first digital computer of the 1940s, computers have been increasing in complexity and performance; however, their overall

More information

Software and Documentation

Software and Documentation CS2100 Computer Organisation Lab #5: Exploring QtSpim (27 th February and 2 nd March 2017) [ This document is available on IVLE and module website http://www.comp.nus.edu.sg/~cs2100 ] Name: Matric. No.:

More information

The following content has been imported from Legacy Help systems and is in the process of being checked for accuracy.

The following content has been imported from Legacy Help systems and is in the process of being checked for accuracy. Processor Debug Old Content - visit altium.com/documentation Modified by Admin on Nov 6, 2013 The following content has been imported from Legacy Help systems and is in the process of being checked for

More information

RISC-V Assembly and Binary Notation

RISC-V Assembly and Binary Notation RISC-V Assembly and Binary Notation L02-1 Course Mechanics Reminders Course website: http://6004.mit.edu All lectures, videos, tutorials, and exam material can be found under Information/Resources tab.

More information

Writing ARM Assembly. Steven R. Bagley

Writing ARM Assembly. Steven R. Bagley Writing ARM Assembly Steven R. Bagley Introduction Previously, looked at how the system is built out of simple logic gates Last week, started to look at the CPU Writing code in ARM assembly language Assembly

More information

Virtual machines. Virtual machines. Abstractions for computers. Abstractions for computers. Virtual machines

Virtual machines. Virtual machines. Abstractions for computers. Abstractions for computers. Virtual machines 1 2 Problems with programming using machine code Difficult to remember instructions Difficult to remember variables Hard to calculate addresses/relocate variables or functions Need to handle instruction

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Chapter 2 Microcontrollers Objectives Describe the difference between source code and machine code. Define opcode, operand, and address of an operand. Explain the purpose of

More information

CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014

CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014 B CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014 DUE : March 3, 2014 READ : - Related sections of Chapter 2 - Related sections of Chapter 3 - Related sections of Appendix A - Related sections

More information

edocs Aero Users Management

edocs Aero Users Management edocs Aero Users Management Description edocs Aero Users Management System allows Company Admin to sync and control Users with other systems, by importing a CSV file. Admin can Add Users Change Users status

More information

Chapter 1 Preliminaries

Chapter 1 Preliminaries Chapter 1 Preliminaries This chapter discusses the major classes of programming languages and the relationship among them. It also discusses the binary and the hexadecimal number systems which are used

More information

Programming using machine code and assembly

Programming using machine code and assembly 9 Programming using machine code and assembly We can use a microprocessor as part of a computer or as part of a dynamite process controller and the only essential difference is in the instructions that

More information

LAB WORK NO. 3 TURBO DEBUGGER ENVIRONMENT

LAB WORK NO. 3 TURBO DEBUGGER ENVIRONMENT LAB WORK NO. 3 TURBO DEBUGGER ENVIRONMENT 1. Objective of the lab work The purpose of this lab is to be able to debug programs written in assembly language and general executables, using a debugging tool.

More information

Software Setup and Introductory Assembly programs for the MSP430 *

Software Setup and Introductory Assembly programs for the MSP430 * OpenStax-CNX module: m15976 1 Software Setup and Introductory Assembly programs for the MSP430 * Texas Instruments This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution

More information

Programming Model 2 A. Introduction

Programming Model 2 A. Introduction Programming Model 2 A. Introduction Objectives At the end of this lab you should be able to: Use direct and indirect addressing modes of accessing data in memory Create an iterative loop of instructions

More information

Lab Determining Data Storage Capacity

Lab Determining Data Storage Capacity Lab 1.3.2 Determining Data Storage Capacity Objectives Determine the amount of RAM (in MB) installed in a PC. Determine the size of the hard disk drive (in GB) installed in a PC. Determine the used and

More information

INTRODUCTION. NOTE Some symbols used in this manual CL = Click Left CR = Click Right DCL = Double Click Left = Enter. Page 1

INTRODUCTION. NOTE Some symbols used in this manual CL = Click Left CR = Click Right DCL = Double Click Left = Enter. Page 1 INTRODUCTION OBJECTIVE The purpose of this manual is to provide the student with practical experience in the writing of assembly language programs, and give them background and instructions on how to use

More information

CS2630: Computer Organization Homework 1 Bits, bytes, and memory organization Due January 25, 2017, 11:59pm

CS2630: Computer Organization Homework 1 Bits, bytes, and memory organization Due January 25, 2017, 11:59pm CS2630: Computer Organization Homework 1 Bits, bytes, and memory organization Due January 25, 2017, 11:59pm Instructions: Show your work. Correct answers with no work will not receive full credit. Whether

More information

Help Volume Agilent Technologies. All rights reserved. Instrument: Agilent Technologies 16550A Logic Analyzer

Help Volume Agilent Technologies. All rights reserved. Instrument: Agilent Technologies 16550A Logic Analyzer Help Volume 1992-2002 Agilent Technologies. All rights reserved. Instrument: Agilent Technologies 16550A Logic Analyzer Agilent Technologies 16550A 100 MHz State/500 MHz Timing Logic Analyzer The Agilent

More information

LAB B Translating Code to Assembly

LAB B Translating Code to Assembly LAB B Translating Code to Assembly Perform the following groups of tasks: LabB1.s 1. Create a directory to hold the files for this lab. 2. Create and run the Java app below. We seek to translate it to

More information

Resource 2 Embedded computer and development environment

Resource 2 Embedded computer and development environment Resource 2 Embedded computer and development environment subsystem The development system is a powerful and convenient tool for embedded computing applications. As shown below, the development system consists

More information

CC312: Computer Organization

CC312: Computer Organization CC312: Computer Organization Dr. Ahmed Abou EL-Farag Dr. Marwa El-Shenawy 1 Chapter 4 MARIE: An Introduction to a Simple Computer Chapter 4 Objectives Learn the components common to every modern computer

More information

A First Look at Microprocessors

A First Look at Microprocessors A First Look at Microprocessors using the The General Prototype Computer (GPC) model Part 4 Ports CPU Ecosystem All CPUs need RAM, ROM, a clock source and reset circuit, and power. Power Supply 1 Vio Vcore

More information

Computer Organization II CMSC 3833 Lecture 33

Computer Organization II CMSC 3833 Lecture 33 Term MARIE Definition Machine Architecture that is Really Intuitive and Easy 4.8.1 The Architecture Figure s Architecture Characteristics: Binary, two s complement Stored program, fixed word length Word

More information

ENCM 369 Winter 2017 Lab 3 for the Week of January 30

ENCM 369 Winter 2017 Lab 3 for the Week of January 30 page 1 of 11 ENCM 369 Winter 2017 Lab 3 for the Week of January 30 Steve Norman Department of Electrical & Computer Engineering University of Calgary January 2017 Lab instructions and other documents for

More information

EITF35 - Introduction to Structured VLSI Design (Fall 2017) Course projects

EITF35 - Introduction to Structured VLSI Design (Fall 2017) Course projects 1 EITF35 - Introduction to Structured VLSI Design (Fall 2017) Course projects v.1.0.0 1 Introduction This document describes the course projects provided in EITF35 Introduction to Structured VLSI Design

More information

Assembly Language Programming

Assembly Language Programming Assembly Language Programming Remember the programmer shown in our first lecture? Originally, computers were programmed manually. After a while, scientists began to consider ways to accelerate and facilitate

More information

THE OPTIUM MICROPROCESSOR AN FPGA-BASED IMPLEMENTATION

THE OPTIUM MICROPROCESSOR AN FPGA-BASED IMPLEMENTATION THE OPTIUM MICROPROCESSOR AN FPGA-BASED IMPLEMENTATION Radu Balaban Computer Science student, Technical University of Cluj Napoca, Romania horizon3d@yahoo.com Horea Hopârtean Computer Science student,

More information

EE 308 LAB 1 ASSEMBLER, SIMULATOR, AND MONITOR. Introduction and Objectives

EE 308 LAB 1 ASSEMBLER, SIMULATOR, AND MONITOR. Introduction and Objectives EE 308 LAB 1 ASSEMBLER, SIMULATOR, AND MONITOR Introduction and Objectives This laboratory introduces you to the following 68HC12 assembly language programming tools: The 68HC12 assembler CA6812. This

More information

An Introduction to Komodo

An Introduction to Komodo An Introduction to Komodo The Komodo debugger and simulator is the low-level debugger used in the Digital Systems Laboratory. Like all debuggers, Komodo allows you to run your programs under controlled

More information

CS311 Lecture: The Architecture of a Simple Computer

CS311 Lecture: The Architecture of a Simple Computer CS311 Lecture: The Architecture of a Simple Computer Objectives: July 30, 2003 1. To introduce the MARIE architecture developed in Null ch. 4 2. To introduce writing programs in assembly language Materials:

More information

How to use the IP generator from Xilinx to instantiate IP cores

How to use the IP generator from Xilinx to instantiate IP cores ÁÌ ¹ ÁÒØÖÓ ÙØ ÓÒ ØÓ ËØÖÙØÙÖ ÎÄËÁ Ò ÐÐ ¾¼½ µ ÓÙÖ ÔÖÓ Ø Úº½º¼º¼ 1 Introduction This document describes the course projects provided in EITF35 Introduction to Structured VLSI Design conducted at EIT, LTH.

More information

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMMUNICATION ENGINEERING REG 2008 TWO MARKS QUESTION AND ANSWERS

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMMUNICATION ENGINEERING REG 2008 TWO MARKS QUESTION AND ANSWERS CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY B.E.,/B.TECH., ELECTRONICS EC6504 MICROPROCESSORS & MICRO CONTROLLERS COMMUNICATION ENGINEERING REG 2008 TWO MARKS QUESTION AND ANSWERS UNIT 1 AND 2 CS SUBJECT

More information

Disassemble the machine code present in any memory region. Single step through each assembly language instruction in the Nios II application.

Disassemble the machine code present in any memory region. Single step through each assembly language instruction in the Nios II application. Nios II Debug Client This tutorial presents an introduction to the Nios II Debug Client, which is used to compile, assemble, download and debug programs for Altera s Nios II processor. This tutorial presents

More information

Introduction to Microcontrollers

Introduction to Microcontrollers Motorola M68HC11 Specs Assembly Programming Language BUFFALO Topics of Discussion Microcontrollers M68HC11 Package & Pinouts Accumulators Index Registers Special Registers Memory Map I/O Registers Instruction

More information

Help Volume Agilent Technologies. All rights reserved. Instrument: Agilent Technologies 16557D 140 MHz State/500 MHz Timing Logic Analyzer

Help Volume Agilent Technologies. All rights reserved. Instrument: Agilent Technologies 16557D 140 MHz State/500 MHz Timing Logic Analyzer Help Volume 1992-2002 Agilent Technologies. All rights reserved. Instrument: Agilent Technologies 16557D 140 MHz State/500 MHz Timing Logic Analyzer Agilent Technologies 16557D 140MHz State/500MHz Timing

More information