Design Problem 4 Solutions

Size: px
Start display at page:

Download "Design Problem 4 Solutions"

Transcription

1 CSE 260 Digital Computers: Organization and Logical Design Jon Turner Design Problem 4 Solutions In this problem, you are to design, simulate and implement a maze game on the S3 board, using VHDL. This circuit allows a user to move through a 7x7 maze with the objective of moving from the starting position (0,0) to the finish position (6,6). An example of such a maze is shown in the figure at right. At each step, the S3 board s seven segment display shows the user s (x,y) position on digits 3 and 2 of the display, the user s orientation (0=north, 1=east, 2=south, 3=west) on digit 1 of the display, and a view of the current cell, and the next cell in front (assuming there is no intervening wall) using digit 0. Two example views that might be shown on digit 0 of the display are shown in the upper right part of the figure. Start by implementing a module called maze with inputs clk, reset, left, right and move. The left and right inputs cause the user to turn to the left or 0,0 6,6 wwall(4,1)=1 sample views (3,1) north (4,1) west swall(6,4)=0 right. The move input causes the user to move forward one cell, assuming there is no wall in the way. The outputs of your circuit should include signals xpos and ypos that specify the current position in the maze (these should be specified as 3 bit signals), and a signal direction, that specifies the direction that the user is facing (0 for north, 1 for east, 2 for south, 3 for west). You should also provide a 1 bit signal called error which is asserted if the user attempts to move forward when there is a wall in the way. The error signal should stay asserted until the user performs some other action. To represent the walls of the maze, define a pair of twodimensional constant arrays, swall and wwall. Use swall(x)(y) to represent the south wall of cell (x,y) in the maze. Use wwall(x)(y) to represent the west wall of cell (x,y) in the maze. Use a 1 to indicate the presence of a wall segment and 0 to indicate the absence of a wall segment. Initialize swall and wwall so as to define the maze shown in the figure above. The following VHDL code can be used to declare wwall. Declare swall similarly. type walltype is array (0 to 7) of std_logic_vector(0 to 7 constant wwall: walltype := ( " ", " ", " ", " ", " ", " ", " ", " " You will also need to write a top module that connects to the external signals on the S3 board (use the same ucf file as in design problems 2 and 3), and connects them to the maze component and the other components you will need to use. One of these other components is the debounce circuit that was used in design problem 3. You will also need another component to control the seven segment display. On the web site, you will find a module called displayunit that can be used for this purpose. Combine these components in your top module in order to - 1 -

2 provide the desired functionality. The debounced buttons should be used for the reset and the game control inputs. In particular, use dbtn(3) for reset, dbtn(2) for left, dbtn(1) for move and dbtn(0) for right. You should equip top with logic to detect rising transitions on each of the game control buttons. For example, when dbtn(2) goes from 0 to 1, your circuit should make left high for one clock tick, so that the maze module will respond appropriately (if you just connect dbtn(2) to left, the maze module will see its left input stay high for many clock ticks, causing multiple turns to the left, rather than a single turn). Perform a functional simulation of your circuit that takes at least six steps through the maze, verifying that the left, right and move buttons work correctly and that the outputs from the maze module are correct. Be sure to verify that the error signal works correctly. Your design notes should include block diagrams for both the maze module and the top module. Create a separate project that implements your maze module by itself. Access the synthesis properties by right-clicking on the synthesis line in the Sources sub-window of Project Navigator, and set the optimization goal to Area. Synthesize the circuit and look at the HDL Synthesis section of the synthesis report. Print this section and include it when you hand in your design problem. You will find several lines in this section of the form Found 3-bit adder for signal <$add0034> created at line 93. Found 4-bit comparator greater for signal <$cmp_gt0000> created at line 99. For all the lines that mention adders or comparators, examine the corresponding lines in your VHDL source code. Why are adders and comparators found for these lines? Are there lines in your VHDL source where additions are performed but for which no adders are mentioned in the HDL synthesis section. If so, identify those lines and explain why there are no adders mentioned for those lines. Do the same for comparators. The final part of the problem is to implement your design on one of the S3 boards in the Urbauer lab. Once you have your design on the S3 board, verify that it works by playing the maze game from start to finish, verifying that the values displayed on the S3 board are correct. When you are satisfied, have one of the TAs come into the lab and check it. Be sure to the file containing your VHDL code (please send it as a single file) as an attachment to jon.turner@wustl.edu. Please name your attachment dp4-yourname.vhd, where yourname is your first and last names (e.g. jonturner). Also, a copy of your MCS file, as a second attachment. Note that the last page of this handout is a grading template for the design problem. This should stapled to the front of the assignment when you turn it in, with your name filled in the blank space. When you demonstrate the running design to the TA, make sure he assigns a score and signs in the comment space

3 Design notes for Maze game. This circuit implements a maze game, in which a user moves through a 7x7 maze on the S3 board. The user controls the maze game using the push buttons on the S3 board. Btn(2) causes the user to turn left, btn(1) causes the user to move forward and btn(0) causes the user to turn right. The user s current position in the maze is displayed on digits 3 and 2 of the seven segment display, the user s orientation is shown on digit 1 (0 for north, 1 for east, 2 for south and 3 for west) and a view of the user s current position is shown on digit 0. The LEDs on the board are turned on if the user attempts to move through a wall and they stay on until the user performs a legal move. The circuit requires some static data to represent the maze. The 2d array wwall(i)(j)=1 if there is a wall on the west side of cell (i,j) and 2d array swall(i)(j)=1 if there is a wall on the south side of cell(i,j). The circuit also requires some dynamic state. In particular, it must remember the user s position in the maze and the direction that the user is facing. Position is represented by a pair of registers, xpos and ypos. Direction is represented by a third register, dir. A block diagram of the maze module is shown at right. The blocks labeled wwall and swall represent the two dimensional constant arrays that define the maze. The blocks labeled wselect and sselect are used to select bits from wwall xpos ypos swall wselect sselect wwall(x)(y), wwall(x+1)(y)... =0,=7 x y =0,=7 clr,+,- swall(x)(y), swall(x)(y+1)... clr,+,- Control dir direction left move right error view these arrays that are needed to make various control decisions. These circuits can be implemented using multiplexors to extract the appropriate bits. Adders and subtracters will also be needed to obtain x+1,x+2,x-1,y+1,y+2 and y-1 from x and y. These are not shown explicitly. The blocks labeled x, y and dir are up-down counters with clear inputs. The control block consists of combinational circuitry that uses the selected bits from wwall and swall and the control inputs to generate the output signals and the control signals for the counters

4 A block diagram for the top module is shown at right. The debouncer module takes the buttons as inputs and produces dbtn as an output. The circuit between debouncer and maze detects rising transitions on dbtn(2..0) and generates a one clock tick pulse for each rising transition. This way, each press of the clock triggers one move in the maze game. The error output is connected to all 8 LEDs and the other outputs of the maze game are passed to the display module. The outputs of the display module drive the seven segment display. btn debouncer dbtn(3) dbtn(2..0) D >C mclk reset left move right clk maze xpos, ypos, direction, view error led display an ssg - 4 -

5 VHDL Source Code.. library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; package commondefs is constant mazesize: integer := 7; # of rows and columns in maze constant possize: integer := 3; number of bits to represent xy position constant nbtn: integer := 4; number of buttons constant nswt: integer := 8; number of switches constant nled: integer := 8; number of LEDs constant ndig: integer := 4; number of digits constant operationmode: integer := 0; use 0 for sim, 1 for S3 board subtype bigdelay is std_logic_vector(27 downto 0 type displaytype is array(ndig-1 downto 0) of std_logic_vector(7 downto 0 function int(d: std_logic_vector) return integer; Convert logic vector to integer. Handy for array indexing. end package commondefs; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; package body commondefs is function int(d: std_logic_vector) return integer is Convert logic vector to integer. Handy for array indexing. begin return conv_integer(unsigned(d) end function int; end package body commondefs; Maze game Jon Turner - 3/1/2007 This module implements an 8x8 maze. The user starts in position 0,0 of the maze and can move around the maze using the input signals, left, right and move. The left and right signals cause the user to turn to the left or right without changing position. The move signal causes the user to advance one step in the position he/she is facing, assuming there is no wall directly in front of. The outputs include the user's xy position in the maze (xpos, ypos) and orientation (0=north, 1=east, 2=south, 3=west). The output also includes a view of the user's immediate environment, using one digit of the seven segment display. This allows the user to see the walls of the current "cell" and if there is no intervening wall, the next cell in front. There is also an error signal that is asserted if the user attempts to move through a wall of the maze. The error signal remains asserted until the next action by the user. It is assumed that at most one of left, right or move is asserted in any one clock tick

6 library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; use work.commondefs.all; entity maze is port( clk, reset: in STD_LOGIC; left, right, move: in std_logic; view : out std_logic_vector(7 downto 0 xpos, ypos : out std_logic_vector(possize-1 downto 0 direction: out std_logic_vector(1 downto 0 error: out std_logic end maze; architecture a1 of maze is Signals that define the maze. wwall(x)(y) defines the west wall of cell (x,y) and swall(x)(y) defines the south wall of cell (x,y) type walltype is array (0 to mazesize) of std_logic_vector(0 to mazesize constant wwall: walltype := ( " ", " ", " ", " ", " ", " ", " ", " " constant swall: walltype := ( " ", " ", " ", " ", " ", " ", " ", " " signal x,y: std_logic_vector(possize-1 downto 0 signal dir: std_logic_vector(1 downto 0 begin xpos <= x(possize-1 downto 0 ypos <= y(possize-1 downto 0 direction <= dir; process (clk,dir,x,y) begin updtate state in response to user actions if rising_edge(clk) then if reset = '1' then x <= (x'range => '0' y <= (y'range => '0' dir <= "00"; error <= '0'; else if left = '1' then dir <= dir - 1; error <= '0'; elsif right = '1' then dir <= dir + 1; error <= '0'; elsif move = '1' then error <= '0'; case dir is when "00" => if y < mazesize-1 and swall(int(x))(int(y+1)) = '0' then y <= y + 1; else error <= '1'; when "01" => if x<mazesize-1 and wwall(int(x+1))(int(y))='0' then x <= x + 1; else error <= '1'; - 6 -

7 when "10" => if y > x"0" and swall(int(x))(int(y)) = '0' then y <= y 1; else error <= '1'; when others => if x > x"0" and wwall(int(x))(int(y)) = '0' then x <= x - 1; else error <= '1'; end case; define view from current position view <= x"00"; case dir is when "00" => view(2) <= wwall(int(x+1))(int(y) view(3) <= swall(int(x))(int(y) view(4) <= wwall(int(x))(int(y) view(6) <= swall(int(x))(int(y+1) if swall(int(x))(int(y+1)) = '0' and y < mazesize-1 then view(0) <= swall(int(x))(int(y+2) view(1) <= wwall(int(x+1))(int(y+1) view(5) <= wwall(int(x))(int(y+1) when "01" => view(2) <= swall(int(x))(int(y) view(3) <= wwall(int(x))(int(y) view(4) <= swall(int(x))(int(y+1) view(6) <= wwall(int(x+1))(int(y) if wwall(int(x+1))(int(y)) = '0' and x < mazesize-1 then view(0) <= wwall(int(x+2))(int(y) view(1) <= swall(int(x+1))(int(y) view(5) <= swall(int(x+1))(int(y+1) when "10" => view(2) <= wwall(int(x))(int(y) view(3) <= swall(int(x))(int(y+1) view(4) <= wwall(int(x+1))(int(y) view(6) <= swall(int(x))(int(y) if swall(int(x))(int(y)) = '0' and y > x"0"then view(0) <= swall(int(x))(int(y-1) view(1) <= wwall(int(x))(int(y-1) view(5) <= wwall(int(x+1))(int(y-1) when others => view(2) <= swall(int(x))(int(y+1) view(3) <= wwall(int(x+1))(int(y) view(4) <= swall(int(x))(int(y) view(6) <= wwall(int(x))(int(y) if wwall(int(x))(int(y)) = '0' and x > x"0"then view(0) <= wwall(int(x-1))(int(y) view(1) <= swall(int(x-1))(int(y+1) view(5) <= swall(int(x-1))(int(y) end case; end process; end a1;

8 Synchronize and de-bounce the push buttons. dbtn is de-bounced version of btn The constant operationmode should be set to 0 for simulation and 1 for use in S3 board. - library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; use work.commondefs.all; entity debouncer is port( clk: in std_logic; btn: in std_logic_vector(nbtn-1 downto 0 dbtn: out std_logic_vector(nbtn-1 downto 0) end debouncer; architecture debarch of debouncer is When operationmode=1, debounceperiod=10^6 which gives a delay of 20 ms for the 50 MHz clock frequency of the S3 board. constant debounceperiod: integer := 3 + operationmode*999997; signal s1btn, s2btn, s3btn: std_logic_vector(nbtn-1 downto 0 signal count: bigdelay; begin process(clk) begin if clk'event and clk = '1' then first synchronize buttons to reduce likelihood of synchronizer failure s1btn <= btn; s2btn <= s1btn; s3btn <= s2btn; transfer new value to dbtn after it has been stable for duration of the de-bounce period if s3btn /= s2btn then count <= (count'range => '0' elsif count < debounceperiod then count <= count + 1; elsif count = debounceperiod then dbtn <= s3btn; count <= count + 1; end process; end debarch; Display unit This module displays values on a seven segment display. It is designed to accept either "raw" inputs or numeric inputs. The display input signal is an array of ndig(=4) values of 8 bits each. If display(i)(7)=1 then display(i) is interpreted as a "raw mode" input and is used to drive the display digit directly. In raw mode, a 1 in a given bit position causes that display segment to be turned on. For each i, diplay(i)(0) corresponds to the a segment on the display, display(i)(1) corresponds to the b segment and so forth. The decimal point on the display is always turned off. If display(i)(7)=0, then display(i) is interpreted as a hex digit to be decoded and then displayed - 8 -

9 The circuit drives the external display using the ssg signal and the an signal. It rotates through the values specified in display, routating through each one every 20 ms. This makes it look like the values are all being displayed continuously. The operationmode constant is used to control the amount of time each digit is displayed. It should be set to 0 for simulation and 1 for use on the S3 board. library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; use work.commondefs.all; entity displayunit is port( clk, reset: in STD_LOGIC; display: in displaytype; an : out std_logic_vector(ndig-1 downto 0 ssg: out std_logic_vector(7 downto 0) end displayunit; architecture displayarch of displayunit is These constants control which bits of the displaycnt register are used to select the display digit to display. When operationmode=0, bits 2..(2-nBits+1) select the current digit to be displayed, resulting into a very fast cycling through the values. When operationmode=1, bits 19..(19-nBits+1) select the current digit. This causes all four digits to be displayed once every 20 ms. constant nbits: integer := 2; constant displaycntbits: integer := nbits + operationmode*(19-nbits signal displaycnt: bigdelay; function ssdecode(digit: std_logic_vector(3 downto 0)) return std_logic_vector is Seven segment display decoder. The output produced specifies the segments on the display to light in order to display a hexadecimal digit for input value. variable result: std_logic_vector(7 downto 0 begin case digit is when x"0" => result := x"c0"; b" " when x"1" => result := x"f9"; b" " when x"2" => result := x"a4"; b" " when x"3" => result := x"b0"; b" " when x"4" => result := x"99"; b" " when x"5" => result := x"92"; b" " when x"6" => result := x"82"; b" " when x"7" => result := x"f8"; b" " when x"8" => result := x"80"; b" " when x"9" => result := x"90"; b" " when x"a" => result := x"88"; b" " when x"b" => result := x"83"; b" " when x"c" => result := x"c6"; b" " when x"d" => result := x"a1"; b" " when x"e" => result := x"86"; b" " when others => result := x"8e"; b" " - 9 -

10 end case; return result; end function; begin process (clk,display,displaycnt) begin displaycnt process just increments counter on each clock tick if clk'event and clk = '1' then displaycnt <= displaycnt + 1; if reset = '1' then displaycnt <= (displaycnt'range => '0' display each of the display digits an <= (an'range => '1' for i in 0 to ndig-1 loop when the relevant bits of displaycnt=i, display(i) is used to drive the seven segment display signal (ssg) and the corresponding enable (an(i)) is turned on. if int(displaycnt(displaycntbits downto displaycntbits-(nbits-1))) = i then if display(i)(7) = '1' then ssg <= '1' & (not (display(i)(6 downto 0)) else ssg <= ssdecode(display(i)(3 downto 0) an(i) <= '0'; end loop; end process; end displayarch; Top module Defines the connections among the various components and the connections between the external pins provided by the S3 board and the corresponding internal signals. library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; use work.commondefs.all; entity top is port( mclk: in STD_LOGIC; btn: in std_logic_vector(nbtn-1 downto 0 swt : in std_logic_vector(nswt-1 downto 0 led : out std_logic_vector(nled-1 downto 0 an : out std_logic_vector(ndig-1 downto 0 ssg: out std_logic_vector(7 downto 0) end top; architecture toparch of top is component maze port( clk, reset: in STD_LOGIC; left, right, move: in std_logic; view : out std_logic_vector(7 downto 0 xpos, ypos : out std_logic_vector(possize-1 downto 0 direction: out std_logic_vector(1 downto

11 error: out std_logic end component; component debouncer port( clk: in std_logic; btn: in std_logic_vector(nbtn-1 downto 0 dbtn: out std_logic_vector(nbtn-1 downto 0) end component; component displayunit port( clk, reset: in STD_LOGIC; display: in displaytype; an : out std_logic_vector(ndig-1 downto 0 ssg: out std_logic_vector(7 downto 0) end component; signal reset, error: STD_LOGIC; signal dbtn, prev_dbtn: std_logic_vector(nbtn-1 downto 0 signal left, right, move: std_logic; signal xpos, ypos: std_logic_vector(possize-1 downto 0 signal dir: std_logic_vector(1 downto 0 signal view: std_logic_vector(7 downto 0 signal display: displaytype; begin debc: debouncer port map(mclk, btn, dbtn process(mclk,error) begin prev_dbtn is the value of dbtn from previous clock tick if rising_edge(mclk) then prev_dbtn <= dbtn; turn on all the LEDs when the user attempts an illegal move for i in 0 to nled-1 loop led(i) <= error; end loop; end process; reset <= dbtn(3 generate single clock tick pulse for left, move and right whenever corresponding button is pressed left <= (not prev_dbtn(2)) and dbtn(2 move <= (not prev_dbtn(1)) and dbtn(1 right <= (not prev_dbtn(0)) and dbtn(0 mazc: maze port map(mclk,reset,left,right,move,view,xpos,ypos,dir,error Associate xpos with display digit 3, ypos with digit 2, dir with display digit 1 and users current view of the maze with digit 0. Note that bit 7 of display(0) is set to 1, since we need to use "raw mode" for this position. display(3)(7 downto possize) <= (others => '0' display(3)(possize-1 downto 0) <= xpos; display(2)(7 downto possize) <= (others => '0' display(2)(possize-1 downto 0) <= ypos; display(1) <= "000000" & dir; display(0) <= '1' & view(6 downto 0 dispc: displayunit port map(mclk, reset, display, an, ssg end toparch;

12 Simulation. The first section of the simulation shown below shows the circuit being reset and the first move. It also shows how the values of xpos, ypos, dir and view are correctly reflected in the seven segment display. btn(3) produces reset ypos changes with move initial views are ssg reflects xpos (C0), ypos (f9), dir (C0), view (af)

13 The next two sections of the simulation are zoomed out to better show the sequence of moves. The first shows how the position and direction variables change in response to the specified operations. It also shows how the error signal is triggered when the user attempts to move through a wall. The last part of correct updating position and direction in response to actions error when attempting to move through wall correct updating position and direction in response to actions views the simulation also shows proper updating of the state variables and the view diagrams at the bottom can be used to check the values of the view signal

14 Synthesis Report. The HDL Synthesis section of the synthesis report is shown below. After each line that refers to an adder or comparator, the corresponding line of the VHDL source code has been inserted, along with a comment. ========================================================================= * HDL Synthesis * ========================================================================= Performing bidirectional port resolution... Synthesizing Unit <maze>. Related source file is "C:/260designs/sequential/vhdlAM/mazeSA/maze.vhd". Found 8x16-bit ROM for signal <$rom0000>. Found 8x16-bit ROM for signal <$rom0001>. Found 8x8-bit ROM for signal <$mux0012> created at line 134. Found 8x16-bit ROM for signal <$rom0002>. Found 7-bit 4-to-1 multiplexer for signal <view<6:0>>. Found 1-bit register for signal <error>. Found 3-bit adder for signal <$add0007> created at line 124. view(0) <= swall(int(x))(int(y+2) the adder is needed to produce the signal y+2; this is first place in the source code where y+2 appears. Found 3-bit adder for signal <$add0017> created at line 134. view(0) <= wwall(int(x+2))(int(y) the adder is needed to produce the signal x+2; this is first place in the source code where x+2 appears. Found 3-bit adder for signal <$add0033> created at line 87. if y < mazesize-1 and swall(int(x))(int(y+1)) = '0' then the adder is needed to produce the signal y+1; this is first place in the source code where y+1 appears. Found 3-bit adder for signal <$add0034> created at line 93. if x < mazesize-1 and wwall(int(x+1))(int(y)) = '0' then the adder is needed to produce the signal x+1; this is first place in the source code where x+1 appears. Found 4-bit comparator greater for signal <$cmp_gt0000> created at line 99. if y > x"0" and swall(int(x))(int(y)) = '0' then the comparator is needed to compare y to 0; this is first place in the source code where y>0 appears. Found 4-bit comparator greater for signal <$cmp_gt0001> created at line 153. if wwall(int(x))(int(y)) = '0' and x > x"0"then the comparator is needed to compare x to 0; this is first place in the source code where x>0 appears. Found 4-bit comparator less for signal <$cmp_lt0000> created at line 87. if y < mazesize-1 and swall(int(x))(int(y+1)) = '0' then the comparator is needed to compare y to mazesize-1 this is use of y<mazesize-1. Found 4-bit comparator less for signal <$cmp_lt0001> created at line 133. if x < mazesize-1 and wwall(int(x+1))(int(y)) = '0' then the comparator is needed to compare x to mazesize-1 this is use of x<mazesize-1. Found 1-bit 8-to-1 multiplexer for signal <$mux0001> created at line 87. Found 1-bit 8-to-1 multiplexer for signal <$mux0003> created at line 93. Found 1-bit 8-to-1 multiplexer for signal <$mux0005> created at line 99. Found 1-bit 8-to-1 multiplexer for signal <$mux0007> created at line 105. Found 1-bit 4-to-1 multiplexer for signal <$mux0028> created at line 85. Found 3-bit 4-to-1 multiplexer for signal <$mux0029> created at line 85. Found 1-bit 8-to-1 multiplexer for signal <$mux0031> created at line 124. Found 1-bit 8-to-1 multiplexer for signal <$mux0032> created at line 134. Found 1-bit 8-to-1 multiplexer for signal <$mux0033> created at line 144. Found 1-bit 8-to-1 multiplexer for signal <$mux0034> created at line 154. Found 1-bit 8-to-1 multiplexer for signal <$mux0039> created at line 125. Found 1-bit 8-to-1 multiplexer for signal <$mux0040> created at line 135. Found 1-bit 8-to-1 multiplexer for signal <$mux0041> created at line 145. Found 1-bit 8-to-1 multiplexer for signal <$mux0042> created at line 155. Found 1-bit 8-to-1 multiplexer for signal <$mux0047> created at line 126. Found 1-bit 8-to-1 multiplexer for signal <$mux0048> created at line 136. Found 1-bit 8-to-1 multiplexer for signal <$mux0049> created at line 146. Found 1-bit 8-to-1 multiplexer for signal <$mux0050> created at line 156. Found 3-bit subtractor for signal <$sub0009> created at line 144. Found 3-bit subtractor for signal <$sub0010> created at line 154. Found 2-bit updown counter for signal <dir>. Found 3-bit register for signal <x>

15 Found 3-bit register for signal <y>. Summary: inferred 4 ROM(s). inferred 1 Counter(s). inferred 7 D-type flip-flop(s). inferred 6 Adder/Subtractor(s). inferred 4 Comparator(s). inferred 27 Multiplexer(s). Unit <maze> synthesized. There are many other lines in the VHDL that refer to the sums x+1,x+2,y+1,y+2 but only one adder is generated for each unique expression, and then the outputs from these adders are used to implement the logic for all the VHDL statements in which the expressions appear. x and y are also compared to 0 and mazesize-1 at other places in the source code, but only one comparator is generated for each unique comparison

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer 1 P a g e HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer Objectives: Develop the behavioural style VHDL code for D-Flip Flop using gated,

More information

Lab 4: Hex Calculator

Lab 4: Hex Calculator CpE 487 Digital Design Lab Lab 4: Hex Calculator 1. Introduction In this lab, we will program the FPGA on the Nexys2 board to function as a simple hexadecimal calculator capable of adding and subtracting

More information

ACS College of Engineering. Department of Biomedical Engineering. HDL pre lab questions ( ) Cycle-1

ACS College of Engineering. Department of Biomedical Engineering. HDL pre lab questions ( ) Cycle-1 ACS College of Engineering Department of Biomedical Engineering HDL pre lab questions (2015-2016) Cycle-1 1. What is truth table? 2. Which gates are called universal gates? 3. Define HDL? 4. What is the

More information

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems 1 P a g e Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems Lab 5 - VHDL for Sequential Circuits: Implementing a customized State Machine 15 Marks ( 2 weeks) Due

More information

Lab 3: VGA Bouncing Ball I

Lab 3: VGA Bouncing Ball I CpE 487 Digital Design Lab Lab 3: VGA Bouncing Ball I 1. Introduction In this lab, we will program the FPGA on the Nexys2 board to display a bouncing ball on a 640 x 480 VGA monitor connected to the VGA

More information

Flip-flop and Registers

Flip-flop and Registers ECE 322 Digital Design with VHDL Flip-flop and Registers Lecture Textbook References n Sequential Logic Review Stephen Brown and Zvonko Vranesic, Fundamentals of Digital Logic with VHDL Design, 2 nd or

More information

Eng. Mohammed Samara. Fall The Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department

Eng. Mohammed Samara. Fall The Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department Fall 2011 The Islamic University of Gaza Faculty of Engineering Computer Engineering Department ECOM 4111 - Digital Systems Design Lab Lab 7: Prepared By: Eng. Mohammed Samara Introduction: A counter is

More information

STATIC RANDOM-ACCESS MEMORY

STATIC RANDOM-ACCESS MEMORY STATIC RANDOM-ACCESS MEMORY by VITO KLAUDIO OCTOBER 10, 2015 CSC343 FALL 2015 PROF. IZIDOR GERTNER Table of contents 1. Objective... pg. 2 2. Functionality and Simulations... pg. 4 2.1 SR-LATCH... pg.

More information

Class 06 Sequential Logic: Flip-Flop

Class 06 Sequential Logic: Flip-Flop Class 06 Sequential Logic: Flip-Flop June 16, 2017 2 Differences between Latch and Flip-Flop D latch Level trigger D flip-flop Edge trigger 1 June 16, 2017 3 Function Table of D Flip-Flop DFF D flip-flop

More information

Class 19 Sequential Logic: Flip-Flop

Class 19 Sequential Logic: Flip-Flop Class 9 Sequential Logic: Flip-Flop June 2, 22 2 Differences between Latch and Flip-Flop D latch Level trigger D flip-flop Edge trigger June 2, 22 3 Function Table of D Flip-Flop DFF CLK D D flip-flop

More information

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017 University of Texas at El Paso Electrical and Computer Engineering Department EE 2169 Laboratory for Digital Systems Design I Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift

More information

Figure 1 Block diagram of a 4-bit binary counter

Figure 1 Block diagram of a 4-bit binary counter Lab 3: Four-Bit Binary Counter EE-459/500 HDL Based Digital Design with Programmable Logic Electrical Engineering Department, University at Buffalo Last update: Cristinel Ababei, August 2012 1. Objective

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences Introductory Digital Systems Lab (6.111) Quiz #2 - Spring 2003 Prof. Anantha Chandrakasan and Prof. Don

More information

ECE337 Lab 4 Introduction to State Machines in VHDL

ECE337 Lab 4 Introduction to State Machines in VHDL ECE337 Lab Introduction to State Machines in VHDL In this lab you will: Design, code, and test the functionality of the source version of a Moore model state machine of a sliding window average filter.

More information

Laboratory Exercise 7

Laboratory Exercise 7 Laboratory Exercise 7 Finite State Machines This is an exercise in using finite state machines. Part I We wish to implement a finite state machine (FSM) that recognizes two specific sequences of applied

More information

Main Design Project. The Counter. Introduction. Macros. Procedure

Main Design Project. The Counter. Introduction. Macros. Procedure Main Design Project Introduction In order to gain some experience with using macros we will exploit some of the features of our boards to construct a counter that will count from 0 to 59 with the counts

More information

ECE 263 Digital Systems, Fall 2015

ECE 263 Digital Systems, Fall 2015 ECE 263 Digital Systems, Fall 2015 REVIEW: FINALS MEMORY ROM, PROM, EPROM, EEPROM, FLASH RAM, DRAM, SRAM Design of a memory cell 1. Draw circuits and write 2 differences and 2 similarities between DRAM

More information

Synchronous Sequential Logic

Synchronous Sequential Logic Synchronous Sequential Logic Ranga Rodrigo August 2, 2009 1 Behavioral Modeling Behavioral modeling represents digital circuits at a functional and algorithmic level. It is used mostly to describe sequential

More information

Main Design Project. The Counter. Introduction. Macros. Procedure

Main Design Project. The Counter. Introduction. Macros. Procedure Main Design Project Introduction In order to gain some experience with using macros we will exploit some of the features of our boards to construct a counter that will count from 0 to 59 with the counts

More information

DIGITAL SYSTEM DESIGN VHDL Coding for FPGAs Unit 7

DIGITAL SYSTEM DESIGN VHDL Coding for FPGAs Unit 7 DIGITAL SYSTM DSIGN VHDL Coding for FPGAs Unit 7 INTRODUCTION TO DIGITAL SYSTM DSIGN: Digital System Components Use of generic map to map parameters. xample: Digital Stopwatch xample: Lights Pattern mbedding

More information

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8 CSCB58 - Lab 4 Clocks and Counters Learning Objectives The purpose of this lab is to learn how to create counters and to be able to control when operations occur when the actual clock rate is much faster.

More information

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit:

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit: Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: This lab gives you more exercise in schematic entry, state machine design using the one-hot state method, further understanding

More information

UNIT 1 NUMBER SYSTEMS AND DIGITAL LOGIC FAMILIES 1. Briefly explain the stream lined method of converting binary to decimal number with example. 2. Give the Gray code for the binary number (111) 2. 3.

More information

COE758 Xilinx ISE 9.2 Tutorial 2. Integrating ChipScope Pro into a project

COE758 Xilinx ISE 9.2 Tutorial 2. Integrating ChipScope Pro into a project COE758 Xilinx ISE 9.2 Tutorial 2 ChipScope Overview Integrating ChipScope Pro into a project Conventional Signal Sampling Xilinx Spartan 3E FPGA JTAG 2 ChipScope Pro Signal Sampling Xilinx Spartan 3E FPGA

More information

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7 California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 322: Digital Design with VHDL Laboratory 7 Rational: The purpose of this lab is to become familiar in using

More information

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS) DIGITAL SYSTEM DESIGN UNIT I (2 MARKS) 1. Convert Binary number (111101100) 2 to Octal equivalent. 2. Convert Binary (1101100010011011) 2 to Hexadecimal equivalent. 3. Simplify the following Boolean function

More information

Debugging of VHDL Hardware Designs on Altera s DE2 Boards

Debugging of VHDL Hardware Designs on Altera s DE2 Boards Debugging of VHDL Hardware Designs on Altera s DE2 Boards This tutorial presents some basic debugging concepts that can be helpful in creating VHDL designs for implementation on Altera s DE2 boards. It

More information

Feedback Sequential Circuits

Feedback Sequential Circuits Feedback Sequential Circuits sequential circuit output depends on 1. current inputs 2. past sequence of inputs current state feedback sequential circuit uses ordinary gates and feedback loops to create

More information

MODULE 3. Combinational & Sequential logic

MODULE 3. Combinational & Sequential logic MODULE 3 Combinational & Sequential logic Combinational Logic Introduction Logic circuit may be classified into two categories. Combinational logic circuits 2. Sequential logic circuits A combinational

More information

1. Synopsis: 2. Description of the Circuit:

1. Synopsis: 2. Description of the Circuit: Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: This lab gives you more exercise in schematic entry, state machine design using the one-hot state method, further understanding

More information

Outline. CPE/EE 422/522 Advanced Logic Design L04. Review: 8421 BCD to Excess3 BCD Code Converter. Review: Mealy Sequential Networks

Outline. CPE/EE 422/522 Advanced Logic Design L04. Review: 8421 BCD to Excess3 BCD Code Converter. Review: Mealy Sequential Networks Outline PE/EE 422/522 Advanced Logic Design L4 Electrical and omputer Engineering University of Alabama in Huntsville What we know ombinational Networks Analysis, Synthesis, Simplification, Hazards, Building

More information

Figure 1: segment of an unprogrammed and programmed PAL.

Figure 1: segment of an unprogrammed and programmed PAL. PROGRAMMABLE ARRAY LOGIC The PAL device is a special case of PLA which has a programmable AND array and a fixed OR array. The basic structure of Rom is same as PLA. It is cheap compared to PLA as only

More information

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Nate Pihlstrom, npihlstr@uccs.edu Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Objective The objective of lab assignments 5 through 9 are to systematically design and implement

More information

Bachelor of Technology (Electronics and Instrumentation Engg.)

Bachelor of Technology (Electronics and Instrumentation Engg.) 1 A Project Report on Embedded processor design and Implementation of CAM In partial fulfillment of the requirements of Bachelor of Technology (Electronics and Instrumentation Engg.) Submitted By Jaswant

More information

download instant at

download instant at Chapter 4: Modeling Behavior 1. Construct a VHDL model of a parity generator for 7-bit words. The parity bit is generated to create an even number of bits in the word with a value of 1. Do not prescribe

More information

ECE 3401 Lecture 11. Sequential Circuits

ECE 3401 Lecture 11. Sequential Circuits EE 3401 Lecture 11 Sequential ircuits Overview of Sequential ircuits Storage Elements Sequential circuits Storage elements: Latches & Flip-flops Registers and counters ircuit and System Timing Sequential

More information

Step 1 - shaft decoder to generate clockwise/anticlockwise signals

Step 1 - shaft decoder to generate clockwise/anticlockwise signals Workshop Two Shaft Position Encoder Introduction Some industrial automation applications require control systems which know the rotational position of a shaft. Similar devices are also used for digital

More information

Department of Computer Science and Engineering Question Bank- Even Semester:

Department of Computer Science and Engineering Question Bank- Even Semester: Department of Computer Science and Engineering Question Bank- Even Semester: 2014-2015 CS6201& DIGITAL PRINCIPLES AND SYSTEM DESIGN (Common to IT & CSE, Regulation 2013) UNIT-I 1. Convert the following

More information

ECE 3401 Lecture 12. Sequential Circuits (II)

ECE 3401 Lecture 12. Sequential Circuits (II) EE 34 Lecture 2 Sequential ircuits (II) Overview of Sequential ircuits Storage Elements Sequential circuits Storage elements: Latches & Flip-flops Registers and counters ircuit and System Timing Sequential

More information

Laboratory Exercise 7

Laboratory Exercise 7 Laboratory Exercise 7 Finite State Machines This is an exercise in using finite state machines. Part I We wish to implement a finite state machine (FSM) that recognizes two specific sequences of applied

More information

Lab 6: Video Game PONG

Lab 6: Video Game PONG CpE 487 Digital Design Lab Lab 6: Video Game PONG 1. Introduction In this lab, we will extend the FPGA code we developed in Labs 3 and 4 (Bouncing Ball) to build a simple version of the 1970 s arcade game

More information

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger. CS 110 Computer Architecture Finite State Machines, Functional Units Instructor: Sören Schwertfeger http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University

More information

Level and edge-sensitive behaviour

Level and edge-sensitive behaviour Level and edge-sensitive behaviour Asynchronous set/reset is level-sensitive Include set/reset in sensitivity list Put level-sensitive behaviour first: process (clock, reset) is begin if reset = '0' then

More information

Spartan-II Development System

Spartan-II Development System 2002-May-4 Introduction Dünner Kirchweg 77 32257 Bünde Germany www.trenz-electronic.de The Spartan-II Development System is designed to provide a simple yet powerful platform for FPGA development, which

More information

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it, Solution to Digital Logic -2067 Solution to digital logic 2067 1.)What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it, A Magnitude comparator is a combinational

More information

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit) Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6. - Introductory Digital Systems Laboratory (Spring 006) Laboratory - Introduction to Digital Electronics

More information

CS 151 Final. Instructions: Student ID. (Last Name) (First Name) Signature

CS 151 Final. Instructions: Student ID. (Last Name) (First Name) Signature CS 151 Final Name Student ID Signature :, (Last Name) (First Name) : : Instructions: 1. Please verify that your paper contains 19 pages including this cover. 2. Write down your Student-Id on the top of

More information

hochschule fu r angewandte wissenschaften hamburg Prof. Dr. B. Schwarz FB Elektrotechnik/Informatik

hochschule fu r angewandte wissenschaften hamburg Prof. Dr. B. Schwarz FB Elektrotechnik/Informatik 8 Shift Registers A Johnson counter contains the basic structure of a shift register which is made up by a chain of D- FFs. Beginning with the LSB of a register (a number of D-FFs) each D-FF output can

More information

Lecture 6: Simple and Complex Programmable Logic Devices. EE 3610 Digital Systems

Lecture 6: Simple and Complex Programmable Logic Devices. EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 6: Simple and Complex Programmable Logic Devices MEMORY 2 Volatile: need electrical power Nonvolatile: magnetic disk, retains its stored information after the removal

More information

Altera s Max+plus II Tutorial

Altera s Max+plus II Tutorial Altera s Max+plus II Tutorial Written by Kris Schindler To accompany Digital Principles and Design (by Donald D. Givone) 8/30/02 1 About Max+plus II Altera s Max+plus II is a powerful simulation package

More information

CS/EE Homework 6

CS/EE Homework 6 CS/EE 260 - Homework 6 Due 3/16/2000 1. Use VHDL to design the 4 bit arithmetic unit specified in problem 4 of homework 5 (you may borrow from the posted solution, if you wish). Use a dataflow description

More information

Digital Systems Laboratory 1 IE5 / WS 2001

Digital Systems Laboratory 1 IE5 / WS 2001 Digital Systems Laboratory 1 IE5 / WS 2001 university of applied sciences fachhochschule hamburg FACHBEREICH ELEKTROTECHNIK UND INFORMATIK digital and microprocessor systems laboratory In this course you

More information

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist Sequential circuits Same input can produce different output Logic circuit If the same input may produce different output signal, we have a sequential logic circuit. It must then have an internal memory

More information

EECS 270 Midterm 2 Exam Closed book portion Fall 2014

EECS 270 Midterm 2 Exam Closed book portion Fall 2014 EECS 270 Midterm 2 Exam Closed book portion Fall 2014 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Page # Points

More information

More Digital Circuits

More Digital Circuits More Digital Circuits 1 Signals and Waveforms: Showing Time & Grouping 2 Signals and Waveforms: Circuit Delay 2 3 4 5 3 10 0 1 5 13 4 6 3 Sample Debugging Waveform 4 Type of Circuits Synchronous Digital

More information

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops Objective Construct a two-bit binary decoder. Study multiplexers (MUX) and demultiplexers (DEMUX). Construct an RS flip-flop from discrete gates.

More information

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24 2065 Computer Science and Information Technology (CSc. 151) Pass Marks: 24 Time: 3 hours. Candidates are required to give their answers in their own words as for as practicable. Attempt any TWO questions:

More information

1. Convert the decimal number to binary, octal, and hexadecimal.

1. Convert the decimal number to binary, octal, and hexadecimal. 1. Convert the decimal number 435.64 to binary, octal, and hexadecimal. 2. Part A. Convert the circuit below into NAND gates. Insert or remove inverters as necessary. Part B. What is the propagation delay

More information

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

FPGA Laboratory Assignment 4. Due Date: 06/11/2012 FPGA Laboratory Assignment 4 Due Date: 06/11/2012 Aim The purpose of this lab is to help you understanding the fundamentals of designing and testing memory-based processing systems. In this lab, you will

More information

4:1 Mux Symbol 4:1 Mux Circuit

4:1 Mux Symbol 4:1 Mux Circuit Exercise 6: Combinational Circuit Blocks Revision: October 20, 2009 215 E Main Suite D Pullman, WA 99163 (509) 334 6306 Voice and Fax STUDT I am submitting my own work, and I understand penalties will

More information

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1. [Question 1 is compulsory] 1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. Figure 1.1 b) Minimize the following Boolean functions:

More information

cs281: Introduction to Computer Systems Lab07 - Sequential Circuits II: Ant Brain

cs281: Introduction to Computer Systems Lab07 - Sequential Circuits II: Ant Brain cs281: Introduction to Computer Systems Lab07 - Sequential Circuits II: Ant Brain 1 Problem Statement Obtain the file ant.tar from the class webpage. After you untar this file in an empty directory, you

More information

VHDL 4 BUILDING BLOCKS OF A COMPUTER.

VHDL 4 BUILDING BLOCKS OF A COMPUTER. 1 VHDL 4 BUILDING BLOCKS OF A COMPUTER http://www.cse.cuhk.edu.hk/~mcyang/teaching.html 2 We will learn Combinational circuit and sequential circuit Building blocks of a computer Control units are state

More information

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20 Advanced Devices Using a combination of gates and flip-flops, we can construct more sophisticated logical devices. These devices, while more complex, are still considered fundamental to basic logic design.

More information

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory RPI Rensselaer Polytechnic Institute Computer Hardware Design ECSE 4770 Report Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory Name: Walter Dearing Group: Brad Stephenson David Bang

More information

DE2 Electronic Keyboard with the Autoplayer Feature ReadMeFirst

DE2 Electronic Keyboard with the Autoplayer Feature ReadMeFirst Lab Summary DE2 Electronic Keyboard with the Autoplayer Feature ReadMeFirst At the end of this lab your ever expanding circuit design will automatically play an entire song stored in read only memory.

More information

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York DEPARTMENT: SUBJECT CODE AND TITLE: COURSE DESCRIPTION: REQUIRED: Electrical and Telecommunications Engineering Technology TCET 3122/TC

More information

CHAPTER1: Digital Logic Circuits

CHAPTER1: Digital Logic Circuits CS224: Computer Organization S.KHABET CHAPTER1: Digital Logic Circuits 1 Sequential Circuits Introduction Composed of a combinational circuit to which the memory elements are connected to form a feedback

More information

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING DRONACHARYA GROUP OF INSTITUTIONS, GREATER NOIDA Affiliated to Mahamaya Technical University, Noida Approved by AICTE DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Lab Manual for Computer Organization Lab

More information

Programmable Logic Design I

Programmable Logic Design I Programmable Logic Design I Introduction In labs 11 and 12 you built simple logic circuits on breadboards using TTL logic circuits on 7400 series chips. This process is simple and easy for small circuits.

More information

UNIVERSITI TEKNOLOGI MALAYSIA

UNIVERSITI TEKNOLOGI MALAYSIA SULIT Faculty of Computing UNIVERSITI TEKNOLOGI MALAYSIA FINAL EXAMINATION SEMESTER I, 2016 / 2017 SUBJECT CODE : SUBJECT NAME : SECTION : TIME : DATE/DAY : VENUES : INSTRUCTIONS : Answer all questions

More information

Experiment: FPGA Design with Verilog (Part 4)

Experiment: FPGA Design with Verilog (Part 4) Department of Electrical & Electronic Engineering 2 nd Year Laboratory Experiment: FPGA Design with Verilog (Part 4) 1.0 Putting everything together PART 4 Real-time Audio Signal Processing In this part

More information

VLSI DESIGN LAB (EE-330-F) VI SEMESTER. Electrical and Electronics Engineering

VLSI DESIGN LAB (EE-330-F) VI SEMESTER. Electrical and Electronics Engineering VLSI DESIGN LAB (EE-330-F) VI SEMESTER Electrical and Electronics Engineering DEPARTMENT OF ELECTRICAL & ELECTRONICS DRONACHARAY COLLEGE OF ENGINEERING KHENTAWAS, GURGAON-123506 DEPARTMENT OF ELECTRICAL

More information

Synchronous Sequential Design

Synchronous Sequential Design Synchronous Sequential Design SMD098 Computation Structures Lecture 4 1 Synchronous sequential systems Almost all digital systems have some concept of state the outputs of a system depends on the past

More information

Contents Circuits... 1

Contents Circuits... 1 Contents Circuits... 1 Categories of Circuits... 1 Description of the operations of circuits... 2 Classification of Combinational Logic... 2 1. Adder... 3 2. Decoder:... 3 Memory Address Decoder... 5 Encoder...

More information

Chapter 8 Registers & Counters

Chapter 8 Registers & Counters Chapter 8 Registers & Counters 8.1 Introduction Register is a type of sequential circuit used to store binary information or to manipulate the binary information which consists of flip-flops and combinational

More information

SPI Serial Communication and Nokia 5110 LCD Screen

SPI Serial Communication and Nokia 5110 LCD Screen 8 SPI Serial Communication and Nokia 5110 LCD Screen 8.1 Objectives: Many devices use Serial Communication to communicate with each other. The advantage of serial communication is that it uses relatively

More information

Chapter 3: Sequential Logic Systems

Chapter 3: Sequential Logic Systems Chapter 3: Sequential Logic Systems 1. The S-R Latch Learning Objectives: At the end of this topic you should be able to: design a Set-Reset latch based on NAND gates; complete a sequential truth table

More information

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Final Exam review: chapter 4 and 5. Supplement 3 and 4 Final Exam review: chapter 4 and 5. Supplement 3 and 4 1. A new type of synchronous flip-flop has the following characteristic table. Find the corresponding excitation table with don t cares used as much

More information

VHDL test bench for digital image processing systems using a new image format

VHDL test bench for digital image processing systems using a new image format VHDL test bench for digital image processing systems using a new image format A. Zuloaga, J. L. Martín, U. Bidarte, J. A. Ezquerra Department of Electronics and Telecommunications, University of the Basque

More information

Microprocessor Design

Microprocessor Design Microprocessor Design Principles and Practices With VHDL Enoch O. Hwang Brooks / Cole 2004 To my wife and children Windy, Jonathan and Michelle Contents 1. Designing a Microprocessor... 2 1.1 Overview

More information

Logic Design II (17.342) Spring Lecture Outline

Logic Design II (17.342) Spring Lecture Outline Logic Design II (17.342) Spring 2012 Lecture Outline Class # 05 February 23, 2012 Dohn Bowden 1 Today s Lecture Analysis of Clocked Sequential Circuits Chapter 13 2 Course Admin 3 Administrative Admin

More information

Registers, Register Transfers and Counters Dr. Fethullah Karabiber

Registers, Register Transfers and Counters Dr. Fethullah Karabiber 36 OMPUTER HARWARE Registers, Register Transfers and ounters r. Fethullah Karabiber Overview 2 Registers, Microoperations and Implementations Registers and load enable Register transfer operations Microoperations

More information

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

CSE115: Digital Design Lecture 23: Latches & Flip-Flops Faculty of Engineering CSE115: Digital Design Lecture 23: Latches & Flip-Flops Sections 7.1-7.2 Suggested Reading A Generic Digital Processor Building Blocks for Digital Architectures INPUT - OUTPUT Interconnect:

More information

Lab 5 FPGA Design Flow Based on Aldec Active-HDL. Fast Reflex Game.

Lab 5 FPGA Design Flow Based on Aldec Active-HDL. Fast Reflex Game. Lab 5 FPGA Design Flow Based on Aldec Active-HDL. Fast Reflex Game. Task 0 (tested during lab demonstration) Get familiar with the Tutorial on FPGA Design Flow based on Aldec Active-HDL. Be ready to perform

More information

Asynchronous & Synchronous Reset Design Techniques - Part Deux

Asynchronous & Synchronous Reset Design Techniques - Part Deux Clifford E. Cummings Don Mills Steve Golson Sunburst Design, Inc. LCDM Engineering Trilobyte Systems cliffc@sunburst-design.com mills@lcdm-eng.com sgolson@trilobyte.com ABSTRACT This paper will investigate

More information

library IEEE; use IEEE.STD_LOGIC_1164.ALL;

library IEEE; use IEEE.STD_LOGIC_1164.ALL; library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values use IEEE.NUMERIC_STD.ALL; -- Uncomment the following

More information

TSIU03: Lab 3 - VGA. Petter Källström, Mario Garrido. September 10, 2018

TSIU03: Lab 3 - VGA. Petter Källström, Mario Garrido. September 10, 2018 Petter Källström, Mario Garrido September 10, 2018 Abstract In the initialization of the DE2-115 (after you restart it), an image is copied into the SRAM memory. What you have to do in this lab is to read

More information

Flip-Flops and Registers

Flip-Flops and Registers The slides included herein were taken from the materials accompanying Fundamentals of Logic Design, 6 th Edition, by Roth and Kinney, and were used with permission from Cengage Learning. Flip-Flops and

More information

Good Evening! Welcome!

Good Evening! Welcome! Page 1/11 Instructions: urn off all cell phones, beepers and other noise making devices. Show all work on the front of the test papers. Box each answer. If you need more room, make a clearly indicated

More information

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7).

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7). VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur-603203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Academic Year: 2015-16 BANK - EVEN SEMESTER UNIT I PART-A 1 Find the octal equivalent of hexadecimal

More information

COE328 Course Outline. Fall 2007

COE328 Course Outline. Fall 2007 COE28 Course Outline Fall 2007 1 Objectives This course covers the basics of digital logic circuits and design. Through the basic understanding of Boolean algebra and number systems it introduces the student

More information

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053 SET - 1 1. a) What are the characteristics of 2 s complement numbers? b) State the purpose of reducing the switching functions to minimal form. c) Define half adder. d) What are the basic operations in

More information

Administrative issues. Sequential logic

Administrative issues. Sequential logic Administrative issues Midterm #1 will be given Tuesday, October 29, at 9:30am. The entire class period (75 minutes) will be used. Open book, open notes. DDPP sections: 2.1 2.6, 2.10 2.13, 3.1 3.4, 3.7,

More information

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram UNIT III INTRODUCTION In combinational logic circuits, the outputs at any instant of time depend only on the input signals present at that time. For a change in input, the output occurs immediately. Combinational

More information

Registers and Counters

Registers and Counters Registers and Counters Clocked sequential circuit = F/Fs and combinational gates Register Group of flip-flops (share a common clock and capable of storing one bit of information) Consist of a group of

More information

Chapter 3 Unit Combinational

Chapter 3 Unit Combinational EE 200: Digital Logic Circuit Design Dr Radwan E Abdel-Aal, COE Logic and Computer Design Fundamentals Chapter 3 Unit Combinational 5 Registers Logic and Design Counters Part Implementation Technology

More information

Chapter 4: One-Shots, Counters, and Clocks

Chapter 4: One-Shots, Counters, and Clocks Chapter 4: One-Shots, Counters, and Clocks I. The Monostable Multivibrator (One-Shot) The timing pulse is one of the most common elements of laboratory electronics. Pulses can control logical sequences

More information

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath Objectives Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath In the previous chapters we have studied how to develop a specification from a given application, and

More information

Good Evening! Welcome!

Good Evening! Welcome! University of Florida EEL 3701 Spring 2010 Dr Eric M Schwartz Page 1/11 Exam 2 Instructions: Turn off all cell phones, beepers and other noise making devices Show all work on the front of the test papers

More information