OpenCores
URL https://opencores.org/ocsvn/fpga-cf/fpga-cf/trunk

Subversion Repositories fpga-cf

[/] [fpga-cf/] [trunk/] [hdl/] [sha1/] [dffhr.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 peteralieb
///////////////////////////////////////////////////////////////
2
// dffhr.v  version 0.1
3
// 
4
// Standard parameterizable synchronous reset D-type flipflop
5
//
6
// Paul Hartke, phartke@stanford.edu,  Copyright (c)2002
7
//
8
// The information and description contained herein is the
9
// property of Paul Hartke.
10
//
11
// Permission is granted for any reuse of this information
12
// and description as long as this copyright notice is
13
// preserved.  Modifications may be made as long as this
14
// notice is preserved.
15
// This code is made available "as is".  There is no warranty,
16
// so use it at your own risk.
17
// Documentation? "Use the source, Luke!"
18
///////////////////////////////////////////////////////////////
19
 
20
module dffhr (d, r, clk, q);
21
  parameter WIDTH = 1;
22
  input                         r;
23
  input                         clk;
24
  input         [WIDTH-1:0]      d;
25
  output        [WIDTH-1:0]      q;
26
  reg           [WIDTH-1:0]      q;
27
 
28
  always @ (posedge clk)
29
    if ( r )
30
      q <= {WIDTH{1'b0}};
31
    else
32
      q <= d;
33
 
34
endmodule // dffhr
35
 
36
 

powered by: WebSVN 2.1.0

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