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

Subversion Repositories oc54x

[/] [oc54x/] [trunk/] [rtl/] [verilog/] [oc54_treg.v] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 rherveille
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  OpenCores54 DSP, Temporary Register (TREG)                 ////
4
////                                                             ////
5
////  Author: Richard Herveille                                  ////
6
////          richard@asics.ws                                   ////
7
////          www.asics.ws                                       ////
8
////                                                             ////
9
/////////////////////////////////////////////////////////////////////
10
////                                                             ////
11
//// Copyright (C) 2002 Richard Herveille                        ////
12
////                    richard@asics.ws                         ////
13
////                                                             ////
14
//// This source file may be used and distributed without        ////
15
//// restriction provided that this copyright statement is not   ////
16
//// removed from the file and that any derivative work contains ////
17
//// the original copyright notice and the associated disclaimer.////
18
////                                                             ////
19
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
20
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
21
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
22
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
23
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
24
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
25
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
26
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
27
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
28
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
29
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
30
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
31
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
32
////                                                             ////
33
/////////////////////////////////////////////////////////////////////
34
 
35
//
36
// NOTE: Read the pipeline information for the CMPS instruction
37
//
38
 
39
//
40
// Xilinx Virtex-E WC: 41 CLB slices @ 130MHz
41
//
42
 
43
//  CVS Log                                                                                                                  
44
//                                                                                                                                   
45
//  $Id: oc54_treg.v,v 1.1.1.1 2002-04-10 09:34:41 rherveille Exp $                                                                                                                  
46
//                                                                                                                                   
47
//  $Date: 2002-04-10 09:34:41 $                                                                                                                 
48
//  $Revision: 1.1.1.1 $                                                                                                         
49
//  $Author: rherveille $                                                                                                            
50
//  $Locker:  $                                                                                                      
51
//  $State: Exp $                                                                                                                
52
//                                                                                                                                   
53
// Change History:                                                                                                   
54
//               $Log: not supported by cvs2svn $                                                                                        
55
 
56
`include "timescale.v"
57
 
58
module oc54_treg (
59
        clk, ena,
60
        seli, we,
61
        exp, d,
62
        result
63
        );
64
 
65
//
66
// parameters
67
//
68
 
69
//
70
// inputs & outputs
71
//
72
input         clk;
73
input         ena;
74
input         seli;              // select input
75
input         we;                // store result
76
input  [ 5:0] exp;               // exponent encoder input
77
input  [15:0] d;                 // DB input
78
output [15:0] result;
79
 
80
reg [15:0] result;
81
 
82
//
83
// variables
84
//
85
 
86
//
87
// module body
88
//
89
 
90
//
91
// generate input selection
92
//
93
 
94
// result
95
always@(posedge clk)
96
        if (ena)
97
                if (we)
98
                        result <= #1 seli ? {10'h0, exp} : d;
99
endmodule

powered by: WebSVN 2.1.0

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