Skip to content

Commit

Permalink
move address space of adc5g controller
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Jack Hickish committed Oct 11, 2017
1 parent bf4705d commit d6cd28b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xps_base/XPS_ROACH2_base/core_info.tab
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions xps_base/XPS_ROACH2_base/system.mhs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6cd28b

Please sign in to comment.