ad_ip_jesd204_tpl_dac: Use perfect shuffle helper module
Replace the open-coded instances of a perfect shuffle in the DAC framer with the new helper module. Using the helper module gives well defined semantics and hopefully makes the code easier to understand. There are no changes in behavior. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>main
parent
67f204e10e
commit
b7ea846c40
|
@ -22,6 +22,7 @@ ALTERA_DEPS += ../common/ad_dds_2.v
|
||||||
ALTERA_DEPS += ../common/ad_dds_cordic_pipe.v
|
ALTERA_DEPS += ../common/ad_dds_cordic_pipe.v
|
||||||
ALTERA_DEPS += ../common/ad_dds_sine.v
|
ALTERA_DEPS += ../common/ad_dds_sine.v
|
||||||
ALTERA_DEPS += ../common/ad_dds_sine_cordic.v
|
ALTERA_DEPS += ../common/ad_dds_sine_cordic.v
|
||||||
|
ALTERA_DEPS += ../common/ad_perfect_shuffle.v
|
||||||
ALTERA_DEPS += ../common/ad_rst.v
|
ALTERA_DEPS += ../common/ad_rst.v
|
||||||
ALTERA_DEPS += ../common/up_axi.v
|
ALTERA_DEPS += ../common/up_axi.v
|
||||||
ALTERA_DEPS += ../common/up_clock_mon.v
|
ALTERA_DEPS += ../common/up_clock_mon.v
|
||||||
|
|
|
@ -21,6 +21,7 @@ ad_ip_files axi_ad9144 [list \
|
||||||
$ad_hdl_dir/library/common/ad_dds_2.v \
|
$ad_hdl_dir/library/common/ad_dds_2.v \
|
||||||
$ad_hdl_dir/library/common/ad_dds_1.v \
|
$ad_hdl_dir/library/common/ad_dds_1.v \
|
||||||
$ad_hdl_dir/library/common/ad_dds.v \
|
$ad_hdl_dir/library/common/ad_dds.v \
|
||||||
|
$ad_hdl_dir/library/common/ad_perfect_shuffle.v \
|
||||||
$ad_hdl_dir/library/common/ad_rst.v \
|
$ad_hdl_dir/library/common/ad_rst.v \
|
||||||
$ad_hdl_dir/library/common/up_axi.v \
|
$ad_hdl_dir/library/common/up_axi.v \
|
||||||
$ad_hdl_dir/library/common/up_xfer_cntrl.v \
|
$ad_hdl_dir/library/common/up_xfer_cntrl.v \
|
||||||
|
|
|
@ -22,6 +22,7 @@ ALTERA_DEPS += ../common/ad_dds_2.v
|
||||||
ALTERA_DEPS += ../common/ad_dds_cordic_pipe.v
|
ALTERA_DEPS += ../common/ad_dds_cordic_pipe.v
|
||||||
ALTERA_DEPS += ../common/ad_dds_sine.v
|
ALTERA_DEPS += ../common/ad_dds_sine.v
|
||||||
ALTERA_DEPS += ../common/ad_dds_sine_cordic.v
|
ALTERA_DEPS += ../common/ad_dds_sine_cordic.v
|
||||||
|
ALTERA_DEPS += ../common/ad_perfect_shuffle.v
|
||||||
ALTERA_DEPS += ../common/ad_rst.v
|
ALTERA_DEPS += ../common/ad_rst.v
|
||||||
ALTERA_DEPS += ../common/up_axi.v
|
ALTERA_DEPS += ../common/up_axi.v
|
||||||
ALTERA_DEPS += ../common/up_clock_mon.v
|
ALTERA_DEPS += ../common/up_clock_mon.v
|
||||||
|
|
|
@ -20,6 +20,7 @@ ad_ip_files axi_ad9152 [list \
|
||||||
$ad_hdl_dir/library/common/ad_dds_2.v \
|
$ad_hdl_dir/library/common/ad_dds_2.v \
|
||||||
$ad_hdl_dir/library/common/ad_dds_1.v \
|
$ad_hdl_dir/library/common/ad_dds_1.v \
|
||||||
$ad_hdl_dir/library/common/ad_dds.v \
|
$ad_hdl_dir/library/common/ad_dds.v \
|
||||||
|
$ad_hdl_dir/library/common/ad_perfect_shuffle.v \
|
||||||
$ad_hdl_dir/library/common/ad_rst.v \
|
$ad_hdl_dir/library/common/ad_rst.v \
|
||||||
$ad_hdl_dir/library/common/up_axi.v \
|
$ad_hdl_dir/library/common/up_axi.v \
|
||||||
$ad_hdl_dir/library/common/up_xfer_cntrl.v \
|
$ad_hdl_dir/library/common/up_xfer_cntrl.v \
|
||||||
|
|
|
@ -11,6 +11,7 @@ GENERIC_DEPS += ../../common/ad_dds_2.v
|
||||||
GENERIC_DEPS += ../../common/ad_dds_cordic_pipe.v
|
GENERIC_DEPS += ../../common/ad_dds_cordic_pipe.v
|
||||||
GENERIC_DEPS += ../../common/ad_dds_sine.v
|
GENERIC_DEPS += ../../common/ad_dds_sine.v
|
||||||
GENERIC_DEPS += ../../common/ad_dds_sine_cordic.v
|
GENERIC_DEPS += ../../common/ad_dds_sine_cordic.v
|
||||||
|
GENERIC_DEPS += ../../common/ad_perfect_shuffle.v
|
||||||
GENERIC_DEPS += ../../common/ad_rst.v
|
GENERIC_DEPS += ../../common/ad_rst.v
|
||||||
GENERIC_DEPS += ../../common/up_axi.v
|
GENERIC_DEPS += ../../common/up_axi.v
|
||||||
GENERIC_DEPS += ../../common/up_clock_mon.v
|
GENERIC_DEPS += ../../common/up_clock_mon.v
|
||||||
|
|
|
@ -117,26 +117,24 @@ module ad_ip_jesd204_tpl_dac_framer #(
|
||||||
end
|
end
|
||||||
|
|
||||||
/* Slice channel and pack it into frames */
|
/* Slice channel and pack it into frames */
|
||||||
for (i = 0; i < NUM_CHANNELS; i = i + 1) begin: g_frame_data_outer
|
ad_perfect_shuffle #(
|
||||||
for (j = 0; j < FRAMES_PER_BEAT; j = j + 1) begin: g_frame_data_inner
|
.NUM_GROUPS (NUM_CHANNELS),
|
||||||
localparam w = BITS_PER_CHANNEL_PER_FRAME;
|
.WORDS_PER_GROUP (FRAMES_PER_BEAT),
|
||||||
localparam dst_lsb = (i + j * NUM_CHANNELS) * w;
|
.WORD_WIDTH (BITS_PER_CHANNEL_PER_FRAME)
|
||||||
localparam src_lsb = (j + i * FRAMES_PER_BEAT) * w;
|
) i_channels_to_frames (
|
||||||
|
.data_in (dac_data_msb),
|
||||||
assign frame_data_s[dst_lsb+:w] = dac_data_msb[src_lsb+:w];
|
.data_out (frame_data_s)
|
||||||
end
|
);
|
||||||
end
|
|
||||||
|
|
||||||
/* Slice frame and pack it into lanes */
|
/* Slice frame and pack it into lanes */
|
||||||
for (i = 0; i < FRAMES_PER_BEAT; i = i + 1) begin: g_link_data_msb_outer
|
ad_perfect_shuffle #(
|
||||||
for (j = 0; j < NUM_LANES; j = j + 1) begin: g_link_data_msb_inner
|
.NUM_GROUPS (FRAMES_PER_BEAT),
|
||||||
localparam w = BITS_PER_LANE_PER_FRAME;
|
.WORDS_PER_GROUP (NUM_LANES),
|
||||||
localparam dst_lsb = (i + j * FRAMES_PER_BEAT) * w;
|
.WORD_WIDTH (BITS_PER_LANE_PER_FRAME)
|
||||||
localparam src_lsb = (j + i * NUM_LANES) * w;
|
) i_frames_to_lanes (
|
||||||
|
.data_in (frame_data_s),
|
||||||
assign link_data_msb_s[dst_lsb+:w] = frame_data_s[src_lsb+:w];
|
.data_out (link_data_msb_s)
|
||||||
end
|
);
|
||||||
end
|
|
||||||
|
|
||||||
/* Reorder octets LSB first */
|
/* Reorder octets LSB first */
|
||||||
for (i = 0; i < LINK_DATA_WIDTH; i = i + 8) begin: g_link_data
|
for (i = 0; i < LINK_DATA_WIDTH; i = i + 8) begin: g_link_data
|
||||||
|
|
|
@ -35,6 +35,7 @@ ad_ip_files ad_ip_jesd204_tpl_dac [list \
|
||||||
$ad_hdl_dir/library/common/ad_dds_2.v \
|
$ad_hdl_dir/library/common/ad_dds_2.v \
|
||||||
$ad_hdl_dir/library/common/ad_dds_1.v \
|
$ad_hdl_dir/library/common/ad_dds_1.v \
|
||||||
$ad_hdl_dir/library/common/ad_dds.v \
|
$ad_hdl_dir/library/common/ad_dds.v \
|
||||||
|
$ad_hdl_dir/library/common/ad_perfect_shuffle.v \
|
||||||
$ad_hdl_dir/library/common/ad_rst.v \
|
$ad_hdl_dir/library/common/ad_rst.v \
|
||||||
$ad_hdl_dir/library/common/up_axi.v \
|
$ad_hdl_dir/library/common/up_axi.v \
|
||||||
$ad_hdl_dir/library/common/up_xfer_cntrl.v \
|
$ad_hdl_dir/library/common/up_xfer_cntrl.v \
|
||||||
|
|
|
@ -33,6 +33,7 @@ adi_ip_files ad_ip_jesd204_tpl_dac [list \
|
||||||
"$ad_hdl_dir/library/common/ad_dds_2.v" \
|
"$ad_hdl_dir/library/common/ad_dds_2.v" \
|
||||||
"$ad_hdl_dir/library/common/ad_dds_1.v" \
|
"$ad_hdl_dir/library/common/ad_dds_1.v" \
|
||||||
"$ad_hdl_dir/library/common/ad_dds.v" \
|
"$ad_hdl_dir/library/common/ad_dds.v" \
|
||||||
|
"$ad_hdl_dir/library/common/ad_perfect_shuffle.v" \
|
||||||
"$ad_hdl_dir/library/common/ad_rst.v" \
|
"$ad_hdl_dir/library/common/ad_rst.v" \
|
||||||
"$ad_hdl_dir/library/common/up_axi.v" \
|
"$ad_hdl_dir/library/common/up_axi.v" \
|
||||||
"$ad_hdl_dir/library/common/up_xfer_cntrl.v" \
|
"$ad_hdl_dir/library/common/up_xfer_cntrl.v" \
|
||||||
|
|
Loading…
Reference in New Issue