Follow a scan pattern past the flip-flop that asks for an analog bias, and count the pulses on which the bias is on, with the clamp off and with it on.
Hardware context: Scan flip-flop of ap_soc that holds the bias request of an analog receiver, with a clamp driven from a test pin. Keeping analog blocks in a safe state during scan test
This is the analog hook of lesson S8.13 with another pattern. A scan chain has three flip-flops. Flop 0 is next to the scan input, and each pulse moves every bit one flop on. Here flop 2 holds the bias request. With the clamp off, bias enable equals the bias request. With the clamp on, bias enable is 0. All three flops hold 0 before the first pulse.
This worksheet uses named constants. The first three entries show how to record your decisions.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Item | Value |
|---|---|
| The pattern, first bit first | 0, 1, 1, 0, 1, 0, 0, 1 |
| Pulses | Eight, numbered 1 to 8. One bit goes in on each. |
| The bias request | The content of flop 2 |
Write the three flops as one binary number, flop 2 on the left, and enter it as a decimal number: 110 is 6. Enter a pulse as its number: 4 for pulse 4.
| Entry | Your decision |
|---|---|
| FLOPS_3 | The flops after pulse 3, as a decimal number. |
| FLOPS_4 | The flops after pulse 4. |
| FIRST_HIGH | With the clamp off: after which pulse is bias enable 1 for the first time? |
| ENABLE_5 | With the clamp off: the level of bias enable after pulse 5. |
| ENABLE_6 | With the clamp off: the level of bias enable after pulse 6. |
| LAST_HIGH | With the clamp off: after which pulse is bias enable 1 for the last time? |
| HIGH_COUNT | With the clamp off: after how many of the eight pulses is bias enable 1? |
| FLOPS_8 | The flops after pulse 8. |
| CLAMP_COUNT | With the clamp on: after how many of the eight pulses is bias enable 1? |
| REQUEST_COUNT | With the clamp on: after how many of the eight pulses is the bias request 1? |
| ONES_NOT_SEEN | How many ones of the pattern never reach flop 2 within the eight pulses? |
| HIGH_N | Suppose the pattern were N ones followed by zeros, eight bits in all, with the clamp off. After how many of the eight pulses would bias enable be 1? |
Examples
Example 1
FLOPS 3- Input
The flops after pulse 3, as a decimal number.
- Output
matches = 1
The bits 0, 1, 1 are in flop 2, flop 1 and flop 0: 011.
Example 2
FLOPS 4- Input
The flops after pulse 4.
- Output
matches = 1
Each bit moved on and a 0 came in: 110.
Example 3
FIRST HIGH- Input
With the clamp off: after which pulse is bias enable 1 for the first time?
- Output
matches = 1
The first 1 of the pattern went in on pulse 2. It reaches flop 2 two pulses later.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For HIGH_N, enter a constant expression using N. Only this entry changes with the parameter. The supported integer range is 1 through 8, inclusive.
Hints
Hint 1
Write the flops after each pulse. Flop 2 holds the bit that went in two pulses before.
Hint 2
The bias request is flop 2. With the clamp off, bias enable is the same.
Hint 3
With the clamp on, bias enable is 0 on every pulse. The flops do not change.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
12 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 1 problem on this path