fix(ttl): Compare SWB_UNIT1 in the second operand of the traffic branches
Rework the traffic blocks in A, B and C as explicit if/elseif branches
holding literal commands, and drop the derived swb_any/swb_opt from
config.ttl -- the branches read straight off the page and there is no
indirection to follow.
All nine conditions compared SWB_UNIT0 against itself, though:
if SWB_UNIT0 = 1 && SWB_UNIT0 = 1 -> SWB_UNIT0 = 1
elseif SWB_UNIT0 = 1 && SWB_UNIT0 = 0 -> never
elseif SWB_UNIT0 = 0 && SWB_UNIT0 = 1 -> never
so the single-unit paths were unreachable. A DUT with only unit 0 would
have run the both-unit commands and hit bcmcmd on an absent unit 1,
while a DUT with only unit 1 fell through to the empty else and skipped
traffic entirely. Second operand is now SWB_UNIT1.
Verified per branch that the -u argument matches the condition guarding
it: both units carry no -u (tool default TL_UNITS="0 1"), unit-0-only
carries -u 0, unit-1-only carries -u 1, and the else stays empty.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM
This commit is contained in:
@@ -5,7 +5,6 @@ project_name = "Blanton"
|
||||
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
|
||||
|
||||
;================================================================
|
||||
@@ -14,30 +13,6 @@ EN_log = 1 ; 1: Enable log, 0: Disable log
|
||||
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