FPGA fancier

FPGA 愛好者天地
現在的時間是 九月 9th, 2010, 9:38 am

所有顯示的時間為 UTC + 8 小時




   [ 1 篇文章 ] 
發表人 內容
 文章主題 : Clock speed change
文章發表於 : 三月 8th, 2010, 9:54 am 
新進人士

註冊時間: 三月 8th, 2010, 9:42 am
文章: 1
Hi,

I am working on a CPLD project. The program was originally sending 8-bits data in parallel. Now I have to change it to send the data in serial.

So the clock speed was set to 8 times faster. But the problem is that the
data still have to be read from the buffer in parallel before sending.

The original coding for the parallel data output is as following:
代碼:
always @ (iPSClk)        // clock for parallel data output
begin
    if(iPSClk)
        oRead = 0;          // triggers read at the falling edge;
    else
        oRead = 1;
end


Then it was modified for the serial output:
代碼:
always @(rBitCnt)
begin
    if((rBitCnt == 4) || (rBitCnt == 5) || (rBitCnt == 6) || (rBitCnt == 7))
         oRead = 0;
    else
         oRead = 1;
end

always @(negedge iPSClk2)    // new clock for serial output
begin
    if(rBitCnt < 7)
         rBitCnt = rBitCnt + 1;
    else
         rBitCnt = 0;
end


The oRead signals measured by the analyzer are in the same timing, however, the program is not working.

So it will be great help, if anyone knows better ways to remain the oRead timing with new faster clock.

Thank you,
JR


回頂端
   
 
顯示文章 :  排序  
   [ 1 篇文章 ] 

所有顯示的時間為 UTC + 8 小時


誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客


不能 在這個版面發表主題
不能 在這個版面回覆主題
不能 在這個版面編輯文章
不能 在這個版面刪除文章
不能 在這個版面上傳附加檔案

搜尋:
前往 :  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
正體中文語系由 竹貓星球 維護製作