求解一下 sdram 控制器代码段中的 command 中一段 关于仲裁 的 代码,怎么实现的?代码段如下:
// set command_delay shift register and command_done flag // The command delay shift register is a timer that is used to ensure that // the SDRAM devices have had sufficient time to finish the last command.
if ((do_refresh == 1) | (do_reada == 1) | (do_writea == 1) | (do_precharge == 1) | (do_load_mode == 1)) begin command_delay <= 8'b11111111; command_done <= 1; rw_flag <= do_reada; end else begin command_done <= command_delay[0]; // the command_delay shift operation command_delay <= (command_delay>>1); end // start additional timer that is used for the refresh, writea, reada commands if (command_delay[0] == 0 & command_done == 1) begin rp_shift <= 4'b1111; rp_done <= 1; end else begin if(SC_PM == 0) begin rp_shift <= (rp_shift>>1); rp_done <= rp_shift[0]; end else begin if( (ex_read == 0) && (ex_write == 0) ) begin rp_shift <= (rp_shift>>1); rp_done <= rp_shift[0]; end else begin if( PM_STOP==1 ) begin rp_shift <= (rp_shift>>1); rp_done <= rp_shift[0]; ex_read <= 1'b0; ex_write <= 1'b0; end end end end end end end
|