Circuits

With only write(addr, data) and read(addr, &data) APIs at your disposal, how would you devise an algorithm to detect a shorted internal signal in a black box scenario?

Design Verification Engineer

ASUS

SpaceX

IBM

FLIR Systems

GE Aviation

ByteDance

Did you come across this question in an interview?

Answers

Anonymous

8 months ago
4.6Exceptional
A short circuit in an internal signal implies that this signal is electrically connected to another signal, possibly VCC or GND. This will cause unexpected behavior when either of the shorted signals is driven.
Algorithm
  1. Initialization Gather information about the device:Addressable memory range. Data width at each address. Any known 'safe' addresses (e.g., read-only registers that won't affect device operation when written to). If no safe addresses are known, start with the highest address and work downwards to minimize the risk of disrupting critical functionality early in the process.
  2. Write-Read-Verify Loop For each address addr in the memory range:read(addr, &original_data): Read the original data at the address. new_data = ~original_data: Invert the original data. write(addr, new_data): Write the inverted data to the address. read(addr, &read_back_data): Read back the data from the same address. Compare:If read_back_data == new_data, the write was successful, move to the next address. If read_back_data != new_data:write(addr, original_data): Restore the original data to minimize disruption Potential Short: There's a potential short circuit involving a signal affected by writing to this address. Further Investigation:Try writing different patterns to the address and observe the read-back data. If the read-back data consistently reflects an unexpected pattern or is stuck at a particular value regardless of the written data, it strengthens the possibility of a short circuit. Log the address and the observed behavior for further analysis.
  3. Analysis
  • Correlate the addresses where unexpected behavior was observed.
  • Look for patterns:Are the problematic addresses contiguous or spread out? Do specific bit patterns in the read-back data suggest a connection to VCC, GND, or another signal?
  • Use your understanding of the device's functionality (even if limited) to hypothesize which internal signals might be shorted based on the affected addresses.
  • With only write(addr, data) and read(addr, &data) APIs at your disposal, how would you devise an algorithm to detect a shorted internal signal in a black box scenario?
  • Given the write(addr, data) and read(addr, &data) APIs, what would be your approach to uncover a shorted internal signal without access to internal or interface signals?
  • How would you construct an algorithm using just write(addr, data) and read(addr, &data) APIs to find a shorted internal signal, given no access to the signals themselves?
  • Using the write(addr, data) and read(addr, &data) APIs only, can you explain your method to identify a shorted internal signal in a device?
  • With the available write(addr, data) and read(addr, &data) APIs, what is your strategy for detecting a shorted internal signal under black box conditions?
  • If restricted to write(addr, data) and read(addr, &data) APIs, how would you approach identifying a shorted internal signal in a device?
  • How can you utilize write(addr, data) and read(addr, &data) APIs to detect a shorted internal signal, assuming black box constraints?
  • Given only write(addr, data) and read(addr, &data) APIs, how do you plan to uncover a shorted internal signal in a device?
  • With just the write(addr, data) and read(addr, &data) APIs, how would you engineer a solution to identify a shorted internal signal?
  • Suppose you have access to a device that has two APIs: write(addr, data) and read(addr, &data). Using only these two APIs, how would you write an algorithm to identify one of the internal signals that has been shorted? Assume that you have no access to the internal signals or the interface signals, and that you are limited to black box verification.
Try Our AI Interviewer

Prepare for success with realistic, role-specific interview simulations.

Try AI Interview Now

Interview question asked to Design Verification Engineers interviewing at Dialog Semiconductor, Cisco, KTM AG and others: With only write(addr, data) and read(addr, &data) APIs at your disposal, how would you devise an algorithm to detect a shorted internal signal in a black box scenario?.