verilog中时钟上升沿准备数据,下降沿使用

在时钟下降沿产生single_bit 变量,然后在时钟上升沿使用single_bit 进行循环移位操作,
reg [7:0] shift;

reg [7:0] shift_cnt;
reg [7:0] temp ;
reg single_bit;
always@( negedge clk_100MHz, negedge rstn )
begin
if( !rstn )
begin
shift_cnt <= 8'd8;
temp <= 8'h55;
single_bit <= 1'b0 ;
end
else if( |shift_cnt )
begin
shift_cnt <= shift_cnt - 1;
single_bit <= temp[shift_cnt - 1];
end
else
single_bit <= 1'b0 ;
end

always@( posedge clk_100MHz, negedge rstn )
begin
if( !rstn )
begin
shift <= 8'd0;
end
else
begin
shift <= {shift[6:0], single_bit} ;
end
end

img

我理解是时序是,由于shift是非阻塞赋值,所以shift值为1应该出现在光标处,而实际上shift为1出现的时刻比我想得提前了一个时钟周期,这是为什么呢?希望大家给分析分析,指一个 正确的思路,在此先谢过了

时序与代码是一致的,波形没问题
不太理解你为什么认为在这个光标处shift 应该为 1
按你的代码,shift 为1是在时钟上升沿single_bit 为 1 的时候产生。
如果你认为波形有问题,就应该去分析single_bit