電子工程網(wǎng)

標題: 為何除法器IP內核仿真總是高阻狀態(tài) [打印本頁(yè)]

作者: txmilan    時(shí)間: 2011-5-16 21:01
標題: 為何除法器IP內核仿真總是高阻狀態(tài)
我剛開(kāi)始玩FPGA,發(fā)現不能直接使用除法,需要使用除法內核(暫時(shí)沒(méi)考慮自己別寫(xiě)除法程序)。
我嘗試了IP內核中的Math Functions--dividers, 里面有2個(gè)IP核,我都試過(guò)了,仿真的時(shí)候輸出總是高阻狀態(tài)。
我使用的是Xilinx Spatan3, ISE10.1, Verilog語(yǔ)言,采用自帶的ISE Simulator仿真器, 使用編寫(xiě)Verilog Test Fixture的方法仿真。
例如,我利用divider generator V1.0生成my_div模塊,并實(shí)例化,程序如下:

module div(clk, ce, dividend, divisor, quotient, remainder);
    input clk;
    input ce;
    input [7:0] dividend;
    input [7:0] divisor;
    output [7:0] quotient;
    output [7:0] remainder;

    my_div test(
    .clk(clk),
    .ce(ce),
    .aclr(1'b0),
    .sclr(1'b0),
    .dividend(dividend),
    .divisor(divisor),
    .quotient(quotient),
    .remainder(remainder),
    .rfd());

endmodule

然后仿真程序如下:
module test;
     // Inputs
     reg clk;
     reg ce;
     reg [7:0] dividend;
     reg [7:0] divisor;
     // Outputs
     wire [7:0] quotient;
     wire [7:0] remainder;

     // Instantiate the Unit Under Test (UUT)
    div uut (
    .clk(clk),
    .dividend(dividend),
    .divisor(divisor),
    .quotient(quotient),
    .remainder(remainder)
     );

   initial begin
   forever #10 clk = ~clk;
   end

   initial begin
   // Initialize Inputs
  clk = 0;
  ce = 0;
  dividend = 0;
  divisor = 0;
  // Wait 100 ns for global reset to finish
  #100;
  dividend = 100;
  divisor = 12;
  #10;
  ce = 1;
  #500 $stop;
      end
  // Add stimulus here
endmodule

但是進(jìn)入仿真后,quotient與remainder輸出總是高電平(見(jiàn)圖片),試過(guò)好多次了都是這樣。
請問(wèn)大家遇到過(guò)這種情況沒(méi)?
求解原因!謝謝!

1.jpg (74.32 KB)

1.jpg

作者: txmilan    時(shí)間: 2011-5-16 21:18
對了,是試過(guò)其他一些IP核的仿真,都沒(méi)有問(wèn)題




歡迎光臨 電子工程網(wǎng) (http://selenalain.com/) Powered by Discuz! X3.4
午夜高清国产拍精品福利|亚洲色精品88色婷婷七月丁香|91久久精品无码一区|99久久国语露脸精品|动漫卡通亚洲综合专区48页