最新免费av在线观看,亚洲综合一区成人在线,中文字幕精品无码一区二区三区,中文人妻av高清一区二区,中文字幕乱偷无码av先锋

登錄 免費(fèi)注冊(cè) 首頁(yè) | 行業(yè)黑名單 | 幫助
維庫(kù)電子市場(chǎng)網(wǎng)
技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測(cè)控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng)
驅(qū)動(dòng)編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計(jì) | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe

請(qǐng)教同樣一個(gè)程序在xilinx和LATTICE結(jié)果不一樣,郁悶ing

作者:大老鼠布布 欄目:EDA技術(shù)
請(qǐng)教同樣一個(gè)程序在XILINXLATTICE結(jié)果不一樣,郁悶ing
MODULE counter(seg,sl,clock);
    OUTPUT [7:0] seg;
    OUTPUT [3:0] sl;
    input  clock;

    reg[7:0]seg_reg;
    reg[7:0]seg_reg1;
    reg[7:0]seg_total;

    reg[3:0]sl_reg;
    reg[3:0]disp_dat;
    reg[3:0]disp_dat1;

    reg[39:0]count;

    reg flag;

    //count[37:34]        //qian wei
    //count[33:30]        //bai  wei
    //count[29:26]        //shi  wei
    //count[25:22]        //ge   wei
    
    always@(posedge clock)
    begin
        count=count+1;

        if(count[25:22]>4'h9)    //ge    wei   miao
        begin
            count[25:22]=0;
            count[29:26]=count[29:26]+1;
        end

        if(count[29:26]>4'h5)    //shi   wei   shi miao
        begin
            count[29:26]=0;
            count[33:30]=count[33:30]+1;
        end

        if(count[33:30]>4'h9)    //bai   wei   feng
        begin
            count[33:30]=0;
            count[37:34]=count[37:34]+1;
        end

        if(count[37:34]>4'h5)    //qian  wei   shi feng
            count[37:34]=0;
    end

always@(count[14:13])            //sua xin ping lv
    begin
    case(count[14:13])            //sua xin ping lv
    // ji shi qi de shu du
    2'h0: disp_dat  = count[37:34];    //qian wei    
    2'h1:
          begin
            disp_dat1 = count[33:30];    
            flag=1;
        end
    2'h2: disp_dat  = count[29:26];    //shi  wei    
    2'h3: disp_dat  = count[25:22];    //ge   wei    
    endcase

    case(count[14:13])            //sua xin ping lv
        2'h0:sl_reg=4'b1110;    //qian wei
        2'h1:sl_reg=4'B1101;    //bai  wei
        2'h2:sl_reg=4'B1011;    //shi  wei
        2'h3:sl_reg=4'b0111;    //ge   wei
    endcase
end

    always@(disp_dat)
    begin
        case(disp_dat)
        4'h0:seg_reg=8'hc0;        //DISPLAY 0
        4'h1:seg_reg=8'hf9;        //DISPLAY 1
        4'h2:seg_reg=8'ha4;        //DISPLAY 2
        4'h3:seg_reg=8'hb0;        //DISPLAY 3

        4'h4:seg_reg=8'h99;        //DISPLAY 4
        4'h5:seg_reg=8'h92;        //DISPLAY 5
        4'h6:seg_reg=8'h82;        //DISPLAY 6
        4'h7:seg_reg=8'hf8;        //DISPLAY 7

        4'h8:seg_reg=8'h80;        //DISPLAY 8
        4'h9:seg_reg=8'h90;        //DISPLAY 9
        endcase
    end

always@(disp_dat1)
begin
  case(disp_dat1)
         4'h0:seg_reg1=8'h40;//DISPLAY 0+dot
         4'h1:seg_reg1=8'h79;//DISPLAY 1+dot
    4'h2:seg_reg1=8'h24;//DISPLAY 2+dot
    4'h3:seg_reg1=8'h20;//DISPLAY 3+dot

     4'h4:seg_reg1=8'h19;//DISPLAY 4+dot
    4'h5:seg_reg1=8'h12;//DISPLAY 5+dot
    4'h6:seg_reg1=8'h02;//DISPLAY 6+dot
    4'h7:seg_reg1=8'h78;//DISPLAY 7+dot

    4'h8:seg_reg1=8'h00;//DISPLAY 8+dot
    4'h9:seg_reg1=8'h10;//DISPLAY 9+dot
    endcase
end

    always@(flag)
    begin
        if(flag)
        begin
            seg_total=seg_reg1;
            flag=0;
        end
        else
        begin
            seg_total=seg_reg;
        end
    end
    
    assign seg=seg_total;
    assign sl=sl_reg;

endMODULE
/****************************************************/
XILINX下會(huì)提示這樣的錯(cuò)誤
用的芯片是XC95108
Optimizing unit <counter> ...
WARNING:
2樓: >>參與討論
littleou
lots of error
    always@(posedge clock)
    begin
        count=count+1; //error ,should be <=


always@(count[14:13])            //sua xin ping lv  //error
    begin
    case(count[14:13])            //sua xin ping lv
    // ji shi qi de shu du
    2'h0: disp_dat  = count[37:34];    //qian wei    // error


    always@(flag)  //error
    begin
        if(flag)
        begin
            seg_total=seg_reg1; //error
            flag=0;
        end
        else
        begin
            seg_total=seg_reg; //error
        end
    end
    

check you coding style,lots of error

3樓: >>參與討論
大老鼠布布
大老鼠
 always@(posedge clock)
    begin
        count=count+1; //這是對(duì)的,不會(huì)有問題的。
關(guān)鍵就是flag引出的問題。我該怎么改呢?(兩個(gè)模塊傳遞標(biāo)志位出的問題。)

4樓: >>參與討論
吳明詩(shī)
always@(count[14:13]) 綜合不了。
 
5樓: >>參與討論
a_tu01
Flag在多個(gè)always塊中賦值
應(yīng)該在一個(gè)塊中

6樓: >>參與討論
大老鼠布布
大老鼠
LATTICE的ISPLEVER下,不管是模塊內(nèi)引用,還是在模塊外引用都是好的。

* - 本貼最后修改時(shí)間:2005-4-22 9:09:46 修改者:大老鼠布布

7樓: >>參與討論
大老鼠布布
大老鼠
我用的是LATTICE的ISPLEVER,在模塊外引用FLAG也是好用的呀
但是把它改XILINX下運(yùn)行是不行的。
即使把flag改為模塊內(nèi),能夠鎖定管腳但是點(diǎn)擊Configure(IMPACT)也是不對(duì)的有錯(cuò)誤提示。

ERROR:Cpld - Cannot fit the design into any of the specified devices with the
   selected implementation options.
Tcl _cpldfit.tcl detected a return code of '1' from program 'cpldfit -f _cpldfit.rsp counter.ngd'


Done: failed with exit code: 0001.
那位大俠能夠解釋一下

8樓: >>參與討論
大老鼠布布
新改的程序,還是XILINX不能運(yùn)行
MODULE counter(seg,sl,clock);
    OUTPUT [7:0] seg;
    OUTPUT [3:0] sl;
    input  clock;

    reg[7:0]seg_reg;
    reg[7:0]seg_reg1;
    reg[7:0]seg_total;

    reg[3:0]sl_reg;
    reg[3:0]disp_dat;
    reg[3:0]disp_dat1;

    reg[39:0]count;

    reg flag;

    //count[37:34]        //qian wei
    //count[33:30]        //bai  wei
    //count[29:26]        //shi  wei
    //count[25:22]        //ge   wei
    
    always@(posedge clock)
    begin
        count=count+1;

        if(count[25:22]>4'h9)    //ge    wei   
        begin
            count[25:22]=0;
            count[29:26]=count[29:26]+1;
        end

        if(count[29:26]>4'h5)    //shi   wei   
        begin
            count[29:26]=0;
            count[33:30]=count[33:30]+1;
        end

        if(count[33:30]>4'h9)    //bai   wei  
        begin
            count[33:30]=0;
            count[37:34]=count[37:34]+1;
        end

        if(count[37:34]>4'h5)    //qian  wei  
            count[37:34]=0;
    end

    always@(count[14:13])        
    begin
    case(count[14:13])        
            // ji shi qi de shu du
        2'h0: disp_dat  = count[37:34];
        2'h1:
         begin
          disp_dat1 = count[33:30];
          flag=1;
        end
        2'h2: disp_dat  = count[29:26];    
        2'h3: disp_dat  = count[25:22];
    endcase

    case(count[14:13])            
        2'h0:sl_reg=4'b1110;    //qian wei
        2'h1:sl_reg=4'B1101;    //bai  wei
        2'h2:sl_reg=4'B1011;    //shi  wei
        2'h3:sl_reg=4'b0111;    //ge   wei
    endcase

    if(flag)
    begin
        seg_total=seg_reg1;
        flag=0;
    end
    else
    begin
        seg_total=seg_reg;
    end
end

always@(disp_dat)
begin
    case(disp_dat)
        4'h0:seg_reg=8'hc0;        
        4'h1:seg_reg=8'hf9;        
        4'h2:seg_reg=8'ha4;        
        4'h3:seg_reg=8'hb0;    
         4'h4:seg_reg=8'h99;        
        4'h5:seg_reg=8'h92;        
        4'h6:seg_reg=8'h82;        
        4'h7:seg_reg=8'hf8;    
         4'h8:seg_reg=8'h80;    
        4'h9:seg_reg=8'h90;        
    endcase
end

always@(disp_dat1)
begin
    case(disp_dat1)
        4'h0:seg_reg1=8'h40;    //DISPLAY 0+dot
        4'h1:seg_reg1=8'h79;    //DISPLAY 1+dot
        4'h2:seg_reg1=8'h24;    //DISPLAY  2+dot
        4'h3:seg_reg1=8'h20;    //DISPLAY  3+dot
                  4'h4:seg_reg1=8'h19;    //DISPLAY  4+dot
        4'h5:seg_reg1=8'h12;    //DISPLAY  5+dot
        4'h6:seg_reg1=8'h02;    //DISPLAY  6+dot
        4'h7:seg_reg1=8'h78;    //DISPLAY  7+dot
        4'h8:seg_reg1=8'h00;    //DISPLAY  8+dot
        4'h9:seg_reg1=8'h10;    //DISPLAY  9+dot
        4'ha:seg_reg1=8'h08;    //DISPLAY  a+dot
        4'hb:seg_reg1=8'h03;    //DISPLAY  b+dot
                  4'hc:seg_reg1=8'h46;    //DISPLAY  c+dot
        4'hd:seg_reg1=8'h21;    //DISPLAY  d+dot
        4'he:seg_reg1=8'h06;    //DISPLAY  e+dot
9樓: >>參與討論
w7612
程序在XILINXLATTICE結(jié)果不一樣
這與綜合器有關(guān),你可以用好的綜合器SYPLIFY綜合一下,應(yīng)該一個(gè)SIGNAL不能在多個(gè)always賦值,(在VHDL也不能對(duì)一個(gè)SIGNAL在多個(gè)PROCESS賦值),還有你在綜合時(shí),最好選一些好的綜合器

10樓: >>參與討論
大老鼠布布
大老鼠
呵呵,新改的程序綜合已經(jīng)通過,還有什么問題呢?

ERROR:Cpld - Cannot fit the design into any of the specified devices with the
   selected implementation options.
Tcl _cpldfit.tcl detected a return code of '1' from program 'cpldfit -f _cpldfit.rsp counter.ngd'

Done: failed with exit code: 0001.
那位大俠能夠解釋一下?

11樓: >>參與討論
大老鼠布布
頂,貼子不能沉拉!那位大蝦碰到過類似問題。
 
12樓: >>參與討論
w7612
請(qǐng)教同樣一個(gè)程序在XILINXLATTICE結(jié)果不一樣,郁悶ing
Tcl _cpldfit.tcl是一種腳本語言,有點(diǎn)類似批處理,我認(rèn)為你選擇器件沒有選對(duì),你可以看一下cpldfit.rsp文件 

參與討論
昵稱:
討論內(nèi)容:
 
 
相關(guān)帖子
討論:我覺得計(jì)數(shù)器不能用流水來提高計(jì)數(shù)頻率,原因見內(nèi)!
vhdl和verilog的文件在一個(gè)設(shè)計(jì)里,怎么編譯不能通過!
Verilog的函數(shù)和任務(wù)在maxplush不能編譯
我設(shè)計(jì)的PCI板卡,雙FPGA
求助:有沒有強(qiáng)5V電源轉(zhuǎn)為3。3V的穩(wěn)壓模塊?
免費(fèi)注冊(cè)為維庫(kù)電子開發(fā)網(wǎng)會(huì)員,參與電子工程師社區(qū)討論,點(diǎn)此進(jìn)入


Copyright © 1998-2006 www.udpf.com.cn 浙ICP證030469號(hào)