INF3430 - H131 Clock and Reset Unit (CRU) module library ieee; use ieee.std_logic_1164.all; entity cru is port ( arst : in std_logic; -- Asynch. reset.

Slides:



Advertisements
Similar presentations
arquitectura – implementação
Advertisements

INF H131 DCM Location and clock distribution.
Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
Arbitrary Waveform Discussion 5.5 Example 34.
Edge-Triggered D Flip-Flops Discussion D4.2 Example 26.
Multiplexer as a Universal Element Discussion D2.6 Example 9.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
Top-level VHDL Designs
Generic Multiplexers: Parameters Discussion D2.5 Example 8.
2-to-1 Multiplexer: if Statement Discussion D2.1 Example 4.
Logic Design Fundamentals - 3 Discussion D3.2. Logic Design Fundamentals - 3 Basic Gates Basic Combinational Circuits Basic Sequential Circuits.
Integer Square Root.
Structural VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T3: ALU Design.
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.
7-Segment Display DIO1 Board. Digilab2 – DIO1 Boards Four 7-segment displays A0A1A2A3.
Lab 2 4-Bit Adder Digilent Spartan 3 Board Lecture L2.3.
Division Lecture L6.3. Division
4-to-1 Multiplexer: case Statement Discussion D2.3 Example 6.
Digilab 7-Segment Displays Lab 4. selyInstruction name “000”true if b = a false otherwise = “001”true if b /= a false otherwise “010”true if b < a.
Finite State Machines Discussion D8.1 Example 36.
Latches and Flip-Flops Discussion D4.1 Appendix J.
Division Discussion D11.3. Division
4-Bit Binary-to-BCD Converter: case Statement
Shift Registers Discussion D5.2 Example Bit Shift Register qs(3) qs(2) qs(1) qs(0) if rising_edge(CLK) then for i in 0 to 2 loop s(i) := s(i+1);
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
1 Part V: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
UART ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
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
Introducing the Nexys 2 Board CS 332 – Operating Systems 12/04/2011 by Otto Castell-R.
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
VHDL for Finite State Machines. Sorry – no standard way One way –Use TYPE and SIGNAL ARCHITECTURE Behavior OF two_ones_fsm IS TYPE State_type IS ( A,
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
Digital System Projects
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
Controllers ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr. Filip Cuckov.
Prime Numbers Lecture L6.1 Sieve of Eratosthenes.
Registers and Counters Discussion D8.1. Logic Design Fundamentals - 3 Registers Counters Shift Registers.
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
Sequential statements (1) process
Combinational logic circuit
Lecture L5.1 Mealy and Moore Machines
Describing Combinational Logic Using Processes
Part II A workshop by Dr. Junaid Ahmed Zubairi
Part III: SYSTEM DESIGN
Hardware Description Languages
Part IV: VHDL CODING.
Dept. of Info. & Comm. Eng. Prof. Jongbok Lee
Combinational Circuits Using VHDL
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
LIBRARY IEEE; Include Libraries for standard logic data types USE IEEE.STD_LOGIC_1164.ALL; -- Entity name normally the same as file name.
Getting Started with Vivado
A Data Stack CoreGen Discussion 12.1.
VHDL Structural Architecture
A Greatest Common Divisor (GCD) Processor
CPE 528: Lecture #5 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
Fibonacci Sequence Lecture L4.1 Lab 3.
Modeling of Circuits with a Regular Structure
Fast, Asynchronous SRAM
Modeling of Circuits with Regular Structure
High-Low Guessing Game
4-Input Gates VHDL for Loops
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
Digital Logic with VHDL
(Sequential-Circuit Building Blocks)
EEL4712 Digital Design (Midterm 1 Review).
Presentation transcript:

INF H131 Clock and Reset Unit (CRU) module library ieee; use ieee.std_logic_1164.all; entity cru is port ( arst : in std_logic; -- Asynch. reset refclk : in std_logic; -- Reference clock rst : out std_logic; -- Synchronized arst_n for mclk rst_div : out std_logic; -- Synchronized arst_n for mclk_div mclk : out std_logic; -- Master clock mclk_div : out std_logic -- Master clock div. by 128. ); end cru;

INF H132 library ieee; use ieee.std_logic_1164.all; library unisim; use unisim.all; architecture str of cru is component bufg port (i : in std_logic; o : out std_logic); end component; component rstsynch is port (arst : in std_logic; -- Asynch. reset mclk : in std_logic; -- Master clock mclk_div : in std_logic; -- Master clock div. by 128 rst : out std_logic; -- Synch. reset master clock rst_div : out std_logic); -- Synch. reset div. by 128 end component rstsynch; component clkdiv is port (rst : in std_logic; -- Reset mclk : in std_logic; -- Master clock mclk_div : out std_logic); -- Master clock div. by 128 end component clkdiv; CRU module architecture 1

INF H133 signal rst_i : std_logic; signal rst_local : std_logic; signal rst_div_local : std_logic; signal rst_div_i : std_logic; signal mclk_i : std_logic; signal mclk_div_local : std_logic; signal mclk_div_i : std_logic; begin bufg_0: bufg port map ( i => refclk, o => mclk_i); rstsynch_0: rstsynch port map (arst => arst, -- [in] Asynch. reset mclk => mclk_i, -- [in] Master clock mclk_div => mclk_div_i, -- [in] Master clock div. by 128 rst => rst_local, -- [out] Synch. reset master clock rst_div => rst_div_local); -- [out] Synch. reset mclk div. by 128 bufg_1: bufg port map ( i => rst_local, o => rst_i); bufg_2: bufg port map ( i => rst_div_local, o => rst_div_i); CRU module architecture 2

INF H134 clkdiv_0: clkdiv port map (rst => rst_i, -- [in] Reset mclk => mclk_i, -- [in] Master clock mclk_div => mclk_div_local); -- [out] Master clock div. by 128 bufg_3: bufg port map ( i => mclk_div_local, o => mclk_div_i); -- Concurrent statements rst <= rst_i; rst_div <= rst_div_i; mclk <= mclk_i; mclk_div <= mclk_div_i; end str; CRU module architecture 3

INF H135 library ieee; use ieee.std_logic_1164.all; entity rstsynch is port ( arst : in std_logic; -- Asynch. reset mclk : in std_logic; -- Master clock mclk_div : in std_logic; -- Master clock div. by 128 rst : out std_logic; -- Synch. reset master clock rst_div : out std_logic -- Synch. reset div. by 128 ); end rstsynch; Reset synch. module entity

INF H136 library ieee; use ieee.std_logic_1164.all; architecture rtl of rstsynch is signal rst_s1, rst_s2 : std_logic; signal rst_div_s1, rst_div_s2 : std_logic; begin P_RST_0 : process(arst, mclk) begin if arst='1' then rst_s1 <= '1'; rst_s2 <= '1'; elsif rising_edge(mclk) then rst_s1 <= '0'; rst_s2 <= rst_s1; end if; end process P_RST_0; Reset synch. module architecture P_RST_1 : process(arst, mclk_div) begin if arst='1' then rst_div_s1 <= '1'; rst_div_s2 <= '1'; elsif rising_edge(mclk_div) then rst_div_s1 <= '0'; rst_div_s2 <= rst_div_s1; end if; end process P_RST_1; rst <= rst_s2; rst_div <= rst_div_s2; end rtl;

INF H137 library ieee; use ieee.std_logic_1164.all; entity clkdiv is port ( rst : in std_logic; -- Reset mclk : in std_logic; -- Master clock mclk_div : out std_logic -- Master clock div. by 128 ); end clkdiv; Clock divide module entity

INF H138 Clock divide module architecture library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; architecture rtl of clkdiv is signal mclk_cnt : unsigned(6 downto 0); begin P_CLKDIV: process(rst, mclk) begin if rst='1' then mclk_cnt '0'); elsif rising_edge(mclk) then mclk_cnt <= mclk_cnt + 1; end if; end process P_CLKDIV ; mclk_div <= std_logic(mclk_cnt(6)); end rtl;