;---------------------------------------------------------------------------- ; ; LedDt402Eb.bvc ; ; setup led scan - test for Dt402Eb ; boundary scan function, requires proper bsdl file (lsi402zx.bsdl) ; ;---------------------------------------------------------------------------- base x ; set number base to hex JTAG 0 BSDL LSI402ZX.bsdl ; configure boundary scan bmode 1 sample ; set first device in the SAMPLE/PRELOAD mode bscan ; scan all bits bmode 1 extest ; set first device in the EXTEST mode bcopy 1 ; copy scanned in data to the EXTEST output buffer bscan ; scan all bits bmfunction remove ; remove old definitions of the functions bmfunction a 1 addr ; assign 16 data bits to the (D)ata function bmfunction d16 1 data ; assign 16 data bits to the (D)ata function bmfunction c 1 pcs0n 0 ; assign active low pcs0 strobe to the (C)s function bmfunction w 1 wr0n 0 ; assign active low wr0n strobe to the (W)r function bmwrite 4 0 ; Clear PLD control register bmwrite 0 F00F ; write pattern to leds set mecho off ; disable command echo to the command window for v0 0 0xFF ; modify leds 16 times in a loop bmwrite 0 v0 ; write LEDs from global variable 0 endfor ; loop again bmode 1 sample ; set first device in the SAMPLE/PRELOAD mode bscan ; scan bits to exit EXTEST bmflush ; send all buffered BSDL scans set mecho on ; reenable echo to the command window