B1.3.1 Read the Specification

EasyImplement12 minIcarus Verilog · serverReview the topic

A UART transmitter sends a byte one bit at a time on one wire. Read a seven-sentence specification of a small one. Sort each statement or question into feature, interface, a case the text answers, or a question it leaves open.

Hardware context: A decade counter and a small UART transmitter, each with a short written specification. Reviewing a block specification before design starts.

This is the whole specification. A question the text leaves open, by ambiguity or by silence, is code 4. It must go to the owner of the specification.

This worksheet uses named constants. The first three entries show how to record your decisions.

Replace each unresolved value of 255 with your result.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
SentenceSpecification of uart_tx
1Pins: clk; rst (synchronous, active high); start; data[7:0] as inputs. tx and busy as outputs.
2When start is high and the transmitter is idle, it takes data and sends one frame.
3A frame is a start bit (0), eight data bits low bit first, and a stop bit (1).
4Each bit lasts 4 clocks.
5busy is high while sending.
6start is ignored while busy.
7tx is 1 when idle.
CodeKind
1Feature: something the design must do
2Interface: a pin or a rule for using one
3An unusual case the text does answer
4A question the text leaves open
EntryYour decision
PINSThe names and directions of clk, rst, start, data, tx and busy.
FRAMEA frame is a start bit, eight data bits low bit first, and a stop bit.
BUSY_STOPIs busy high during the stop bit?
START_MIDstart goes high in the middle of a frame.
RESET_MIDrst goes high in the middle of a frame. What is tx on the next clock?
BIT_TIMEEach bit lasts 4 clocks.
RST_KINDrst is synchronous and active high.
DATA_MIDdata changes in the middle of a frame.
FIRST_BITWhich data bit is sent first?
GAPMust tx stay 1 for at least one clock between two frames?
BUSY_QUESTIONSentence 5 may be revised. REVISED = 0: it stays "busy is high while sending". REVISED = 1: it becomes "busy is high from the start bit through the last clock of the stop bit". Classify the question "Is busy high during the stop bit?"

Examples

Example 1

PINS
Input
The names and directions of clk, rst, start, data, tx and busy.
Output
matches = 1

Pins and their directions are the interface.

Example 2

FRAME
Input
A frame is a start bit, eight data bits low bit first, and a stop bit.
Output
matches = 1

Something the design must do.

Example 3

BUSY STOP
Input
Is busy high during the stop bit?
Output
matches = 1

"While sending" does not say whether the stop bit counts as sending.

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For BUSY_QUESTION, enter a constant expression using REVISED. Only this entry changes with the parameter. The supported integer range is 0 through 1, inclusive.

Hints

Hint 1

Does any of the seven sentences answer it? Quote it to yourself.

Hint 2

Names, directions and rules of use are interface; what the design does is a feature.

Hint 3

If no sentence answers it, it is code 4, however obvious the answer seems.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.

15 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

Report a problem with this page

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

PINS

Input
The names and directions of clk, rst, start, data, tx and busy.
Expected output
matches = 1

Pins and their directions are the interface.

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

Icarus Verilog · server