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

Subversion Repositories sgmii

[/] [sgmii/] [trunk/] [sim/] [BFMs/] [SGMII_altera/] [triple_speed_ethernet-library/] [altera_tse_reset_synchronizer.v] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 jefflieu
// (C) 2001-2010 Altera Corporation. All rights reserved.
2
// Your use of Altera Corporation's design tools, logic functions and other 
3
// software and tools, and its AMPP partner logic functions, and any output 
4
// files any of the foregoing (including device programming or simulation 
5
// files), and any associated documentation or information are expressly subject 
6
// to the terms and conditions of the Altera Program License Subscription 
7
// Agreement, Altera MegaCore Function License Agreement, or other applicable 
8
// license agreement, including, without limitation, that your use is for the 
9
// sole purpose of programming logic devices manufactured by Altera and sold by 
10
// Altera or its authorized distributors.  Please refer to the applicable 
11
// agreement for further details.
12
 
13
// $Id: //acds/main/ip/merlin/altera_reset_controller/altera_tse_reset_synchronizer.v#7 $
14
// $Revision: #7 $
15
// $Date: 2010/04/27 $
16
// $Author: jyeap $
17
 
18
// -----------------------------------------------
19
// Reset Synchronizer
20
// -----------------------------------------------
21
`timescale 1ns / 1ns
22
 
23
module altera_tse_reset_synchronizer
24
#(
25
    parameter ASYNC_RESET = 1,
26
    parameter DEPTH       = 2
27
)
28
(
29
    input   reset_in /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"R101,R105\"" */,
30
 
31
    input   clk,
32
    output  reset_out
33
);
34
 
35
    // -----------------------------------------------
36
    // Synchronizer register chain. We cannot reuse the
37
    // standard synchronizer in this implementation 
38
    // because our timing constraints are different.
39
    //
40
    // Instead of cutting the timing path to the d-input 
41
    // on the first flop we need to cut the aclr input.
42
    // -----------------------------------------------
43
    (* ALTERA_ATTRIBUTE = "-name SDC_STATEMENT \" set_false_path -to [get_pins -compatibility_mode -nocase *altera_tse_reset_synchronizer_chain*|aclr]; set_false_path -to [get_pins -compatibility_mode -nocase *altera_tse_reset_synchronizer_chain*|clrn] \"" *) (*preserve*) reg [DEPTH-1:0] altera_tse_reset_synchronizer_chain;
44
 
45
    generate if (ASYNC_RESET) begin
46
 
47
        // -----------------------------------------------
48
        // Assert asynchronously, deassert synchronously.
49
        // -----------------------------------------------
50
        always @(posedge clk or posedge reset_in) begin
51
            if (reset_in) begin
52
                altera_tse_reset_synchronizer_chain <= {DEPTH{1'b1}};
53
            end
54
            else begin
55
                altera_tse_reset_synchronizer_chain[DEPTH-2:0] <= altera_tse_reset_synchronizer_chain[DEPTH-1:1];
56
                altera_tse_reset_synchronizer_chain[DEPTH-1] <= 0;
57
            end
58
        end
59
 
60
        assign reset_out = altera_tse_reset_synchronizer_chain[0];
61
 
62
    end else begin
63
 
64
        // -----------------------------------------------
65
        // Assert synchronously, deassert synchronously.
66
        // -----------------------------------------------
67
        always @(posedge clk) begin
68
            altera_tse_reset_synchronizer_chain[DEPTH-2:0] <= altera_tse_reset_synchronizer_chain[DEPTH-1:1];
69
            altera_tse_reset_synchronizer_chain[DEPTH-1] <= reset_in;
70
        end
71
 
72
        assign reset_out = altera_tse_reset_synchronizer_chain[0];
73
 
74
    end
75
    endgenerate
76
 
77
endmodule

powered by: WebSVN 2.1.0

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