data/full_repos/permissive/459421171/Pipelined/memory.v
1: b'%Warning-WIDTH: data/full_repos/permissive/459421171/Pipelined/memory.v:23: Bit extraction of array[1023:0] requires 10 bit index, not 64 bits.\n                                                                          : ... In instance memory\n                    data_memory[valE]=valA;\n                               ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/459421171/Pipelined/memory.v:31: Bit extraction of array[1023:0] requires 10 bit index, not 64 bits.\n                                                                          : ... In instance memory\n                    valM=data_memory[valE];\n                                    ^\n%Warning-WIDTH: data/full_repos/permissive/459421171/Pipelined/memory.v:39: Bit extraction of array[1023:0] requires 10 bit index, not 64 bits.\n                                                                          : ... In instance memory\n                    data_memory[valE]=valP;\n                               ^\n%Warning-WIDTH: data/full_repos/permissive/459421171/Pipelined/memory.v:47: Bit extraction of array[1023:0] requires 10 bit index, not 64 bits.\n                                                                          : ... In instance memory\n                valM=data_memory[valA];    \n                                ^\n%Warning-WIDTH: data/full_repos/permissive/459421171/Pipelined/memory.v:55: Bit extraction of array[1023:0] requires 10 bit index, not 64 bits.\n                                                                          : ... In instance memory\n                data_memory[valE]=valA;\n                           ^\n%Warning-WIDTH: data/full_repos/permissive/459421171/Pipelined/memory.v:63: Bit extraction of array[1023:0] requires 10 bit index, not 64 bits.\n                                                                          : ... In instance memory\n                    valM=data_memory[valA];\n                                    ^\n%Warning-UNSIGNED: data/full_repos/permissive/459421171/Pipelined/memory.v:20: Comparison is constant due to unsigned arithmetic\n                                                                             : ... In instance memory\n                if((valE>1023)||(valE<0))\n                                     ^\n%Warning-UNSIGNED: data/full_repos/permissive/459421171/Pipelined/memory.v:28: Comparison is constant due to unsigned arithmetic\n                                                                             : ... In instance memory\n                if((valE>1023)||(valE<0))\n                                     ^\n%Warning-UNSIGNED: data/full_repos/permissive/459421171/Pipelined/memory.v:36: Comparison is constant due to unsigned arithmetic\n                                                                             : ... In instance memory\n                if((valE>1023)||(valE<0))\n                                     ^\n%Warning-UNSIGNED: data/full_repos/permissive/459421171/Pipelined/memory.v:44: Comparison is constant due to unsigned arithmetic\n                                                                             : ... In instance memory\n                if((valA>1023)||(valA<0))\n                                     ^\n%Warning-UNSIGNED: data/full_repos/permissive/459421171/Pipelined/memory.v:52: Comparison is constant due to unsigned arithmetic\n                                                                             : ... In instance memory\n                if((valE>1023)||(valE<0))\n                                     ^\n%Warning-UNSIGNED: data/full_repos/permissive/459421171/Pipelined/memory.v:60: Comparison is constant due to unsigned arithmetic\n                                                                             : ... In instance memory\n                if((valA>1023)||(valA<0))\n                                     ^\n%Error: Exiting due to 12 warning(s)\n'
module memory(clk,icode,valA,valE,valP,valM,data_memory_error);
 input clk;
 input [3:0] icode;
 input [63:0] valA;
 input [63:0] valE;
 input [63:0] valP;
 output reg [63:0] valM;
 output reg data_memory_error;

 reg [63:0] data_memory[1023:0];

 initial valM=64'b0;
   
 always @(*)
    begin
        data_memory_error=0;

        if(icode==4'b0100)
            begin
                if((valE>1023)||(valE<0))
                    data_memory_error=1;
                else    
                    data_memory[valE]=valA;
            end

        else if(icode==4'b0101)
            begin
                if((valE>1023)||(valE<0))
                    data_memory_error=1;
                else    
                    valM=data_memory[valE];
            end

        else if(icode==4'b1000)
            begin
                if((valE>1023)||(valE<0))
                    data_memory_error=1;
                else    
                    data_memory[valE]=valP;
            end 

        else if(icode==4'b1001)
            begin
                if((valA>1023)||(valA<0))
                    data_memory_error=1;
                else    
                valM=data_memory[valA];    
            end   

        else if(icode==4'b1010)
            begin
                if((valE>1023)||(valE<0))
                    data_memory_error=1;
                else
                data_memory[valE]=valA;
            end  

        else if(icode==4'b1011)
            begin
                if((valA>1023)||(valA<0))
                    data_memory_error=1;
                else  
                    valM=data_memory[valA];
            end        
    end 
endmodule
module memory(clk,icode,valA,valE,valP,valM,data_memory_error);

 input clk;
 input [3:0] icode;
 input [63:0] valA;
 input [63:0] valE;
 input [63:0] valP;
 output reg [63:0] valM;
 output reg data_memory_error;

 reg [63:0] data_memory[1023:0];

 initial valM=64'b0;
   
 always @(*)
    begin
        data_memory_error=0;

        if(icode==4'b0100)
            begin
                if((valE>1023)||(valE<0))
                    data_memory_error=1;
                else    
                    data_memory[valE]=valA;
            end

        else if(icode==4'b0101)
            begin
                if((valE>1023)||(valE<0))
                    data_memory_error=1;
                else    
                    valM=data_memory[valE];
            end

        else if(icode==4'b1000)
            begin
                if((valE>1023)||(valE<0))
                    data_memory_error=1;
                else    
                    data_memory[valE]=valP;
            end 

        else if(icode==4'b1001)
            begin
                if((valA>1023)||(valA<0))
                    data_memory_error=1;
                else    
                valM=data_memory[valA];    
            end   

        else if(icode==4'b1010)
            begin
                if((valE>1023)||(valE<0))
                    data_memory_error=1;
                else
                data_memory[valE]=valA;
            end  

        else if(icode==4'b1011)
            begin
                if((valA>1023)||(valA<0))
                    data_memory_error=1;
                else  
                    valM=data_memory[valA];
            end        
    end 
endmodule