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

AD469x_fmc: Initial version for Coraz7s and DE-10Nano #1463

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

Conversation

ladace
Copy link
Contributor

@ladace ladace commented Sep 24, 2024

PR Description

Initial version for Coraz7s

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

@ladace ladace self-assigned this Sep 24, 2024
@sarpadi
Copy link
Contributor

sarpadi commented Oct 1, 2024

Update Makefile

@sarpadi
Copy link
Contributor

sarpadi commented Oct 1, 2024

Project should be renamed without "_fmc". I suggest "ad469x_evb"

Comment on lines 10 to 16
set spi_clk_ref_frequency 160

# specify ADC resolution -- supported resolutions 16 bits
set adc_resolution 16

# specify ADC sampling rate in samples/seconds
set adc_sampling_rate 1000000
Copy link
Contributor

Choose a reason for hiding this comment

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

remove useless variables

Copy link
Contributor Author

@ladace ladace Oct 28, 2024

Choose a reason for hiding this comment

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

Removed all unused variables

ad_ip_parameter rom_sys_0 CONFIG.PATH_TO_FILE "$mem_init_sys_file_path/mem_init_sys.txt"
ad_ip_parameter rom_sys_0 CONFIG.ROM_ADDR_BITS 9

set sys_cstring "SPI_CLK_FREQ=$spi_clk_ref_frequency\
Copy link
Contributor

Choose a reason for hiding this comment

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

cstring must contain build parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!


set_property -dict {PACKAGE_PIN G15 IOSTANDARD LVCMOS33 IOB TRUE} [get_ports ad469x_spi_sclk]; ## CK_IO13
set_property -dict {PACKAGE_PIN J18 IOSTANDARD LVCMOS33 IOB TRUE PULLTYPE PULLUP} [get_ports ad469x_spi_sdo]; ## CK_IO12
set_property -dict {PACKAGE_PIN K18 IOSTANDARD LVCMOS33 IOB TRUE PULLTYPE PULLUP} [get_ports ad469x_spi_sdi]; ## CK_IO11
Copy link
Contributor

Choose a reason for hiding this comment

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

remove pullups

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

.dio_o(gpio_i[7:2]),
.dio_p(led));

assign gpio_i[31:8] = gpio_o[31:8];
Copy link
Contributor

Choose a reason for hiding this comment

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

move higher next to other assigments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@ladace ladace changed the title AD469x_fmc: Initial version for Coraz7s AD469x_fmc: Initial version for Coraz7s and DE-10Nano Oct 9, 2024
@ladace
Copy link
Contributor Author

ladace commented Oct 9, 2024

V1: Initial version for DE10-Nano

@sarpadi
Copy link
Contributor

sarpadi commented Oct 10, 2024

de10nano has offload/trigger not connected and execution/sdi not connected

@ladace ladace force-pushed the dev_ad469x branch 2 times, most recently from 0001188 to 29fd7ba Compare October 24, 2024 09:11
sync_bits #(
.ASYNC_CLK(1)
) i_sync_bits (
.in_bits (gpio_i[33]),
Copy link
Contributor

Choose a reason for hiding this comment

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

use ad469x_busy_alt_gp0 instead of gpio_i[33]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

.clk (spi_clk_s),
.rst (1'b0),
.signal_in (spi_trigger_ed),
.signal_out (spi_trigger));
Copy link
Contributor

Choose a reason for hiding this comment

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

spi_trigger not going anywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

.ad469x_spi_sdo_sdo (ad469x_spi_sdo),
.ad469x_spi_resetn_reset_n (spi_resetn),
.ad469x_spi_clk_clk (spi_clk_s),
.ad469x_spi_cnv_if_pwm (ad469x_spi_cnv_s),
Copy link
Contributor

Choose a reason for hiding this comment

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

missing offload trigger input

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

the de10nano project should also support build parameters, starting with SPI_4WIRE
this may be a good reference
https://github.com/analogdevicesinc/hdl/blob/main/projects/ad9081_fmca_ebz/a10soc/system_project.tcl

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

cora project still failing
ERROR: [BD 41-74] Exec TCL: Please specify VLNV when creating IP cell ad469x_trigger_gen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

@ladace
Copy link
Contributor Author

ladace commented Oct 28, 2024

Update Makefile

Done!

@ladace
Copy link
Contributor Author

ladace commented Oct 28, 2024

V2: Fixed some findings

@ladace
Copy link
Contributor Author

ladace commented Oct 28, 2024

Update Makefile

Done!

@ladace ladace marked this pull request as ready for review October 28, 2024 13:54
@ladace ladace requested a review from PIoandan as a code owner October 28, 2024 13:54

add_instance ad469x_trigger_gen axi_pwm_gen
set_instance_parameter_value ad469x_trigger_gen {N_PWMS} {1}
set_instance_parameter_value ad469x_trigger_gen {PULSE_0_PERIOD} {$sampling_cycle}
Copy link
Contributor

Choose a reason for hiding this comment

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

remove variable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@ladace
Copy link
Contributor Author

ladace commented Oct 30, 2024

de10nano has offload/trigger not connected and execution/sdi not connected

Fixed!

@sarpadi
Copy link
Contributor

sarpadi commented Nov 1, 2024

RetriggerCI

@gastmaier gastmaier mentioned this pull request Nov 5, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants