Mars Rover

Microsoft

Problem Description

The year is 2028. You are a Silicon Validation Engineer at a top aerospace firm. Your team has just landed a new rover on Mars. The rover’s Navigation Unit (running on a cutting-edge 500 MHz processor) sends a critical "Obstacle Detected" pulse whenever it senses a rock.

This pulse must be received by the Emergency Brake System, which runs on a ruggedized, radiation-hardened Legacy Controller clocked at a much slower 100 MHz.

The Crisis

During the first drive, the rover hit a rock and didn't stop. The logs show:

  1. The Navigation Unit did generate the pulse.

  2. The Emergency Brake System never saw it.

The Lead Architect realizes the mistake: "We connected a single-cycle pulse from a fast clock directly into a slow clock domain. The slow clock is 'blind' to anything that happens faster than its own cycle!"

Your Mission

You have been tasked to design a Pulse Synchronizer (The Bridge) that ensures no matter how fast the Navigation Unit screams "STOP," the Legacy Controller hears it.

Constraints:

  • Reliability: Every single pulse in the Fast Domain must result in exactly one pulse in the Slow Domain.

  • Asynchronous: You cannot assume any relationship between the phases of the two clocks.

  • Reset: System must be an active-low reset (rst).

Here is how the module interface looks like

Port Name

Direction

Clock Domain

Purpose

clk_fast

Input

N/A

The 500 MHz source clock from the Navigation Unit.

rst

Input

Async/Sync

Active-low system reset to initialize all flip-flops to zero.

pulse_in

Input

clk_fast

A single-cycle high signal representing an Obstacle Alert.

clk_slow

Input

N/A

The 100 MHz destination clock for the Brake System.

pulse_out

Output

clk_slow

A single-cycle high signal perfectly aligned to the slow clock.

Verilog

Code Editor Access

Log in to write, run and submit your solution to this interview question. It's free.

Output

Output goes here...