Size the buffer of a speed bridge between a real interface and a design in an emulator. Then use what the book says about rates.
Hardware context: Hardware emulators, named only, from the book. Speed bridges.
MEHTA-DV 12.3: most emulators reach a few MHz, so a speed bridge buffers data or slows the real side through its protocol. MEHTA-DV 12.5 says acceleration runs in kHz and emulation in MHz. Section 16.11 puts acceleration at a few MHz at best, so the book is not consistent there. The interface numbers below are invented for this exercise.
This worksheet uses named constants. The first three entries show how to record your decisions.
Replace each unresolved value of 65535 with your result.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Code | What a speed bridge does |
|---|---|
| 1 | Drop the bytes the box cannot take |
| 2 | Buffer and slow the real side through its own flow control |
| 3 | Raise the emulator's clock to the real rate |
| 4 | Send the data to a waveform file instead |
| Code | Faster, per MEHTA-DV 12.5 |
|---|---|
| 1 | Emulation |
| 2 | Acceleration |
The exercise: a real interface sends a burst of 4,000 bytes at 100 million bytes a second. The design in the box takes one byte per emulated clock.
| Entry | Your decision |
|---|---|
| BUFFER_2MHZ | At 2 MHz, how many bytes must the bridge hold at the end of the burst? |
| DRAIN_US | At 2 MHz, how many microseconds does the box take to consume all 4,000 bytes? |
| BRIDGE | What does a speed bridge do? (code) |
| FASTER | Which runs faster, per MEHTA-DV 12.5? (code) |
| BURST_US | How many microseconds does the 4,000-byte burst last on the real side? |
| BUFFER_10MHZ | At 10 MHz, how many bytes must the bridge hold at the end of the burst? |
| BUFFER_100MHZ | At 100 MHz, how many bytes must the bridge hold? |
| SLOW_REAL | The bridge has room for only 1,000 bytes. What must it do at 2 MHz? (code) |
| BUFFER_F | At an emulated clock of F MHz, how many bytes must the bridge hold at the end of the 4,000-byte burst? |
Examples
Example 1
BUFFER 2MHZ- Input
At 2 MHz, how many bytes must the bridge hold at the end of the burst?
- Output
matches = 1
The burst lasts 40 us; the box takes 80 bytes in that time.
Example 2
DRAIN US- Input
At 2 MHz, how many microseconds does the box take to consume all 4,000 bytes?
- Output
matches = 1
4,000 bytes at 2 million a second.
Example 3
BRIDGE- Input
What does a speed bridge do? (code)
- Output
matches = 1
MEHTA-DV 12.3: buffering, or protocol tricks that slow the real world.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For BUFFER_F, enter a constant expression using F. Only this entry changes with the parameter. The supported integer range is 1 through 10, inclusive.
Hints
Hint 1
4,000 bytes at 100 MB/s is 40 us.
Hint 2
F MHz x 40 us bytes.
Hint 3
Buffer = burst - taken.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
13 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 2 problems on this path