DescriptionQ531
Q531DVASIC interview problem
Constrain a DMA transfer to one 4KB page
TechniquesSystemVerilogConstraintsDMAAlignment
DifficultyMedium
TopicConstraints
LanguageSystemVerilog
Requirements4 checkpoints
01
Problem
Constrain a randomized DMA transaction with a 64-bit address, a 64-to-4096-byte length in 64-byte units, and LINEAR or FIXED burst type. Incrementing transfers may not cross a 4KB page.
Example input and output
Use this case to check your interpretationInput
burst_type=LINEAR, 4 KiB page size, length_bytes=128Output
One valid randomized result: addr=0x1803, final_byte=0x1882Explanation
Both endpoints lie in page 0x1000..0x1FFF. Alignment is not part of this question, so any other start that stays inside the page is also legal.
02
Requirements (4)
- Length must be within 64 through 4096 bytes and divisible by 64.
- For LINEAR bursts, the last byte must remain in the same 4KB page as the first byte.
- A FIXED burst may contain at most 256 bytes.
- Allow a 4096-byte LINEAR transfer only when the start address is page aligned.
