赋值延时
时间:10-02
整理:3721RD
点击:
请教,为什么一定要有赋值延时? 如下
对任何reg赋值用非阻塞赋值代替阻塞赋值 reg 的非阻塞赋值要加单位延迟但异
步复位可加可不加=与=的区别
Always @(posedge Clk or negedge Rst_)
Begin
If (!Rst_) // prioritize the “if conditions” in if statement
Begin
Rega <= 0; //non_blocking assignment
Regb <= 0;
End
Else if (Soft_rst_all)
Begin
Rega <= #u_dly 0; //add unit delay
Regb <= #u_dly 0;
End
Else if (Load_init)
Begin
Rega <= #u_dly init_rega;
Regb <= #u_dly init_regb;
End
Else
Begin
Rega <= #u_dly Rega << 1;
Regb <= #u_dly St_1;
End
End // end Rega, Regb assignment.
对任何reg赋值用非阻塞赋值代替阻塞赋值 reg 的非阻塞赋值要加单位延迟但异
步复位可加可不加=与=的区别
Always @(posedge Clk or negedge Rst_)
Begin
If (!Rst_) // prioritize the “if conditions” in if statement
Begin
Rega <= 0; //non_blocking assignment
Regb <= 0;
End
Else if (Soft_rst_all)
Begin
Rega <= #u_dly 0; //add unit delay
Regb <= #u_dly 0;
End
Else if (Load_init)
Begin
Rega <= #u_dly init_rega;
Regb <= #u_dly init_regb;
End
Else
Begin
Rega <= #u_dly Rega << 1;
Regb <= #u_dly St_1;
End
End // end Rega, Regb assignment.
其实只是为了综合前仿真时候能模仿一些电路延时,我是这样想的……
就是模拟考虑到信号在线间传输所要消耗的时间。
延时只是仿真时用的,实际中还是需要硬件来实现的!
仅仅是为了仿真而已
模拟uTCO,便于看波形,不加也是可以的
