I've got a hopefully easy to solve question.
The following Code is given:
input [31:0] rawdata,
output [31:0] filtered_data
reg [31:0] filtered_data_q;
assign filtered_data = filtered_data_q;
// filter + register
always @(posedge clk)
// Simple recursive filtering
filtered_data_q <= filtered_data_q * 3 / 4 + rawdata / 4;
filtered_data_q <= filtered_data_q;
This code synthesizes and simulates perfectly, just as expected.
But once I add a simple(st) buffer, nothing works:
assign temp = rawdata;
Additionally, I used 'temp' instead of 'rawdata' for the filter.
The result is that my complete filtered_q register is removed during
optimization step for the following reason: "Stuck at GND due to stuck
I also tried
always @ (rawdata)
temp = rawdata;
but that did not change anything.
Any Explanations? Why does this happen?