From d6cd28b5d9385d44097d170d167fc92a3dcc3ce5 Mon Sep 17 00:00:00 2001 From: Jack Hickish Date: Wed, 11 Oct 2017 13:54:15 -0700 Subject: [PATCH] move address space of adc5g controller Move the ADC5g controller address space from 0x20000 - 0x2ffff to 0x10000 - 0x1ffff so that it can operate in harmony with other ADCs, in the slightly unusual case where a user wants two different ZDOK ADCs on a single ROACH. This fix is a bit lame, because most/all of the ADCs use the same 0x20000 range for their controllers, so this commit only attempts to solve the case where one adc is an ADC5g. For example, an iADC + ADC16 still won't work. The toolflow doesn't dynamically generate addresses on the fly, so a proper fix would involve trawling the repo to find unused address ranges which could be assigned to different kinds of ADC. --- xps_base/XPS_ROACH2_base/core_info.tab | 2 +- xps_base/XPS_ROACH2_base/system.mhs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xps_base/XPS_ROACH2_base/core_info.tab b/xps_base/XPS_ROACH2_base/core_info.tab index 86d862e500..40219eb0af 100644 --- a/xps_base/XPS_ROACH2_base/core_info.tab +++ b/xps_base/XPS_ROACH2_base/core_info.tab @@ -16,7 +16,7 @@ sys_clkcounter 3 10 4 #IF# (strcmp(get(b,'type'),'xps_xaui') || strncmp(get(b,'type'),'xps_tengbe',10)) && strcmp(get(b, 'flavour'), 'sfp+')#sfp_op_dbg 3 60028 4 #IF# (strcmp(get(b,'type'),'xps_xaui') || strncmp(get(b,'type'),'xps_tengbe',10)) && strcmp(get(b, 'flavour'), 'sfp+')#sfp_op_dbg1 3 6002c 4 #IF# strcmp(get(b,'type'),'xps_adc16')#['adc16_controller 3 20000 ' dec2hex(4096*(1+get(b,'num_units'))) 10] -#IF# strcmp(get(b,'type'),'xps_adc5g')#adc5g_controller 3 20000 1000 +#IF# strcmp(get(b,'type'),'xps_adc5g')#adc5g_controller 3 10000 1000 #IF# strcmp(get(b,'type'),'xps_katadc')#kat_adc_controller 3 20000 1000 #IF# strcmp(get(b,'type'),'xps_katadc') && strcmp(get(b,'hw_adc'),'adc0')#iic_adc0 3 40000 100 #IF# strcmp(get(b,'type'),'xps_katadc') && strcmp(get(b,'hw_adc'),'adc1')#iic_adc1 3 48000 100 diff --git a/xps_base/XPS_ROACH2_base/system.mhs b/xps_base/XPS_ROACH2_base/system.mhs index 21de344531..f8bee7eed2 100644 --- a/xps_base/XPS_ROACH2_base/system.mhs +++ b/xps_base/XPS_ROACH2_base/system.mhs @@ -309,8 +309,8 @@ #IF# (strcmp(get(b,'type'),'xps_adc5g')) # # #IF# (strcmp(get(b,'type'),'xps_adc5g')) # PARAMETER INSTANCE = opb_adc5g_controller_0 #IF# (strcmp(get(b,'type'),'xps_adc5g')) # PARAMETER HW_VER = 1.00.a -#IF# (strcmp(get(b,'type'),'xps_adc5g')) # PARAMETER C_BASEADDR = 0x00020000 -#IF# (strcmp(get(b,'type'),'xps_adc5g')) # PARAMETER C_HIGHADDR = 0x0002ffff +#IF# (strcmp(get(b,'type'),'xps_adc5g')) # PARAMETER C_BASEADDR = 0x00010000 +#IF# (strcmp(get(b,'type'),'xps_adc5g')) # PARAMETER C_HIGHADDR = 0x0001ffff #IF# (strcmp(get(b,'type'),'xps_adc5g')) # BUS_INTERFACE SOPB = opb0 #IF# (strcmp(get(b,'type'),'xps_adc5g')) && get(b, 'use_adc0') && strcmp(get(b,'mode'), 'MODE_ACHAN_DMUX1')# PARAMETER INITIAL_CONFIG_MODE_0 = 0 #IF# (strcmp(get(b,'type'),'xps_adc5g')) && get(b, 'use_adc0') && strcmp(get(b,'mode'), 'MODE_ACHAN_DMUX2')# PARAMETER INITIAL_CONFIG_MODE_0 = 1