VHDL Hierarchy in XILINX

Slides:



Advertisements
Similar presentations
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Advertisements

Integrated Circuits Laboratory Faculty of Engineering Digital Design Flow Using Mentor Graphics Tools Presented by: Sameh Assem Ibrahim 16-October-2003.
L18 – VHDL for other counters and controllers. Other counters  More examples Gray Code counter Controlled counters  Up down counter  Ref: text Unit.
Arbitrary Waveform Discussion 5.5 Example 34.
6/27/20061 Sequence Detectors Lecture Notes – Lab 5 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
6/12/20151 Sequence Detectors Lecture Notes – Lab 4 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
FPGAs and VHDL Lecture L12.1. FPGAs and VHDL Field Programmable Gate Arrays (FPGAs) VHDL –2 x 1 MUX –4 x 1 MUX –An Adder –Binary-to-BCD Converter –A Register.
Counters Discussion D5.3 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Random-Access Memory Distributed and Block RAM Discussion D10.3 Example 41.
Introduction to Counter in VHDL
Introduction to VHDL (part 2)
1 Part V: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
L16 – Testbenches for state machines. VHDL Language Elements  More examples HDL coding of class examples Testbench for example  Testing of examples.
Finite State Machines VHDL ET062G & ET063G Lecture 6 Najeem Lawal 2012.
1/8/ L20 Project Step 8 - Data Path Copyright Joanne DeGroat, ECE, OSU1 State Machine Design with an HDL A methodology that works for documenting.
CprE / ComS 583 Reconfigurable Computing
VHDL in 1h Martin Schöberl. AK: JVMHWVHDL2 VHDL /= C, Java,… Think in hardware All constructs run concurrent Different from software programming Forget.
L16 – VHDL for State Machines with binary encoding.
ENG241 Digital Design Week #8 Registers and Counters.
ECE 332 Digital Electronics and Logic Design Lab Lab 6 Concurrent Statements & Adders.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
Finite state machines Modelling FSM in VHDL. Types of automata (FSM) A sequential automaton has: –Inputs –States (a finite number of states) –Outputs.
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
Sequential Logic Design by VHDL
Introduction to VHDL Coding Wenchao Cao, Teaching Assistant Department of EECS University of Tennessee.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
Slide 1 3.VHDL/Verilog Description Elements. Slide 2 To create a digital component, we start with…? The component’s interface signals Defined in MODULE.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
Project 1.  Two parts Implement a 3 bit Gray Code Counter Implement a 4-to-1 muxtiplexer  Can be done on Altera (Quartis) or Xilinx 8/22/2012 – ECE.
Show who is the BOSS Issues with VHDL Synthesis. VHDL Simulator versus Synthetiser VHDL Simulator follows the strict VHDL rules. It does not produce a.
State Machine Design with an HDL
1 AL and CA Lecture 13: System Design 1 2 Outline System Level Design Control Signals Controller Design.
An Introduction to V.H.D.L.. Need of a Compiler… main( ) { int x=10,y=20,z; z = x + y ; printf ( “ %d “, z ); getch( ) ; } What’s That ? Give me only.
Sequential statements (1) process
Combinational logic circuit
Week #7 Sequential Circuits (Part B)
Registers and Counters
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Some VHDL Details 10/8/08 ECE Lecture 8.
ECE 4110–5110 Digital System Design
Using CAD Tools to implement Digital Circuits
Sequential-Circuit Building Blocks
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
Instructions to get MAX PLUS running
ELEC 5200/6200 Computer Architecture and Design Review of VHDL
Developing More Advanced Testbenches
VHDL (VHSIC Hardware Description Language)
State Machine Design with an HDL
Behavioral Modeling of Sequential-Circuit Building Blocks
Founded in Silicon Valley in 1984
Sequntial-Circuit Building Blocks
ECE 331 – Digital System Design
Modeling of Circuits with a Regular Structure
Figure 8.1. The general form of a sequential circuit.
Hardware Modeling & Synthesis Using VHDL
Structural Modeling and the Generate Statement
Modeling of Circuits with Regular Structure
Sequntial-Circuit Building Blocks
High-Low Guessing Game
System Controller Approach
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
(Sequential-Circuit Building Blocks)
Structural Modeling and the Generate Statement
EEL4712 Digital Design (Midterm 1 Review).
Presentation transcript:

VHDL Hierarchy in XILINX 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

VHDL Hierarchy in XILINX How do you do component instantiation in a tool such as XILINX Outline and initial code of another application that includes a system controller 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX The Spec Design a 2 digit timer that has user inputs of Start/STOP S digit 1 S digit 2 And the digital circuit also has outside input/outputs of Clk Alarm output signal 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

Internal architecture A general high level view 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX The digit counters Inputs and outputs Clk – the clock signal Incr – an enable input (was not used) cup,cdn – count up or count down at0,at9 – output signals that indicate when the counter digit is at a value of 0 or 9 respectively Cnt – the BCD of the count for display 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

The code of the digit counter Note that it must add up or down The ENTITY ENTITY dig IS Port (clk : IN BIT; incr : IN BIT; cup,cdn : IN BIT; at0,at9 : OUT BIT; cnt : OUT BIT_VECTOR(3 DOWNTO 0)); END dig; 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX The Architecture The first part ARCHITECTURE one OF dig IS SIGNAL icnt, inext_cnt : BIT_VECTOR(3 DOWNTO 0); SIGNAL incr_icnt : BIT_VECTOR(3 downto 0); SIGNAL incr_carry : BIT_VECTOR(4 DOWNTO 0) := "00001"; SIGNAL idec_icnt : BIT_VECTOR(3 downto 0); SIGNAL idec_bor : BIT_VECTOR(4 DOWNTO 0) := "00001"; BEGIN 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX The Architecture The F/F process PROCESS BEGIN WAIT UNTIL clk='1' and clk'event; icnt <= inext_cnt; END PROCESS; 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX Next State --NEXT state generation --CODE FOR INCREMENTER incr_icnt <= icnt xor incr_carry(3 DOWNTO 0); incr_carry(4 DOWNTO 1) <= incr_carry(3 DOWNTO 0) and icnt; --CODE FOR DECREMENTER idec_icnt <= icnt xor idec_bor(3 downto 0); idec_bor(4 DOWNTO 1) <= idec_bor(3 DOWNTO 0) and NOT icnt; PROCESS (cup,cdn,incr_icnt,idec_icnt) BEGIN IF (cup = '1' and cdn = '0' and incr_icnt = "1010") THEN inext_cnt <= "0000"; ELSIF (cup = '1' and cdn = '0') THEN inext_cnt <= incr_icnt; ELSIF (cup = '0' and cdn = '1' and idec_icnt = "0000") THEN inext_cnt <= "1001"; ELSIF (cup = '0' and cdn = '1') THEN inext_cnt <= idec_icnt; END IF; END PROCESS; 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX Output Generation And the output and end of the ARCHITECTURE --Output process PROCESS(icnt) BEGIN IF icnt = "0000" THEN at0 <= '1'; ELSE at0 <= '0'; END IF; IF icnt = "1001" THEN at9 <= '1'; ELSE at9 <= '0'; END IF; cnt <= icnt; END PROCESS; END one; 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX The controller The controller instantiates this digit unit twice. The ENTITY -- SYSTEM CONTROLLER ENTITY cntrl IS PORT (ST_STOP : IN BIT; sclk : IN BIT; s1,s2 : IN BIT; alarm : OUT BIT); END cntrl; 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX Cntrl declarations ARCHITECTURE one OF cntrl IS --internal signals SIGNAL cup,cdn : BIT; SIGNAL at0,at9 : BIT; SIGNAL cnt : BIT_VECTOR(3 downto 0); SIGNAL iclk : BIT; TYPE state_type IS (idle,sethr,setmin,run,stop); SIGNAL state,next_state : state_type; 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

The Component Declaration Note that there is no configuration in XILINX COMPONENT m1 IS PORT (clk : IN BIT; en : IN BIT; cup,cdn : IN BIT; at0,at9 : OUT BIT; cnt : OUT BIT_VECTOR(3 downto 0)); END COMPONENT; BEGIN 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX Using the component BEGIN --wire in component c0: m1 PORT MAP (iclk,'1',cup,cdn,at0,at9,cnt); --F/Fs PROCESS WAIT UNTIL sclk='1' and sclk'event; state <= next_state; END PROCESS; END ARCHITECTURE; Instantiates the component 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX What to do in the tool Start with input of the controller, cntrl, VHDL code Then in the process window (lower of the two left windows and the first tab) you will not that the first in the list is “Add Existing Source” Click on this tab and a window come up that allows selection of VHDL code for the digits counter unit. 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX Special Notes It is probably easiest to enter the code for the digits unit using the editor of ModelSim XE. Under the File tab choose NewSourceVHDL This is a nice VHDL editor. Now that the source is added you can do the synthesis. You need the declaration of the component and the instantiation, but no configuration 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX

ECE 561 - Lecture - Hierarchy in XILINX 9/26/2008 ECE 561 - Lecture - Hierarchy in XILINX