Forum Discussion
Altera_Forum
Honored Contributor
14 years agoobject assigned a value but never read - does this effect synthesis?
Hello, I have the following small module which is intended to store the value 0xFF in a register when a button is pressed.
module connector_test(button, txd);
input button;
output reg t...
Altera_Forum
Honored Contributor
14 years agoHere's what I've used:
// ------------------------------------------------------------
// SignalTap II counter
// ------------------------------------------------------------
//
`ifdef USE_SIGNALTAP
logic count /* synthesis noprune */;
always_ff @ (posedge clkin, negedge pcie_perstN)
if (~pcie_perstN)
count <= '0;
else
count <= count + 1;
`endif
This preserves a counter that goes nowhere, which I can then probe with SignalTap ... which arguably means it goes somewhere ... however I needed to add this constraint so that Quartus would keep the counter so that I could probe it. There are a few other synthesis attributes; keep, preserve, etc. Try a few :) Cheers, Dave