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

Subversion Repositories pci

[/] [pci/] [trunk/] [rtl/] [verilog/] [pci_synchronizer_flop.v] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 111 simons
//===========================================================================
2
// $Id: pci_synchronizer_flop.v,v 1.1 2003-08-14 13:08:58 simons Exp $
3
//
4
//////////////////////////////////////////////////////////////////////
5
////                                                              ////
6
//// pci_synchronizer_flop                                        ////
7
////                                                              ////
8
//// This file is part of the general opencores effort.           ////
9
//// <http://www.opencores.org/cores/misc/>                       ////
10
////                                                              ////
11
//// Module Description:                                          ////
12
////                                                              ////
13
//// Make a rising-edge triggered flop with async reset with a    ////
14
////   distinguished name so that it can be replaced with a flop  ////
15
////   which does not make X's during simulation.                 ////
16
////                                                              ////
17
//// This flop should be used instead of a regular flop for ALL   ////
18
////   cross-clock-domain flops.  Manually instantiating this     ////
19
////   flop for all signals which must NEVER go to 1'bX during    ////
20
////   simulation will make it possible for the user to           ////
21
////   substitute a simulation model which does NOT have setup    ////
22
////   and hold checks.                                           ////
23
////                                                              ////
24
//// If a target device library has a component which is          ////
25
////   especially well suited to perform this function, it should ////
26
////   be instantiated by name in this file.  Otherwise, the      ////
27
////   behaviorial version of this module will be used.           ////
28
////                                                              ////
29
//// To Do:                                                       ////
30
//// Nothing                                                      ////
31
////                                                              ////
32
//// Author(s):                                                   ////
33
//// - anynomous                                                  ////
34
////                                                              ////
35
//////////////////////////////////////////////////////////////////////
36
////                                                              ////
37
//// Copyright (C) 2001 Authors and OPENCORES.ORG                 ////
38
////                                                              ////
39
//// This source file may be used and distributed without         ////
40
//// restriction provided that this copyright statement is not    ////
41
//// removed from the file and that any derivative work contains  ////
42
//// the original copyright notice and the associated disclaimer. ////
43
////                                                              ////
44
//// This source file is free software; you can redistribute it   ////
45
//// and/or modify it under the terms of the GNU Lesser General   ////
46
//// Public License as published by the Free Software Foundation; ////
47
//// either version 2.1 of the License, or (at your option) any   ////
48
//// later version.                                               ////
49
////                                                              ////
50
//// This source is distributed in the hope that it will be       ////
51
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
52
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
53
//// PURPOSE. See the GNU Lesser General Public License for more  ////
54
//// details.                                                     ////
55
////                                                              ////
56
//// You should have received a copy of the GNU Lesser General    ////
57
//// Public License along with this source; if not, download it   ////
58
//// from <http://www.opencores.org/lgpl.shtml>                   ////
59
////                                                              ////
60
//////////////////////////////////////////////////////////////////////
61
//
62
// CVS Revision History
63
//
64
// $Log: not supported by cvs2svn $
65
//
66
 
67
// synopsys translate_off
68
`include "timescale.v"
69
// synopsys translate_on
70
 
71
// If the vendor has a flop which is particularly good at settling out of
72
//   metastability, it should be used here.
73
module pci_synchronizer_flop (
74
  data_in, clk_out, sync_data_out, async_reset
75
);
76
parameter               width = 1 ;
77
parameter               reset_val = 0 ;
78
 
79
  input   [width-1:0]   data_in;
80
  input                 clk_out;
81
  output  [width-1:0]   sync_data_out;
82
  input                 async_reset;
83
 
84
  reg     [width-1:0]   sync_data_out;
85
 
86
  always @(posedge clk_out or posedge async_reset)
87
  begin
88
    if (async_reset == 1'b1)
89
    begin
90
      sync_data_out <= reset_val;
91
    end
92
    else
93
    begin
94
// In gate-level simulation, must only go to 1'bX if the input is 1'bX or 1'bZ.
95
// This should NEVER go to 1'bX due to setup or hold violations.
96
      sync_data_out <= data_in;
97
    end
98
  end
99
endmodule
100
 

powered by: WebSVN 2.1.0

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