Machine description will provide the basis for assignment

Assignment Help Macroeconomics
Reference no: EM131081794

Introduction

The following machine description will provide the basis for this assignment. You will create a virtual machine/operating system for the machine described below that will accept programs in the target machine language. The details for this assignment are presented below following the machine description.

MICROPROGRAMMING/MACHINE DISCRIPTION

The following is a description of a machine called SIMMAC that contains the following:

512 32-bit words of memory (memory is word addressable).

Each Instruction consists of a 16-bit opcode and a 16-bit operand.

An ALU for performing mathematical operations.

Registers

ACC: Accumulator; A 32-bit register involved in all arithmetic operations. One of the operands in each arithmetic operation must be in the Accumulator; the other must be in primary storage.

PSIAR: Primary Storage Instruction Address Register; This 16-bit register points to the location in primary storage of the next machine language instruction to be executed.

SAR: Storage Address Register; This 16-bit register is involved in all references to primary storage. It holds the address of the location in primary storage being read from or written to.

SDR: Storage Data Register; This 32-bit register is also involved in all references to primary storage. It holds the data being written to or receives the data being read from primary storage at the location specified in the SAR.

TMPR: Temporary Register; This 32-bit register is used to extract the address portion (rightmost 16-bits) of the machine instruction in the SDR so that it may be placed in the SAR. (No SDR to SAR transfer.)

CSIAR: Control Storage Instruction Address Register; This register points to the location of the next micro-instruction (in control storage) to be executed.

IR: Instruction Register; This register contains the current instruction being executed.

MIR: Micro-instruction Register; This register contains the current micro-instruction being executed.

Register Transfers (REG is ACC, PSIAR, or TMPR):

SDR = REG

REG = SDR

SAR = REG

Primary Storage Operations:

READ: Data from primary storage location named in the SAR is placed in the SDR.

WRITE: Data in the SDR is placed in primary storage location named in the SAR.

Sequencing operations:

CSIAR = CSIAR + 1

CSIAR = decoded SDR

CSIAR = constant

SKIP = (add 2 to CSIAR if ACC=0; else add 1)

Operations involving the accumulator:

ACC = ACC + REG

ACC = ACC - REG

ACC = REG

REG = ACC

ACC = REG + 1

Instruction fetch:

(00)  SAR = PSIAR

(01)  READ

(02)  IR = SDR

(03)  SDR = decoded IR (Operand)

(04)  CSIAR = decoded IR (OP CODE)

ADD (Opcode 10):

(10) TMPR = ACC

(11) ACC = PSIAR + 1 (12) PSIAR = ACC

(13) ACC = TMPR

(14) TMPR = SDR

(15) SAR = TMPR

(16) READ

(17) TMPR = SDR

(18) ACC = ACC + TMPR

(19) CSIAR = 0

SUB (Opcode 20):

(20) TMPR = ACC

(21) ACC = PSIAR + 1 (22) PSIAR = ACC

(23) ACC = TMPR

(24) TMPR = SDR

(25) SAR = TMPR

(26) READ

(27) TMPR = SDR

(28) ACC = ACC - TMPR

(29) CSIAR = 0

LOAD (LDA, Opcode 30):

(30) TMPR = ACC

(31) ACC = PSIAR + 1

(32) PSIAR = ACC

(33) ACC = TMPR

(34) TMPR = SDR

(35) SAR = TMPR

(36) READ

(37) ACC = SDR

(38) CSIAR = 0

STORE (Name STR, Opcode 40):

(40) TMPR = ACC

(41) ACC = PSIAR + 1

(42) PSIAR = ACC

(43) ACC = TMPR

(44) TMPR = SDR

(45) SAR = TMPR

(46) SDR = ACC

(47) WRITE

(48) CSIAR = 0

BRANCH (Name BRH, Opcode 50):

(50) PSIAR = SDR

(51) CSIAR = 0

COND BRANCH (Name CBR, Opcode 60):

(60) SKIP

(61) CSIAR = 64

(62) PSIAR = SDR

(63) CSIAR = 0

(64) TMPR = ACC

(65) ACC = PSIAR + 1

(65) PSIAR = ACC

(66) ACC = TMPR

(67) CSIAR = 0

LOAD IMMEDIATE (LDI, Opcode 70):

(70) TMPR = ACC

(71) ACC = PSIAR + 1

(72) PSIAR = ACC

(73) ACC = TMPR

(74) ACC = SDR

(75) CSIAR = 0

SIMMAC Programming Language Description

Addition

Usage: ADD <Address>

Where <address> holds the value to add to the accumulator.

Subtraction Usage:

Usage: SUB <address>

Where <address> holds the value to substract to the accumulator.

Load:

Usage: LDA <address>

Where <address> holds the value to load in to the accumulator.

Load Immediate

Usage: LDI number

Where number is the value to load in to the accumulator.

Store

Usage: STR <address>

Where <address> is the storage location for the contents of the accumulator.

Branch 

Usage: BRH <address>

Where <address> is the target of the absolute branch.

Conditional Branch

Usage: CBR <address>

Where <address> is the target of an absolute branch if the accumulator is zero.

Project Description

Design and implement a program to simulate the operation of the SIMMAC based on the descriptions above.

Add a HALT instruction that dumps the contents of all registers and memory and then prints an "End of Job" message.

Your project must implement multi-tasking in a single queue using a round-robin scheduling discipline. You will implement process entities (jobs) that will allow your machine to run several SIMMAC machine-language programs. In order to do this you will define a Process Control Block (PCB) data structure that will be created for each job in your system. For this assignment assume each SIMMAC instruction is equivalent to one clock cycle. Additionally the time quantum value for round-robin scheduling is an integer multiple of a clock cycle. The quantum value is to be set on the command line or prompted for during initialization.

You will define the notion of an interrupt handler that will process a time quantum for each running job. On each job switch, you will print some state information such as which job will be loaded and the current state of the job queues.

Your version of SIMMAC will then run multiple SIMMAC machine language programs simultaneously. These programs will test the ability of your SIMMAC to handle multi- tasking and scheduling. You must design your system such that all SIMMAC machine programs are loaded from text files.

The SIMMAC must be designed to take command line arguments or to prompt for input files in addition to the previously specified items. By this mechanism, all SIMMAC language programs will be loaded. Since there is the LDI command, all data can be loaded into SIMMAC memory using SIMMAC programming statements.

You must develop the following SIMMAC language programs to be run on your SIMMAC machine:

1) Write three programs in the machine language of the SIMMAC that will total the numbers stored in 20 different locations and place the result in a single location.

2) Write a program in the machine language of the SIMMAC that will decrement the value stored in location 201 (must be at least 100) by one until the result is zero. Store the result in location 202.

3) Write a program in the machine language of the SIMMAC that will increment the value stored in location 301 by two until the value has been increased by 200. Store the result in location 302.

Each line of any SIMMAC program must have the following format:

Opcode Operand

You will be responsible for turning in the system design document, source code of your version of SIMMAC (this code must be appropriately commented & readable), an executable version of your SIMMAC, and the output generated from your SIMMAC programs running on your version of SIMMAC.

Reference no: EM131081794

Questions Cloud

Small office internet connection : 1. Describe how to configure Windows 8.1 for a home or small office internet connection. What hardware would you use (cable, NIC, etc.)? What steps would you take? Describe how you would configure Windows 8.1 for a home or small office wireless co..
Using linear interpolation : An individual wants to accumulate $60,000 using 8 annual deposits of $6,000 for 8 years. What is the interest rate require on at the end of year 8. Using the information provided on the graph solve for i' using linear interpolation. Show all work ple..
Network connectivity issues : Your computer is having network connectivity issues. One of the first troubleshooting steps is to ping the loopback address. Why? What is a loopback address?
What is the minimum value of n that produces probability : Assume p = 0.8. What is the minimum value of n that produces a probability of 0.95 of receiving the message at least once?
Machine description will provide the basis for assignment : The following machine description will provide the basis for this assignment. You will create a virtual machine/operating system for the machine described below that will accept programs in the target machine language. The details for this assignm..
Average annual maintenance cost : A used car can be kept for two more years and then sold for an estimated $3000, or it could be sold now for $7500. The average annual maintenance cost over the past 7 years has been $500 per year. However, if the car is kept for two more years this c..
Find weighting of criteria for different type of projects : Discuss the importance of defining criteria for source selection prior to receiving bids from vendors. Discuss how to determine the weighting of criteria for different types of projects and for different types of procurements.
How many moths will it take to pay off the debt : A college graduate is $24,000 in debt from her loans. The interest rate on the debt is 0.75% each month. The monthly payments are $432.61. How many moths will it take to pay off the debt.
Draw a tree diagram that describes the call setup procedure : Draw a tree diagram that describes the call setup procedure.

Reviews

Write a Review

Macroeconomics Questions & Answers

  How to trace out the long-run average cost curve

Long Run Costs Suppose the firm has only three possible scales of production as shown below: a. Which scale of production is most efficient when Q =65 b. Which scale of production is most efficient when Q = 75 c. Trace out the long-run average cost c..

  Aggregate expenditure model and the is curve

Provide the key provisions of the tax cuts passed through Congress in spring 2003 and explain how would these tax cuts be represented by the aggregate expenditure model and the IS curve

  Equilibrium price and quantity using supply and demand

using supply and demand illustrations and assuming competitive markets what is the effect on equilibrium price and

  Government pay for the new spending

Suppose MPC=0.75 and the government pay for the new spending of 100,000 by increasing taxes by 100,000. Calculate the new Y. Could you provide the answer with specific formulas if possible?

  Each organization manager''s performance was evaluated yearly

Each organization manager's performance was evaluated yearly in relation to the specified multiple goals.

  The simple interest for buying a passenger transit rail

A taxi driver plans to pick you up at the airport and drop you off at the bank so you can complete some financial transaction before you head home. He notes that the change in vehicle operating cost (VOC) is 42 cents per mile. Given that his fuel con..

  Explain how will these events impact the equilibrium price

Explain how will these events impact the equilibrium price and quantity of generic soft drinks.

  What is worse for our u.s. economy

Finally, based on these economic concepts as well as your own point-of-view, discuss and explain what is worse for our U.S. economy, too much inflation or too much unemployment?

  What would be a monetary policy prescription

What are some of the damaging effects inflation has on an economy and What would be a monetary policy prescription to reduce or eliminate inflation?

  What are the trade-offs that bag by faces in chooseing

Baby copy company is a worldwide producer of copy machines. It manufactures 10 different copieers, ranging from low-end desktop copiers that sell for a few hundred dollars to high volume document machines that retail for over $200,000.

  Tradeoff between fiscal stimulus and inflation

Compute the short-run profit maximizing level of labor and capital demand. Compute the long-run profit maximizing level of labor and capital demand.

  Marginal cost-profits and graph equilibrium

Draw a diagram showing the current situation of the firm. In addition to the above information, suppose the price of the output is $13/unit, if the firm wants to maximize its profit, what should it do? Explain in detail with the aid of a diagram.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd