#!/.software/local/.admin/bins/bin/wish -f # ============================================================================= # pr1 # by Christopher Trudeau, Copyright 1997 # # This tcl/tk script is used in conjunction with proof.c to test the hardware # emulator for the SX4 project. # # Comments and criticism on this program are greatly appreciated. Feel free to # send me a note at ctrudeau@etude.uwaterloo.ca. This material is copyright # but non-commercial institutes have permission to reproduce the program in # its entirety, all other uses require explicit written permission of the # author. # ============================================================================= wm title . "Proof" # ============================================================================= # main window declarations # ============================================================================= # create the frames for each row of entry fields for {set i 0} {$i < 16} {incr i 1} { frame .f($i) pack .f($i) } button .bDoAll -relief raised -text "Do All" -command {cmdDoIt 1} button .bDoit -relief raised -text "Do It" -command {cmdDoIt 0} button .bExit -relief raised -text "Death" -command exit pack .bDoAll .bDoit .bExit -in .f(15) -side left # create the MF Sender rows for {set i 6} {$i < 8} {incr i 1} { label .lMFS($i) -text "MFS $i" entry .eMFS($i) -width 4 -textvariable entryMFS($i) label .lMFSTrunk($i) -text " Trunk:" entry .eMFSTrunk($i) -width 4 -textvariable entryMFSTrunk($i) label .lMFSChan($i) -text " Chan:" entry .eMFSChan($i) -width 4 -textvariable entryMFSChan($i) pack .lMFS($i) .eMFS($i) .lMFSTrunk($i) .eMFSTrunk($i) .lMFSChan($i) \ .eMFSChan($i) -in .f([expr {$i - 6}]) -side left } # create the trunk rows for {set i 8} {$i < 16} {incr i 1} { label .lTrunk($i) -text "Trunk $i" entry .eTrunk($i) -width 4 -textvariable entryTrunk($i) label .lTrunkCard($i) -text " Card:" entry .eTrunkCard($i) -width 4 -textvariable entryTrunkCard($i) label .lTrunkChan($i) -text " Chan:" entry .eTrunkChan($i) -width 4 -textvariable entryTrunkChan($i) set j [expr {$i - 6}] pack .lTrunk($i) .eTrunk($i) .lTrunkCard($i) .eTrunkCard($i) \ .lTrunkChan($i) .eTrunkChan($i) -in .f($j) -side left } # create the MF Receiver rows for {set i 16} {$i < 20} {incr i 1} { label .lMFR($i) -text "MFR $i" entry .eMFR($i) -width 4 -textvariable entryMFR($i) set j [expr {$i - 5}] pack .lMFR($i) .eMFR($i) -in .f($j) -side left } # -----------------------------------------------------------------------------