Projects for CLD(E,F) 2014
Computer Logic Design (Spring 2014)
Submission Detais!Dea"ines# 12-
High level Design of Circuit- 28 th April, 2014 Complete implementation of the circuit in Logic Wors!- "th #a$, 2014
1
Project 1# Trafc lights Problem If the three trac lights (leaving yellow) are written as R, G and G- where G- is the green light to turn right, then the trac signals operate as follows.
The trac lights operate with the following signals signals R x G x! G!x "ou "ou have to design design a circuit circuit controlling controlling all the lights. #ach #ach state should should stay there for $ cloc% cycles.
Input &loc% 'ulse &'
Output ight connections , !, *, *!, &, &!, +, +!
Project 2# Dice counter Problem A company is producing dice. To check the balancing of the dice they have made a mechanical 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 .
Input Clock 'ulse (ample Available (ample ata
C' (A )*+
Output Count of 1,-
A)*A+" B)*B+" C)*C+" )*+" )*+" /)*/+
Project $# %ueue of 2&bit 'or"s Problem 0mplement a queue of & bit numbers. The capacity should be ! words. 0t should have an add input with & inputs for actual data. A delete input with & outputs for data. And two outputs as overflow and underflow indicators.
Input Clock 'ulse Add Add ata elete
C' AA A)" A1 A
Output elete ata verflow 2nderflow
)" 1 / 2/
Project 4# Stac of 2&bit numbers Problem 0mplement a stack of & bit numbers. The capacity should be ! words. 0t should have a push 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 Add 'ush ata elete
C' AA A)" A1 A
Output 'op ata verflow 2nderflow
)" 1 / 2/
Project # Line" List of bits Problem esign a linked list of 1 bit numbers with capacity for 3 bits. 0t should have an insert input 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.
Input Clock 'ulse 0nsert elete 'osition 0nsert ata
C' 0A A ')*'& 0
Output elete ata 4othing to elete / ata Already present 0/
5delete failure6 5insert failure6
Project *# +obot Controer Problem A computer needs to control a robot" where the computer sends the following commands7 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 signals o 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 0nput Available 0nput Command
C' 0A C)" C1
Output utput Available utput (ignal
A ()*(&
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 Alarm utput
A)*A-" B)*B-" C)*C-" )*A'
Project .# Seria /! Controer Problem A serial 0< Controller will interrupt the C'2 when 3 bits are available in its buffer. 0t will provide the C'2 with data when the C'2 acknowledges the interrupt. 0t will discard its buffer" if the C'2 does negative acknowledgment. To read data from the serial device it check input available flag" then reads data and sends data read signal. 0f more data is available" input available will be set in the ne$t cycle also.
Input Clock 'ulse 0nput Available 0nput ata 04T acknowledge 04T 4T AC=
C' 0A 0 04TA 04T4A
Output ata >ead (ignal utput ata utput Available
> A
Project # emor3 Controer Problem A computer has & >8s each containing 3 words of 1,bits data. There are two devices each 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 8emory enable >8 (elect Address lines utput Available utput ata
C' A" B A(" B( AA)*AA&" BA)*BA& A" #A " #
Output utput Available utput ata 8emory enable Address lines
AA" BA A" B " # A)*A&" #A)*#A&
Project 10# ouse Controer Problem The actual mouse device never sends screen coordinates? it sends relative motion. #ou have 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) (low motion 1)1 4o motion 1)) (low negative motion )11 /ast negative motion )1)
Input Clock 'ulse >eset and # 2p
C' >(T >#)*>#& >)*>&
Output position # position
)*9 #)*#9
& pi$els 1 pi$el no change ,1 pi$el ,& pi$els
Project 11# S3stem timer Problem Computers contain a timer containing programmable channels. 'rogrammable channels mean 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 0nput Available Channel (elect uration
C' 0A C()" C(1 )*+
Output Timer $pire
TA" TB" TC" T
Project 12# Ping reporter Problem esign 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 will be followed by a >('4( and the ma$ time before >('4( cannot e$ceed 1-.
Input Clock 'ulse >esponse
C' >
Output 'ing 8a$imum time
' 8)*8+
Project 1$# Spee"ometer Problem #ou have to design a circuit" which will be given the !,bit speed of a vehicle at its input every clock cycle. 0t has + outputs" ma$" avg F min" each !,bit long giving the respective value.
Input Clock 'ulse 0nput (peed
C' 0)*0+
Output 8a$ speed Avg speed 8in speed Note:
)*+ A)*A+ 4)*4+
#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 adder circuits in the design of the multiplier.
Input Clock 'ulse /irst 4umber (econd 4umber
C' A)*A9 B)*B9
Output Answer
C)*C1!
Project 15: Calculator Problem #ou have to design a processor for a calculator" which can do the following7 isplay A isplay B 0nput A 0nput B AGAB BGAB AGB , A BGA
))) ))1 )1) )11 1)) 1)1 11) 111
#our circuit has three inputs to read the command and a command available flag. Hhile it has four more inputs to read A or B and has ; outputs" ! for displaying and 1 as output available flag.
Input Clock 'ulse Command Available Command 0nput ata
C' CA C)*C& A)*A+
Output utput Available utput ata
A )*+
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 C)*C! Euessed 4umber
Output Correct Answer 4umber of guesses @igh Low
CA )*! @ L
Project 1# Circuar Line" List Problem esign a linked list of + bit numbers with capacity for +$! bits. 0t should be able to insert input 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 >otate left swap
)) )1 1) 11
A (even segment display is attached to each node.
Input Clock 'ulse 0nsert 'osition 0nsert ata (ource 'osition estination 'osition Command
C' ')"'1 0)*0& ()"(1 )"1 A"B
Output ! (even segment display showing the contents of each node 5insert ata Already present 0/ failure6 Note:
0f node is empty then (even segment display should display
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 (eed
C' ()*(1;
Output >andom 4umber
A)*..A1;
Project 1 ic&ac&oe 5ame 0t%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 Cell no
C' C4 5on every turn6
Output Hinner 'layer
H'
Project 20 Snaes an" La""ers 0t%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 the turn of each player.
Input Clock 'ulse (tart ice >oll
C' 1 to start and ) to stop
Output 'osition of each player on board Hinner 'layer H'
Project 21
Distance easuring De6ice (S7-+) Sonar 5originally an acronym for SOund Navigation And R a nging6 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 T 5Trigger evice6 (>5(ound >eceived6 050nput (peed6 (peed of (ound5m
C' set to initiate distance measurement process set when the echo is received set when speed of sound has to be updated ()*(1;
Output (5mit (ound6 istance 5m6
(ignal for the (ound mitter to initiate pulse )*1;
Project 22 Snae 5ame #ou are required to design the famous single player game called (nake. The snake 5initially + bits long6 moves in a 1- $ 1- grid. /ood appears at random locations on the grid and the sie of the snake grows by one each time it eats. ach food item increases the points by ;. Twenty points leads to the ne$t level where the sie of the snake is again reset to + bits and new obstacles 5bricks on certain locations on the grid6 appear. 0f the snake hits one of these obstacles" it dies and game is over. There are ; levels in the game. 0f the player scores 1))" he wins.
Input Clock 'ulse 2p own >ight Left
C' 1 to move up 1 to move down 1 to move right 1 to move left
Output Level 'oints
L)" L1" L& ')*'-