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

Subversion Repositories robust_fir

[/] [robust_fir/] [trunk/] [src/] [gen/] [prgen_delayN.v] - Blame information for rev 16

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 eyalhoc
<##//////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  Author: Eyal Hochberg                                      ////
4
////          eyal@provartec.com                                 ////
5
////                                                             ////
6
////  Downloaded from: http://www.opencores.org                  ////
7
/////////////////////////////////////////////////////////////////////
8
////                                                             ////
9
//// Copyright (C) 2010 Provartec LTD                            ////
10
//// www.provartec.com                                           ////
11
//// info@provartec.com                                          ////
12
////                                                             ////
13
//// This source file may be used and distributed without        ////
14
//// restriction provided that this copyright statement is not   ////
15
//// removed from the file and that any derivative work contains ////
16
//// the original copyright notice and the associated disclaimer.////
17
////                                                             ////
18
//// This source file is free software; you can redistribute it  ////
19
//// and/or modify it under the terms of the GNU Lesser General  ////
20
//// Public License as published by the Free Software Foundation.////
21
////                                                             ////
22
//// This source is distributed in the hope that it will be      ////
23
//// useful, but WITHOUT ANY WARRANTY; without even the implied  ////
24
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR     ////
25
//// PURPOSE.  See the GNU Lesser General Public License for more////
26
//// details. http://www.gnu.org/licenses/lgpl.html              ////
27
////                                                             ////
28
//////////////////////////////////////////////////////////////////##>
29 5 eyalhoc
 
30 2 eyalhoc
 
31
OUTFILE prgen_NAME.v
32
 
33 13 eyalhoc
STARTDEF
34
IFDEF CLKEN
35
SWAP NAME delayDELAY_en
36
ELSE CLKEN
37
SWAP NAME delayDELAY
38
ENDIF CLKEN
39
ENDDEF
40
 
41
ITER DX DELAY
42
 
43 2 eyalhoc
module prgen_NAME(PORTS);
44
   parameter          WIDTH = 1;
45
 
46
   input                      clk;
47
   input                      reset;
48
IF CLKEN  input                       clken;
49
 
50
   input [WIDTH-1:0]  din;
51
IFDEF PARALLEL
52
   output [WIDTH*DELAY-1:0] dout;
53
ELSE PARALLEL
54
   output [WIDTH-1:0] dout;
55
ENDIF PARALLEL
56
 
57
 
58
   wire [WIDTH-1:0]   din_d0;
59
   reg [WIDTH-1:0]         din_dEXPR(DX+1);
60
 
61
   assign din_d0 = din;
62
 
63
   always @(posedge clk or posedge reset)
64
     if (reset)
65
           begin
66
         din_dEXPR(DX+1) <= #FFD {WIDTH{1'b0}};
67
           end
68
     else
69
IFDEF CLKEN
70
         STOMP NEWLINE
71
         if (clken)
72
ENDIF CLKEN
73
           begin
74
         din_dEXPR(DX+1) <= #FFD din_dDX;
75
           end
76
 
77
 
78
IFDEF PARALLEL
79
  assign              dout = {CONCAT.REV(din_dDX ,)};
80
ELSE PARALLEL
81
   assign                     dout = din_dDELAY;
82
ENDIF PARALLEL
83
 
84
 
85
endmodule
86
 
87
 
88
 
89
 
90
 
91
 

powered by: WebSVN 2.1.0

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