Download presentation
Presentation is loading. Please wait.
1
CSE:-670 DESIGN OF EMBEDDED SYSTEMS USING FPGA. PROFESSOR:-Dr. RICHARD E. HASKELL. MIDTERM EXAM. NAME:-RAVI D. SHAH
2
ALGORITHM. Accept the input (number whose factorial is desired) from switches and store it in R2 making wld = ‘1’ for display. Accept the input (number whose factorial is desired) from switches and store it in R2 making wld = ‘1’ for display. Provide the first number using which the algorithm starts. (i.e. 1) using the switches and store it in R0 and R1 making wld = ‘1’ for display. Provide the first number using which the algorithm starts. (i.e. 1) using the switches and store it in R0 and R1 making wld = ‘1’ for display. Now bring R1 to input a of the alu and perform multiplication. Now bring R1 to input a of the alu and perform multiplication. Store the answer in R1. Store the answer in R1.
3
Bring R0 to input a of the alu and perform a+b. Now input b of the alu has the value of a+b on it. Now bring R2 to input a of the alu and perform a-b. If z = ‘0’ then bring R1 again to input a of the alu and perform multiplication and so on. If z = ‘1’ perform multiplication, store the answer in R2 register and keep displaying it untill the new number is entered. Bring R0 to input a of the alu and perform a+b. Now input b of the alu has the value of a+b on it. Now bring R2 to input a of the alu and perform a-b. If z = ‘0’ then bring R1 again to input a of the alu and perform multiplication and so on. If z = ‘1’ perform multiplication, store the answer in R2 register and keep displaying it untill the new number is entered.
4
DATAPATHANDCONTROL UNIT Components used in the Datapath:- Registers, Multiplexer, ALU, Binary to BCD convertor and BCD to seven segment convertor for display. Control Unit:- It employs the state machine approach with a total of 13 states communicating with each other.
5
ADVANTAGES OF THE ALGORITHM. Can be a part of any Embedded System where multiply and add operation is being performed like in a correlator in a Global Positioning System. Implemented through the state machine approach which provides clear and perfect communication between the states, which facilitates both debugging and implementation. With more display options in terms of the number of LCD displays it is a smooth implementation for finding factorial of as large a number as required.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.