Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
x393
Commits
d3f2d87c
Commit
d3f2d87c
authored
Dec 20, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more debugging
parent
75477a7c
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
735 additions
and
134 deletions
+735
-134
dsp_ma_preadd.v
dsp/dsp_ma_preadd.v
+4
-5
dsp_ma_preadd_c_dbg.v
dsp/dsp_ma_preadd_c_dbg.v
+260
-0
mclt16x16.v
dsp/mclt16x16.v
+42
-21
mclt_test_01.tf
dsp/mclt_test_01.tf
+11
-4
phase_rotator.v
dsp/phase_rotator.v
+33
-26
clt_dtt_in_00_2_x1489_y951.dat
input_data/clt_dtt_in_00_2_x1489_y951.dat
+32
-32
clt_dtt_out_00_2_x1489_y951.dat
input_data/clt_dtt_out_00_2_x1489_y951.dat
+34
-32
mclt_test_01.sav
mclt_test_01.sav
+319
-14
No files found.
dsp/dsp_ma_preadd.v
View file @
d3f2d87c
...
...
@@ -42,8 +42,7 @@ module dsp_ma_preadd #(
parameter
B_WIDTH
=
18
,
parameter
A_WIDTH
=
25
,
parameter
P_WIDTH
=
48
,
parameter
A_INPUT
=
"DIRECT"
,
// other: "CASCADE"
parameter
B_INPUT
=
"DIRECT"
)
// other: "CASCADE"
parameter
BREG
=
1
)
// means number in series, so "2" always reads the second
(
input
clk
,
input
rst
,
...
...
@@ -89,10 +88,10 @@ module dsp_ma_preadd #(
.
ALUMODEREG
(
1
)
,
.
AREG
(
1
)
,
// 2), // (1) - means number in series, so "2" always reads the second
.
AUTORESET_PATDET
(
"NO_RESET"
)
,
.
A_INPUT
(
A_INPUT
)
,
// "DIRECT", "CASCADE"
.
A_INPUT
(
"DIRECT"
)
,
// "DIRECT", "CASCADE"
.
BCASCREG
(
1
)
,
.
BREG
(
1
)
,
// (2), // (1) - means number in series, so "2" always reads the second
.
B_INPUT
(
B_INPUT
)
,
// "DIRECT"),
.
BREG
(
BREG
)
,
// (2), // (1) - means number in series, so "2" always reads the second
.
B_INPUT
(
"DIRECT"
)
,
// "DIRECT"),
.
CARRYINREG
(
1
)
,
.
CARRYINSELREG
(
1
)
,
.
CREG
(
0
)
,
//(1),
...
...
dsp/dsp_ma_preadd_c_dbg.v
0 → 100644
View file @
d3f2d87c
This diff is collapsed.
Click to expand it.
dsp/mclt16x16.v
View file @
d3f2d87c
...
...
@@ -76,11 +76,19 @@ module mclt16x16#(
output
dv
,
//!< output data valid
output
signed
[
OUT_WIDTH
-
1
:
0
]
dout
//!<frequency domain data output
)
;
localparam
DTT_OUT_DELAY
=
191
;
// start output to sin/cos rotator, ~=3/4 of 256
localparam
DTT_IN_DELAY
=
195
;
// fune tune? ~= 3/4 of 256
// maybe use small FIFO memory?
reg
[
SHIFT_WIDTH
-
1
:
0
]
x_shft_r
;
// registered at start
reg
[
SHIFT_WIDTH
-
1
:
0
]
y_shft_r
;
// registered at start
reg
[
SHIFT_WIDTH
-
1
:
0
]
x_shft_r2
;
// use for the window calculation
reg
[
SHIFT_WIDTH
-
1
:
0
]
y_shft_r2
;
// use for the window calculation
reg
[
SHIFT_WIDTH
-
1
:
0
]
x_shft_r3
;
// registered @ start_dtt
reg
[
SHIFT_WIDTH
-
1
:
0
]
y_shft_r3
;
// registered @ start_dtt
reg
[
SHIFT_WIDTH
-
1
:
0
]
x_shft_r4
;
// registered @ dtt_start_first_fill
reg
[
SHIFT_WIDTH
-
1
:
0
]
y_shft_r4
;
// registered @ dtt_start_first_fill
reg
[
SHIFT_WIDTH
-
1
:
0
]
x_shft_r
;
reg
[
SHIFT_WIDTH
-
1
:
0
]
y_shft_r
;
reg
[
SHIFT_WIDTH
-
1
:
0
]
x_shft_r2
;
reg
[
SHIFT_WIDTH
-
1
:
0
]
y_shft_r2
;
reg
[
3
:
0
]
bayer_r
;
reg
[
3
:
0
]
bayer_d
;
// same latency as mpix_a_w
reg
[
7
:
0
]
in_cntr
;
// input counter
...
...
@@ -139,7 +147,7 @@ module mclt16x16#(
wire
var_last
;
// next cycle the data_xx_r will have data (in_busy[14], ...)
// reading/converting DTT
wire
start_dtt
=
dtt_in_cntr
==
196
;
// fune tune? ~= 3/4 of 256
reg
start_dtt
;
//
= dtt_in_cntr == 196; // fune tune? ~= 3/4 of 256
reg
[
7
:
0
]
dtt_r_cntr
;
//
reg
dtt_r_page
;
reg
dtt_r_re
;
...
...
@@ -166,13 +174,21 @@ module mclt16x16#(
bayer_r
<=
bayer
;
end
start_r
<=
{
start_r
[
0
]
,
start
};
// if (in_busy[2]) begin // same latency as mpix_a_w
if
(
start_r
[
1
])
begin
// same latency as mpix_a_w
x_shft_r2
<=
x_shft_r
;
x_shft_r2
<=
x_shft_r
;
// use for the window
y_shft_r2
<=
y_shft_r
;
end
/// if (in_busy[2]) bayer_d <= bayer_r;
if
(
start_dtt
)
begin
x_shft_r3
<=
x_shft_r2
;
y_shft_r3
<=
y_shft_r2
;
end
if
(
dtt_start_first_fill
)
begin
x_shft_r4
<=
x_shft_r3
;
y_shft_r4
<=
y_shft_r3
;
end
if
(
in_busy
[
1
])
bayer_d
<=
bayer_r
;
if
(
rst
)
in_busy
<=
0
;
...
...
@@ -190,11 +206,7 @@ module mclt16x16#(
if
(
in_busy
[
9
])
pix_wnd_r
<=
mpixel_d_r
*
window_r
;
// 1 MSB is extra
// pix_wnd_r2 - positive with 2 extra zeros, max value 0x3fff60
/// if (in_busy[10]) pix_wnd_r2 <= {2'b00,pix_wnd_r[PIXEL_WIDTH + WND_WIDTH - 2 -: DTT_IN_WIDTH - 2]};
if
(
in_busy
[
10
])
begin
/// if (in_busy[9]) begin
/// pix_wnd_r2 <= {2'b0,pix_wnd_r[PIXEL_WIDTH + WND_WIDTH - 2 -: DTT_IN_WIDTH - 2]};
// pix_wnd_r2_old <= {{2{pix_wnd_r[PIXEL_WIDTH + WND_WIDTH - 2]}},pix_wnd_r[PIXEL_WIDTH + WND_WIDTH - 2 -: DTT_IN_WIDTH - 2]};
pix_wnd_r2
<=
{{
2
{
pix_wnd_r2_w
[
DTT_IN_WIDTH
-
3
]
}},
pix_wnd_r2_w
};
mpix_use_r
<=
mpix_use_d
;
var_first_r
<=
var_first_d
;
...
...
@@ -222,6 +234,9 @@ module mclt16x16#(
if
(
!
in_busy
[
16
])
dtt_in_cntr
<=
0
;
else
dtt_in_cntr
<=
dtt_in_cntr
+
1
;
start_dtt
<=
dtt_in_cntr
==
DTT_IN_DELAY
;
if
(
rst
)
dtt_in_page
<=
0
;
else
if
(
&
dtt_in_cntr
)
dtt_in_page
<=
dtt_in_page
+
1
;
...
...
@@ -435,15 +450,17 @@ D11 - negate for mode 3 (SS)
reg
[
4
:
0
]
dtt_out_ram_cntr
;
reg
[
4
:
0
]
dtt_out_ram_wah
;
wire
dtt_start_fill
;
// some data available in DTT output buffer, OK to start consecutive readout
reg
dtt_start_first_fill
;
reg
dtt_start_out
;
// start read out to sin/cos rotator
// frequency domain, high address bit - page, 2 next - mode, 6 LSBs - transposed FD data (vertical first)
wire
[
8
:
0
]
dtt_out_ram_wa
=
{
dtt_out_ram_wah
,
dtt_out_wa16
};
localparam
DTT_OUT_DELAY
=
192
;
// start output to sin/cos rotator, ~=3/4 of 256
reg
[
7
:
0
]
dtt_dly_cntr
;
reg
[
8
:
0
]
dtt_rd_cntr
;
// counter for dtt readout to rotator
wire
[
8
:
0
]
dtt_rd_ra
=
{
dtt_rd_cntr
[
8
]
,
dtt_rd_cntr
[
1
:
0
]
,
dtt_rd_cntr
[
7
:
2
]
};
// page, mode, frequency
// wire [8:0] dtt_rd_ra = {dtt_rd_cntr[8],dtt_rd_cntr[1:0],dtt_rd_cntr[7:2]}; // page, mode, frequency
wire
[
8
:
0
]
dtt_rd_ra
=
{
dtt_rd_cntr
[
8
]
,
dtt_rd_cntr
[
0
]
,
dtt_rd_cntr
[
1
]
,
dtt_rd_cntr
[
7
:
2
]
};
// page, mode, frequency
reg
[
2
:
0
]
dtt_rd_regen_dv
;
// dtt output buffer mem read, register enable, data valid
wire
[
35
:
0
]
dtt_rd_data_w
;
// high bits are not used
// data to be input to phase rotator
...
...
@@ -457,10 +474,14 @@ D11 - negate for mode 3 (SS)
else
if
(
dtt_inc16
)
dtt_out_ram_cntr
<=
dtt_out_ram_cntr
+
1
;
dtt_out_ram_wah
<=
dtt_out_ram_cntr
-
dtt_sub16
;
dtt_start_first_fill
<=
dtt_start_fill
&
dtt_first_quad_out
;
if
(
rst
)
dtt_dly_cntr
<=
0
;
else
if
(
dtt_start_fi
ll
&
dtt_first_quad_out
)
dtt_dly_cntr
<=
DTT_OUT_DELAY
;
else
if
(
dtt_start_fi
rst_fill
)
dtt_dly_cntr
<=
DTT_OUT_DELAY
;
else
if
(
|
dtt_dly_cntr
)
dtt_dly_cntr
<=
dtt_dly_cntr
-
1
;
dtt_start_out
<=
dtt_dly_cntr
==
1
;
if
(
rst
)
dtt_rd_regen_dv
[
0
]
<=
0
;
...
...
@@ -534,8 +555,8 @@ D11 - negate for mode 3 (SS)
.
rst
(
rst
)
,
// input
.
start
(
dtt_start_out
)
,
// input
// are these shift OK? Will need to be valis only @ dtt_start_out
.
shift_h
(
x_shft_r
2
)
,
// input[6:0] signed
.
shift_v
(
y_shft_r
2
)
,
// input[6:0] signed
.
shift_h
(
x_shft_r
4
)
,
// input[6:0] signed
.
shift_v
(
y_shft_r
4
)
,
// input[6:0] signed
.
fd_din
(
dtt_rd_data
)
,
// input[24:0] signed. Expected latency = 3 from start
.
fd_out
(
dout
)
,
// output[24:0] reg signed
.
pre_first_out
(
pre_first_out
)
,
// output reg
...
...
dsp/mclt_test_01.tf
View file @
d3f2d87c
...
...
@@ -95,12 +95,14 @@ module mclt_test_01 ();
reg
[
DTT_IN_WIDTH
-
1
:
0
]
java_dtt_in0
[
0
:
255
]
;
// SuppressThisWarning VEditor : assigned in $readmem() system task
reg
[
WND_WIDTH
-
1
:
0
]
tiles_wnd
[
0
:
1023
]
;
reg
[
DTT_IN_WIDTH
-
1
:
0
]
java_dtt_in
[
0
:
1023
]
;
reg
[
WND_WIDTH
-
1
:
0
]
tiles_wnd
[
0
:
1023
]
;
// SuppressThisWarning VEditor : assigned in $readmem() system task
reg
[
DTT_IN_WIDTH
-
1
:
0
]
java_dtt_in
[
0
:
1023
]
;
// SuppressThisWarning VEditor : assigned in $readmem() system task
reg
[
DTT_IN_WIDTH
-
1
:
0
]
java_dtt_out0
[
0
:
255
]
;
// SuppressThisWarning VEditor : assigned in $readmem() system task
reg
[
DTT_IN_WIDTH
-
1
:
0
]
java_dtt_out
[
0
:
1023
]
;
reg
[
DTT_IN_WIDTH
-
1
:
0
]
java_dtt_out
[
0
:
1023
]
;
// SuppressThisWarning VEditor : assigned in $readmem() system task
reg
[
DTT_IN_WIDTH
-
1
:
0
]
java_dtt_rot0
[
0
:
255
]
;
// SuppressThisWarning VEditor : assigned in $readmem() system task
reg
[
DTT_IN_WIDTH
-
1
:
0
]
java_dtt_rot
[
0
:
1023
]
;
// SuppressThisWarning VEditor : assigned in $readmem() system task
integer
i
,
n
,
n_out
;
initial
begin
$readmemh
(
"input_data/clt_wnd_signs.dat"
,
java_wnd_signs
);
...
...
@@ -129,6 +131,10 @@ module mclt_test_01 ();
java_dtt_out['
h000
+
i
]
=
java_dtt_out0
[
i
]
;
end
$readmemh
(
"input_data/clt_dtt_rot_00_2_x1489_y951.dat"
,
java_dtt_rot0
);
for
(
i
=
0
;
i
<
256
;
i
=
i
+
1
)
begin
java_dtt_rot
[
'h000 + i] = java_dtt_rot0[i];
end
$
readmemh("input_data/tile_02.dat",tile_shift);
shifts_x[1] = tile_shift[0][SHIFT_WIDTH-1:0];
...
...
@@ -360,7 +366,8 @@ module mclt_test_01 ();
integer
n6
,
cntr6
,
diff6
,
diff6a
;
// SuppressThisWarning VEditor : assigned in $readmem() system task
wire
[
DTT_IN_WIDTH
-
1
:
0
]
data_dtt_out
=
mclt16x16_i
.
dtt_rd_data
;
wire [DTT_IN_WIDTH-1:0] java_data_dtt_out = java_dtt_out0[{cntr6[1:0],cntr6[7:2]}]; // java_dtt_in[n2 * 256 + cntr2];
// wire [DTT_IN_WIDTH-1:0] java_data_dtt_out = java_dtt_out0[{cntr6[1:0],cntr6[7:2]}]; // java_dtt_in[n2 * 256 + cntr2];
wire
[
DTT_IN_WIDTH
-
1
:
0
]
java_data_dtt_out
=
java_dtt_out0
[{
cntr6
[
0
]
,
cntr6
[
1
]
,
cntr6
[
7
:
2
]}]
;
// java_dtt_in[n2 * 256 + cntr2];
initial
begin
while
(
RST
)
@(
negedge
CLK
);
for
(
n6
=
0
;
n6
<
4
;
n6
=
n6
+
1
)
begin
...
...
dsp/phase_rotator.v
View file @
d3f2d87c
...
...
@@ -43,7 +43,8 @@ module phase_rotator#(
parameter
SHIFT_WIDTH
=
7
,
// x/y subpixel shift, signed -0.5<=shift<0.5
parameter
DSP_B_WIDTH
=
18
,
// signed, output from sin/cos ROM
parameter
DSP_A_WIDTH
=
25
,
parameter
DSP_P_WIDTH
=
48
parameter
DSP_P_WIDTH
=
48
,
parameter
COEFF_WIDTH
=
17
// = DSP_B_WIDTH - 1 or positive numbers,
)(
input
clk
,
//!< system clock, posedge
input
rst
,
//!< sync reset
...
...
@@ -89,7 +90,7 @@ module phase_rotator#(
reg
[
SHIFT_WIDTH
-
1
:
0
]
shift_v0
;
reg
[
SHIFT_WIDTH
-
1
:
0
]
shift_vr
;
reg
[
SHIFT_WIDTH
-
1
:
0
]
shift_hv
;
// combined horizonta and vertical shifts to match cntr_mux;
reg
sign_cs
;
// sign for cos / sin, feed to DSP
reg
[
5
:
0
]
sign_cs
;
// sign for cos / sin, feed to DSP
wire
sign_cs_d
;
// sign_cs delayed by 3 clocks
reg
[
1
:
0
]
sign_cs_r
;
// sign_cs delayed by 5 clocks
reg
[
SHIFT_WIDTH
-
2
:
0
]
rom_a_shift
;
// ~shift absolute value
...
...
@@ -99,7 +100,7 @@ module phase_rotator#(
wire
shift_ends_0
=
shift_hv
[
SHIFT_WIDTH
-
2
:
0
]
==
0
;
reg
[
2
:
0
]
rom_re_regen
;
wire
signed
[
DSP_B_WIDTH
-
1
:
0
]
cos_sin_w
;
wire
mux_v
=
run_v
&&
cntr_v
[
1
]
;
wire
mux_v
=
cntr_v
[
1
]
;
// && run_v; // removed for debugging to see 'x'
always
@
(
posedge
clk
)
begin
if
(
rst
)
start_d
<=
0
;
...
...
@@ -131,7 +132,8 @@ module phase_rotator#(
rom_a_shift
<=
shift_hv
[
SHIFT_WIDTH
-
1
]
?
-
shift_hv
[
SHIFT_WIDTH
-
2
:
0
]
:
shift_hv
[
SHIFT_WIDTH
-
2
:
0
]
;
rom_a_sin
<=
shift_ends_0
?
shift_hv
[
SHIFT_WIDTH
-
1
]
:
hv_sin
;
// sign_cs <= shift_hv[SHIFT_WIDTH-1] & ( hv_sin | (shift_ends_0 & hv_index[2]));
sign_cs
<=
shift_hv
[
SHIFT_WIDTH
-
1
]
&
hv_sin
;
// sign_cs <= shift_hv[SHIFT_WIDTH-1] & hv_sin;
sign_cs
<=
{
sign_cs
[
4
:
0
]
,
shift_hv
[
SHIFT_WIDTH
-
1
]
&
hv_sin
};
rom_re_regen
<=
{
rom_re_regen
[
1
:
0
]
,
run_hv
};
...
...
@@ -157,7 +159,7 @@ module phase_rotator#(
.
clk
(
clk
)
,
// input
.
rst
(
rst
)
,
// input
.
dly
(
4'h2
)
,
// input[3:0]
.
din
(
sign_cs
)
,
// input[0:0]
.
din
(
sign_cs
[
0
])
,
// input[0:0]
.
dout
(
sign_cs_d
)
// output[0:0]
)
;
...
...
@@ -168,7 +170,7 @@ module phase_rotator#(
.
LOG2WIDTH_A
(
4
)
,
.
LOG2WIDTH_B
(
4
)
`ifdef
PRELOAD_BRAMS
`include
"mclt_
fold_rom.vh"
// TODO: put real!
`include
"mclt_
rotator_rom.vh"
`endif
)
i_mclt_rot_rom
(
...
...
@@ -192,8 +194,8 @@ module phase_rotator#(
reg
ceb1_1
,
ceb1_2
,
ceb1_3
,
ceb1_4
;
reg
ceb2_1
,
ceb2_2
,
ceb2_3
,
ceb2_4
;
reg
selb_1
,
selb_2
,
selb_3
,
selb_4
;
wire
signed
[
DSP_A_WIDTH
-
1
:
0
]
ain_34
=
pout_1
[
DSP_P_WIDTH
-
1
-:
FD
_WIDTH
]
;
// bit select from pout_1
wire
signed
[
DSP_A_WIDTH
-
1
:
0
]
din_34
=
pout_2
[
DSP_P_WIDTH
-
1
-:
FD
_WIDTH
]
;
// bit select from pout_1
wire
signed
[
DSP_A_WIDTH
-
1
:
0
]
ain_34
=
pout_1
[
COEFF_WIDTH
+:
DSP_A
_WIDTH
]
;
// bit select from pout_1
wire
signed
[
DSP_A_WIDTH
-
1
:
0
]
din_34
=
pout_2
[
COEFF_WIDTH
+:
DSP_A
_WIDTH
]
;
// bit select from pout_1
reg
cea1_1
,
cea1_2
,
cea1_3
,
cea1_4
;
reg
cea2_1
,
cea2_2
,
ced_3
,
ced_4
;
reg
sela_1
,
sela_2
,
end_3
,
end_4
;
...
...
@@ -210,7 +212,8 @@ module phase_rotator#(
always
@
(
posedge
clk
)
begin
if
(
rst
)
ph
<=
0
;
else
ph
<=
{
ph
[
15
:
0
]
,
run_h
&
~
cntr_h
[
0
]
&
cntr_h
[
1
]
};
// else ph <= {ph[15:0], run_h & ~cntr_h[0] & cntr_h[1]};
else
ph
<=
{
ph
[
15
:
0
]
,
run_h
&
~
cntr_h
[
0
]
&
~
cntr_h
[
1
]
};
cea1_1
<=
ph
[
0
]
;
cea2_1
<=
ph
[
2
]
;
cea1_2
<=
ph
[
1
]
;
cea2_2
<=
ph
[
3
]
;
ceb1_1
<=
ph
[
3
]
;
ceb2_1
<=
ph
[
2
]
;
ceb1_2
<=
ph
[
2
]
|
ph
[
3
]
;
ceb2_2
<=
ph
[
3
]
;
cead_1
<=
|
ph
[
5
:
2
]
;
cead_2
<=
|
ph
[
6
:
3
]
;
...
...
@@ -218,8 +221,12 @@ module phase_rotator#(
sela_1
<=
ph
[
2
]
|
ph
[
4
]
;
sela_2
<=
ph
[
3
]
|
ph
[
5
]
;
selb_1
<=
ph
[
2
]
|
ph
[
5
]
;
selb_2
<=
ph
[
3
]
|
ph
[
6
]
;
// 0 1 0 0
negm_1
<=
(
ph
[
3
]
^
sign_cs_d
)
|
(
~
ph
[
4
]
^
sign_cs_d
)
|
(
ph
[
5
]
^
sign_cs_r
[
1
])
|
(
ph
[
6
]
^
sign_cs_r
[
1
])
;
negm_2
<=
(
ph
[
4
]
^
sign_cs_d
)
|
(
~
ph
[
5
]
^
sign_cs_d
)
|
(
ph
[
6
]
^
sign_cs_r
[
1
])
|
(
ph
[
7
]
^
sign_cs_r
[
1
])
;
// negm_1 <= (ph[3] ^ sign_cs_d) | (~ph[4] ^ sign_cs_d) | (ph[5] ^ sign_cs_r[1]) | (ph[6] ^ sign_cs_r[1]);
// negm_2 <= (ph[4] ^ sign_cs_d) | (~ph[5] ^ sign_cs_d) | (ph[6] ^ sign_cs_r[1]) | (ph[7] ^ sign_cs_r[1]);
/// negm_1 <= (ph[4] & ~sign_cs[0]) | (ph[5] & sign_cs[1]);
/// negm_2 <= (ph[5] & ~sign_cs[1]) | (ph[6] & sign_cs[2]);
negm_1
<=
(
ph
[
4
]
&
~
sign_cs
[
2
])
|
(
ph
[
5
]
&
sign_cs
[
3
])
;
negm_2
<=
(
ph
[
5
]
&
~
sign_cs
[
3
])
|
(
ph
[
6
]
&
sign_cs
[
4
])
;
accum_1
<=
ph
[
4
]
|
ph
[
6
]
;
accum_2
<=
ph
[
5
]
|
ph
[
7
]
;
// vertical shift DSPs
...
...
@@ -230,16 +237,22 @@ module phase_rotator#(
end_3
<=
ph
[
10
]
|
ph
[
8
]
;
end_4
<=
ph
[
11
]
|
ph
[
9
]
;
selb_3
<=
ph
[
8
]
|
ph
[
11
]
;
selb_4
<=
ph
[
9
]
|
ph
[
12
]
;
negm_4
<=
(
ph
[
9
]
^
sign_cs_d
)
|
(
~
ph
[
10
]
^
sign_cs_d
)
|
(
ph
[
11
]
^
sign_cs_r
[
1
])
|
(
ph
[
12
]
^
sign_cs_r
[
1
])
;
negm_3
<=
(
ph
[
10
]
^
sign_cs_d
)
|
(
~
ph
[
11
]
^
sign_cs_d
)
|
(
ph
[
12
]
^
sign_cs_r
[
1
])
|
(
ph
[
13
]
^
sign_cs_r
[
1
])
;
// negm_4 <= (ph[ 9] ^ sign_cs_d) | (~ph[10] ^ sign_cs_d) | (ph[11] ^ sign_cs_r[1]) | (ph[12] ^ sign_cs_r[1]);
// negm_3 <= (ph[10] ^ sign_cs_d) | (~ph[11] ^ sign_cs_d) | (ph[12] ^ sign_cs_r[1]) | (ph[13] ^ sign_cs_r[1]);
/// negm_3 <= (ph[10] & ~sign_cs[0]) | (ph[11] & sign_cs[1]);
/// negm_4 <= (ph[11] & ~sign_cs[1]) | (ph[12] & sign_cs[2]);
negm_3
<=
(
ph
[
10
]
&
~
sign_cs
[
2
])
|
(
ph
[
11
]
&
sign_cs
[
3
])
;
negm_4
<=
(
ph
[
11
]
&
~
sign_cs
[
3
])
|
(
ph
[
12
]
&
sign_cs
[
4
])
;
accum_3
<=
ph
[
10
]
|
ph
[
12
]
;
accum_4
<=
ph
[
11
]
|
ph
[
13
]
;
omux_sel
<=
ph
[
13
]
|
ph
[
15
]
;
fd_dv
<=
pre_dv
;
if
(
pre_dv
)
fd_out
<=
omux_sel
?
pout_4
[
DSP_P_WIDTH
-
1
-:
FD_WIDTH
]
:
pout_3
[
DSP_P_WIDTH
-
1
-:
FD_WIDTH
]
;
if
(
pre_dv
)
fd_out
<=
omux_sel
?
pout_4
[
COEFF_WIDTH
+:
DSP_A_WIDTH
]
:
pout_3
[
COEFF_WIDTH
+:
DSP_A_WIDTH
]
;
// pre_first_out <= ph[12];
pre_first_out
<=
cntr_h
[
7
:
0
]
==
8'hf
;
pre_first_out
<=
ph
[
12
]
;
end
/*
...
...
@@ -251,9 +264,7 @@ module phase_rotator#(
dsp_ma_preadd
#(
.
B_WIDTH
(
DSP_B_WIDTH
)
,
.
A_WIDTH
(
DSP_A_WIDTH
)
,
.
P_WIDTH
(
DSP_P_WIDTH
)
,
.
A_INPUT
(
"DIRECT"
)
,
.
B_INPUT
(
"DIRECT"
)
.
P_WIDTH
(
DSP_P_WIDTH
)
)
dsp_1_i
(
.
clk
(
clk
)
,
// input
.
rst
(
rst
)
,
// input
...
...
@@ -280,8 +291,7 @@ module phase_rotator#(
.
B_WIDTH
(
DSP_B_WIDTH
)
,
.
A_WIDTH
(
DSP_A_WIDTH
)
,
.
P_WIDTH
(
DSP_P_WIDTH
)
,
.
A_INPUT
(
"DIRECT"
)
,
.
B_INPUT
(
"CASCADE"
)
.
BREG
(
2
)
)
dsp_2_i
(
.
clk
(
clk
)
,
// input
.
rst
(
rst
)
,
// input
...
...
@@ -309,9 +319,7 @@ module phase_rotator#(
dsp_ma_preadd
#(
.
B_WIDTH
(
DSP_B_WIDTH
)
,
.
A_WIDTH
(
DSP_A_WIDTH
)
,
.
P_WIDTH
(
DSP_P_WIDTH
)
,
.
A_INPUT
(
"DIRECT"
)
,
.
B_INPUT
(
"DIRECT"
)
.
P_WIDTH
(
DSP_P_WIDTH
)
)
dsp_3_i
(
.
clk
(
clk
)
,
// input
.
rst
(
rst
)
,
// input
...
...
@@ -338,8 +346,7 @@ module phase_rotator#(
.
B_WIDTH
(
DSP_B_WIDTH
)
,
.
A_WIDTH
(
DSP_A_WIDTH
)
,
.
P_WIDTH
(
DSP_P_WIDTH
)
,
.
A_INPUT
(
"DIRECT"
)
,
.
B_INPUT
(
"CASCADE"
)
.
BREG
(
2
)
)
dsp_4_i
(
.
clk
(
clk
)
,
// input
.
rst
(
rst
)
,
// input
...
...
input_data/clt_dtt_in_00_2_x1489_y951.dat
View file @
d3f2d87c
// DTT input range: -341.093520 ... 345.703701
a6e
42 bbecb b0d82 757e8 888a0 44f14 3df14 4f8f
9ba
cb c2323 8292d 94604 3dd5c 7c9f2 928f 3da1f
a73
7e 8f707 c33dd 4c6b3 9ea56 1fffa0a 7736b 1fb3813
9aa
38 c729a 53827 c82f8 3db4 9a8b6 1fc678d 6d045
9dd
e5 542e6 c29ad 72b8 a6d06 1fc51bf 95f2b 1f969fc
71f
c8 a3d29 9586 b3172 1fb7b28 b1e4e 1f85a94 aac83
5526
c 1fe55b1 9908c 1face78 2b36b0 1f6ec1c a5ece 1f4982f
269
b2 3bb9a 1f8177b ac042 1f778e6 ae96a 1f385d0 d69c9
a6e
2e bbeb3 b0d6b 757d9 8888f 44f0b 3df0d 4f8e
9ba
b8 c230a 8291d 945f1 3dd54 7c9e3 928e 3da17
a73
69 8f6f5 c33c5 4c6a9 9ea42 1fffa0b 7735c 1fb381d
9aa
25 c7281 5381c c82df 3db3 9a8a3 1fc6794 6d038
9dd
d2 542dc c2995 72b7 a6cf1 1fc51c7 95f18 1f96a09
71f
ba a3d15 9585 b315b 1fb7b31 b1e38 1f85aa4 aac6e
5526
2 1fe55b4 99079 1face82 2b365a 1f6ec2e a5eb9 1f49846
269
ad 3bb93 1f8178b ac02c 1f778f7 ae954 1f385e9 d69ae
1fe338
2 1fd4a1c 1f965df 1fae322 1f6c881 1f78cdc 1f6c360 1f640e0
3011
b 1f8b460 1ff2381 1f81088 1fb1cb0 1f625f5 1f64e21 1f664ab
1f90f
ae 2d78c 1f5d4f8 1feb1c2 1f5c6fb 1fac5db 1f640c5 1f6fa75
833
8c 1f45b22 3b259 1f3b8e0 1feafb8 1f5f0f0 1fb07fe 1f8060
4
1f467
5f 80c13 1f2f275 3cb9b 1f5b248 1fe87dc 1f7abd1 1fb126f
cb1
30 1f2435c 9b2ae 1f3ea65 35bcc 1f6751a 1fdc518 1f918a4
1f272
bc 26fe2b 1f2bdb4 92266 1d55cd7 35f2e 1fad736 1fdba2d
11f6
86 1f257ae ff5bb 1f2ff73 7aecf 1f835ee 430ad 1fd9293
1fe338
5 1fd4a22 1f965ed 1fae32c 1f6c893 1f78ced 1f6c373 1f640f4
3011
5 1f8b46f 1ff2383 1f81098 1fb1cb9 1f62608 1f64e35 1f664be
1f90f
bc 2d786 1f5d50c 1feb1c5 1f5c70f 1fac5e5 1f640d8 1f6fa87
833
7b 1f45b39 3b251 1f3b8f9 1feafbb 1f5f104 1fb0808 1f8061
4
1f467
76 80c03 1f2f28f 3cb93 1f5b25c 1fe87df 1f7abe2 1fb1279
cb1
16 1f24377 9b29a 1f3ea7d 35bc5 1f6752d 1fdc51d 1f918b2
1f272
d7 26fddd 1f2bdcf 92254 1d55d2d 35f28 1fad740 1fdba31
11f6
62 1f257ca ff59b 1f2ff8d 7aec0 1f835fe 430a5 1fd9297
1fe338
2 2b5e4 1f965df 51cde 1f6c881 87324 1f6c360 9bf20
1fcfee
5 1f8b460 dc7f 1f81088 4e350 1f625f5 9b1df 1f664ab
1f90f
ae 1fd2874 1f5d4f8 14e3e 1f5c6fb 53a25 1f640c5 9058b
1f7cc
74 1f45b22 1fc4da7 1f3b8e0 15048 1f5f0f0 4f802 1f8060
4
1f467
5f 1f7f3ed 1f2f275 1fc3465 1f5b248 17824 1f7abd1 4ed91
1f34e
d0 1f2435c 1f64d52 1f3ea65 1fca434 1f6751a 23ae8 1f918a4
1f272
bc 1d901d5 1f2bdb4 1f6dd9a 1d55cd7 1fca0d2 1fad736 245d3
1ee09
7a 1f257ae 1f00a45 1f2ff73 1f85131 1f835ee 1fbcf53 1fd9293
1fe338
5 2b5de 1f965ed 51cd4 1f6c893 87313 1f6c373 9bf0c
1fcfee
b 1f8b46f dc7d 1f81098 4e347 1f62608 9b1cb 1f664be
1f90f
bc 1fd287a 1f5d50c 14e3b 1f5c70f 53a1b 1f640d8 90579
1f7cc
85 1f45b39 1fc4daf 1f3b8f9 15045 1f5f104 4f7f8 1f8061
4
1f467
76 1f7f3fd 1f2f28f 1fc346d 1f5b25c 17821 1f7abe2 4ed87
1f34e
ea 1f24377 1f64d66 1f3ea7d 1fca43b 1f6752d 23ae3 1f918b2
1f272
d7 1d90223 1f2bdcf 1f6ddac 1d55d2d 1fca0d8 1fad740 245cf
1ee09
9e 1f257ca 1f00a65 1f2ff8d 1f85140 1f835fe 1fbcf5b 1fd9297
a6e
42 1f44135 b0d82 1f8a818 888a0 1fbb0ec 3df14 1ffb071
1f645
35 c2323 1f7d6d3 94604 1fc22a4 7c9f2 1ff6d71 3da1f
a73
7e 1f708f9 c33dd 1fb394d 9ea56 5f6 7736b 4c7ed
1f655
c8 c729a 1fac7d9 c82f8 1ffc24c 9a8b6 39873 6d045
9dd
e5 1fabd1a c29ad 1ff8d48 a6d06 3ae41 95f2b 69604
1f8e0
38 a3d29 1ff6a7a b3172 484d8 b1e4e 7a56c aac83
5526
c 1aa4f 9908c 53188 2b36b0 913e4 a5ece b67d1
1fd96
4e 3bb9a 7e885 ac042 8871a ae96a c7a30 d69c9
a6e
2e 1f4414d b0d6b 1f8a827 8888f 1fbb0f5 3df0d 1ffb072
1f645
48 c230a 1f7d6e3 945f1 1fc22ac 7c9e3 1ff6d72 3da17
a73
69 1f7090b c33c5 1fb3957 9ea42 5f5 7735c 4c7e3
1f655
db c7281 1fac7e4 c82df 1ffc24d 9a8a3 3986c 6d038
9dd
d2 1fabd24 c2995 1ff8d49 a6cf1 3ae39 95f18 695f7
1f8e0
46 a3d15 1ff6a7b b315b 484cf b1e38 7a55c aac6e
5526
2 1aa4c 99079 5317e 2b365a 913d2 a5eb9 b67ba
1fd96
53 3bb93 7e875 ac02c 88709 ae954 c7a17 d69ae
input_data/clt_dtt_out_00_2_x1489_y951.dat
View file @
d3f2d87c
// DTT output range: -549.382667 ... 423.390240
315
109 1f92301 43d55 1fd020f 261cf 17f0f 1fd00d1 3a887
1b63 347b
7 1f915eb 641b8 1fc955f 1ff6884 4910b 1f8cc86
1fef71
2 172eb 1fdefea 285a2 1fe2c41 1ff1075 1be6d 1fc58dd
157
b0 1f8c318 91bdf 1f78f98 567f7 1fff60a 1fc0339 667f7
1fec4c
5 1feb531 1ffb84f 1ffd39b ee9a 1fec774 1cd99 1fda125
1fd6b2
6 4cb61 1f7fb9c 62f91 1fc4197 1ff1c11 48875 1f9c804
fe6
3 1fc82c8 50e22 1fd06d9 1b70d 1ffed35 1fd8c5f 6308f
1d83
5 1fbe500 5e8ad 1fa35a2 23770 2d2a5 1f8631f 34ec7d
315
0d8 1f92308 43d51 1fd0212 261cc 17f0e 1fd00d4 3a883
1b63 347b
4 1f915f2 641b2 1fc9563 1ff6885 49107 1f8cc8d
1fef71
3 172e9 1fdefec 2859f 1fe2c43 1ff1076 1be6b 1fc58e0
157
ae 1f8c31f 91bd6 1f78fa1 567f1 1fff60a 1fc033d 667f0
1fec4c
6 1feb533 1ffb84f 1ffd39b ee99 1fec775 1cd97 1fda127
1fd6b2
9 4cb5c 1f7fba4 62f8b 1fc419b 1ff1c12 48870 1f9c80a
fe6
2 1fc82cc 50e1d 1fd06dc 1b70c 1ffed35 1fd8c61 63089
1d83
3 1fbe504 5e8a7 1fa35a8 2376e 2d2a2 1f86326 34ec48
1d64536 31672 1fbfc99 376fe 1fed03c 1fe8b1f 2cbf3 1fc36ea
1ffc78d 1fe4f6b 2ba84 1fd7f48 1ff801f 1ff753c 1ffb007 352
34c1d 1f4890d f2c94 1f2b281 82361 533a 1f8126a c012c
1742f 1fa1d39 6cf8a 1f94b33 46326 d0e2 1fce7e4 5c0a9
1fe864d 427f7 1fa65cf 4d81a 1fcfca2 1ff0c3a 2dbdf 1fc0a94
130d3 1fe9baa 2b76f 1fe4cbc 19fc8 8b4e 1ff7379 2b775
1cc48 1fe249c 36c03 1fd25e2 12c3c 5d09 1fd82a2 1ff8570
1fdcb91 7a68d 1f55bff 8c696 1fc459b 1fd676c ace91 1bb53c1
1d64560 3166f 1fbfc9d 376fb 1fed03d 1fe8b20 2cbf0 1fc36ee
1ffc78d 1fe4f6d 2ba82 1fd7f4a 1ff8020 1ff753c 1ffb008 352
34c1a 1f48919 f2c85 1f2b28e 82358 5339 1f81272 c0120
1742e 1fa1d3f 6cf83 1f94b39 46322 d0e2 1fce7e7 5c0a3
1fe864f 427f3 1fa65d5 4d815 1fcfca5 1ff0c3b 2dbdc 1fc0a98
130d2 1fe9bab 2b76c 1fe4cbd 19fc7 8b4d 1ff737a 2b772
1cc46 1fe249e 36bff 1fd25e5 12c3b 5d09 1fd82a5 1ff8571
1fdcb93 7a685 1f55c09 8c68e 1fc459f 1fd676e ace86 1bb5406
1bb5406 ace86 1fd676e 1fc459f 8c68e 1f55c09 7a685 1fdcb93
1ff8571 1fd82a5 5d09 12c3b 1fd25e5 36bff 1fe249e 1cc46
2b772 1ff737a 8b4d 19fc7 1fe4cbd 2b76c 1fe9bab 130d2
1fc0a98 2dbdc 1ff0c3b 1fcfca5 4d815 1fa65d5 427f3 1fe864f
5c0a3 1fce7e7 d0e2 46322 1f94b39 6cf83 1fa1d3f 1742e
c0120 1f81272 5339 82358 1f2b28e f2c85 1f48919 34c1a
352 1ffb008 1ff753c 1ff8020 1fd7f4a 2ba82 1fe4f6d 1ffc78d
1fc36ee 2cbf0 1fe8b20 1fed03d 376fb 1fbfc9d 3166f 1d64560
34ec48 1f86326 2d2a2 2376e 1fa35a8 5e8a7 1fbe504 1d833
63089 1fd8c61 1ffed35 1b70c 1fd06dc 50e1d 1fc82cc fe62
1f9c80a 48870 1ff1c12 1fc419b 62f8b 1f7fba4 4cb5c 1fd6b29
1fda127 1cd97 1fec775 ee99 1ffd39b 1ffb84f 1feb533 1fec4c6
667f0 1fc033d 1fff60a 567f1 1f78fa1 91bd6 1f8c31f 157ae
1fc58e0 1be6b 1ff1076 1fe2c43 2859f 1fdefec 172e9 1fef713
1f8cc8d 49107 1ff6885 1fc9563 641b2 1f915f2 347b4 1b63
3a883 1fd00d4 17f0e 261cc 1fd0212 43d51 1f92308 3150d8
1bb53c1 ace91 1fd676c 1fc459b 8c696 1f55bff 7a68d 1fdcb91
1ff8570 1fd82a2 5d09 12c3c 1fd25e2 36c03 1fe249c 1cc48
2b775 1ff7379 8b4e 19fc8 1fe4cbc 2b76f 1fe9baa 130d3
1fc0a94 2dbdf 1ff0c3a 1fcfca2 4d81a 1fa65cf 427f7 1fe864d
5c0a9 1fce7e4 d0e2 46326 1f94b33 6cf8a 1fa1d39 1742f
c012c 1f8126a 533a 82361 1f2b281 f2c94 1f4890d 34c1d
352 1ffb007 1ff753c 1ff801f 1fd7f48 2ba84 1fe4f6b 1ffc78d
1fc36ea 2cbf3 1fe8b1f 1fed03c 376fe 1fbfc99 31672 1d64536
34ec7d 1f8631f 2d2a5 23770 1fa35a2 5e8ad 1fbe500 1d835
6308f 1fd8c5f 1ffed35 1b70d 1fd06d9 50e22 1fc82c8 fe63
1f9c804 48875 1ff1c11 1fc4197 62f91 1f7fb9c 4cb61 1fd6b26
1fda125 1cd99 1fec774 ee9a 1ffd39b 1ffb84f 1feb531 1fec4c5
667f7 1fc0339 1fff60a 567f7 1f78f98 91bdf 1f8c318 157b0
1fc58dd 1be6d 1ff1075 1fe2c41 285a2 1fdefea 172eb 1fef712
1f8cc86 4910b 1ff6884 1fc955f 641b8 1f915eb 347b7 1b63
3a887 1fd00d1 17f0f 261cf 1fd020f 43d55 1f92301 315109
mclt_test_01.sav
View file @
d3f2d87c
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment