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

Ad7606 serial/parallel interface #1206

Merged
merged 13 commits into from
Apr 26, 2024
Merged

Ad7606 serial/parallel interface #1206

merged 13 commits into from
Apr 26, 2024

Conversation

PIoandan
Copy link
Collaborator

@PIoandan PIoandan commented Oct 31, 2023

PR Description

I unified the ad7606x_fmc project, where both the serial interface and the parallel interface are implemented. I tested the linux part for both the serial and parallel interface and worked well.

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

@PIoandan PIoandan force-pushed the update_ad7606_spi_engine branch from 1e01d64 to 8c214ac Compare November 13, 2023 12:03
@PIoandan PIoandan changed the title Update ad7606 SPIE serial interface/split ad7606 Ad7606 serial/parallel interface Nov 13, 2023
@PIoandan PIoandan force-pushed the update_ad7606_spi_engine branch 3 times, most recently from 1ad3c33 to c40f1c7 Compare November 14, 2023 13:07
projects/ad7606x_fmc/Readme.md Outdated Show resolved Hide resolved
projects/ad7606x_fmc/Readme.md Outdated Show resolved Hide resolved
projects/ad7606x_fmc/Readme.md Show resolved Hide resolved
@IuliaCMoldovan IuliaCMoldovan mentioned this pull request Nov 17, 2023
12 tasks
@PIoandan PIoandan requested a review from StancaPop November 17, 2023 12:45
@IuliaCMoldovan
Copy link
Contributor

Could you check the messages given by the Guideline checker action? There are a few changes that need to be done

projects/ad7606x_fmc/zed/Makefile Outdated Show resolved Hide resolved
projects/ad7606x_fmc/zed/system_top_si.v Outdated Show resolved Hide resolved
projects/ad7606x_fmc/common/ad7606x_fmc.txt Outdated Show resolved Hide resolved
@PopPaul2021 PopPaul2021 self-requested a review February 6, 2024 13:06
Copy link
Contributor

@PopPaul2021 PopPaul2021 left a comment

Choose a reason for hiding this comment

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

When building the project for the serial interface with make INTF=1 the project implementation fails, and it's caused by placement errors.

@PIoandan
Copy link
Collaborator Author

PIoandan commented Feb 8, 2024

When building the project for the serial interface with make INTF=1 the project implementation fails, and it's caused by placement errors.

Fixed.

I unified the ad7606x_fmc project, where both the serial interface and the parallel interface are implemented.

Signed-off-by: Ioan-daniel Pop <[email protected]>
It was modified Readme.md file.

Signed-off-by: Ioan-daniel Pop <[email protected]>
Guideline check errors fixed

Signed-off-by: Ioan-daniel Pop <[email protected]>
Updated the axi_pwm_gen IP address for parallel interface

Signed-off-by: Ioan-daniel Pop <[email protected]>
Regenerate Makefile

Signed-off-by: Ioan-daniel Pop <[email protected]>
I have updated some pins type according to the
datasheet for serial and parallel interface.

Signed-off-by: Ioan-daniel Pop <[email protected]>
Fixed the case when it is make build without any parameter.
Also updated the Copyright and Readme.md file.

Signed-off-by: Ioan-daniel Pop <[email protected]>
@PIoandan PIoandan force-pushed the update_ad7606_spi_engine branch from 168e7cd to f45ece3 Compare February 8, 2024 14:04
@PIoandan PIoandan requested a review from PopPaul2021 February 8, 2024 14:05
Fixed some Critical Warnings related to the set_multicycle_path
in system_constr.tcl file.

Signed-off-by: Ioan-daniel Pop <[email protected]>
Copy link
Contributor

@IuliaCMoldovan IuliaCMoldovan left a comment

Choose a reason for hiding this comment

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

Could you replace in all the license headers the word "master" with "main"?

library/axi_ad7606x/axi_ad7606x.v Outdated Show resolved Hide resolved
projects/ad7606x_fmc/zed/system_project.tcl Outdated Show resolved Hide resolved
@PIoandan
Copy link
Collaborator Author

Could you replace in all the license headers the word "master" with "main"?

Sure.

Requested changes.

Signed-off-by: Ioan-daniel Pop <[email protected]>
@PIoandan PIoandan force-pushed the update_ad7606_spi_engine branch from 4d280cd to 831abd4 Compare February 16, 2024 10:06
IuliaCMoldovan
IuliaCMoldovan previously approved these changes Feb 16, 2024
Copy link
Contributor

@IuliaCMoldovan IuliaCMoldovan left a comment

Choose a reason for hiding this comment

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

I built the project in Vivado 2023.2 as well, and it looks ok.

@@ -1,5 +1,5 @@
####################################################################################
## Copyright (c) 2018 - 2023 Analog Devices, Inc.
## Copyright (c) 2018 - 2024 Analog Devices, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

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

should be reverted

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.

@@ -39,7 +39,7 @@ module axi_ad7606x #(

parameter ID = 0,
parameter DEV_CONFIG = 0,
parameter ADC_CH_DW = 16,
parameter ADC_TO_DMA_N_BITS = 16,
Copy link
Contributor

Choose a reason for hiding this comment

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

too many whitespaces in declarations

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@@ -1,6 +1,6 @@
// ***************************************************************************
// ***************************************************************************
// Copyright (C) 2023 Analog Devices, Inc. All rights reserved.
// Copyright (C) 2023-2024 Analog Devices, Inc. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

should be reverted

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.

@@ -1,6 +1,6 @@
// ***************************************************************************
// ***************************************************************************
// Copyright (C) 2023 Analog Devices, Inc. All rights reserved.
// Copyright (C) 2023-2024 Analog Devices, Inc. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

should be reverted

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.

@@ -1,5 +1,5 @@
###############################################################################
## Copyright (C) 2023 Analog Devices, Inc. All rights reserved.
## Copyright (C) 2023-2024 Analog Devices, Inc. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

should be reverted

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.


switch $INTF {
0 {
set_property -dict {PACKAGE_PIN N19 IOSTANDARD LVCMOS25} [get_ports adc_db[0] ] ; ## D08 FMC_LPC_LA01_CC_P
Copy link
Contributor

Choose a reason for hiding this comment

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

fix whitespaces

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.


switch $NUM_OF_SDI {
1 {
set_property -dict {PACKAGE_PIN M20 IOSTANDARD LVCMOS25} [get_ports ad7606_spi_sdi[0]] ; ## G07 FMC_LPC_LA00_CC_N
Copy link
Contributor

Choose a reason for hiding this comment

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

fix whitespaces

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.

}
}

set_property -dict {PACKAGE_PIN M19 IOSTANDARD LVCMOS25} [get_ports ad7606_spi_sclk] ; ## G06 FMC_LPC_LA00_CC_P
Copy link
Contributor

Choose a reason for hiding this comment

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

fix whitespaces

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.


# control lines

set_property -dict {PACKAGE_PIN K19 IOSTANDARD LVCMOS25} [get_ports adc_serpar] ; ## C18 FMC_LPC_LA14_P
Copy link
Contributor

Choose a reason for hiding this comment

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

fix whitespaces

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.

.dio_o(gpio_i[31:0]),
.dio_p(gpio_bd));

assign gpio_i[63:40] = gpio_o[63:40];
Copy link
Contributor

Choose a reason for hiding this comment

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

move assign to a different location (i.e. after wire declarations)

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.

Final requested changes.

Signed-off-by: Ioan-daniel Pop <[email protected]>
}

# interconnect
ad_cpu_interconnect 0x44a00000 axi_ad7606x
Copy link
Contributor

Choose a reason for hiding this comment

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

Not done. There are still instances where double white spaces are used


switch $INTF {
0 {
set_property -dict {PACKAGE_PIN N19 IOSTANDARD LVCMOS25} [get_ports adc_db[0] ]; ## D08 FMC_LPC_LA01_CC_P
Copy link
Contributor

Choose a reason for hiding this comment

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

fix whitespaces

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.


switch $NUM_OF_SDI {
1 {
set_property -dict {PACKAGE_PIN M20 IOSTANDARD LVCMOS25} [get_ports ad7606_spi_sdi[0]]; ## G07 FMC_LPC_LA00_CC_N
Copy link
Contributor

Choose a reason for hiding this comment

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

fix whitespaces

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.


# control lines

set_property -dict {PACKAGE_PIN K19 IOSTANDARD LVCMOS25} [get_ports adc_serpar]; ## C18 FMC_LPC_LA14_P
Copy link
Contributor

Choose a reason for hiding this comment

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

fix whitespaces

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.

ad_ip_parameter adc_clk_generator CONFIG.CLKIN1_UI_JITTER 0
ad_ip_parameter adc_clk_generator CONFIG.PRIM_IN_FREQ 100.000

ad_connect sys_cpu_clk adc_clk_generator/clk_in1
Copy link
Contributor

Choose a reason for hiding this comment

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

Not done

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add more details regarding the valid combinations of build parameters. you can use this readme as reference
https://github.com/analogdevicesinc/hdl/blob/main/projects/ad4630_fmc/zed/README.md

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.

Fix whitespaces. Update readme.

Signed-off-by: Ioan-daniel Pop <[email protected]>
@PIoandan PIoandan requested a review from sarpadi April 18, 2024 05:56
Copy link
Contributor

@gastmaier gastmaier left a comment

Choose a reason for hiding this comment

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

Successfully synthesized with INTF=0 and INTF=1.

projects/ad7606x_fmc/common/ad7606x_bd.tcl Outdated Show resolved Hide resolved
projects/ad7606x_fmc/zed/system_bd.tcl Outdated Show resolved Hide resolved
projects/ad7606x_fmc/zed/system_bd.tcl Outdated Show resolved Hide resolved
Fix trailing whitespaces.

Signed-off-by: Ioan-daniel Pop <[email protected]>
@PIoandan PIoandan requested a review from gastmaier April 24, 2024 13:14
Copy link
Contributor

@StancaPop StancaPop left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Contributor

@alin724 alin724 left a comment

Choose a reason for hiding this comment

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

LGTM

Notes:

  • double instances of mem_addr_space assignment [s_axi_clk connection] as in case of axi_dmac|pwm_gen can be removed [line124] (by using a single instance outside of switch instance as in [line25]);
  • name of final commit can be something like [ad7606x: Add configurable digital interface [+serial interface] support];

@PIoandan PIoandan merged commit 606551b into main Apr 26, 2024
1 of 3 checks passed
@PIoandan PIoandan deleted the update_ad7606_spi_engine branch April 26, 2024 09:03
@gastmaier gastmaier mentioned this pull request Jun 10, 2024
11 tasks
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.

7 participants