G7.9.1 Which Way Does the Race Go?

MediumImplementIcarus · browser samples / server checksReview the topic

Analyse a two-loop circuit with no clock. Find its excitation table, its stable states and where its race ends for two delay sets.

Hardware context: A small feedback circuit with no clock on a legacy board, about to move to a process with different delays. Analyse a two-loop circuit's flow table and say where its race ends for two delay sets.

A legacy board has a small feedback circuit with no clock. Before it is moved to a new process, someone must say whether its behaviour depends on the loop delays.

This is an Implement problem with no logic to write. Analyse the circuit and write each answer as a constant. The first three constants are worked examples and are already correct.

Codes are y1y2 read as a binary number: 2 means y1 = 1 and y2 = 0. The check compares every constant with the right value and names the first wrong one.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
The circuit (input x; state variables y1, y2; excitations Y1, Y2)
// The logic has no delay. Each feedback loop has one delay element:
// y1 is Y1 delayed by d1, and y2 is Y2 delayed by d2.
assign Y1 = (~x & (y1 | y2)) | (x & y1 & y2);
assign Y2 = x | (~y1 & y2);
ConstantWhat to write
EXC_00_X0Y1Y2 as a number 0-3 (Y1 is the high bit) for y1y2 = 00 and x = 0.
EXC_00_X1Y1Y2 for y1y2 = 00 and x = 1.
EXC_01_X0Y1Y2 for y1y2 = 01 and x = 0.
EXC_01_X1Y1Y2 for y1y2 = 01 and x = 1.
EXC_11_X0Y1Y2 for y1y2 = 11 and x = 0.
EXC_11_X1Y1Y2 for y1y2 = 11 and x = 1.
EXC_10_X0Y1Y2 for y1y2 = 10 and x = 0.
EXC_10_X1Y1Y2 for y1y2 = 10 and x = 1.
STABLEHow many of the eight total states (y1y2 and x) are stable.
RACE_FROMThe code y1y2 of the stable state with x = 0 from which x rising starts a race.
END_AAfter that change, the final code y1y2 with d1 = 1 and d2 = 3.
END_BAfter that change, the final code y1y2 with d1 = 3 and d2 = 1.
CRITICAL1 if that race is critical, 0 if it is noncritical.
CYCLE_STEPSFrom the stable state 01 with x = 1, x falls: how many changes of y1y2 happen before the circuit is stable.

The circuit works in fundamental mode: x changes only when the circuit is stable. A delay element passes a change of its input only if the change lasts longer than its delay.

Examples

Example 1

Worked Example: 00 With x = 0
Input
Y1Y2 as a number 0-3 (Y1 is the high bit) for y1y2 = 00 and x = 0
Output
exc_00_x0 = 0

Y1 = x'(y1 + y2) + x y1 y2 = 0 and Y2 = x + y1'y2 = 0. The entry is 00, its own row: stable.

Example 2

Worked Example: 00 With x = 1
Input
Y1Y2 for y1y2 = 00 and x = 1
Output
exc_00_x1 = 1

Y1 = 0 and Y2 = 1, so the entry is 01. Only y2 is excited: one variable, no race.

Example 3

Worked Example: 01 With x = 0
Input
Y1Y2 for y1y2 = 01 and x = 0
Output
exc_01_x0 = 3

Y1 = x'(y1 + y2) = 1 and Y2 = y1'y2 = 1: the entry is 11. Only y1 differs from the row, so the circuit moves to 11 and reads that row next.

Constraints and Contract

  • Keep the module name answer and the names of the constants.
  • Codes are 0 to 3, with y1 as the high bit.

Hints

Hint 1

Fill the excitation table first: for each y1y2 and x, evaluate Y1 and Y2. An entry equal to its own row is stable.

Hint 2

For the race, take one variable at a time. Change the faster one first, then read the row you land in, under the same x. Its entry decides whether the slower change still happens.

Hint 3

For the cycle, keep reading the x = 0 column from each new state until an entry equals its own row.

What the grader checks: The check reads each constant and compares it with a value computed in JavaScript from the circuit's equations and a delay-element model. It cannot see how a value was found.

14 checks on Icarus · browser samples / server checks. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain public samples only. A passing result establishes the tested cases, not a proof for all possible inputs.

See all 1 steps and the final capstone

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

Worked Example: 00 With x = 0

Input
Y1Y2 as a number 0-3 (Y1 is the high bit) for y1y2 = 00 and x = 0
Expected output
exc_00_x0 = 0

Y1 = x'(y1 + y2) + x y1 y2 = 0 and Y2 = x + y1'y2 = 0. The entry is 00, its own row: stable.

Run samples executes all 3 public checks. Check all tests runs 14 checks on the server.

Icarus · browser samples / server checks