Design Problem 4 Solutions

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Design Problem 4 Solutions"

Transcription

1 CSE 260 Digital Computers: Organization and Logical Design Design Problem 4 Solutions Jon Turner The block diagram appears below. The controller includes a state machine with three states (normal, movecursor, regenmaze). The random and vgadisplay blocks at the right are sub-circuits. The random block produces a sequence of pseudo-random bits, one bit of which is stored in pixeltype from time-totime. The vgadisplay block has an internal display memory, which is used by the controller to display the maze. At the bottom left are registers for storing new and old position values. When the cursor moves, the new value is stored in news, newy. After an update is complete, the new position is stored in oldx, oldy. The tick register is used for timing by the controller. The leftpix register stores the color value of the leftmost pixel of the middle row of a 5x5 block. This is read from the vgadisplay s internal memory so that when a cursor is written to the memory, we get the color of the leftmost pixel correct (we need to write all five pixels in a row of a 5x5 block, only two of which are used for the cursor). The linecolor and bgcolor are used to form the data that goes to the display. There are several cases here, but the details are not shown in the diagram

2 The state diagram appears below. It has three states, normal, regenmaze and movecursor. The circuit enters the regenmaze state after reset, in order to create an initial maze. In the regenmaze state, it writes each of the 5x5 blocks that make up the maze, using a random bit value to decide the type of each block (line on left side, or line on top). When it is done generating the maze, it write the cursor in the maze at the position specified by the xpos, ypos inputs. The timing of these operations is controlled by the tick register, which is incremented on every clock tick. The circuit stays in the regenmaze state until after all the steps have been done. This happens when tick reaches some value represented here by xx. When tick reaches this value, the circuit goes to the normal state. In the normal state, the circuit does nothing but wait for an input change. If the numaze input goes high, it transitions to the regenmaze state. If xpos or ypos changes, it goes to the movecursor state. In the movecursor state, the circuit writes the cursor at the appropriate location, using the xpos and ypos values. It first erases the cursor from its old position, then writes the cursor at its new position. When it is finished, the new position becomes the old position

3 Here is the source code for the mazerunner circuit MazeRunner - circuit for displaying a maze and with a cursor around maze -- Jon Turner - 9/ The maze consists of 5x5 pixel blocks organized as an array of 24 rows -- and 32 columns. Each block has a line across the top or along the left -- side A 1 on the numaze signal causes the circuit to generate and display a -- new random maze. The background color of the maze is specified by bgcolor -- and the lines that define the walls of the maze are drawn using linecolor. -- The xpos, ypos inputs specify the x and y position of the cursor in the -- maze; ypos is required to be in the range 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 mazerunner is port( clk, reset: in std_logic; numaze: in std_logic; linecolor, bgcolor: in std_logic_vector(2 downto 0); xpos, ypos: in std_logic_vector(4 downto 0); -- output signals to drive VGA display hsync, vsync: out std_logic; dispval: out std_logic_vector(2 downto 0)); end mazerunner; architecture a1 of mazerunner is component vgadisplay port ( clk, reset: in std_logic; en, rw: in std_logic; addr: in address; data: inout word; hsync, vsync: out std_logic; dispval: out std_logic_vector(2 downto 0)); end component; component random port( clk, reset: in std_logic; randbits: out std_logic_vector(0 to 15)); end component; -- signals used to read/write display buffer signal en, rw: std_logic; signal addr: address; signal data, memword: word; -- state and timer register type statetype is (normal, movecursor, regenmaze); signal state: statetype; - 3 -

4 signal tick: std_logic_vector(15 downto 0); -- old and new positions signal ypos, oldx, oldy, newx, newy: std_logic_vector(4 downto 0); signal randbits: std_logic_vector(0 to 15); signal pixeltype: std_logic; signal leftpix: std_logic_vector(2 downto 0); begin vga: vgadisplay port map(clk, reset, en, rw, addr, data, hsync, vsync, dispval); rand: random port map(clk, reset, randbits); process (clk) begin if rising_edge(clk) then -- default values of several signals en <= '0'; rw <= '1'; addr <= (others => '0'); data <= (others => 'Z'); tick <= (others => '0'); if reset = '1' then state <= regenmaze; oldx <= "00000"; oldy <= "00000"; newx <= "00000"; newy <= "00000"; elsif state = regenmaze then -- redraw maze and place cursor at specified position tick <= tick + 1; if tick(15 downto 12) < "0011" then -- Block to be written is selected using upper bits of tick; -- row number is tick(13..9), col number is tick(8..4) if tick(3 downto 0) = x"0" then pixeltype <= randbits(0); elsif tick(3 downto 0) = x"1" then en <= '1'; rw <= '0'; addr <= ("00" & tick(13 downto 9) & "00000") + (tick(13 downto 9) & " ") + (" " & tick(8 downto 4)); if pixeltype = '0' then data <= "0" & linecolor & linecolor & linecolor & linecolor & linecolor; else data <= "0" & linecolor & bgcolor & bgcolor & bgcolor & bgcolor; elsif tick(3 downto 0) <= x"5" then en <= '1'; rw <= '0'; addr <= addr + x"020"; if pixeltype = '0' then data <= "0" & bgcolor & bgcolor & bgcolor & bgcolor & bgcolor; else data <= "0" & linecolor & bgcolor & bgcolor & bgcolor & bgcolor; else -- finish up by displaying cursor and going to normal state if tick(3 downto 0) = x"0" then - 4 -

5 newx <= xpos; newy <= ypos; oldx <= xpos; oldy <= ypos; elsif tick(3 downto 0) = x"1" then -- first must read color of leftmost pixel in cursor rows en <= '1'; addr <= ("00" & newy & "00000") + (newy & " ") + x"040" + (" " & newx); elsif tick(3 downto 0) = x"3" then leftpix <= data(14 downto 12); elsif tick(3 downto 0) = x"4" then -- now write the first cursor row en <= '1'; rw <= '0'; addr <= ("00" & newy & "00000") + (newy & " ") + x"040" + (" " & newx); data <= "0" & leftpix & bgcolor & linecolor & linecolor & bgcolor; elsif tick(3 downto 0) = x"5" then -- now write the second row en <= '1'; rw <= '0'; addr <= ("00" & newy & "00000") + (newy & " ") + x"060" + (" " & newx); data <= "0" & leftpix & bgcolor & linecolor & linecolor & bgcolor; elsif tick(3 downto 0) = x"6" then state <= normal; elsif state = movecursor then tick <= tick + 1; -- erase the old cursor if tick(3 downto 0) = x"1" then -- first read the color of the left pixel in the cursor rows en <= '1'; addr <= ("00" & oldy & "00000") + (oldy & " ") + x"040" + (" " & oldx); elsif tick(3 downto 0) = x"3" then leftpix <= data(14 downto 12); elsif tick(3 downto 0) = x"4" then -- then write the first cursor row en <= '1'; rw <= '0'; addr <= ("00" & oldy & "00000") + (oldy & " ") + x"040" + (" " & oldx); data <= "0" & leftpix & bgcolor & bgcolor & bgcolor & bgcolor; elsif tick(3 downto 0) = x"5" then -- and the second cursor row en <= '1'; rw <= '0'; addr <= ("00" & oldy & "00000") + (oldy & " ") + x"060" + (" " & oldx); data <= "0" & leftpix & bgcolor & bgcolor & bgcolor & bgcolor; -- now draw the cursor in the new position elsif tick(3 downto 0) = x"6" then en <= '1'; addr <= ("00" & newy & "00000") + (newy & " ") + x"040" + (" " & newx); - 5 -

6 elsif tick(3 downto 0) = x"8" then leftpix <= data(14 downto 12); elsif tick(3 downto 0) = x"9" then en <= '1'; rw <= '0'; addr <= ("00" & newy & "00000") + (newy & " ") + x"040" + (" " & newx); data <= "0" & leftpix & bgcolor & linecolor & linecolor & bgcolor; elsif tick(3 downto 0) = x"a" then en <= '1'; rw <= '0'; addr <= ("00" & newy & "00000") + (newy & " ") + x"060" + (" " & newx); data <= "0" & leftpix & bgcolor & linecolor & linecolor & bgcolor; elsif tick(3 downto 0) = x"b" then -- update old position and go back to normal state oldx <= newx; oldy <= newy; state <= normal; else -- normal state - nothing to do, but switch to other states if numaze = '1' then state <= regenmaze; elsif xpos /= oldx or ypos /= oldy then newx <= xpos; newy <= ypos; state <= movecursor; end process; end a1; - 6 -

7 Here is the source code for displaymod Display Module for mazerunner -- Jon Turner, 10/ This circuit displays the color values used by the mazerunner circuit -- to draw the maze, and the current x and y positions of the cursor. -- The first line of the display provides labels (lc, bc, xp and yp), -- while the second gives the actual values 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 displaymod is port( clk, reset : in std_logic; -- internal interface for controlling display linecolor, bgcolor: std_logic_vector(2 downto 0); xpos, ypos: std_logic_vector(4 downto 0); -- connections to external pins lcd: out lcdsigs); end displaymod; architecture a1 of displaymod is component lcddisplay port( clk, reset : in std_logic; -- internal interface for controlling display update: in std_logic; -- update a stored value selekt: in std_logic_vector(4 downto 0); -- character to replace nuchar: in std_logic_vector(7 downto 0); -- new character value -- connections to external pins lcd: out lcdsigs); end component; -- signals for controlling lcddisplay signal update: std_logic; signal selekt: std_logic_vector(4 downto 0); signal nuchar: std_logic_vector(7 downto 0); -- timing signal constant tickwidth : integer := 6+10*operationMode; signal tick: std_logic_vector(tickwidth-1 downto 0); type hex2asciimap is array(0 to 15) of std_logic_vector(7 downto 0); signal hex2ascii: hex2asciimap := ( x"30",x"31",x"32",x"33",x"34",x"35",x"36",x"37",x"38",x"39", x"61",x"62",x"63",x"64",x"65",x"66" -- a-f ); begin ldc: lcddisplay port map(clk,reset,update,selekt,nuchar,lcd); process(clk) begin - 7 -

8 if rising_edge(clk) then if reset = '1' then tick <= (others => '0'); else tick <= tick + 1; selekt <= tick(4 downto 0); update <= '0'; if tick(tick high downto 5) = (tick high downto 5=>'0') then update <= '1'; case tick(4 downto 0) is when "00001" => nuchar <= x"6c"; -- l when "00010" => nuchar <= x"63"; -- c end process; end a1; when "00101" => nuchar <= x"62"; -- b when "00110" => nuchar <= x"63"; -- c when "01001" => nuchar <= x"78"; -- x when "01010" => nuchar <= x"70"; -- p when "01101" => nuchar <= x"79"; -- y when "01110" => nuchar <= x"70"; -- p when "10010" => nuchar <= hex2ascii(int("0" & linecolor)); when "10110" => nuchar <= hex2ascii(int("0" & bgcolor)); when "11001" => nuchar <= hex2ascii(int("000" & xpos(4))); when "11010" => nuchar <= hex2ascii(int(xpos(3 downto 0))); when "11101" => nuchar <= hex2ascii(int("000" & ypos(4))); when "11110" => nuchar <= hex2ascii(int(ypos(3 downto 0))); when others => nuchar <= x"20"; end case; - 8 -

9 Here is the source code for the testbench Testbench for mazerunner (top level test) -- Jon Turner - 10/ library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; use work.commondefs.all; use work.txt_util.all; entity testall is end testall; architecture a1 of testall is component top port( clk: in std_logic; -- buttons and knob, switches and LEDs btn: in buttons; knob: knobsigs; swt: in switches; led: out leds; -- external signals to display lcd: out lcdsigs; -- signals to vga display hsync, vsync: out std_logic; dispval: out std_logic_vector(2 downto 0)); end component; signal clk: std_logic := '0'; signal rot: std_logic_vector(1 downto 0); signal btn: buttons := (others => '0'); signal knob: knobsigs := (others => '0'); signal swt: switches; signal led: leds; signal lcd: lcdsigs; signal hsync, vsync: std_logic; signal dispval: std_logic_vector(2 downto 0); constant clkp : time := 20 ns; constant pause : time := 8*clkP; type testvector is record reset, numaze, load, xysel, colorsel: std_logic; color: std_logic_vector(2 downto 0); turns: integer; -- number of times to turn knob pause: time; end record; type testdata is array(natural range <>) of testvector; constant td: testdata(0 to 20) := ( -- row 1,2 just reset the ciruit -- row 3 turns the knob clockwise 3 times (incrementing xpos) -- row 5 turns the knob clockwise twice while selecting y -- row 7 turns the knob counter-clockwise (decrementing xpos) -- row 9 changes the background color - 9 -

10 ); -- row 11 changes the line color -- row 13 generates a new maze -- row 15 turns the knob clockwise once in the new maze -- reset numaze load xysel colorsel color turns pause 1 => ('1', '0', '0', '0', '0', "000", 0, pause), 2 => ('0', '0', '0', '0', '0', "000", 0, 350 us), 3 => ('0', '0', '0', '0', '0', "000", 3, 2 us), 5 => ('0', '0', '0', '1', '0', "000", 2, 2 us), 7 => ('0', '0', '0', '0', '0', "000", -2, 2 us), 9 => ('0', '0', '1', '0', '0', "110", 0, pause), 11 => ('0', '0', '1', '0', '1', "010", 0, pause), 13 => ('0', '1', '0', '0', '0', "000", 0, 350 us), 15 => ('0', '0', '0', '0', '0', "000", 1, 2 us), others => ('0', '0', '0', '0', '0', "000", 0, pause) begin uut: top port map (clk, btn, knob, swt, led, lcd, hsync, vsync, dispval); process begin -- clock process clk <= '0'; wait for clkp/2; clk <= '1'; wait for clkp/2; end process; knob(2 downto 1) <= rot; knob(0) <= '0'; process begin -- stimulus process rot <= "00"; wait for pause; for i in td'low to td'high loop -- set buttons and switches from test data vector btn <= (0 => td(i).reset, 1 => td(i).numaze, 2 => td(i).load, 3 => td(i).xysel); -- swt <= (3 => td(i).colorsel, (2 downto 0) => td(i).color); swt(3) <= td(i).colorsel; swt(2) <= td(i).color(2); swt(1) <= td(i).color(1); swt(0) <= td(i).color(0); if td(i).turns > 0 then -- turn knob right turns times for i in 1 to td(i).turns loop rot <= "01"; wait for pause; rot <= "11"; wait for pause; rot <= "10"; wait for pause; rot <= "00"; wait for pause; end loop; elsif td(i).turns < 0 then -- turn knob left turns times for i in 1 to -td(i).turns loop rot <= "10"; wait for pause; rot <= "11"; wait for pause; rot <= "01"; wait for pause; rot <= "00"; wait for pause; end loop; wait for td(i).pause; end loop; assert (false) report "Simulation ended normally." severity failure; end process; end;

11 The figure below shows an overview of the simulation. More detailed views are on later pages. Note the mazerunner states changing in response to the inputs from the testbench. In this view, you can also see some of the changes to the xpos and ypos values and the changes to the colors. You can also observe the final color values in both the leds and the character buffer of the lcd display. And you can see the final values of xpos and ypos in the lcd character buffer. These observations allow us to conclude that the inputs are properly controlling these internal values and that the lcd display is getting the values it is supposed to display. Of course, the ultimate proof for the lcd can only come with viewing the running circuit on the S3 board

12 This next section shows the very beginning of the simulation, at the start of the maze regeneration following reset. At left, we see the circuit writing data to addresses 0, x020, x040, x060 and x080. At right, we see it writing to data to addresses 001, 021, 041, 061 and 081. These are the addresses for the first two 5x5 blocks in the top row. We can also see that the first word is getting a different value from the other words. This indicates that in both blocks, the line appears on the top. Although we can t see the data values for the first words of each block, we can infer they must be zero and we can see that the other words get the value o77777, which means that all the pixels are white

13 The next section shows the writing of a block for which the line is along the left side of the block, rather than the top. Notice that all lines of the block have 0 in the first pixel (black) and 7 in the remaining four pixels (white)

14 The simulation continues below, with the writing of the cursor at the end of the maze regeneration process. At left, we see the circuit reading from the display buffer (en=1 and rw=1). The address of 040 indicates that we re reading the third line of the first 5x5 block. The returned value is o At right, we see the cursor being written to addresses 040 and 060 (the third and fourth lines of the first 5x5 block). The new data value is o77007, giving us a white square, 2 pixels wide by 2 pixels high

15 This next figure shows a section near the middle of the simulation run (just before the maze is generated a second time). At the left, we can see some changes happening to xpos, as a result of the knob turning. In the middle, we see changes to ypos as the knob turns while xyselect is high. And at right, we see xpos getting smaller as the knob is turned in the other direction. We can see the memory signals in mazerunner changing in response to the changes in xpos and ypos, although we can t see the details at this resolution. Those details can be seen on the next page

16 Here is a view showing the details of the memory signals, as a result of ypos changing from 0 to 1 (near left of figure). Near the middle of the figure, we can see the circuit read the third line from the block containing the cursor. This line has the value o To the right of this, we can see the circuit writing o77777 to the third and fourth lines of that block, effectively erasing the cursor. Continuing to the right, we can see the circuit read the third line from the block where the cursor is to go. This line has the value o07777, indicating that the line is on the left side of the block. At the far right, we see the circuit writing o07007 in the third and fourth lines of the block, effectively drawing a black cursor within the white background

17 This final detail of the simulation shows the writing of the first block of a new maze with new colors. Notice that the line color is now 2 (green) and the background color is 6 (yellow). We see data being written to addresses x00, x20, x40, x60 and x80 (the five words that make up the first block). The value o22222 is written in the first word, giving us a green line across the top of the block, and o66666 is written to the four other words, giving us the yellow background

CSE 260 Digital Computers: Organization and Logical Design. Exam 2. Jon Turner 3/28/2012

CSE 260 Digital Computers: Organization and Logical Design. Exam 2. Jon Turner 3/28/2012 CSE 260 Digital Computers: Organization and Logical Design Exam 2 Jon Turner 3/28/2012 1. (15 points). Draw a diagram for a circuit that implements the VHDL module shown below. Your diagram may include

More information

CSE 260 Digital Computers: Organization and Logical Design. Exam 2 Solutions

CSE 260 Digital Computers: Organization and Logical Design. Exam 2 Solutions CSE 260 Digital Computers: Organization and Logical Design Exam 2 Solutions Jon Turner 1. (10 points). The table at right shows a table with 5 rows and three columns with each column having a heading.

More information

Design Problem 6 Solution

Design Problem 6 Solution CSE 260 Digital Computers: Organization and Logical Design Design Problem 6 Solution Jon Turner The modifications to the VHDL for the console appear below entity console end console; architecture a1 of

More information

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents VHDL Testbench Tutorial 1 Contents 1 VHDL Testbench 2 Test Bench Syntax 3 Testbench Example: VHDL Code for Up Down Binary Counter 4 VHDL Testbench code for up down binary counter 5 Testbench Waveform for

More information

Counters. Counter Types. Variations. Modulo Gray Code BCD (Decimal) Decade Ring Johnson (twisted ring) LFSR

Counters. Counter Types. Variations. Modulo Gray Code BCD (Decimal) Decade Ring Johnson (twisted ring) LFSR CE 1911 Counters Counter Types Modulo Gray Code BC (ecimal) ecade Ring Johnson (twisted ring) LFSR Variations Asynchronous / Synchronous Up/own Loadable 2 tj Modulo-n (n = a power of 2) Asynchronous Count

More information

Test Benches - Module 8

Test Benches - Module 8 Test Benches Module 8 Jim Duckworth, WPI 1 Overview We have concentrated on VHDL for synthesis Can also use VHDL as a test language Very important to conduct comprehensive verification on your design To

More information

Sequential Statement

Sequential Statement Sequential Statement Sequential Logic Output depends not only on current input values but also on previous input values. Are building blocks of; Counters Shift registers Memories Flip flops are basic sequential

More information

EENG 2910 Project III: Digital System Design. Due: 04/30/2014. Team Members: University of North Texas Department of Electrical Engineering

EENG 2910 Project III: Digital System Design. Due: 04/30/2014. Team Members: University of North Texas Department of Electrical Engineering EENG 2910 Project III: Digital System Design Due: 04/30/2014 Team Members: University of North Texas Department of Electrical Engineering Table of Content i Contents Abstract...3 Introduction...3 Report...4

More information

Problem Set 5 Solutions

Problem Set 5 Solutions Problem Set 5 Solutions library ieee; use ieee.std_logic_1164.all; use work.std_arith.all; -- here is the declaration of entity entity la_rewarder is port (clk, go, SRAM_busy, SRAM_rdy: in std_logic; min:

More information

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions CSE 6 Introduction to igital Logic and Computer esign Exam Solutions Jonathan Turner /3/4. ( points) raw a logic diagram that implements the expression (B+C)(C +)(B+ ) directly (do not simplify first),

More information

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs IGITAL LOGIC SIGN VHL Coding for FPGAs SUNTIAL CIRCUITS Unit 5 Asynchronous sequential circuits: Latches Synchronous circuits: flip flops, counters, registers. Testbench: Generating stimulus COMBINATIONAL

More information

VHDL Testbench Design. Textbook chapters 2.19, , 9.5

VHDL Testbench Design. Textbook chapters 2.19, , 9.5 VHDL Testbench Design Textbook chapters 2.19, 4.10-4.12, 9.5 The Test Bench Concept Elements of a VHDL/Verilog testbench Unit Under Test (UUT) or Device Under Test (DUT) instantiate one or more UUT s Stimulus

More information

Lecture 6. Digital Design Laboratory. Copyright 2007, 2009, 2010, 2014 Thomas R. Collins, Kevin Johnson

Lecture 6. Digital Design Laboratory. Copyright 2007, 2009, 2010, 2014 Thomas R. Collins, Kevin Johnson Lecture 6 Digital Design Laboratory Copyright 2007, 2009, 2010, 2014 Thomas R. Collins, Kevin Johnson Recent changes We updated the train simulator, lecture slides, and lab manual in Fall 2014 and again

More information

Lab 3. Advanced VHDL

Lab 3. Advanced VHDL Lab 3 Advanced VHDL Lab 3 Advanced VHDL This lab will demonstrate many advanced VHDL techniques and how they can be used to your advantage to create efficient VHDL code. Topics include operator balancing,

More information

Timing in synchronous systems

Timing in synchronous systems BO 1 esign of sequential logic Outline Timing in synchronous networks Synchronous processes in VHL VHL-code that introduces latches andf flip-flops Initialization of registers Mealy- and Moore machines

More information

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points)

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points) EEL 4712 Midterm 2 Spring 2010 VERSION 1 Name: UFID: Sign your name here if you would like for your test to be returned in class: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read

More information

Codec. WM8731 Audio Codec

Codec. WM8731 Audio Codec Codec WM8731 Audio Codec Codec Coder / Decoder Audio, Video Compression/decompression signal coding 2 tj WM8731 3 tj WM8731 Data Path Basic Connection 4 tj WM8731 Data Path Basic Timing 5 tj WM8731 Data

More information

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID:

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID: EEL 4712 Midterm 1 Spring 2012 VERSION 1 Name: UFID: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. As always, the best answer

More information

VHDL in 1h. Martin Schöberl

VHDL in 1h. Martin Schöberl VHDL in 1h Martin Schöberl VHDL /= C, Java, Think in hardware All constructs run concurrent Different from software programming Forget the simulation explanation VHDL is complex We use only a small subset

More information

Concurrent & Sequential Stmts. (Review)

Concurrent & Sequential Stmts. (Review) VHDL Introduction, Part II Figures in this lecture are from: Rapid Prototyping of Digital Systems, Second Edition James O. Hamblen & Michael D. Furman, Kluwer Academic Publishers, 2001, ISBN 0-7923-7439-

More information

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes)

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes) Last (family) name: Answer Key First (given) name: Student I.D. #: Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE 551 Digital System Design and Synthesis Midterm

More information

VHDL: Modeling RAM and Register Files. Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2

VHDL: Modeling RAM and Register Files. Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2 VHDL: Modeling RAM and Register Files Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2 Memory Synthesis Approaches: Random logic using flip-flops or latches Register files in datapaths RAM standard components

More information

VHDL And Synthesis Review

VHDL And Synthesis Review VHDL And Synthesis Review VHDL In Detail Things that we will look at: Port and Types Arithmetic Operators Design styles for Synthesis VHDL Ports Four Different Types of Ports in: signal values are read-only

More information

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic CPE 626 Lecture 6: VHDL Synthesis Aleksandar Milenkovic http://www.ece.uah.edu/~milenka http://www.ece.uah.edu/~milenka/cpe626-04f/ milenka@ece.uah.edu Assistant Professor Electrical and Computer Engineering

More information

The block diagram representation is given below: The output equation of a 2x1 multiplexer is given below:

The block diagram representation is given below: The output equation of a 2x1 multiplexer is given below: Experiment-3: Write VHDL programs for the following circuits, check the wave forms and the hardware generated a. multiplexer b. De-Multiplexer Objective: i. To learn the VHDL coding for Multiplexer and

More information

cla library ieee; use ieee.std_logic_1164.all;

cla library ieee; use ieee.std_logic_1164.all; -- cla entity cla is generic( n_g: integer :=4 -- count of bits ); port( x_p : in std_logic_vector (n_g-1 downto 0); y_p : in std_logic_vector (n_g-1 downto 0); cin_p : in std_logic; cla_p :out std_logic_vector

More information

Programmable Logic. Simple Programmable Logic Devices

Programmable Logic. Simple Programmable Logic Devices Programmable Logic SM098 Computation Structures - Programmable Logic Simple Programmable Logic evices Programmable Array Logic (PAL) AN-OR arrays are common blocks in SPL and CPL architectures Implements

More information

CprE 583 Reconfigurable Computing

CprE 583 Reconfigurable Computing Recap Moore FSM Example CprE / ComS 583 Reconfigurable Computing Moore FSM that recognizes sequence 10 0 1 0 1 S0 / 0 S1 / 0 1 S2 / 1 Prof. Joseph Zambreno Department of Electrical and Computer Engineering

More information

Getting Started with VHDL

Getting Started with VHDL Getting Started with VHDL VHDL code is composed of a number of entities Entities describe the interface of the component Entities can be primitive objects or complex objects Architectures are associated

More information

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1 DIGITAL LOGIC WITH VHDL (Fall 23) Unit DESIGN FLOW DATA TYPES LOGIC GATES WITH VHDL TESTBENCH GENERATION DESIGN FLOW Design Entry: We specify the logic circuit using a Hardware Description Language (e.g.,

More information

XSV Flash Programming and Virtex Configuration

XSV Flash Programming and Virtex Configuration XSV Flash Programming and Virtex Configuration July 5, 2001 (Version 1.1) Application Note by D. Vanden Bout Summary This application note describes the circuits that let the XC95108 CPLD program the Flash

More information

COE Design Process Tutorial

COE Design Process Tutorial COE 758 - Design Process Tutorial I. Introduction This tutorial describes a formal design process for the creation of digital systems. The aim of this design process is to provide a systematic approach

More information

Sign here to give permission for your test to be returned in class, where others might see your score:

Sign here to give permission for your test to be returned in class, where others might see your score: EEL 4712 Midterm 2 Spring 215 VERSION 1 Name: UFID: Sign here to give permission for your test to be returned in class, where others might see your score: IMPORTANT: Please be neat and write (or draw)

More information

MAX 10. Memory Modules

MAX 10. Memory Modules MAX 10 Memory Modules Three types of on-chip memory FF based memory embedded in the LEs Most efficient for very small memories Compiler driven Embedded SRAM block 8K bits + 1024 parity bits (9216b) MAX

More information

5. 0 VHDL OPERATORS. The above classes are arranged in increasing priority when parentheses are not used.

5. 0 VHDL OPERATORS. The above classes are arranged in increasing priority when parentheses are not used. Filename= ch5.doc 5. 0 VHDL OPERATORS There are seven groups of predefined VHDL operators: 1. Binary logical operators: and or nand nor xor xnor 2. Relational operators: = /= < >= 3. Shifts operators:

More information

Sign here to give permission to return your test in class, where other students might see your score:

Sign here to give permission to return your test in class, where other students might see your score: EEL 4712 Midterm 1 Spring 2017 VERSION 1 Name: UFID: Sign here to give permission to return your test in class, where other students might see your score: IMPORTANT: Please be neat and write (or draw)

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 2.2.2: VHDL-3 Liang Liu liang.liu@eit.lth.se 1 Outline Inference of Basic Storage Element Some Design Examples DFF with enable Counter Coding Style:

More information

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 8

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 8 DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 8 PARAMETRIC CODING Techniques: generic input size, for-generate, if-generate, conv_integer. Custom-defined arrays, functions, and packages. Examples: vector

More information

UART. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning

UART. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning UART ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Cengage Learning UART Universal Asynchronous Receiver Transmitter Serial Data Transmission 68HC11 Microcontroller UART Registers

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 2.2.2: VHDL-3 Liang Liu liang.liu@eit.lth.se 1 Outline Inference of Basic Storage Element Some Design Examples DFF with enable Counter Coding Style:

More information

Lecture 12 VHDL Synthesis

Lecture 12 VHDL Synthesis CPE 487: Digital System Design Spring 2018 Lecture 12 VHDL Synthesis Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 What is Synthesis?

More information

Mid-Term Exam Solutions

Mid-Term Exam Solutions CS/EE 26 Digital Computers: Organization and Logical Design Mid-Term Eam Solutions Jon Turner 3/3/3. (6 points) List all the minterms for the epression (B + A)C + AC + BC. Epanding the epression gives

More information

EEL 4712 Digital Design Test 1 Spring Semester 2007

EEL 4712 Digital Design Test 1 Spring Semester 2007 IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. COVER SHEET: Problem: Points: 1 (15 pts) 2 (20 pts) Total 3 (15 pts) 4 (18 pts)

More information

FPGAs in a Nutshell - Introduction to Embedded Systems-

FPGAs in a Nutshell - Introduction to Embedded Systems- FPGAs in a Nutshell - Introduction to Embedded Systems- Dipl.- Ing. Falk Salewski Lehrstuhl Informatik RWTH Aachen salewski@informatik.rwth-aachen.de Winter term 6/7 Contents History FPGA architecture

More information

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques FSM Components XST features: Specific inference capabilities for synchronous Finite State Machine (FSM) components. Built-in FSM encoding strategies to accommodate your optimization goals. You may also

More information

Digital System Construction

Digital System Construction Digital System Construction FYSIKUM Lecture 4: More VHDL, memory, PRNG Arithmetic Memories Pipelines and buffers Pseudorandom numbers IP core generation in Vivado Introduction to Lab 3 Digital Systemkonstruktion

More information

Altera s Avalon Communication Fabric

Altera s Avalon Communication Fabric Altera s Avalon Communication Fabric Stephen A. Edwards Columbia University Spring 2012 Altera s Avalon Bus Something like PCI on a chip Described in Altera s Avalon Memory-Mapped Interface Specification

More information

Hardware Description Languages. Modeling Complex Systems

Hardware Description Languages. Modeling Complex Systems Hardware Description Languages Modeling Complex Systems 1 Outline (Raising the Abstraction Level) The Process Statement if-then, if-then-else, if-then-elsif, case, while, for Sensitivity list Signals vs.

More information

TKT-1212 Digitaalijärjestelmien toteutus. Lecture 7: VHDL Testbenches Ari Kulmala, Erno Salminen 2008

TKT-1212 Digitaalijärjestelmien toteutus. Lecture 7: VHDL Testbenches Ari Kulmala, Erno Salminen 2008 TKT-1212 Digitaalijärjestelmien toteutus Lecture 7: VHDL Testbenches Ari Kulmala, Erno Salminen 2008 Contents Purpose of test benches Structure of simple test bench Side note about delay modeling in VHDL

More information

ECE 545 Lecture 11 Addendum

ECE 545 Lecture 11 Addendum ECE 545 Lecture 11 Addendum Controllers for Keccak_F and AES George Mason University ECE 448 FPGA and ASIC Design with VHDL Keccak_F 1600 din start done Keccak_F rst 1600 dout ready Note: Bold line represents

More information

In this section we cover the following: State graphs introduction Serial Adder Multiplier Divider STATE GRAPHS FOR CONTROL NETWORKS What are the

In this section we cover the following: State graphs introduction Serial Adder Multiplier Divider STATE GRAPHS FOR CONTROL NETWORKS What are the In this section we cover the following: State graphs introduction Serial Adder Multiplier Divider STATE GRAPHS FOR CONTROL NETWORKS What are the conditions for having a proper state graph? If an arc is

More information

FPGA.

FPGA. CMOS TTL Verilog VHDL mshora@yahoo.com 7400. NAND CMOS TTL 1 0 source sink datasheet bounce bounce debunce RS Latch debounce Typical Characteristics NO NC Semiconductor Material Wavelength Colour V F @

More information

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic George Mason University Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 3, RT-level

More information

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic George Mason University Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 3, RT-level

More information

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits M1 Informatique / MOSIG Introduction to Modeling and erification of Digital Systems Part 4: HDL for sequential circuits Laurence PIERRE http://users-tima.imag.fr/amfors/lpierre/m1arc 2017/2018 81 Sequential

More information

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. Behavioral Design Style: Registers & Counters.

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. Behavioral Design Style: Registers & Counters. ECE 55 Lecture 6 Behavioral Modeling of Sequential-Circuit Building Blocks Required reading P. Chu, RTL Hardware esign using VHL Chapter 5.1, VHL Process Chapter 8, Sequential Circuit esign: Principle

More information

CDA 4253 FGPA System Design Xilinx FPGA Memories. Hao Zheng Comp Sci & Eng USF

CDA 4253 FGPA System Design Xilinx FPGA Memories. Hao Zheng Comp Sci & Eng USF CDA 4253 FGPA System Design Xilinx FPGA Memories Hao Zheng Comp Sci & Eng USF Xilinx 7-Series FPGA Architecture On-Chip block RAM On-Chip block RAM Distributed RAM by Logic Fabric Distributed RAM by Logic

More information

3 Designing Digital Systems with Algorithmic State Machine Charts

3 Designing Digital Systems with Algorithmic State Machine Charts 3 Designing with Algorithmic State Machine Charts An ASM chart is a method of describing the sequential operations of a digital system which has to implement an algorithm. An algorithm is a well defined

More information

SEQUENTIAL STATEMENTS

SEQUENTIAL STATEMENTS SEQUENTIAL STATEMENTS Sequential Statements Allow to describe the behavior of a circuit as a sequence of related events Can be used to model, simulate and synthesize: Combinational logic circuits Sequential

More information

Hardware Modeling. VHDL Syntax. Vienna University of Technology Department of Computer Engineering ECS Group

Hardware Modeling. VHDL Syntax. Vienna University of Technology Department of Computer Engineering ECS Group Hardware Modeling VHDL Syntax Vienna University of Technology Department of Computer Engineering ECS Group Contents Identifiers Types & Attributes Operators Sequential Statements Subroutines 2 Identifiers

More information

INTRODUCTION TO VHDL ADVANCED COMPUTER ARCHITECTURES. Slides by: Pedro Tomás. Additional reading: - ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC)

INTRODUCTION TO VHDL ADVANCED COMPUTER ARCHITECTURES. Slides by: Pedro Tomás. Additional reading: - ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC) INTRODUCTION TO VHDL Slides by: Pedro Tomás Additional reading: - ADVANCED COMPUTER ARCHITECTURES ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC) Outline 2 Hardware Description Languages (HDL) VHDL Very

More information

VHDL for Modeling - Module 10

VHDL for Modeling - Module 10 VHDL for Modeling Module 10 Jim Duckworth, WPI 1 Overview General examples AND model Flip-flop model SRAM Model Generics DDR SDRAM Model Constraints Metastability Block Statements Just for reference Jim

More information

VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University

VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University 1 The Wait Statement Syntax wait until condition; Different forms wait until(clk event and clk = 1 ); wait

More information

Very High Speed Integrated Circuit Har dware Description Language

Very High Speed Integrated Circuit Har dware Description Language Very High Speed Integrated Circuit Har dware Description Language Industry standard language to describe hardware Originated from work in 70 s & 80 s by the U.S. Departm ent of Defence Root : ADA Language

More information

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\ CSCI 250 - Lab 3 VHDL Syntax Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\ Objectives 1. Learn VHDL Valid Names 2. Learn the presentation of Assignment and Comments 3. Learn Modes, Types, Array,

More information

File: /home/young/mywork/c.arithmetic/bshfit/print.bshift Page 1 of 13

File: /home/young/mywork/c.arithmetic/bshfit/print.bshift Page 1 of 13 File: /home/young/mywork/c.arithmetic/bshfit/print.bshift Page 1 of 13 makefile.suffixes :.o.vhdl.vhdl.o : ghdl -a $< # CNF_bshift = c3.bshift_tb_conf.rtl.o \ # c3.bshift_tb_conf.mux.o \ OBJ_bshift = cordic_pkg.o

More information

ECE 545: Lecture 11. Programmable Logic Memories

ECE 545: Lecture 11. Programmable Logic Memories ECE 545: Lecture 11 Programmable Logic Memories Recommended reading Vivado Design Suite User Guide: Synthesis Chapter 4 RAM HDL Coding Techniques Initializing RAM Contents 7 Series FPGAs Memory Resources:

More information

ECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs

ECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs ECE 545: Lecture 11 Programmable Logic Memories Recommended reading Vivado Design Suite User Guide: Synthesis Chapter 4 RAM HDL Coding Techniques Initializing RAM Contents 7 Series FPGAs Resources: User

More information

Review of Digital Design with VHDL

Review of Digital Design with VHDL Review of Digital Design with VHDL Digital World Digital world is a world of 0 and 1 Each binary digit is called a bit Eight consecutive bits are called a byte Hexadecimal (base 16) representation for

More information

The CPU Bus : Structure 0

The CPU Bus : Structure 0 The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC). The

More information

Review of Digital Design with VHDL

Review of Digital Design with VHDL Review of Digital Design with VHDL Digital World Digital world is a world of 0 and 1 Each binary digit is called a bit Eight consecutive bits are called a byte Hexadecimal (base 16) representation for

More information

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 4: Modeling in VHDL (Continued ) Sequential Statements Use Process process (sensitivity list) variable/constant declarations Sequential Statements end process; 2 Sequential

More information

VHDL for FPGA Design. by : Mohamed Samy

VHDL for FPGA Design. by : Mohamed Samy VHDL for FPGA Design by : Mohamed Samy VHDL Vhdl is Case insensitive myvar = myvar = MYVAR IF = if = if Comments start with -- Comments can exist anywhere in the line Semi colon indicates the end of statements

More information

VHDL Examples Mohamed Zaky

VHDL Examples Mohamed Zaky VHDL Examples By Mohamed Zaky (mz_rasmy@yahoo.co.uk) 1 Half Adder The Half Adder simply adds 2 input bits, to produce a sum & carry output. Here we want to add A + B to produce Sum (S) and carry (C). A

More information

EL 310 Hardware Description Languages Midterm

EL 310 Hardware Description Languages Midterm EL 3 Hardware Description Languages Midterm 2 3 4 5 Total Name: ID : Notes: ) Please answer the questions in the provided space after each question. 2) Duration is minutes 3) Closed books and closed notes.

More information

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks. Outline CPE/EE 422/522 Advanced Logic Design L05 Electrical and Computer Engineering University of Alabama in Huntsville What we know Combinational Networks Sequential Networks: Basic Building Blocks,

More information

Document Version: 0.6 Document Date: 15 April 2011 Prepared by: Y. Ermoline for ATLAS Level-1Calorimeter Trigger

Document Version: 0.6 Document Date: 15 April 2011 Prepared by: Y. Ermoline for ATLAS Level-1Calorimeter Trigger ATLAS ATL-DA-EN-0004 EDMS Id: 1100579 ATLAS TDAQ Level-1 Calorimeter Trigger VHLD guidelines Document Version: 0.6 Document Date: 15 April 2011 Prepared by: Y. Ermoline for ATLAS Level-1Calorimeter Trigger

More information

CMPT 250: Computer Architecture. Using LogicWorks 5. Tutorial Part 1. Somsubhra Sharangi

CMPT 250: Computer Architecture. Using LogicWorks 5. Tutorial Part 1. Somsubhra Sharangi CMPT 250: Computer Architecture Using LogicWorks 5 Tutorial Part 1 Somsubhra Sharangi What is VHDL? A high level language to describe digital circuit Different that a programming language ( such as Java)

More information

FPGA design with National Instuments

FPGA design with National Instuments FPGA design with National Instuments Rémi DA SILVA Systems Engineer - Embedded and Data Acquisition Systems - MED Region ni.com The NI Approach to Flexible Hardware Processor Real-time OS Application software

More information

DESIGN AND IMPLEMENTATION OF MOD-6 SYNCHRONOUS COUNTER USING VHDL

DESIGN AND IMPLEMENTATION OF MOD-6 SYNCHRONOUS COUNTER USING VHDL Arid Zone Journal of Engineering, Technology and Environment. August, 2013; Vol. 9, 17-26 DESIGN AND IMPLEMENTATION OF MOD-6 SYNCHRONOUS COUNTER USING VHDL Dibal, P.Y. (Department of Computer Engineering,

More information

ECE 699: Lecture 9. Programmable Logic Memories

ECE 699: Lecture 9. Programmable Logic Memories ECE 699: Lecture 9 Programmable Logic Memories Recommended reading XST User Guide for Virtex-6, Spartan-6, and 7 Series Devices Chapter 7, HDL Coding Techniques Sections: RAM HDL Coding Techniques ROM

More information

Lattice VHDL Training

Lattice VHDL Training Lattice Part I February 2000 1 VHDL Basic Modeling Structure February 2000 2 VHDL Design Description VHDL language describes a digital system as a set of modular blocks. Each modular block is described

More information

ECOM 4311 Digital Systems Design

ECOM 4311 Digital Systems Design ECOM 4311 Digital Systems Design Eng. Monther Abusultan Computer Engineering Dept. Islamic University of Gaza Page 1 Agenda 1. Counters Page 2 Counters - special name of any clocked sequential circuit

More information

VHDL simulation and synthesis

VHDL simulation and synthesis VHDL simulation and synthesis How we treat VHDL in this course You will not become an expert in VHDL after taking this course The goal is that you should learn how VHDL can be used for simulation and synthesis

More information

Pollard s Tutorial on Clocked Stuff in VHDL

Pollard s Tutorial on Clocked Stuff in VHDL Pollard s Tutorial on Clocked Stuff in VHDL Welcome to a biased view of how to do register type of stuff in VHDL. The object of this short note is to identify one way to easily handle registered logic

More information

Introduction to VHDL

Introduction to VHDL Introduction to VHDL Agenda Introduce VHDL Basic VHDL constructs Implementing circuit functions Logic, Muxes Clocked Circuits Counters, Shifters State Machines FPGA design and implementation issues FPGA

More information

Asynchronous FIFO Architectures (Part 1)

Asynchronous FIFO Architectures (Part 1) Asynchronous FIFO Architectures (Part 1) Vijay A. Nebhrajani Designing a FIFO is one of the most common problems an ASIC designer comes across. This series of articles is aimed at looking at how FIFOs

More information

The VHDL Hardware Description Language

The VHDL Hardware Description Language The VHDL Hardware Description Language p. 1/? The VHDL Hardware Description Language CSEE W4840 Prof. Stephen A. Edwards Columbia University The VHDL Hardware Description Language p. 2/? Why HDLs? 1970s:

More information

Lab 3: Standard Combinational Components

Lab 3: Standard Combinational Components Lab 3: Standard Combinational Components Purpose In this lab you will implement several combinational circuits on the DE1 development board to test and verify their operations. Introduction Using a high-level

More information

constant reg_init: std_logic_vector(11 downto 0):=" ";

constant reg_init: std_logic_vector(11 downto 0):= ; -- UART Package Declaration -- -- by Weijun Zhang, 05/2001 library ieee; use ieee.std_logic_1164.all; package my_package is FUNCTION parity(inputs: std_logic_vector(7 downto 0)) RETURN std_logic; end my_package;

More information

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu November 6, 2006 Classes November 6 and 8 are in 429 Dana! Lecture 15: Homework 5: Datapath How to write a testbench for synchronous

More information

Chapter 8 VHDL Code Examples

Chapter 8 VHDL Code Examples APPENDIX I Chapter 8 VHDL Code Examples I.1 Introduction Two example VHDL code designs are presented in Chapter 8, the first for controlling the AD7524 digital-to-analogue converter and the second for

More information

library STD; use STD.textio.all; library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; package cordic_pkg is

library STD; use STD.textio.all; library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; package cordic_pkg is cordic_pkg.vhdl Purpose: utility package of cordic Discussion: Licensing: This code is distributed under the GNU LGPL license. Modified: 2012.04.03 Author: Young W. Lim Functions: Conv2fixedPt (x : real;

More information

VHDL par Ahcène Bounceur VHDL

VHDL par Ahcène Bounceur VHDL VHDL Ahcène Bounceur 2009 Plan de travail 1. Introduction au langage 2. Prise en main 3. Machine à état 4. Implémentation sur FPGA 1 VHDL Introduction au langage Ahcène Bounceur VHDL VHIC (Very High-speed

More information

--- WARNING CS0 and WE0 are screwed up, corected by swapping the asignments..!

--- WARNING CS0 and WE0 are screwed up, corected by swapping the asignments..! ---- TOPLEVEL ---------------------------------------------------------- -- NAME : toplevel.vhd -- -- DESCRIPTION : The Toplevel of the project -- -- NOTES : -- -- REVISION HISTORY : -- -- Date Programmer

More information

Using ModelSim to Simulate Logic Circuits in VHDL Designs. 1 Introduction. For Quartus II 13.0

Using ModelSim to Simulate Logic Circuits in VHDL Designs. 1 Introduction. For Quartus II 13.0 Using ModelSim to Simulate Logic Circuits in VHDL Designs For Quartus II 13.0 1 Introduction This tutorial is a basic introduction to ModelSim, a Mentor Graphics simulation tool for logic circuits. We

More information

Solving a 2D Maze. const int WIDTH = 10; const int HEIGHT = 10;

Solving a 2D Maze. const int WIDTH = 10; const int HEIGHT = 10; Solving a 2D Maze Let s use a 2D array to represent a maze. Let s start with a 10x10 array of char. The array of char can hold either X for a wall, for a blank, and E for the exit. Initially we can hard-code

More information

CprE 583 Reconfigurable Computing

CprE 583 Reconfigurable Computing Recap 4:1 Multiplexer CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #18 VHDL for Synthesis I LIBRARY ieee

More information

Kill Switch: Hardware-Based Line-Rate Filtering and Capture of 10Gb/s Ethernet Network

Kill Switch: Hardware-Based Line-Rate Filtering and Capture of 10Gb/s Ethernet Network Kill Switch: Hardware-Based Line-Rate Filtering and Capture of 10Gb/s Ethernet Network Qiushi Ding qd2119, Bokai Chen bc2526, Yuyang Wang yw2507, LihengWang lw2496, Jingshu Fang jf2781 Final Report of

More information

Modeling Complex Behavior

Modeling Complex Behavior Modeling Complex Behavior Sudhakar Yalamanchili, Georgia Institute of Technology, 2006 (1) Outline Abstraction and the Process Statement Concurrent processes and CSAs Process event behavior and signals

More information