OpenCores
URL https://opencores.org/ocsvn/igor/igor/trunk

Subversion Repositories igor

[/] [igor/] [trunk/] [processor/] [pl/] [synchronizer.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 atypic
library IEEE;
2
use ieee.std_logic_1164.all;
3
use work.whisk_constants.all;
4
 
5
-- THANKS TO SINTEF / DAG ROGNLIEN!
6
-- --------------------------------
7
-- This code is based on work by Sintef / Dag Rognlien,
8
-- and shall not be reused under any circumstances without
9
-- their permission.
10
 
11
entity synchronizer is
12
        port (
13
                clk : in std_logic;
14
                ws : in std_logic;
15
                wso : out std_logic
16
        );
17
 
18
    attribute KEEP_HIERARCHY : string;
19
    attribute KEEP_HIERARCHY of synchronizer: entity is "yes";
20
    -- Do not create SRL16 for synchrnoization (not real FLIP-FLOPS)
21
    attribute shreg_extract : string;
22
    attribute shreg_extract of synchronizer: entity is "no";
23
    -- Do not move logic in between the FLIP-FLOPS
24
    attribute register_balancing : string;
25
    attribute register_balancing of synchronizer: entity is "no";
26
    -- Do not duplicate O register 
27
    attribute register_duplication : string;
28
    attribute register_duplication of synchronizer : entity is "no";
29
 
30
end entity;
31
 
32
architecture behav of synchronizer is
33
begin
34
        clock1 : process(clk)
35
                variable wsflop : std_logic;
36
                variable syncflop : std_logic;
37
        begin
38
                if rising_edge(clk) then
39
                        wso <= wsflop;
40
                        wsflop := ws;
41
                end if;
42
        end process;
43
end architecture;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.