Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AD7616: Add AXI ADC support #1477

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

AD7616: Add AXI ADC support #1477

wants to merge 3 commits into from

Conversation

PIoandan
Copy link
Collaborator

@PIoandan PIoandan commented Oct 1, 2024

PR Description

Add AXI ADC support to existing AD7616 PIF project.
Update AD7616 project to account for the changes (add CPACK core, fix DMA connections).
Update AXI_AD7616 and AD7616 (project) documentation and block diagrams

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the code style guidelines
  • I have performed a self-review of changes
  • I have compiled all hdl projects and libraries affected by this PR
  • I have tested in hardware affected projects, at least on relevant boards
  • I have commented my code, at least hard-to-understand parts
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe files, Copyright etc)
  • I have not introduced new Warnings/Critical Warnings on compilation
  • I have added new hdl testbenches or updated existing ones

@@ -67,7 +82,7 @@ module axi_ad7616_pif #(
input rd_req,
input wr_req,
input [15:0] wr_data,
output reg [15:0] rd_data,
output reg [15:0] rd_data = 'ha1b2,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove / fix initialization

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -96,10 +111,20 @@ module axi_ad7616_pif #(

reg rd_valid_d = 1'h0;

reg [ 4:0] channel_counter = 5'h0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix spacing, separate reg from wire reclarations, initializations

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

rd_req_edge_d <= rd_req_edge;
end

//channel_counter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

irrelevant comment. delete or elaborate

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.


wire [255:0] adc_data_s;

wire [ 7:0] adc_custom_control;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing cleanup

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

end
endgenerate

axi_ad7616_pif #(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

assign adc_data_1 = dma_data[14*16+15:14*16];
assign adc_data_0 = dma_data[15*16+15:15*16];

wire [31:0] adc_config_ctrl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move declaration

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@sarpadi
Copy link
Contributor

sarpadi commented Nov 27, 2024

Update system_project.tcl with newer build parameter handling

@sarpadi
Copy link
Contributor

sarpadi commented Nov 27, 2024

fix conflicts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove 100MHz clock gen core and use PS clk (sys_clk) instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@PIoandan PIoandan force-pushed the dev_axi_ad7616 branch 3 times, most recently from 5711fcc to 14394f4 Compare November 28, 2024 12:18
@PIoandan PIoandan marked this pull request as ready for review November 28, 2024 12:20
@PIoandan
Copy link
Collaborator Author

Made a squash for all three categories of files.

@@ -9,7 +9,8 @@ The :git-hdl:`AXI AD7616 <library/axi_ad7616>` IP core
can be used to interface the :adi:`AD7616` device using an
FPGA. The core has a AXI Memory Map interface for configuration, supports the
parallel data interface of the device, and has a simple FIFO interface for the
DMAC.
DMAC. More about the generic framework interfacing ADCs, that contains the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DMAC. More about the generic framework interfacing ADCs, that contains the
DMAC.
More about the generic framework interfacing ADCs, that contains the

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

module, is used in this way: bit 1 - RD request to the device register map('b1),
bit 0 - WR request to the device register map('b1). Also, **adc_custom_control**
signal, that is available in the *up_adc_common* module, controls burst_length.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

['tspan', 'CHx CONVERSION START']
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -31,5 +31,6 @@ LIB_DEPS += spi_engine/spi_engine_interconnect
LIB_DEPS += spi_engine/spi_engine_offload
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

axi_clkgen should be removed from here as well

Copy link
Collaborator Author

@PIoandan PIoandan Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still needed because in the design we have axi_hdmi_clkgen.

- :ref:`axi_sysid`
- :ref:`here <axi_sysid>`
* - UTIL_CPACK2
- :git-hdl:`library/util_pack/util_cpack2 <library/util_pack/util_cpack2>` *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- :git-hdl:`library/util_pack/util_cpack2 <library/util_pack/util_cpack2>` *
- :git-hdl:`library/util_pack/util_cpack2` *

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

up_rdata_r = 'h00;
up_rack_r = 'h00;
up_wack_r = 'h00;
for (j = 0; j <= 16; j=j+1) begin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

< 16 and not <= 16, right?

Suggested change
for (j = 0; j <= 16; j=j+1) begin
for (j = 0; j < 16; j = j + 1) begin

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"$ad_hdl_dir/library/xilinx/common/up_xfer_cntrl_constr.xdc" \
"$ad_hdl_dir/library/xilinx/common/ad_rst_constr.xdc" \
"$ad_hdl_dir/library/xilinx/common/up_xfer_status_constr.xdc" \
"$ad_hdl_dir/library/xilinx/common/up_clock_mon_constr.xdc" \
"axi_ad7616_pif.v" \
"axi_ad7616.v" ]

adi_ip_properties axi_ad7616

set_property company_url {https://wiki.analog.com/resources/fpga/docs/axi_ad7616} [ipx::current_core]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants