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

Subversion Repositories sd_mmc_emulator

[/] [sd_mmc_emulator/] [trunk/] [rtl/] [trig_filter.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jclaytons
//------------------------------------------------------------------------------
2
// (C) Copyright 2013, NXP Semiconductors
3
//     All rights reserved.
4
//
5
// PROPRIETARY INFORMATION
6
//
7
// The information contained in this file is the property of NXP Semiconductors.
8
// Except as specifically authorized in writing by NXP, the holder of this
9
// file: (1) shall keep all information contained herein confidential and
10
// shall protect same in whole or in part from disclosure and dissemination to
11
// all third parties and (2) shall use same for operation and maintenance
12
// purposes only.
13
// -----------------------------------------------------------------------------
14
// File name:           trig_filter.v
15
// Project:             Ctrl4 extended digital, passthru image
16
// Author:              Roger Williams <roger.williams@nxp.com> (RAW)
17
// -----------------------------------------------------------------------------
18
// 1.07.2  2014-09-14 (RAW) Pass in N
19
// 0.01.0  2013-09-30 (RAW) Initial entry
20
//------------------------------------------------------------------------------
21
 
22
`include "timescale.v"
23
 
24
module trig_filter
25
  (
26
   output reg           O,
27
   input wire           I,
28
   input wire           C,
29
   input wire [15:0]     N
30
   );
31
 
32
   reg [15:0]            tf;
33
 
34
   always @(posedge C)
35
      if (~I) begin
36
         O <= 0;
37
         tf <= 0;
38
      end
39
      else if (tf == N)
40
         O <= 1;
41
      else
42
         tf <= tf + 1;
43
 
44
endmodule

powered by: WebSVN 2.1.0

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