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

Subversion Repositories dma_ahb

[/] [dma_ahb/] [trunk/] [src/] [dma_ahb64/] [prgen_min3.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 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 2 eyalhoc
//---------------------------------------------------------
30
//-- File generated by RobustVerilog parser
31
//-- Version: 1.0
32
//-- Invoked Fri Mar 25 23:33:02 2011
33
//--
34
//-- Source file: prgen_min3.v
35
//---------------------------------------------------------
36
 
37
 
38
 
39
module prgen_min3(clk,reset,a,b,c,min);
40
 
41
   parameter             WIDTH = 8;
42
 
43
   input          clk;
44
   input          reset;
45
   input [WIDTH-1:0]      a;
46
   input [WIDTH-1:0]      b;
47
   input [WIDTH-1:0]      c;
48
 
49
   output [WIDTH-1:0]      min;
50
 
51
   wire [WIDTH-1:0]      min_ab_pre;
52
   reg [WIDTH-1:0]      min_ab;
53
   reg [WIDTH-1:0]      min_c;
54
 
55
 
56
   prgen_min2 #(WIDTH) min2_ab(
57
                 .a(a),
58
                 .b(b),
59
                 .min(min_ab_pre)
60
                 );
61
 
62
   prgen_min2 #(WIDTH) min2_abc(
63
                  .a(min_ab),
64
                  .b(min_c),
65
                  .min(min)
66
                  );
67
 
68
   always @(posedge clk or posedge reset)
69
     if (reset)
70
       begin
71
      min_ab <= #1 {WIDTH{1'b0}};
72
      min_c  <= #1 {WIDTH{1'b0}};
73
       end
74
     else
75
       begin
76
      min_ab <= #1 min_ab_pre;
77
      min_c  <= #1 c;
78
       end
79
 
80
endmodule
81
 
82
 
83
 
84
 
85
 

powered by: WebSVN 2.1.0

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