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

Subversion Repositories wf3d

[/] [wf3d/] [trunk/] [rtl/] [core/] [fm_3d_frcp_rom.v] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 specular
//=======================================================================
2
// Project Monophony
3
//   Wire-Frame 3D Graphics Accelerator IP Core
4
//
5
// File:
6
//   fm_3d_core.v
7
//
8
// Abstract:
9
//   22-bit floating point 1/x rom table
10
//
11
// Author:
12 9 specular
//   Kenji Ishimaru (info.info.wf3d@gmail.com)
13 2 specular
//
14
//======================================================================
15
//
16
// Copyright (c) 2015, Kenji Ishimaru
17
// All rights reserved.
18
//
19
// Redistribution and use in source and binary forms, with or without
20
// modification, are permitted provided that the following conditions are met:
21
//
22
//  -Redistributions of source code must retain the above copyright notice,
23
//   this list of conditions and the following disclaimer.
24
//  -Redistributions in binary form must reproduce the above copyright notice,
25
//   this list of conditions and the following disclaimer in the documentation
26
//   and/or other materials provided with the distribution.
27
//
28
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
30
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
32
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
33
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
34
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
35
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
36
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
37
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
38
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
//
40
// Revision History
41
 
42
module fm_3d_frcp_rom (
43
  clk_core,
44
  i_a,
45
  o_c
46
);
47
 
48
////////////////////////////
49
// I/O definition
50
////////////////////////////
51
    input         clk_core;
52
    input  [6:0]  i_a;
53
    output [31:0] o_c;
54
 
55
////////////////////////////
56
// reg
57
////////////////////////////
58
    reg    [31:0] r_c;
59
////////////////////////////
60
// assign
61
////////////////////////////
62
    assign o_c = r_c;
63
///////////////////////////////////////////
64
//  always statement
65
///////////////////////////////////////////
66
    always @(posedge clk_core) begin
67
        case (i_a)
68
            7'd0:   r_c <= 32'h800001fc;
69
            7'd1:   r_c <= 32'h7f0101f4;
70
            7'd2:   r_c <= 32'h7e0701ec;
71
            7'd3:   r_c <= 32'h7d1101e5;
72
            7'd4:   r_c <= 32'h7c1f01dd;
73
            7'd5:   r_c <= 32'h7b3001d6;
74
            7'd6:   r_c <= 32'h7a4401cf;
75
            7'd7:   r_c <= 32'h795c01c8;
76
            7'd8:   r_c <= 32'h787801c2;
77
            7'd9:   r_c <= 32'h779701bb;
78
            7'd10:  r_c <= 32'h76b901b5;
79
            7'd11:  r_c <= 32'h75de01af;
80
            7'd12:  r_c <= 32'h750701a8;
81
            7'd13:  r_c <= 32'h743201a2;
82
            7'd14:  r_c <= 32'h7361019d;
83
            7'd15:  r_c <= 32'h72920197;
84
            7'd16:  r_c <= 32'h71c70191;
85
            7'd17:  r_c <= 32'h70fe018c;
86
            7'd18:  r_c <= 32'h70380186;
87
            7'd19:  r_c <= 32'h6f740181;
88
            7'd20:  r_c <= 32'h6eb3017c;
89
            7'd21:  r_c <= 32'h6df50177;
90
            7'd22:  r_c <= 32'h6d3a0172;
91
            7'd23:  r_c <= 32'h6c80016d;
92
            7'd24:  r_c <= 32'h6bca0168;
93
            7'd25:  r_c <= 32'h6b150164;
94
            7'd26:  r_c <= 32'h6a63015f;
95
            7'd27:  r_c <= 32'h69b4015a;
96
            7'd28:  r_c <= 32'h69060156;
97
            7'd29:  r_c <= 32'h685b0152;
98
            7'd30:  r_c <= 32'h67b2014d;
99
            7'd31:  r_c <= 32'h670b0149;
100
            7'd32:  r_c <= 32'h66660145;
101
            7'd33:  r_c <= 32'h65c30141;
102
            7'd34:  r_c <= 32'h6522013d;
103
            7'd35:  r_c <= 32'h64830139;
104
            7'd36:  r_c <= 32'h63e70136;
105
            7'd37:  r_c <= 32'h634c0132;
106
            7'd38:  r_c <= 32'h62b2012e;
107
            7'd39:  r_c <= 32'h621b012a;
108
            7'd40:  r_c <= 32'h61860127;
109
            7'd41:  r_c <= 32'h60f20123;
110
            7'd42:  r_c <= 32'h60600120;
111
            7'd43:  r_c <= 32'h5fd0011d;
112
            7'd44:  r_c <= 32'h5f410119;
113
            7'd45:  r_c <= 32'h5eb40116;
114
            7'd46:  r_c <= 32'h5e290113;
115
            7'd47:  r_c <= 32'h5d9f0110;
116
            7'd48:  r_c <= 32'h5d17010d;
117
            7'd49:  r_c <= 32'h5c90010a;
118
            7'd50:  r_c <= 32'h5c0b0107;
119
            7'd51:  r_c <= 32'h5b870104;
120
            7'd52:  r_c <= 32'h5b050101;
121
            7'd53:  r_c <= 32'h5a8400fe;
122
            7'd54:  r_c <= 32'h5a0500fb;
123
            7'd55:  r_c <= 32'h598700f9;
124
            7'd56:  r_c <= 32'h590b00f6;
125
            7'd57:  r_c <= 32'h588f00f3;
126
            7'd58:  r_c <= 32'h581600f1;
127
            7'd59:  r_c <= 32'h579d00ee;
128
            7'd60:  r_c <= 32'h572600ec;
129
            7'd61:  r_c <= 32'h56b000e9;
130
            7'd62:  r_c <= 32'h563b00e7;
131
            7'd63:  r_c <= 32'h55c700e4;
132
            7'd64:  r_c <= 32'h555500e2;
133
            7'd65:  r_c <= 32'h54e400e0;
134
            7'd66:  r_c <= 32'h547400dd;
135
            7'd67:  r_c <= 32'h540500db;
136
            7'd68:  r_c <= 32'h539700d9;
137
            7'd69:  r_c <= 32'h532a00d7;
138
            7'd70:  r_c <= 32'h52bf00d4;
139
            7'd71:  r_c <= 32'h525400d2;
140
            7'd72:  r_c <= 32'h51eb00d0;
141
            7'd73:  r_c <= 32'h518300ce;
142
            7'd74:  r_c <= 32'h511b00cc;
143
            7'd75:  r_c <= 32'h50b500ca;
144
            7'd76:  r_c <= 32'h505000c8;
145
            7'd77:  r_c <= 32'h4fec00c6;
146
            7'd78:  r_c <= 32'h4f8800c4;
147
            7'd79:  r_c <= 32'h4f2600c2;
148
            7'd80:  r_c <= 32'h4ec400c0;
149
            7'd81:  r_c <= 32'h4e6400bf;
150
            7'd82:  r_c <= 32'h4e0400bd;
151
            7'd83:  r_c <= 32'h4da600bb;
152
            7'd84:  r_c <= 32'h4d4800b9;
153
            7'd85:  r_c <= 32'h4ceb00b8;
154
            7'd86:  r_c <= 32'h4c8f00b6;
155
            7'd87:  r_c <= 32'h4c3400b4;
156
            7'd88:  r_c <= 32'h4bda00b2;
157
            7'd89:  r_c <= 32'h4b8000b1;
158
            7'd90:  r_c <= 32'h4b2700af;
159
            7'd91:  r_c <= 32'h4ad000ae;
160
            7'd92:  r_c <= 32'h4a7900ac;
161
            7'd93:  r_c <= 32'h4a2200aa;
162
            7'd94:  r_c <= 32'h49cd00a9;
163
            7'd95:  r_c <= 32'h497800a7;
164
            7'd96:  r_c <= 32'h492400a6;
165
            7'd97:  r_c <= 32'h48d100a4;
166
            7'd98:  r_c <= 32'h487e00a3;
167
            7'd99:  r_c <= 32'h482d00a2;
168
            7'd100: r_c <= 32'h47dc00a0;
169
            7'd101: r_c <= 32'h478b009f;
170
            7'd102: r_c <= 32'h473c009d;
171
            7'd103: r_c <= 32'h46ed009c;
172
            7'd104: r_c <= 32'h469e009b;
173
            7'd105: r_c <= 32'h46510099;
174
            7'd106: r_c <= 32'h46040098;
175
            7'd107: r_c <= 32'h45b80097;
176
            7'd108: r_c <= 32'h456c0095;
177
            7'd109: r_c <= 32'h45210094;
178
            7'd110: r_c <= 32'h44d70093;
179
            7'd111: r_c <= 32'h448d0092;
180
            7'd112: r_c <= 32'h44440091;
181
            7'd113: r_c <= 32'h43fb008f;
182
            7'd114: r_c <= 32'h43b3008e;
183
            7'd115: r_c <= 32'h436c008d;
184
            7'd116: r_c <= 32'h4325008c;
185
            7'd117: r_c <= 32'h42df008b;
186
            7'd118: r_c <= 32'h429a008a;
187
            7'd119: r_c <= 32'h42540088;
188
            7'd120: r_c <= 32'h42100087;
189
            7'd121: r_c <= 32'h41cc0086;
190
            7'd122: r_c <= 32'h41890085;
191
            7'd123: r_c <= 32'h41460084;
192
            7'd124: r_c <= 32'h41040083;
193
            7'd125: r_c <= 32'h40c20082;
194
            7'd126: r_c <= 32'h40810081;
195
            7'd127: r_c <= 32'h40400080;
196
            default: r_c <= 32'h0;
197
        endcase
198
    end
199
 
200
 
201
endmodule

powered by: WebSVN 2.1.0

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