C7 Digital logic · Practice
Writing Verilog
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 7 kinds solid
Check
How many wires does a vector declared [7:0] have?
Check
A reg [4-1:0] q starts at 15 and runs q <= q + 1; on every clock. What does it hold after 12 clocks?
Check
How many flip-flops does reg [8-1:0] r; always @(posedge clk) r <= r + 1; create?
Check
always @(posedge clk) r <= {r[N-2:0], d}; with N = 8, and a second block that copies its input through k nonblocking registers in a chain.
(a)
After how many clocks does a bit of d reach r[N−1]?
(b)
How many flip-flops do the two blocks build together?
Check
How many bits does the part-select x[7:2] contain?
Check
A case on a 3-bit selector can have how many distinct non-default items?
Check
assign y = en & a; with inputs E (en) and A. Write y.
Write AND as · or & (or just AB), OR as +, XOR as ⊕, and NOT as ¬ or a trailing ': A·B + C' works.
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in C7