Попытка получить все 4-битные комбинации двух чисел in1 и in2 в verilog, но это показывает ошибку - PullRequest
0 голосов
/ 08 октября 2018

Пожалуйста, исправьте ошибки, которые приводят к ошибке

Я пытаюсь получить все комбинации четырехбитных цифр in1 и in2, используя циклы for, но это показывает ошибку.место, скажите мне ошибки, ниже приведены код и ошибки

module segment_7_test;

    // Inputs
    reg [3:0] in1;
    reg [3:0] in2;
    reg [1:0] opCode;

    // Outputs
    wire [3:0] result;

    // Instantiate the Unit Under Test (UUT)
    calculator uut (
        .in1(in1), 
        .in2(in2), 
        .opCode(opCode), 
        .result(result)
    );

    initial begin
        // Initialize Inputs
        in1 = 0;
        in2 = 0;
        opCode = 0;

        Wait 100 ns for global reset to finish
            #100
            for( k=0;k<16;k=k+1)
                begin
                in1=in1+4'b0001;
                #0.5;
                for(j=0;j<16;j=j+1)
                    begin
                    in2=in2+4'b0001;
                    #0.5;
                end
            end




        // Add stimulus here

    end

endmodule

Ошибки:

Запуск:

/opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/unwrapped/fuse -relaunch -intstyle "ise" -incremental -lib "unisims_ver" -lib "unimacro_ver" -lib "xilinxcorelib_ver" -lib "secureip" -o "/home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7_test_isim_beh.exe" -prj "/home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7_test_beh.prj" "work.segment_7_test" "work.glbl" 
ISim P.20131013 (signature 0xfbc00daa)
Number of CPUs detected in this system: 4
Turning on mult-threading, number of parallel sub-compilation jobs: 8 
Determining compilation order of HDL files
Analyzing Verilog file "/home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7.v" into library work
Analyzing Verilog file "/home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7_test.v" into library work
ERROR:HDLCompiler:806 - "/home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7_test.v" Line 49: Syntax error near "100".
ERROR:HDLCompiler:806 - "/home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7_test.v" Line 51: Syntax error near "for". ERROR:HDLCompiler:69 - "/home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7_test.v" Line 51: is not declared. 
ERROR:HDLCompiler:69 - "/home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7_test.v" Line 55: is not declared. ERROR:HDLCompiler:598 - "/home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7_test.v" Line 25: Module ignored due to previous errors. 
Verilog file /home/divyanshu/Desktop/Verilog_SimpleCalculator/segment_7_test.v ignored due to errors
========== Fuse: failed ==========
...