📄 factor_rom_q.v
字号:
module factor_rom_Q
(
clk,
addr,
data
);
input clk;
input [5:0] addr;
output [15:0] data;
reg [15:0] data;
function [15:0] romout;
input [5:0] addr;
// 1位整数,14位小数
case (addr)
0 : romout = 16'h0000;
1 : romout = 16'hFE6E;
2 : romout = 16'hFCDD;
3 : romout = 16'hFB4B;
4 : romout = 16'hF9BB;
5 : romout = 16'hF82B;
6 : romout = 16'hF69C;
7 : romout = 16'hF50F;
8 : romout = 16'hF384;
9 : romout = 16'hF1FB;
10 : romout = 16'hF074;
11 : romout = 16'hEEEF;
12 : romout = 16'hED6C;
13 : romout = 16'hEBED;
14 : romout = 16'hEA71;
15 : romout = 16'hE8F8;
16 : romout = 16'hE783;
17 : romout = 16'hE611;
18 : romout = 16'hE4A3;
19 : romout = 16'hE33A;
20 : romout = 16'hE1D5;
21 : romout = 16'hE075;
22 : romout = 16'hDF19;
23 : romout = 16'hDDC3;
24 : romout = 16'hDC72;
25 : romout = 16'hDB26;
26 : romout = 16'hD9E1;
27 : romout = 16'hD8A1;
28 : romout = 16'hD767;
29 : romout = 16'hD633;
30 : romout = 16'hD506;
31 : romout = 16'hD3DF;
32 : romout = 16'hD2BF;
33 : romout = 16'hD1A6;
34 : romout = 16'hD095;
35 : romout = 16'hCF8A;
36 : romout = 16'hCE87;
37 : romout = 16'hCD8C;
38 : romout = 16'hCC99;
39 : romout = 16'hCBAD;
40 : romout = 16'hCACA;
41 : romout = 16'hC9EE;
42 : romout = 16'hC91B;
43 : romout = 16'hC851;
44 : romout = 16'hC78F;
45 : romout = 16'hC6D6;
46 : romout = 16'hC626;
47 : romout = 16'hC57E;
48 : romout = 16'hC4E0;
49 : romout = 16'hC44A;
50 : romout = 16'hC3BE;
51 : romout = 16'hC33B;
52 : romout = 16'hC2C2;
53 : romout = 16'hC252;
54 : romout = 16'hC1EC;
55 : romout = 16'hC18F;
56 : romout = 16'hC13B;
57 : romout = 16'hC0F2;
58 : romout = 16'hC0B2;
59 : romout = 16'hC07C;
60 : romout = 16'hC04F;
61 : romout = 16'hC02D;
62 : romout = 16'hC014;
63 : romout = 16'hC005;
default : romout = 16'hxxxx;
endcase
endfunction
always @ (posedge clk)
begin
data <= romout(addr);
end
//assign data = romout(addr);
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -