feat(ttl): Drive traffic and port wait from SWB_UNIT0/SWB_UNIT1
The bench is not always fully populated. config.ttl now declares which
switch units exist:
SWB_UNIT0 = 1 ; this DUT has switch unit 0
SWB_UNIT1 = 1 ; this DUT has switch unit 1
Two values are derived there rather than repeating the same test in
three scripts: swb_any (0 = no unit at all) and swb_opt, the suffix
appended to each blanton_traffic_linespeed call -- "" for both units so
the tool's own TL_UNITS="0 1" applies, " -u 0" or " -u 1" for a single
one.
Script A, B and C build their traffic commands with sprintf2 and the
suffix, wrapped in `if swb_any = 1`. A half-populated DUT no longer
issues bcmcmd against an absent unit, and a DUT with no switch board
skips the traffic stage outright instead of filling the log with
failures.
wait_init.ttl reads the same two flags instead of its own copies, so the
wait and the traffic blocks cannot disagree about what is installed.
Script A -> V1.0.5.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM
This commit is contained in:
@@ -7,6 +7,37 @@ strTestcase="ENV" ;ENV,EMC,Margin...etc
|
||||
EN_Margin = 0 ; 1: Enable Margin Test, 0: Disable Margin Test
|
||||
|
||||
EN_log = 1 ; 1: Enable log, 0: Disable log
|
||||
|
||||
;================================================================
|
||||
; Switch Unit Population
|
||||
;================================================================
|
||||
SWB_UNIT0 = 1 ; 1 = this DUT has switch unit 0, wait for it ; 0 = skip
|
||||
SWB_UNIT1 = 1 ; 1 = this DUT has switch unit 1, wait for it ; 0 = skip
|
||||
|
||||
; --- derived from the two flags above; do not edit --------------
|
||||
; swb_any : 0 = no switch unit at all -> skip every traffic block
|
||||
; swb_opt : suffix appended to each blanton_traffic_linespeed call
|
||||
; "" both units -> tool default TL_UNITS="0 1"
|
||||
; " -u 0" unit 0 only
|
||||
; " -u 1" unit 1 only
|
||||
swb_any = 0
|
||||
swb_opt = ""
|
||||
if SWB_UNIT0 = 1 then
|
||||
swb_any = 1
|
||||
endif
|
||||
if SWB_UNIT1 = 1 then
|
||||
swb_any = 1
|
||||
endif
|
||||
if SWB_UNIT0 = 1 then
|
||||
if SWB_UNIT1 = 0 then
|
||||
swb_opt = " -u 0"
|
||||
endif
|
||||
endif
|
||||
if SWB_UNIT0 = 0 then
|
||||
if SWB_UNIT1 = 1 then
|
||||
swb_opt = " -u 1"
|
||||
endif
|
||||
endif
|
||||
;================================================================
|
||||
; Prompt Definitions
|
||||
;================================================================
|
||||
|
||||
Reference in New Issue
Block a user