mirror of
https://github.com/jhshi/openofdm.git
synced 2025-03-01 03:26:09 +00:00
22 lines
405 B
Coq
22 lines
405 B
Coq
|
`include "common_defs.v"
|
||
|
|
||
|
/*
|
||
|
* Output: atan(addr/1024.0)*2048
|
||
|
* Delay: 1 cycle
|
||
|
*/
|
||
|
module atan_lut (
|
||
|
input clka,
|
||
|
input [`ATAN_LUT_LEN_SHIFT-1:0] addra,
|
||
|
output reg [`ATAN_LUT_SCALE_SHIFT-1:0] douta
|
||
|
);
|
||
|
|
||
|
reg [`ATAN_LUT_SCALE_SHIFT-1:0] ram [0:(1<<`ATAN_LUT_LEN_SHIFT)-1];
|
||
|
initial begin
|
||
|
$readmemb("./atan_lut.mif", ram);
|
||
|
end
|
||
|
|
||
|
always @(posedge clka) begin
|
||
|
douta <= ram[addra];
|
||
|
end
|
||
|
endmodule
|