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

Subversion Repositories ssp_uart

[/] [ssp_uart/] [trunk/] [RTL/] [redet.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 MichaelA
////////////////////////////////////////////////////////////////////////////////
2
//
3
//  Copyright 2006-2013 by Michael A. Morris, dba M. A. Morris & Associates
4
//
5
//  All rights reserved. The source code contained herein is publicly released
6
//  under the terms and conditions of the GNU Lesser Public License. No part of
7
//  this source code may be reproduced or transmitted in any form or by any
8
//  means, electronic or mechanical, including photocopying, recording, or any
9
//  information storage and retrieval system in violation of the license under
10
//  which the source code is released.
11
//
12
//  The source code contained herein is free; it may be redistributed and/or
13
//  modified in accordance with the terms of the GNU Lesser General Public
14
//  License as published by the Free Software Foundation; either version 2.1 of
15
//  the GNU Lesser General Public License, or any later version.
16
//
17
//  The source code contained herein is freely released WITHOUT ANY WARRANTY;
18
//  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
19
//  PARTICULAR PURPOSE. (Refer to the GNU Lesser General Public License for
20
//  more details.)
21
//
22
//  A copy of the GNU Lesser General Public License should have been received
23
//  along with the source code contained herein; if not, a copy can be obtained
24
//  by writing to:
25
//
26
//  Free Software Foundation, Inc.
27
//  51 Franklin Street, Fifth Floor
28
//  Boston, MA  02110-1301 USA
29
//
30
//  Further, no use of this source code is permitted in any form or means
31
//  without inclusion of this banner prominently in any derived works.
32
//
33
//  Michael A. Morris
34
//  Huntsville, AL
35
//
36
////////////////////////////////////////////////////////////////////////////////
37
 
38
`timescale 1ns / 1ps
39
 
40
//////////////////////////////////////////////////////////////////////////////////
41
// Company:         M. A. Morris & Associates
42
// Engineer:        Michael A. Morris 
43
// 
44
// Create Date:     11:45:29 12/31/2006 
45
// Design Name:     USB MBP HDL 
46
// Module Name:     re1ce 
47
// Project Name:    USBMBP_HDL
48
// Target Devices:  XC2S15-5TQ144
49
// Tool versions:   ISE Webpack 8.2i
50
// Description:     Multi-stage synchronizer with rising edge detection
51
//
52
// Dependencies:    None
53
//
54
// Revision History:
55
//
56
//  0.01    06L31   MAM     File Created
57
//
58
// Additional Comments: 
59
//
60
///////////////////////////////////////////////////////////////////////////////
61
 
62
module redet(rst, clk, din, pls);
63
 
64
///////////////////////////////////////////////////////////////////////////////
65
//
66
//  Module Port Declarations
67
//
68
 
69
    input   rst;
70
    input   clk;
71
    input   din;
72
    output  pls;
73
 
74
///////////////////////////////////////////////////////////////////////////////
75
//
76
//  Module Level Declarations
77
//
78
 
79
    reg [2:0] QSync;
80
 
81
///////////////////////////////////////////////////////////////////////////////
82
//
83
//  Implementation
84
//
85
 
86
always @(posedge clk or posedge rst) begin
87
    if(rst)
88
        #1 QSync <= 3'b0;
89
    else
90
        #1 QSync <= {QSync[0] & ~QSync[1], QSync[0], din};
91
end
92
assign pls = QSync[2];
93
 
94
endmodule

powered by: WebSVN 2.1.0

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