S3 Digital design with HDL · Practice
A RISC-V core in RTL
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 11 kinds solid
Check
Encode sw x6, 1000(x2) (S-type, funct3 = 2, opcode 0x23).
Check
A 12-bit immediate field holds 2047 (unsigned). What value does the immediate generator produce after sign extension?
Check
A single-cycle core: clock-to-Q 40, instruction memory 200, register read 180, ALU 250, data memory 200, write-back mux 20, setup 20 ps. What's the clock period?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
Check
A multicycle core takes 5 cycles for loads, 4 for stores and ALU instructions, and 3 for branches. With 0.2 loads, 0.1 stores, 0.16 branches and the rest ALU, what's the CPI?
Check
A program runs 1 billion instructions at a CPI of 1.4 with a 1 ns clock. How long does it take?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A register file has 16 registers of 32 bits, with register 0 hard-wired to zero. How many flip-flops does it need?
Check
A taken branch at address 0x00000400 has a B-type offset of −64. What's the target address?
Check
A multicycle core (load 5 cycles, store 4, ALU 4, branch 3) runs a mix of 0.2 loads, 0.1 stores and 0.2 branches, the rest ALU, with a 400 ps clock. Separately, an I-type instruction's 12-bit immediate field reads 3000.
(a)
What is its CPI?
(b)
How long do 10 million instructions take?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
(c)
What value does the immediate field encode?
Check
Encode sw x4, 500(x3).
Check
Sign-extend the 12-bit field 2049?
Check
Multicycle CPI with 0.25 loads, 0.08 stores, 0.18 branches?
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 S3