1/37
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Constant Bit-Select
A vector selection using a fixed index, such as in[5], that always selects the same predetermined bit.
Variable Bit-Select
A vector selection using a runtime signal as the index, such as in[sel], allowing the selected bit to change while the hardware operates.
What does in[sel] mean?
Select the bit of in whose index is given by the current value of sel.
What happens to out in assign out = in[sel]; when sel changes?
out reflects the bit at the newly selected position of in.
Constant Index vs Variable Index
A constant index selects one predetermined position, while a variable index selects a position determined by a runtime signal.
What hardware behavior can in[sel] infer?
Multiplexer-like hardware that selects one bit from multiple possible input bits.
Multiplexer Inference
When an HDL description causes synthesis to recognize and implement the required selection behavior using mux-like hardware.
What role does sel have in assign out = in[sel];?
sel is the selection control that determines which bit of in appears at out.
Does sel become part of the output data in out = in[sel]?
No. sel identifies which input position is selected; the selected bit itself becomes out.
How many choices can an N-bit selector represent?
Up to 2^N different choices.
How many choices can an 8-bit selector represent?
256 choices, corresponding to values 0 through 255.
What mux behavior is described by a 256-bit in, an 8-bit sel, and out = in[sel]?
A 256-to-1, 1-bit-wide multiplexer.
What does 256-to-1 mean for a multiplexer?
There are 256 possible input choices and one of them is selected for the output.
What does 1-bit-wide mean in a 256-to-1, 1-bit-wide mux?
Each selectable input contains one bit.
Selector Width
The number of bits in the selection control; it determines how many distinct choices can be addressed.
Data Width
The number of bits contained in each selectable data item.
Does selector width determine the width of each selected data item?
No. Selector width determines the number of addressable choices, while data width determines the size of each choice.
Dynamic Word Selection
Selecting one fixed-width multi-bit word from several packed words according to a runtime selector.
What is the new Session 3 idea in in[sel*4 +: 4]?
The base of an already-known fixed-width indexed part-select is controlled by a runtime selector, producing dynamic 4-bit word selection.
What does sel represent in in[sel*4 +: 4]?
The number of the 4-bit word to select.
Why is sel multiplied by 4 in in[sel*4 +: 4]?
Each word is 4 bits wide, so multiplying the word number by 4 gives that word's starting bit position.
What does in[sel*4 +: 4] select when sel = 0?
in[3:0].
What does in[sel*4 +: 4] select when sel = 1?
in[7:4].
What does in[sel*4 +: 4] select when sel = 2?
in[11:8].
What remains fixed in in[sel*4 +: 4] even though sel changes?
The selection width remains 4 bits.
How many packed bits are required to hold 256 four-bit words?
1024 bits, because 256 × 4 = 1024.
How can a 1024-bit packed vector be interpreted for this mux application?
As 256 consecutive 4-bit words.
What mux behavior is described by out = in[sel*4 +: 4] with 256 four-bit words and an 8-bit sel?
A 256-to-1, 4-bit-wide multiplexer.
What does 4-bit-wide mean in a 256-to-1, 4-bit-wide mux?
Each of the 256 selectable inputs is a complete 4-bit word.
How can a 4-bit-wide mux be viewed internally?
As four parallel selection paths sharing the same selector, one for each output bit.
Word Number vs Bit Number
In dynamic word selection, sel identifies a word, while sel multiplied by the word width gives that word's starting bit index.
What is the general starting-index relationship for packed words of width W?
starting index = selector × W.
Does variable indexing create new hardware whenever sel changes?
No. The selection hardware already exists; sel only controls which existing input path influences the output.
Runtime Selection
A selection made while the circuit is operating according to the current value of a signal such as sel.
Variable Indexing vs Generate Selection
Variable indexing performs runtime selection through existing hardware, while generate constructs determine hardware structure during elaboration.
Why can assign out = in[sel]; describe much more hardware than the source line suggests?
A short HDL expression can specify selection among many inputs, requiring a potentially large mux network after synthesis.
What is the key hardware question to ask when seeing in[sel]?
Which one of the available input bits must the hardware select according to sel?
What is the key hardware question to ask when seeing in[sel*4 +: 4]?
Which fixed-width word must the hardware select according to sel?