Cadence Design Systems interview question

Scenario based coding question. Gave 15-20 mins to finish the code.