-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
PulSAR LVDS #1273
PulSAR LVDS #1273
Conversation
a3f975d
to
aa6832b
Compare
4eca858
to
a1c6b5a
Compare
parameter ADC_DATA_WIDTH = 16, | ||
parameter BITS_PER_SAMPLE = 32 | ||
) ( | ||
input delay_clk, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please minimum amount of whitespaces to align signals
output [31:0] adc_data, => output [31:0] adc_data,
this aplies to most wire/reg declarations as well
// processor read interface | ||
|
||
always @(negedge up_rstn or posedge up_clk) begin | ||
if (up_rstn == 0) begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change line to
if (!up_rstn) begin
|
||
// adc interface | ||
|
||
input adc_clk, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use fewer whitespaces for alignment
|
||
// delay interface | ||
|
||
input up_clk, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use fewer whitespaces
.DELAY_REFCLK_FREQUENCY (DELAY_REFCLK_FREQUENCY), | ||
.IODELAY_CTRL (IODELAY_CTRL), | ||
.ADC_DATA_WIDTH (ADC_DATA_WIDTH) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank line
ad_ip_parameter reference_clkgen CONFIG.VCO_DIV 1 | ||
ad_ip_parameter reference_clkgen CONFIG.VCO_MUL 10 | ||
ad_ip_parameter reference_clkgen CONFIG.CLK0_DIV 6 | ||
#ad_ip_parameter reference_clkgen CONFIG.CLK1_DIV 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented line
|
||
module system_top ( | ||
|
||
inout [14:0] ddr_addr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many whitespaces used for alignment
|
||
// internal signals | ||
|
||
wire [63:0] gpio_i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many whitespaces used for alignment
fb7b120
to
fa02ebd
Compare
Made the requested changes. |
Signed-off-by: Ioan-daniel Pop <Pop.Ioan-daniel@analog.com>
Signed-off-by: Ioan-daniel Pop <Pop.Ioan-daniel@analog.com>
fa02ebd
to
e224aa7
Compare
RetriggerCI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments
Tested synthesize on both 16/18 resolutions.
No critical warnings
ad_cpu_interconnect 0x44A30000 axi_pulsar_lvds_dma | ||
ad_cpu_interconnect 0x44A60000 axi_pwm_gen | ||
ad_cpu_interconnect 0x44a80000 reference_clkgen | ||
# interconnect (adc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blank line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
ad_cpu_interconnect 0x44A00000 axi_pulsar_lvds | ||
ad_cpu_interconnect 0x44A30000 axi_pulsar_lvds_dma | ||
ad_cpu_interconnect 0x44A60000 axi_pwm_gen | ||
ad_cpu_interconnect 0x44a80000 reference_clkgen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uppercase this hex value, or lower case the others hex values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
set ADC_DATA_WIDTH [expr {$RESOLUTION_16_18N == 1 ? 16 : 18}] | ||
set BITS_PER_SAMPLE [expr {$RESOLUTION_16_18N == 1 ? 16 : 32}] | ||
|
||
# ltc2387 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blank line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
projects/pulsar_lvds_adc/Readme.md
Outdated
How to use over-writable parameters from the environment: | ||
``` | ||
hdl/projects/pulsar_lvds_adc/zed> make RESOLUTION_16_18N=0 | ||
RESOLUTION_16_18N - Defines the resolution of the ADC: 0 - 18 BITS, 1 - 16 BITS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing closing ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
set BITS_PER_SAMPLE [expr {$RESOLUTION_16_18N == 1 ? 16 : 32}] | ||
|
||
# ltc2387 | ||
create_bd_port -dir I ref_clk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This port doesn't seem to be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted it for now.
ad_connect d_n axi_pulsar_lvds/d_n | ||
|
||
ad_connect reference_clkgen/clk_0 axi_pulsar_lvds_dma/fifo_wr_clk | ||
ad_connect axi_pulsar_lvds/adc_valid axi_pulsar_lvds_dma/fifo_wr_en |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't adc_valid , adc_data , and adc_dovf a single fifo_wr interface?
`timescale 1ns/100ps | ||
|
||
module axi_pulsar_lvds #( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
"axi_pulsar_lvds.v" ] | ||
|
||
adi_ip_properties axi_pulsar_lvds | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could pack adc_valid, adc_data, adc_dovf into a fifo_wr
interface, so when you connect to the axi_dmac/fifo_wr(slave) it doesn't raise unnecessary warnings.
adi_add_bus "fifo_wr" "master" \ | |
"analog.com:interface:fifo_wr_rtl:1.0" \ | |
"analog.com:interface:fifo_wr:1.0" \ | |
{ \ | |
{"adc_valid" "EN"} \ | |
{"adc_data" "DATA"} \ | |
{"adc_dovf " "OVERFLOW"} \ | |
} | |
adi_add_bus_clock "fifo_wr_clk" "fifo_wr" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
// dma interface | ||
|
||
output adc_valid, | ||
output [31:0] adc_data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this be
output [31:0] adc_data, | |
output [BITS_PER_SAMPLE-1:0] adc_data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
output adc_enable, | ||
output adc_valid, | ||
output [31:0] adc_data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this be
output [31:0] adc_data, | |
output [BITS_PER_SAMPLE-1:0] adc_data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Signed-off-by: Ioan-daniel Pop <Pop.Ioan-daniel@analog.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
.DELAY_REFCLK_FREQUENCY (DELAY_REFCLK_FREQUENCY), | ||
.IODELAY_CTRL (IODELAY_CTRL), | ||
.ADC_DATA_WIDTH (ADC_DATA_WIDTH) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra empty line here.
ad_ip_parameter reference_clkgen CONFIG.VCO_DIV 1 | ||
ad_ip_parameter reference_clkgen CONFIG.VCO_MUL 10 | ||
ad_ip_parameter reference_clkgen CONFIG.CLK0_DIV 6 | ||
#ad_ip_parameter reference_clkgen CONFIG.CLK1_DIV 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can be deleted.
PR Description
Add support for fast LVDS PulSAR AD762x/AD796x ADC.
PR Type
PR Checklist