cld project files

Upload: christopher-griffin

Post on 02-Jun-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 CLD Project Files

    1/21

    Projects for CLD(E,F)

    2014

    Computer Logic Design (Spring 2014)

    Submission Detais!Dea"ines#

    1-High level Design of Circuit- 28

    th

    April, 20142- Complete implementation of the circuit in LogicWors!- "th#a$, 2014

    1

  • 8/10/2019 CLD Project Files

    2/21

    Project 1#

    Trafc lights

    ProblemIf the three trac lights (leaving yellow) are written as R, G and G- whereG- is the green light to turn right, then the trac signals operate asfollows.

    The trac lights operate with the following signalsR xG x!G- !x

    "ou have to design a circuit controlling all the lights. #ach state shouldstay there for $ cloc% cycles.

    Input&loc% 'ulse &'

    Outputight connections , !, *, *!, &, &!, +, +!

  • 8/10/2019 CLD Project Files

    3/21

    Project 2#Dice counter

    Problem

    A company is producing dice. To check the balancing of the dice they have made amechanical equipment to throw the dice and read the answer. But they now need a

    circuit to count the actual number of times each side appeared.

    They already have a display and the dice counter. The LC has ! inputs and displays the

    number placed at its input. The dice counter has five outputs" four to tell which number

    has appeared and one to tell that a new sample is available.

    #ou have to design a circuit that gets input from the counter" counts the frequency of all

    the numbers and produce the output on si$ LC%s i.e. you will have &! output lines.

    InputClock 'ulse C'

    (ample Available (A

    (ample ata )*+

    Output

    Count of 1,- A)*A+" B)*B+" C)*C+" )*+" )*+" /)*/+

  • 8/10/2019 CLD Project Files

    4/21

    Project $#%ueue of 2&bit 'or"s

    Problem

    0mplement a queue of & bit numbers. The capacity should be ! words. 0t should have anadd input with & inputs for actual data. A delete input with & outputs for data. And two

    outputs as overflow and underflow indicators.

    Input

    Clock 'ulse C'

    Add AAAdd ata A)" A1

    elete A

    Outputelete ata )" 1verflow /

    2nderflow 2/

  • 8/10/2019 CLD Project Files

    5/21

    Project 4#Stac of 2&bit numbers

    Problem

    0mplement a stack of & bit numbers. The capacity should be ! words. 0t should have apush input with & inputs for actual data and a pop input with & outputs for data. And two

    outputs as overflow and underflow indicators.

    Input

    Clock 'ulse C'

    Add AA'ush ata A)" A1

    elete A

    Output'op ata )" 1verflow /

    2nderflow 2/

  • 8/10/2019 CLD Project Files

    6/21

    Project #Line" List of bits

    Problem

    esign a linked list of 1 bit numbers with capacity for 3 bits. 0t should have an insertinput with +,bit input for position and a bit for actual data. 0t should also have a delete

    input with +,bit position input and a bit for output. very position should know weather

    there is data available or not. This should be set on insert and cleared on delete.

    InputClock 'ulse C'

    0nsert 0A

    elete A

    'osition ')*'&

    0nsert ata 0

    Outputelete ata

    4othing to elete / 5delete failure6

    ata Already present 0/ 5insert failure6

  • 8/10/2019 CLD Project Files

    7/21

    Project *#+obot Controer

    Problem

    A computer needs to control a robot" where the computer sends the followingcommands7

    o nothing ))

    Turn right )1

    Turn left 1)

    8ove forward 11

    #ou have to design a circuit that accepts these commands and sends the robot the

    following signalso nothing )))Turn right ))1 )1) )11

    Turn left 1)1 11) 111

    8ove forward 1)) 1))

    (o they respectively take 1"+"+ and & clock cycles. 2ntil the current command is

    completed" don%t take a look at the ne$t input from the computer.

    Input

    Clock 'ulse C'

    0nput Available 0A0nput Command C)" C1

    Output

    utput Available A

    utput (ignal ()*(&

  • 8/10/2019 CLD Project Files

    8/21

    Project #-arm coc

    Problem

    #ou have to design a digital alarm clock. The circuit you will design will keep the time in&! hour format and will give its output to ! seven, segment displays" whose input is 9

    bits controlling the seven segments. (o you will have &3 output lines for the display. #ou

    will also have an alarm output" which is connected to an actual alarm. The alarm will ring

    as long as this signal is :1%. #ou will set this output at 1&)) hrs everyday and it should

    remain set for ; minutes. Assume that the clock pulse you are using gives pulses e$actly

    one minute apart.

    Input

    Clock 'ulse C'

    Output

    isplay output A)*A-" B)*B-" C)*C-" )*-

    Alarm utput A'

  • 8/10/2019 CLD Project Files

    9/21

    Project .#Seria /! Controer

    Problem

    A serial 0ead (ignal >

    utput ata

    utput Available A

  • 8/10/2019 CLD Project Files

    10/21

    Project #emor3 Controer

    Problem

    A computer has & >8s each containing 3 words of 1,bits data. There are two deviceseach of which needs access to the >8s. ach >8 has three address lines? an enable

    input while produces output of a single bit" setting the output available flag" in total four

    inputs and & outputs.

    ach device has five outputs? one to enable the memory" one to select which >8 to

    use" three to select the address in the >8" while there are two inputs" data available

    and the actual data.

    #ou are to insert a circuit between the devices that allows both devices to use both

    >8s. The devices should be able to simultaneously place requests and get data if

    they are going for different >8s while one should wait when going before one of

    them.

    Assume one request arrives in one clock cycle" and no request can arrive from the

    same device until the first is satisfied. @owever the memory can take many clock

    cycles before it sets output available and gives the data.

    0n the following A and B are the prefi$ for devices" and # for >8s.

    Input

    Clock 'ulse C'8emory enable A" B

    >8 (elect A(" B(Address lines AA)*AA&" BA)*BA&

    utput Available A" #A

    utput ata " #

    Output

    utput Available AA" BA

    utput ata A" B

    8emory enable " #Address lines A)*A&" #A)*#A&

  • 8/10/2019 CLD Project Files

    11/21

    Project 10#ouse Controer

    Problem

    The actual mouse device never sends screen coordinates? it sends relative motion. #ouhave to design a circuit that is given relative motion in both directions from mouse

    device and is to continuously output $ and y coordinates. A >(T input can be used to

    set both to ero.

    The relative motion is coded as follows7

    /ast motion 11) & pi$els

    (low motion 1)1 1 pi$el

    4o motion 1)) no change

    (low negative motion )11 ,1 pi$el

    /ast negative motion )1) ,& pi$els

    Input

    Clock 'ulse C'

    >eset and # >(T2p#)*>#&

    Left)*>&

    Output

    position )*9

    # position #)*#9

  • 8/10/2019 CLD Project Files

    12/21

    Project 11#S3stem timer

    Problem

    Computers contain a timer containing programmable channels. 'rogrammable channelsmean timers of different durations. #ou are to design a circuit with four programmable

    channels" each disabled initially. An enable input" two channel select inputs and ! lines

    for duration input can set any channel to a given duration from 1,1;. Dero means to

    disable a channel. /our output lines correspond to the channels and are set high as soon

    as the corresponding timer e$pires.

    Input

    Clock 'ulse C'

    0nput Available 0A

    Channel (elect C()" C(1uration )*+

    Output

    Timer $pire TA" TB" TC" T

  • 8/10/2019 CLD Project Files

    13/21

    Project 12#Ping reporter

    Problemesign a circuit that communicates with a device using two lines" '04E and>('4(. #our circuit counts the clock cycles between each '04E and the

    following >('4( by the device. 0t makes available the !,bit ma$ number of

    cycles at its output.

    Assume that no stale >('4( replies may occur. very '04E willbe followed by a

    >('4( and the ma$ time before >('4( cannot e$ceed 1-.

    Input

    Clock 'ulse C'

    >esponse >

    Output

    'ing '

    8a$imum time 8)*8+

  • 8/10/2019 CLD Project Files

    14/21

    Project 1$#Spee"ometer

    Problem

    #ou have to design a circuit" which will be given the !,bit speed of a vehicle at its inputevery clock cycle. 0t has + outputs" ma$" avg F min" each !,bit long giving the

    respective value.

    Input

    Clock 'ulse C'

    0nput (peed 0)*0+

    Output

    8a$ speed )*+

    Avg speed A)*A+8in speed 4)*4+

    Note:

  • 8/10/2019 CLD Project Files

    15/21

    #ou can ignore decimal portion in average.Project 14#utipier

    Problem

    esign a circuit that can multiply two 3,bit numbers. #ou will need to use addercircuits in the design of the multiplier.

    Input

    Clock 'ulse C'

    /irst 4umber A)*A9

    (econd 4umber B)*B9

    Output

    Answer C)*C1!

  • 8/10/2019 CLD Project Files

    16/21

    Project 15:Calculator

    Problem

    #ou have to design a processor for a calculator" which can do the following7

    isplay A )))

    isplay B ))1

    0nput A )1)

    0nput B )11

    AGAB 1))

    BGAB 1)1

    AGB , A 11)

    BGA 111

    #our circuit has three inputs to read the command and a command available flag. Hhileit has four more inputs to read A or B and has ; outputs" ! for displaying and 1 as output

    available flag.

    Input

    Clock 'ulse C'

    Command Available CA

    Command C)*C&0nput ata A)*A+

    Outpututput Available Autput ata )*+

  • 8/10/2019 CLD Project Files

    17/21

    Project 16:FunBrain Magician

    The /unBrain 8agician is game that will pick a secret number between ) I +1. 2ser

    guesses what number it is. 0f the guess is high or low" /unBrain will give a hint.

    2ser will ask the magician to generate the random number by setting input E>4 G 1.8agician will take the guess after every ! cycles. 0f the answer is correct CA will be set

    to 1" otherwise @ or L will be set accordingly. 0n the end magician should tell in how

    many turns user is able to guess the correct number.

    Input

    Clock 'ulse C'

    Eenerate >andom number E>4

    Euessed 4umber C)*C!

    Output

    Correct Answer CA

    4umber of guesses )*!

    @igh @

    Low L

  • 8/10/2019 CLD Project Files

    18/21

    Project 1#Circuar Line" List

    Problem

    esign a linked list of + bit numbers with capacity for +$! bits. 0t should be able to insertinput with &,bit input for position and + bits for actual data. very position should know

    weather there is data available or not. This should be set on insert. 0t should be able to

    rotate data right F left. 0t should also be able to swap data of & nodes. 0n that case there

    should be two & bits for source F destination.

    #our circuit has & inputs A" B to read the command

    Command A,B

    0nsert ))

    >otate right )1

    >otate left 1)

    swap 11

    A (even segment display is attached to each node.

    InputClock 'ulse C'

    0nsert 'osition ')"'1

    0nsert ata 0)*0&

    (ource 'osition ()"(1

    estination 'osition )"1Command A"B

    Output! (even segment display showing the

    contents of each node

    ata Already present 0/

    5insert

    failure6

    Note:

    0f node is empty then (even segment display should display

  • 8/10/2019 CLD Project Files

    19/21

    Project 1.1*&bit pseu"o ran"om generator

    0t should generate 1- bit random number. 8ake sure your system should not

    generate the same random number on the same seed.

    Input

    Clock 'ulse C'

    (eed ()*(1;

    Output

    >andom 4umber A)*..A1;

    Project 1ic&ac&oe 5ame0t%s a two player game.#ou have a grid of sie &)$&). ach cell of the grid is

    assigned a unique combination 5id6 of length -. ach player will mark the cell on its turn.

    The cell will be marked by giving its unique id. The player who succeeds in placing

    twenty respective marks in a horiontal" vertical" or diagonal row wins the game.

    Input

    Clock 'ulse C'

    Cell no C4 5on every turn6

    Output

    Hinner 'layer H'

    Project 20Snaes an" La""ers0t%s a two player game. #ou have ),JJ cells" with each cell having a unique number. ach

    player roles a dice and output can only be between 1 to -. The player moves number of

    cells ahead according to face value of dice. The first one to reach JJ will win. #ou need

    to fi$ the positions of snakes and ladders on the cells. The game also has to display theturn of each player.

    Input

    Clock 'ulse C'

    (tart ice >oll 1 to start and ) to stop

    Output

    'osition of each player on board

    Hinner 'layer H'

    Project 21

  • 8/10/2019 CLD Project Files

    20/21

    Distance easuring De6ice (S7-+)Sonar5originally an acronym for SOund Navigation And Ranging6 is a technique that

    uses sound propagation 5usually underwater" as in submarine navigation6 to navigate"

    communicate with or detect obKects on or under the surface of the water" such as other

    vessels. Bats are the pioneers in nature to have mastered the technique of echo,location

    based on the same principle.

    #ou are required to design a similar device that emits an acoustic wave pulse" receives the

    echo" and using the time difference between these two events calculates the distance of a far

    off obKect. #ou do not need to design the emitter and receiver" assume that the hardware is

    available.

    Input

    Clock 'ulse C'

    T 5Trigger evice6 set to initiate distance measurement process

    (>5(ound >eceived6 set when the echo is received

    050nput (peed6 set when speed of sound has to be updated

    (peed of (ound5might 1 to move right

    Left 1 to move left

    OutputLevel L)" L1" L&

    'oints ')*'-

  • 8/10/2019 CLD Project Files

    21/21