w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
cdc_signal_s1_as.vhd
Go to the documentation of this file.
1-- $Id: cdc_signal_s1_as.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2016- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: cdc_signal_s1_as - syn
7-- Description: clock domain crossing for a signal, 2 stage, asyn input
8--
9-- Dependencies: -
10-- Test bench: -
11-- Target Devices: generic
12-- Tool versions: viv 2016.2; ghdl 0.33
13-- Revision History:
14-- Date Rev Version Comment
15-- 2016-06-10 774 1.0 Initial version (copy of cdc_signal_s1)
16--
17------------------------------------------------------------------------------
18-- Logic is identical to cdc_signal_s1 !
19-- but no scoped xdc with max_delay for input associated
20--
21library ieee;
22use ieee.std_logic_1164.all;
23
24use work.slvtypes.all;
25
26entity cdc_signal_s1_as is -- cdc for signal (2 stage), asyn input
27 generic (
28 INIT : slbit := '0'); -- initial state
29 port (
30 CLKO : in slbit; -- O|output clock
31 DI : in slbit; -- I|input data
32 DO : out slbit -- O|output data
33 );
34end entity cdc_signal_s1_as;
35
36
37architecture syn of cdc_signal_s1_as is
38
39 signal R_DO_S0 : slbit := INIT;
40 signal R_DO_S1 : slbit := INIT;
41
42 attribute ASYNC_REG: string;
43
44 attribute ASYNC_REG of R_DO_S0 : signal is "true";
45 attribute ASYNC_REG of R_DO_S1 : signal is "true";
46
47begin
48
49 proc_regs: process (CLKO)
50 begin
51 if rising_edge(CLKO) then
52 R_DO_S0 <= DI; -- synch 0: CLKI->CLKO
53 R_DO_S1 <= R_DO_S0; -- synch 1: CLKO
54 end if;
55 end process proc_regs;
56
57 DO <= R_DO_S1;
58
59end syn;
std_logic slbit
Definition: slvtypes.vhd:30