6.11

用简单的几句代码,便实现类似串口通信那样的时序控制,确实很好,

    case(i)
        
        0,1,2,3,4,5,6,7:
       begin
             rDI <= iData[ 7-i ];                    
            
             if( C1 == 0 ) rSCLK <= 1'b0;
            else if( C1 == isHalf ) rSCLK <= 1'b1;
                                
            if( C1 == isQuarter ) D1[ 7-i ] <= SD_DOUT;
                                
            if( C1 == isFull -1 ) begin C1 <= 10'd0; i <= i + 1'b1; end
            else begin C1 <= C1 + 1'b1; end
        end

 

posted on 2015-06-11 10:36  且歌且行吧  阅读(102)  评论(0编辑  收藏  举报

导航