File tree Expand file tree Collapse file tree 7 files changed +1000
-1036
lines changed
testbenches/project/ad7606x Expand file tree Collapse file tree 7 files changed +1000
-1036
lines changed Original file line number Diff line number Diff line change @@ -54,22 +54,20 @@ create_bd_port -dir O sys_clk
54
54
55
55
ad_connect sys_clk sys_cpu_clk
56
56
57
- set BA_AD7606X 0x44A00000
58
- adi_sim_add_define " AXI_AD7606X_BA=[ format " %d" ${BA_AD7606X} ] "
59
-
60
- set BA_SPI_REGMAP 0x44A00000
61
- adi_sim_add_define " SPI_AD7606_REGMAP_BA=[ format " %d" ${BA_SPI_REGMAP} ] "
62
-
63
57
if {$INTF == 0} {
58
+ set BA_AD7606X 0x44A00000
64
59
set_property offset $BA_AD7606X [get_bd_addr_segs {mng_axi_vip/Master_AXI/SEG_data_axi_ad7606x}]
60
+ adi_sim_add_define " AXI_AD7606X_BA=[ format " %d" ${BA_AD7606X} ] "
65
61
} else {
66
62
create_bd_port -dir O spi_clk
67
63
ad_connect spi_clk spi_clkgen/clk_0
68
64
69
65
create_bd_port -dir O ad7606_irq
70
66
ad_connect ad7606_irq spi_ad7606/irq
71
67
68
+ set BA_SPI_REGMAP 0x44A00000
72
69
set_property offset $BA_SPI_REGMAP [get_bd_addr_segs {mng_axi_vip/Master_AXI/spi_ad7606_axi_regmap}]
70
+ adi_sim_add_define " SPI_AD7606_REGMAP_BA=[ format " %d" ${BA_SPI_REGMAP} ] "
73
71
74
72
set BA_CLKGEN 0x44A70000
75
73
set_property offset $BA_CLKGEN [get_bd_addr_segs {mng_axi_vip/Master_AXI/SEG_data_spi_clkgen}]
Original file line number Diff line number Diff line change @@ -13,14 +13,6 @@ source "cfgs/${cfg_file}"
13
13
# Set the project name
14
14
set project_name [file rootname $cfg_file ]
15
15
16
- # Set project params
17
-
18
- global ad_project_params
19
-
20
- set INTF $ad_project_params(INTF)
21
- set ADC_N_BITS $ad_project_params(ADC_N_BITS)
22
- set NUM_OF_SDI $ad_project_params(NUM_OF_SDI)
23
-
24
16
# set a default test program
25
17
adi_sim_add_define " TEST_PROGRAM=test_program_si"
26
18
Original file line number Diff line number Diff line change @@ -60,9 +60,6 @@ module system_tb();
60
60
61
61
wire [4 : 0 ] num_chs;
62
62
63
- parameter ADC_N_BITS = 16 ;
64
- localparam NEG_EDGE = 1 ;
65
-
66
63
`TEST_PROGRAM test (
67
64
.adc_config_mode (adc_config_mode),
68
65
.rx_cnvst_n (rx_cnvst_n),
@@ -113,14 +110,14 @@ module system_tb();
113
110
end
114
111
else // serial interface
115
112
begin
116
- wire ad7606_spi_sclk;
117
- wire ad7606_spi_sdo;
118
- wire [`NUM_OF_SDI - 1 : 0 ] ad7606_spi_sdi;
119
- wire ad7606_spi_cs;
120
- wire spi_clk;
121
- wire adc_busy;
122
- wire adc_cnvst_n;
123
- wire ad7606_irq;
113
+ wire ad7606_spi_sclk;
114
+ wire ad7606_spi_sdo;
115
+ wire [`NUM_OF_SDI - 1 : 0 ] ad7606_spi_sdi;
116
+ wire ad7606_spi_cs;
117
+ wire spi_clk;
118
+ wire adc_busy;
119
+ wire adc_cnvst_n;
120
+ wire ad7606_irq;
124
121
125
122
`TEST_PROGRAM test (
126
123
.spi_clk (spi_clk),
@@ -141,6 +138,6 @@ module system_tb();
141
138
142
139
assign adc_busy = adc_cnvst_n;
143
140
end
144
- endgenerate
141
+ endgenerate
145
142
146
143
endmodule
You can’t perform that action at this time.
0 commit comments