Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Map packed words to unpacked bytes

Hardware interview practice

Map packed words to unpacked bytes

EasyBit ManipulationSystemVerilog

Split a 32-bit packed word into four unpacked bytes using little-endian byte lanes, then rebuild the original word.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Reviewed example

Work through one case

Input
word = 32'hA1B2_C3D4
Expected output
bytes[0:3] = [D4, C3, B2, A1]; rebuilt_word = 32'hA1B2_C3D4

Little-endian lane zero is word[7:0], and the inverse indexed part-select mapping reproduces every source bit.

What to cover

Requirements

  1. Define byte 0 as word[7:0].
  2. Use indexed part-selects rather than an implicit array assignment.
  3. Rebuilding the word must reproduce every input bit.
asic.fyi · Learn silicon end to end.info@asic.fyi