DISEÑO LÓGICO (DLO) Ejemplos de VHDL.

Slides:



Advertisements
Similar presentations
MC542 Organização de Computadores Teoria e Prática
Advertisements

MC542 Organização de Computadores Teoria e Prática
HDL Programming Fundamentals
UNIT 8: Synthesis Basics
arquitectura – implementação
VHDL Introdução Paulo C. Centoducatte fevereiro de 2005
VHDL Coding Style MO801/MC912.
MO Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
Modelagem Básica Entity –Exemplos: entity identifier is [ port (port_interface_list);] {entity_declarative_item} end [entity] [identifier]; Interface_list.
Flip-Flop J-K.
Diseño de Circuitos de Aplicación Específica VHDL Circuitos Integrados de Aplicación Específica VHDL: VHSIC Hardware Description Language.
Katholieke Hogeschool Kempen VHDL package 1 Package Basic functions in library.
ASIC 121: Practical VHDL Digital Design for FPGAs Tutorial 2 October 4, 2006.
Adders and Subtractors
©2004 Brooks/Cole FIGURES FOR CHAPTER 20 VHDL FOR DIGITAL SYSTEM DESIGN Click the mouse to move to the next page. Use the ESC key to exit this chapter.
VHDL in digital circuit synthesis (tutorial) dr inż. Miron Kłosowski EA 309
Sequential Design ELEC 311 Digital Logic and Circuits Dr. Ron Hayne
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
VHDL Programming in CprE 381 Zhao Zhang CprE 381, Fall 2013 Iowa State University Last update: 9/15/2013.
VHDL Refresher ECE 437 April 13, 2015 Motivation ECE 337 is a prerequisite But… –You may have taken 337 a few semesters previous –Breaks causes memory.
Introduction To VHDL for Combinational Logic
INTRO TO VHDL Appendix A: page page VHDL is an IEEE and ANSI standard. VHDL stands for Very High Speed IC hardware description language.
VHDL範例 真值表 LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.all; ENTITY true IS
Lecture #28 Page 1 ECE 4110– Sequential Logic Design Lecture #28 Agenda 1.Counters Announcements 1.HW #13 assigned 2.Next: Test #2 Review.
Multiplexers Section 3-7 Mano & Kime. Multiplexers & Demultiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal.
Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
LECTURE 4: The VHDL N-bit Adder
Floating-Point Arithmetic ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Sequential Statements
MO Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Top-level VHDL Designs
Generic Multiplexers: Parameters Discussion D2.5 Example 8.
2-to-1 Multiplexer: if Statement Discussion D2.1 Example 4.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
Structural VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T3: ALU Design.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
Finite State Machines Discussion D8.1 Example 36.
Latches and Flip-Flops Discussion D4.1 Appendix J.
Digilent Spartan 3 Board Discussion D3.3
Introduction to VHDL Multiplexers Discussion D1.1.
1 Part I: SYSTEM DESIGN. 2 Packages and Components Functions and Procedures Problem (Design & Implementation) Additional System Designs.
VHDL in 1h Martin Schöberl. AK: JVMHWVHDL2 VHDL /= C, Java,… Think in hardware All constructs run concurrent Different from software programming Forget.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
Digital Systems Design VHDL simulation of a 3 – Bit Binary Decoder with Enable by Marc A. Mackey.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
陳慶瀚 國立中央大學資工系 2014 年 4 月 16 日 A2 VHDL Combinational Logic Design.
8-Jan-16EE5141 Chapter 6 Subprograms & Packages Subprogram declaration Subprogram body Package declaration Package body Resolution function Subprogram.
9/9/2006DSD,USIT,GGSIPU1 Concurrent vs Sequential Combinational vs Sequential logic –Combinational logic is that in which the output of the circuit depends.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
Lecture 8 Review Combinational Devices –Decoder –Multiplexor (Bhasker p-81) –Shifter –Barrel Shifter (Bhasker p-303)
Lecture #18 Page 1 ECE 4110–5110 Digital System Design Lecture #18 Agenda 1.MSI Demultiplexers 2.MSI Tri-State Buffers 3.MSI Comparators Announcements.
Combinational logic circuit
Systems Architecture Lab: Introduction to VHDL
Describing Combinational Logic Using Processes
Part II A workshop by Dr. Junaid Ahmed Zubairi
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Part IV: VHDL CODING.
Combinational Circuits Using VHDL
UNIT 2: Data Flow description
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Mano and Kime Sections 7-6 – 7-8
Concurrent vs Sequential
4-Input Gates VHDL for Loops
Digital Logic with VHDL
Presentation transcript:

DISEÑO LÓGICO (DLO) Ejemplos de VHDL

Biestable D - latch library IEEE; use IEEE.std_logic_1164.all; entity DLatch is port ( GATE: in STD_LOGIC; DIN: in STD_LOGIC; DOUT: out STD_LOGIC ); end DLatch; architecture DLatch_arch of DLatch is begin process (GATE, DIN) if GATE='1' then -- habilitación del biestable activa a nivel alto DOUT <= DIN; end if; end process; end DLatch_arch;

Biestable D-latch con reset library IEEE; use IEEE.std_logic_1164.all; entity DLatchR is port ( GATE: in STD_LOGIC; RESET: in STD_LOGIC; DIN: in STD_LOGIC; DOUT: out STD_LOGIC ); end DLatchR; architecture DLatchR_arch of DLatchR is begin process (GATE, DIN, RESET) if RESET='1' then -- RESET activo a nivel alto DOUT <= '0'; elsif GATE='1' then -- habilitación del biestable activa a nivel alto DOUT <= DIN; end if; end process; end DLatchR_arch;

Biestable D- flip-flop, (sin y con reset) library IEEE; use IEEE.std_logic_1164.all; entity DFlipFlop is port ( CLK: in STD_LOGIC; DIN: in STD_LOGIC; DOUT: out STD_LOGIC ); end DFlipFlop; architecture DFlipFlop_arch of DFlipFlop is begin process (CLK) if CLK'event and CLK='1' then -- CLK rising edge DOUT <= DIN; end if; end process; end DFlipFlop_arch; library IEEE; use IEEE.std_logic_1164.all; entity DFlipFlopR is port ( CLK: in STD_LOGIC; RESET: in STD_LOGIC; DIN: in STD_LOGIC; DOUT: out STD_LOGIC ); end DFlipFlopR; architecture DFlipFlopR_arch of DFlipFlopR is begin process (CLK, RESET) if RESET='1' then -– RESET asíncrono activo alto DOUT <= '0'; elsif (CLK'event and CLK='1') then -- CLK rising edge DOUT <= DIN; end if; end process; end DFlipFlopR_arch; D con reset

Biestable D- flip-flop (Con CE, y reset síncronos library IEEE; use IEEE.std_logic_1164.all; entity DFlipFlopCE is port ( CLK: in STD_LOGIC; ENABLE: in STD_LOGIC; DIN: in STD_LOGIC; DOUT: out STD_LOGIC ); end DFlipFlopCE; architecture DFlipFlopCE_arch of DFlipFlopCE is begin process (CLK) if (CLK'event and CLK='1') then if (ENABLE='1') then DOUT <= DIN; end if; end process; end DFlipFlopCE_arch; library IEEE; use IEEE.std_logic_1164.all; entity DFlipFlopSR is port ( CLK: in STD_LOGIC; RESET: in STD_LOGIC; DIN: in STD_LOGIC; DOUT: out STD_LOGIC ); end DFlipFlopSR; architecture DFlipFlopSR_arch of DFlipFlopSR is begin process (CLK) if CLK'event and CLK='1' then --CLK rising edge if RESET='1' then --synchronous RESET active High DOUT <= '0'; else DOUT <= DIN; end if; end process; end DFlipFlopSR_arch; D con CE D con reset síncrono

Decodificador 3 a 8 library IEEE; use IEEE.std_logic_1164.all; entity deco3a8 is port ( RESET: in STD_LOGIC; CLK: in STD_LOGIC; D_IN: in STD_LOGIC_VECTOR(2 downto 0); D_OUT: out STD_LOGIC_VECTOR(7 downto 0) ); end deco3a8 ; architecture deco3a8_arch of deco3a8 is begin process(CLK, RESET, D_IN) if ( RESET = '1') then D_OUT <= "00000000"; elsif ( CLK'event and CLK ='1') then case D_IN is when "000" => D_OUT <= "00000001"; when "001" => D_OUT <= "00000010"; when "010" => D_OUT <= "00000100"; when "011" => D_OUT <= "00001000"; when "100" => D_OUT <= "00010000"; when "101" => D_OUT <= "00100000"; when "110" => D_OUT <= "01000000"; when "111" => D_OUT <= "10000000"; when others => NULL; end case; end if; end process; end deco3a8_arch;

Codificador 8 a 3 library IEEE; use IEEE.std_logic_1164.all; entity enco8a3 is port ( RESET: in STD_LOGIC; CLK: in STD_LOGIC; D_IN: in STD_LOGIC_VECTOR(7 downto 0); D_OUT: out STD_LOGIC_VECTOR(2 downto 0) ); end enco8a3 ; architecture enco8a3_arch of enco8a3 is begin process(CLK,RESET,D_IN) if ( RESET = '1') then D_OUT <= "000"; elsif ( CLK'event and CLK ='1') then case D_IN is when "00000001" => D_OUT <= "000"; when "00000010" => D_OUT <= "001"; when "00000100" => D_OUT <= "010"; when "00001000" => D_OUT <= "011"; when "00010000" => D_OUT <= "100"; when "00100000" => D_OUT <= "101"; when "01000000" => D_OUT <= "110"; when "10000000" => D_OUT <= "111"; when others => NULL; end case; end if; end process; end enco8a3_arch;

Multiplexor 4 a 1 library IEEE; use IEEE.std_logic_1164.all; entity Mux4a1 is port ( SEL: in STD_LOGIC_VECTOR(1 downto 0); A, B, C, D:in STD_LOGIC; MUX_OUT: out STD_LOGIC ); end Mux4a1; architecture Mux4a1_arch of Mux4a1 is begin process (SEL, A, B, C, D) case SEL is when "00" => MUX_OUT <= A; when "01" => MUX_OUT <= B; when "10" => MUX_OUT <= C; when "11" => MUX_OUT <= D; when others => MUX_OUT <= 'X'; end case; end process; end Mux4a1_arch;

Contador de 4 bits library IEEE; use IEEE.std_logic_1164.all; entity Contador is port ( CLK: in STD_LOGIC; RESET: in STD_LOGIC; CE, LOAD, DIR: in STD_LOGIC; DIN: in INTEGER range 0 to 15; COUNT: inout INTEGER range 0 to 15 ); end Contador; architecture Contador_arch of Contador is begin process (CLK, RESET) if RESET='1' then COUNT <= 0; elsif CLK='1' and CLK'event then if LOAD='1' then COUNT <= DIN; else if CE='1' then if DIR='1' then COUNT <= COUNT + 1; COUNT <= COUNT - 1; end if; end process; end Contador_arch;