Last active
March 17, 2016 14:25
-
-
Save cmosguy/2e85d453c57435ff52b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#for debugging purposes use this command in the console | |
#array set test [parseB5evCsv "$::env(BHAB)/tests/fixtures/B5EV_TD_parameter_template_examplate.csv"] | |
proc validateB5evData {_parsedData sourceLibrary} { | |
#start validating if cells exist | |
# 1. first validate that top level cells exist for shit reg and corner cells | |
array set parsedData $_parsedData | |
#parray parsedData | |
#puts $parsedData(title) | |
set validationFailed 0 | |
set errorMsg "" | |
set checkShiftRegRow [checkCellViewsExist $parsedData(shiftRegRow) layout $sourceLibrary] | |
set $errorMsg [lindex $checkShiftRegRow 1] | |
set $validationFailed [lindex $checkShiftRegRow 0] | |
puts $checkShiftRegRow | |
puts "validationfailed: [lindex $checkShiftRegRow 0]" | |
if {$validationFailed} { | |
puts "here" | |
return -code error $errorMsg | |
} | |
return 0 | |
} | |
proc checkCellViewsExist {cell view sourceLibrary} { | |
set validationFailed 0 | |
set errorMsg {} | |
if {[catch {dm::getCellViews $view -cellName $cell -libName $sourceLibrary}]} { | |
set errorMsg "Could not open $cell $view" | |
set validationFailed 1 | |
} | |
return [list $validationFailed $errorMsg] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment