Challenge - 5 Problems
Synthesis Attribute Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediateWhat is the output of this VHDL attribute usage?
Consider the following VHDL snippet where an attribute is used to control synthesis. What is the effect of the attribute on the signal
clk?VHDL
signal clk : std_logic;
attribute keep : boolean;
attribute keep of clk : signal is true;Attempts:
2 left
💡 Hint
Think about what the 'keep' attribute does in synthesis tools.
✗ Incorrect
The 'keep' attribute when set to true on a signal instructs synthesis tools to preserve that signal and not optimize it away, even if it appears unused.
❓ Predict Output
intermediateWhat is the effect of the following synthesis attribute on a signal?
Given this VHDL code snippet, what does the attribute
dont_touch do to the signal data during synthesis?VHDL
signal data : std_logic_vector(7 downto 0); attribute dont_touch : boolean; attribute dont_touch of data : signal is true;
Attempts:
2 left
💡 Hint
Consider the meaning of 'dont_touch' in synthesis.
✗ Incorrect
The 'dont_touch' attribute tells synthesis tools not to modify or optimize the specified signal, preserving its structure exactly.
❓ Predict Output
advancedWhat is the output of this VHDL code with synthesis attribute controlling register packing?
In this VHDL snippet, an attribute is used to control register packing. What is the expected behavior of the synthesis tool for the
reg_array?VHDL
type reg_array_t is array (0 to 3) of std_logic_vector(7 downto 0); signal reg_array : reg_array_t; attribute ram_style : string; attribute ram_style of reg_array : signal is "block";
Attempts:
2 left
💡 Hint
Think about what the 'ram_style' attribute controls in synthesis.
✗ Incorrect
The 'ram_style' attribute with value 'block' instructs synthesis tools to implement the signal as block RAM instead of registers.
❓ Predict Output
advancedWhat error does this VHDL attribute usage cause?
Analyze the following VHDL code snippet. What error will the synthesis tool report?
VHDL
signal my_signal : std_logic; attribute keep : boolean; attribute keep of my_signal : signal is 1;
Attempts:
2 left
💡 Hint
Check the attribute type and value compatibility.
✗ Incorrect
The 'keep' attribute expects a boolean value, but here an integer is assigned, causing a type mismatch error.
🧠 Conceptual
expertWhich attribute usage will force a synthesis tool to preserve a combinational logic block output?
You want to ensure that the output signal
comb_out of a combinational logic block is not optimized away by synthesis. Which attribute usage is correct?Attempts:
2 left
💡 Hint
Focus on standard synthesis attributes and their correct types and values.
✗ Incorrect
The standard attribute to preserve signals in synthesis is 'keep' with boolean type set to true. Other options use incorrect attribute names or types.
