3e library declarations library IEEE; use IEEE.std_logic_1164.all;

Similar documents
[VARIABLE declaration] BEGIN. sequential statements

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

Multiplication Simple Gradeschool Algorithm for 16 Bits (32 Bit Result)

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

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014

Concurrent & Sequential Stmts. (Review)

EE261: Intro to Digital Design

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. George Mason University

Senior Project Design Review: Internal Hardware Design of a Microcontroller in VLSI

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

Getting Started with VHDL

FPGA.

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

Converting Hardware Interface Layer (HIL) v1.x Projects to v2.0

Sequential Statement

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles

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

Digital Design Laboratory Lecture 2

Asynchronous FIFO Architectures (Part 1)

Revision: 08/10/ East Main Pullman, WA (509) Voice and Fax

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16

Design a 4 bit-adder. Then design a 4-7 decoder to show the outputs. Output Sum(4 bits) Adder. Output carry(1 bit)

Test Benches - Module 8

EEL 4712 Digital Design Test 1 Spring Semester 2008

ACS College of Engineering. Department of Biomedical Engineering. Logic Design Lab pre lab questions ( ) Cycle-1

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 8

Chapter 8 VHDL Code Examples

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

ECOM 4311 Digital Systems Design

Contents. Appendix D VHDL Summary Page 1 of 23

Constructing VHDL Models with CSA

Control and Datapath 8

COE Design Process Tutorial

ECE 459/559 Secure & Trustworthy Computer Hardware Design

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University

EEE8076. Reconfigurable Hardware Design (coursework) Module Outline. Dr A. Bystrov Dr. E.G. Chester. Autumn

ECE 545 Lecture 4. Simple Testbenches. George Mason University

Hardware Description Language VHDL (1) Introduction

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

Review of Digital Design with VHDL

CSC / EE Digital Systems Design. Summer Sample Project Proposal 01

In our case Dr. Johnson is setting the best practices

APPLICATION NOTE. A CPLD VHDL Introduction. Introduction. Overview. Entity. XAPP 105 January12, 1998 (Version 1.0) 0 4* Application Note

Very High Speed Integrated Circuit Har dware Description Language

Lab 4: Integrating a picoblaze processor in LabVIEW FPGA by use of CLIP node

Introduction to VHDL #1

entity priority is Port ( a,b,c,d : in STD_LOGIC; encoded : out STD_LOGIC_VECTOR(2 downto 0)); end priority;

Computer-Aided Digital System Design VHDL

EEL 4712 Digital Design Test 2 Spring Semester 2008

Experiment 0 OR3 Gate ECE 332 Section 000 Dr. Ron Hayne June 8, 2003

ELCT 501: Digital System Design

Declarations of Components and Entities are similar Components are virtual design entities entity OR_3 is

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs

Digital System Construction

CCE 3202 Advanced Digital System Design

CCE 3202 Advanced Digital System Design

5. VHDL - Introduction - 5. VHDL - Design flow - 5. VHDL - Entities and Architectures (1) - 5. VHDL - Entities and Architectures (2) -

Design Guidelines for Using DSP Blocks

Introduction to VHDL #3

Field Programmable Gate Array

EL 310 Hardware Description Languages Midterm

Contents. Chapter 9 Datapaths Page 1 of 28

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University

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

PALMiCE FPGA Probing Function User's Manual

Implementing Multipliers in Xilinx Virtex II FPGAs

Design Problem 3 Solutions

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

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 11/01/17

CprE 583 Reconfigurable Computing

CprE 583 Reconfigurable Computing

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

Reconfigurable Hardware Design (coursework)

13/06/56 8 ก ก. 08-Case Study

-- Fill in values for each generic. -- Fill in values for each signal. SIGNAL load_start : std_ulogic := '1'; SIGNAL clock : std_ulogic := '0';

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

Review. LIBRARY list of library names; USE library.package.object; ENTITY entity_name IS generic declarations PORT ( signal_name(s): mode signal_type;

VHDL for Complex Designs

The Optimization of a Design Using VHDL Concepts

Lattice VHDL Training

Pollard s Tutorial on Clocked Stuff in VHDL

Design Guidelines for Using DSP Blocks

Getting Started with the CPU Design

Assignment 01 Computer Architecture Lab ECSE

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden

ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices

Solutions - Homework 4 (Due date: November 9:30 am) Presentation and clarity are very important!

HDL. Hardware Description Languages extensively used for:

Lab 3: Standard Combinational Components

Combinational Logic COMB. LOGIC BLOCK. A Combinational Logic Block is one where the outputs depend only on the current inputs

Digital Systems Design

ECE 545 Lecture 11 Addendum

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

Tri-State Bus Implementation

EECE 353: Digital Systems Design Lecture 10: Datapath Circuits

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 3

VHDL in 1h. Martin Schöberl

CONCURRENT STATEMENTS COMPONENT DECLARATION COMPONENT INSTANTIATION

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

Transcription:

3e8.54 XSvhd.4Please see the VHDL program below or in the accompanying.zip file (if published by your instructor). This program was kindly written and contributed by Xilinx application engineering, but it has not been further checked for correctness and coding style --********************************** -- PROBLEM : WAKERLY - 8.54 -- FILES : -- 8_54_top.vhd : top level file -- 8_54_par2ser.vhd : parallel to serial converter -- 8_54_control.vhd : control module -- 8_54_shift_synch.vhd : 8 bit shift register -- -- DESCRIPTION : -- Creates a parallel to serial converter. -- Data in is described as 8 x 8bit modules, -- with a single 8 bit data bus that carries -- data of the format given in Figure 8-55. -- Each serial link has its own SYNCH(i) line; -- the pulses should be staggered so SYNCH(i+1) -- occurs 1 clock cycle after SYNCH(i). -- -- Because of this, the load_synch line should -- also be staggered so the data transmitted -- over the serial link will correspond to its -- associated SYNCH line. --********************************** -- library declarations entity wak_8_54_top is data: in STD_LOGIC_VECTOR (63 downto 0 synch: buffer STD_LOGIC_VECTOR (7 downto 0 sdata: out STD_LOGIC_VECTOR (7 downto 0) end wak_8_54_top; architecture wak_8_54_arch of wak_8_54_top is signal load_shift_master: std_logic; signal synch_master: std_logic; signal load_shift: std_logic_vector (7 downto 0 --component declarations component par2ser is data: in STD_LOGIC_VECTOR (7 downto 0 load_shift: in STD_LOGIC; sdata: out STD_LOGIC

component control is load_shift: out STD_LOGIC; synch: out STD_LOGIC component shift_synch is synch_in: in STD_LOGIC; synch: buffer STD_LOGIC_VECTOR (7 downto 0) --component instantiations S1: shift_synch port map (clock=>clock, synch_in=>synch_master, synch=>synch S2: shift_synch port map (clock=>clock, synch_in=>load_shift_master, synch=>load_shift U1: par2ser port map (clock=>clock, data=>data(7 downto 0), load_shift=>load_shift(0), sdata=>sdata(0) U2: par2ser port map (clock=>clock, data=>data(15 downto 8), load_shift=>load_shift(1), sdata=>sdata(1) U3: par2ser port map (clock=>clock, data=>data(23 downto 16), load_shift=>load_shift(2), sdata=>sdata(2) U4: par2ser port map (clock=>clock, data=>data(31 downto 24), load_shift=>load_shift(3), sdata=>sdata(3) U5: par2ser port map (clock=>clock, data=>data(39 downto 32), load_shift=>load_shift(4), sdata=>sdata(4) U6: par2ser port map (clock=>clock, data=>data(47 downto 40), load_shift=>load_shift(5), sdata=>sdata(5) U7: par2ser port map (clock=>clock, data=>data(55 downto 48), load_shift=>load_shift(6), sdata=>sdata(6) U8: par2ser port map (clock=>clock, data=>data(63 downto 56), load_shift=>load_shift(7), sdata=>sdata(7) U9: control port map (clock=>clock, load_shift=>load_shift_master, synch=>synch_master end wak_8_54_arch;

--************************************* -- Basically an 8-bit shift register -- takes the synch_in signal as an -- input, and outputs an 8 bit signal, -- each consecutive bit delayed by one -- from the previous bit. -- library declaration use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity shift_synch is synch_in: in STD_LOGIC; synch: buffer STD_LOGIC_VECTOR (7 downto 0) end shift_synch; architecture shift_synch_arch of shift_synch is -- low order synch signal is simply passed through -- to output. all others are delayed. synch(0) <= synch_in; process(clock) for I in 0 to 6 loop synch(i+1) <= synch(i end loop; end shift_synch_arch;

--*************************************** -- Parallel to serial converter -- Data is entered through 8 bit DATA bus -- It is loaded into the register when -- load_shift is low. If load_shift is -- high, shift data serially out through sdata -- library declarations entity par2ser is data: in STD_LOGIC_VECTOR (7 downto 0 load_shift: in STD_LOGIC; sdata: out STD_LOGIC end par2ser; architecture par2ser_arch of par2ser is -- internal signal declaration signal REG: STD_LOGIC_VECTOR(7 downto 0 signal DIN: std_logic; -- DIN <= 0 will set the high order bit to be -- zero once data is loaded in. DIN <= '0'; -- process to create shift register --accomplished by simply taking the DIN signal --and concatenating on the end the previous --6 high order bits. process (clock) if load_shift = '0' then REG <= data; REG <= DIN & REG(7 downto 1 sdata <= REG(0 end par2ser_arch;

--****************************** -- Control logic -- controls the loading of the -- parallel to serial shift register -- through the load_shift signal. -- also, controls the synch word. -- this occurs every 256 clock cycles. --library declaration use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; --top level entity declaration entity control is load_shift: out STD_LOGIC; synch: out STD_LOGIC end control; architecture control_arch of control is --internal signal declaration signal COUNT: STD_LOGIC_VECTOR(7 downto 0 signal load: STD_LOGIC; load <= '0'; --define constant process (clock) count <= count + 1; if count(2 downto 0) = "110" then load_shift <= load; load_shift <= not load; if count = 254 then synch <= '1'; synch <= '0'; end control_arch;