Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc rbx_find_gpu_async_registers { } {
- set slave_channels "\
- u_rw_slave
- u_jcb_slave
- u_b_slave
- u_ar_slave
- u_ts_slave
- "
- puts "\n\n###################################"
- puts "### DIRECTION = Master to Slave ###"
- puts "###################################"
- foreach chnl $slave_channels {
- # RESET ALL DATA
- set all_sync_regs ""
- set current_sync_regs ""
- set current_dest_regs ""
- # FIND POINTER REGISTERS
- set all_sync_regs [get_object_name [get_cells -hier *synchronizer_sync0*]]
- set current_sync_regs [rm_lregexp $chnl $all_sync_regs]
- set current_dest_regs [get_object_name [all_fanout -from [get_pins -quiet *$chnl/m_data] -endpoints_only]]
- set Y [llength $current_sync_regs]
- set W [llength $current_dest_regs]
- puts "\n\n### Channel = $chnl ###"
- # puts "Y = $Y" ; # Do not used this value. Get this value from datasheet
- # puts "W = $W" ; # Do not used this value. Get this value from datasheet
- # puts "N = [expr round(pow(2,$Y))]" ; # Do not used this value. Get this value from datasheet
- puts "\$destination_ptr_regs_inpin_list ="
- foreach sr $current_sync_regs {
- puts " $sr/D"
- }
- # FIND POINTER REGISTERS
- puts "\$destination_pld_regs_inpin_list ="
- foreach i $current_dest_regs {
- if {[get_attribute [get_cells -of_objects [get_pins $i]] is_sequential]} {
- puts " $i"
- }
- }
- }
- set master_channels "
- u_rw_master
- u_jcb_master
- u_b_master
- u_ar_master
- u_ts_master
- "
- puts "\n\n###################################"
- puts "### DIRECTION = Slave to Master ###"
- puts "###################################"
- foreach chnl $master_channels {
- # RESET ALL DATA
- set all_sync_regs ""
- set current_sync_regs ""
- set current_dest_regs ""
- # FIND POINTER REGISTERS
- set all_sync_regs [get_object_name [get_cells -hier *synchronizer_sync0*]]
- set current_sync_regs [rm_lregexp $chnl $all_sync_regs]
- set current_dest_regs [get_object_name [all_fanout -from [get_pins -quiet *$chnl/s_credit] -endpoints_only]]
- set Y [llength $current_sync_regs]
- set W [llength $current_dest_regs]
- puts "\n\n### Channel = $chnl ###"
- # puts "Y = $Y" ; # Do not used this value. Get this value from datasheet
- # puts "W = $W" ; # Do not used this value. Get this value from datasheet
- # puts "N = [expr round(pow(2,$Y))]" ; # Do not used this value. Get this value from datasheet
- puts "\$destination_ptr_regs_inpin_list ="
- foreach sr $current_sync_regs {
- puts " $sr/D"
- }
- # FIND POINTER REGISTERS
- puts "\$destination_pld_regs_inpin_list ="
- foreach i $current_dest_regs {
- if {[get_attribute [get_cells -of_objects [get_pins $i]] is_sequential]} {
- puts " $i"
- }
- }
- }
- }
- proc rm_lregexp { string_to_match lookup_list } {
- set matched_list ""
- foreach element $lookup_list {
- if {[regexp ".*${string_to_match}.*" $element]} {
- lappend matched_list $element
- }
- }
- return $matched_list
- }
- # EOF
- rbx_find_gpu_async_registers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement