Verilog 合成时出现警告,无法运行ISim

Verilog 合成时出现警告,无法运行ISim,verilog,xilinx,xilinx-ise,Verilog,Xilinx,Xilinx Ise,cnt[15:8]未使用。要消除这些警告信息,只需使用8位计数器 module test_SimpleDDs_v; // Inputs reg DAC_clk; // Outputs wire [9:0] DAC_data; // Instantiate the Unit Under Test (UUT) SimpleDDS uut ( .DAC_clk(DAC_clk), .DAC_data(DAC_dat

cnt[15:8]
未使用。要消除这些警告信息,只需使用8位计数器

module test_SimpleDDs_v;

    // Inputs
    reg DAC_clk;

    // Outputs
    wire [9:0] DAC_data;

    // Instantiate the Unit Under Test (UUT)
    SimpleDDS uut (
        .DAC_clk(DAC_clk), 
        .DAC_data(DAC_data)
    );

    initial begin
        // Initialize Inputs
        DAC_clk = 0;

        // Wait 100 ns for global reset to finish
        #100;

        // Add stimulus here
        DAC_clk = ~ DAC_clk;
        #100;
        DAC_clk = ~ DAC_clk;
    end

endmodule
reg[7:0]cnt;

始终@(posedge DAC_clk)cnt首先关注运行模拟。你以什么方式“无法”运行ISIM?@BrianDrummond:我写了一个测试台,它改变了时钟,但我的方波没有按预期生成,我在所有cnt寄存器中都得到了“x”听起来你运行ISIM很好。在模拟开始时,您是如何将cnt重置为已知值的?我不认为我是在将cnt重置为已知值,您能告诉我如何重置吗?`module test\u simpleds\u v;//输入reg DAC_clk;//输出导线[9:0]DAC_数据;//实例化被测单元(UUT)SimpleDS UUT(.DAC_-clk(DAC_-clk),.DAC_-data(DAC_-data));初始开始//初始化输入DAC_clk=0;//等待100 ns,等待全局重置完成#100;//在此处添加刺激DAC\u clk=~DAC\u clk; #100; DAC_clk=~DAC_clk;end endmodule ``模块测试\u SimpleDS\u v;//输入reg DAC_clk;//输出导线[9:0]DAC_数据;//实例化被测单元(UUT)SimpleDS UUT(.DAC_-clk(DAC_-clk),.DAC_-data(DAC_-data));初始开始//初始化输入DAC_clk=0;//等待100 ns,等待全局重置完成#100;//在此处添加刺激DAC\u clk=~DAC\u clk; #100; DAC_clk=~DAC_clk;端模块`
module test_SimpleDDs_v;

    // Inputs
    reg DAC_clk;

    // Outputs
    wire [9:0] DAC_data;

    // Instantiate the Unit Under Test (UUT)
    SimpleDDS uut (
        .DAC_clk(DAC_clk), 
        .DAC_data(DAC_data)
    );

    initial begin
        // Initialize Inputs
        DAC_clk = 0;

        // Wait 100 ns for global reset to finish
        #100;

        // Add stimulus here
        DAC_clk = ~ DAC_clk;
        #100;
        DAC_clk = ~ DAC_clk;
    end

endmodule
reg [7:0] cnt;
always @(posedge DAC_clk) cnt <= cnt + 8'h1;