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

Subversion Repositories pci

[/] [pci/] [tags/] [rel_3/] [rtl/] [verilog/] [meta_flop.v] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 59 mihad
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  File name "meta_flop.v"                                     ////
4
////                                                              ////
5
////  This file is part of the "PCI bridge" project               ////
6
////  http://www.opencores.org/cores/pci/                         ////
7
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - Miha Dolenc (mihad@opencores.org)                     ////
10
////                                                              ////
11
//////////////////////////////////////////////////////////////////////
12
////                                                              ////
13
//// Copyright (C) 2001 Miha Dolenc, mihad@opencores.org          ////
14
////                                                              ////
15
//// This source file may be used and distributed without         ////
16
//// restriction provided that this copyright statement is not    ////
17
//// removed from the file and that any derivative work contains  ////
18
//// the original copyright notice and the associated disclaimer. ////
19
////                                                              ////
20
//// This source file is free software; you can redistribute it   ////
21
//// and/or modify it under the terms of the GNU Lesser General   ////
22
//// Public License as published by the Free Software Foundation; ////
23
//// either version 2.1 of the License, or (at your option) any   ////
24
//// later version.                                               ////
25
////                                                              ////
26
//// This source is distributed in the hope that it will be       ////
27
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
28
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
29
//// PURPOSE.  See the GNU Lesser General Public License for more ////
30
//// details.                                                     ////
31
////                                                              ////
32
//// You should have received a copy of the GNU Lesser General    ////
33
//// Public License along with this source; if not, download it   ////
34
//// from http://www.opencores.org/lgpl.shtml                     ////
35
////                                                              ////
36
//////////////////////////////////////////////////////////////////////
37
//
38
// CVS Revision History
39
//
40
// $Log: not supported by cvs2svn $
41
//
42
 
43
// synopsys translate_off
44
`include "timescale.v"
45
// synopsys translate_on
46
 
47
// this module is just an ordinary flip-flop - used for identifying meta stable critical flip flops - similar to synchronizer flop
48
module meta_flop
49
(
50
    rst_i,
51
    clk_i,
52
    ld_i,
53
    ld_val_i,
54
    en_i,
55
    d_i,
56
    meta_q_o
57
) ;
58
 
59
parameter p_reset_value = 0 ;
60
 
61
input   rst_i,
62
        clk_i,
63
        ld_i,
64
        ld_val_i,
65
        en_i,
66
        d_i ;
67
 
68
output  meta_q_o ;
69
reg     meta_q_o ;
70
 
71
always@(posedge rst_i or posedge clk_i)
72
begin
73
    if (rst_i)
74
        meta_q_o <= #1 p_reset_value ;
75
    else if (ld_i)
76
        meta_q_o <= #1 ld_val_i ;
77
    else if (en_i)
78
        meta_q_o <= #1 d_i ;
79
end
80
 
81
endmodule

powered by: WebSVN 2.1.0

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