Altera_Forum
Honored Contributor
13 years agoError (12061): Can't synthesize current design -- Top partition does not contain any
Hello people,
I'm trying to compile the following code (below this paragraph) on Quartus II, I wrote the system verilog code on the altera modelsim program, there everything compiles and simulates without problems. When I try the compilation on Quartus II I receive the error: "Error (12061): Can't synthesize current design -- Top partition does not contain any logic"... I'm really new to this kind of language and to the software so if you guys could give me any help like you were teaching a children I would really apreciate... I'm trying to use quartus II to figure out how many logic ports and clock cycles I need to use for this mecanism I'm developing for my masters degree thesys. module DefRFID (); logic [31:0] r1; logic [31:0] r2; logic [31:0] r3; logic [31:0] ID; logic [31:0] K; logic [31:0] R1; logic [31:0] R2; logic [31:0] R3; logic [63:0] M1; logic [63:0] M2; logic [7:0] sbox1 [0:15][0:15]; logic [7:0] sbox2 [0:15][0:15]; logic [7:0] pchoice [0:15]; initial begin r1 = inicializarsboxesepchoice(); //teste2 = 20; ID = 32'b11110000111100001111000011110000; r1 = 32'b11110011110011110011110011110011; r2 = 32'b10100011110011110011110011110011; r3 = 32'b00110010010011110010010010010000; K = 32'b10010010010010011101101101101101; R1 = NLFSR(r1); M1 = {pertubationfunction(R1,r2),r2}; R2 = NLFSR(r2); M2 = {pertubationfunction(R2,r3),r3}; ID = NLFSR(ID); ID = pertubationfunction(ID,K); K = NLFSR(K); R3 = NLFSR(r3); K = pertubationfunction(K,((R3^R2)^R1)); $finish; end function logic [1:0] inicializarsboxesepchoice(); logic[1:0] retorno; retorno = 0; for(int i = 0; i < 16; i++) begin pchoice = 15 - i;for(int j = 0; j < 16; j++) begin
sbox1[j] = i + j; end end for(int i = 0; i < 16; i++) begin for(int j = 0; j < 16; j++) begin sbox2[j] = sbox1[j]; end end return retorno; endfunction function logic [31:0] NLFSR (logic [31:0] entrada); //$display ("Valor de entrada é %b", entrada); logic [31:0] r1ji; logic [31:0] retorno; logic [0:0] resultadologico; // $display ("Valor de entrada é %b", entrada); // $display ("Valor de r1ji é %b", r1ji); // $display ("Valor de entrada é %b", entrada); r1ji = entrada; for(int i = 0; i < 32; i++) begin resultadologico = (((((r1ji[0] ^ r1ji[2]) && r1ji[5]) ^ (r1ji[7] && r1ji[8])) ^ (( (r1ji[25] && r1ji[29])&& r1ji[13])^ r1ji[20])) ^ r1ji[16]); // $display ("Valor de resultadologico com r1ji %b é %b", r1ji,resultadologico); r1ji = r1ji >> 1; // $display ("Valor de r1ji após left shift é %b", r1ji); r1ji[31] = resultadologico; // $display ("Valor de r1ji após atribrlogico é %b", r1ji); for(int j = 0; j < 31; j ++) begin // $display ("Valor de r1ji[j] com j %d é %b", j,r1ji[j]); r1ji[j] = r1ji[j] ^ resultadologico; // $display ("Valor de r1ji após operação com j %d é %b", j,r1ji); end // $display ("Valor de r1ji na rodada %d é %b",i, r1ji); end retorno = r1ji; // $display ("Valor da saida NLFSR é %b", retorno); return retorno; endfunction function logic [15:0] calcsboxes (logic [7:0] Esbox1,logic [7:0] Esbox2); logic [15:0] retorno; logic [3:0] linha; logic [3:0] coluna; linha = Esbox1[7:4]; coluna = Esbox1[3:0]; // $display ("Valor de Esbox1 é %b", Esbox1); // $display ("Valor de linha é %d", linha); // $display ("Valor de coluna é %d", coluna); Esbox1 = sbox1[linha][coluna]; // $display ("Valor de Esbox1 é %d", Esbox1); linha = Esbox2[7:4]; coluna = Esbox2[3:0]; // $display ("Valor de Esbox2 é %b", Esbox2); // $display ("Valor de linha é %d", linha); // $display ("Valor de coluna é %d", coluna); Esbox2 = sbox2[linha][coluna]; // $display ("Valor de Esbox2 é %d", Esbox2); retorno = {Esbox1, Esbox2}; return retorno; endfunction function logic [15:0] calcpchoice (logic [15:0] Epchoice); logic [15:0] retorno; for(int i = 0; i < 16; i++) begin retorno = epchoice[pchoice]; end return retorno; endfunction function logic [31:0] pertubationfunction (logic [31:0] e1, logic [31:0] e2); logic [31:0] retorno; logic [15:0] L; logic [15:0] R; retorno = (e1 ^ e2); if((retorno[0] == 0) || (retorno[31] == 0)) begin L = retorno[15:0]; R = retorno[31:16]; end else begin L = retorno[31:16]; R = retorno[15:0]; end // $display ("Valor de L é %b", L); // $display ("Valor de R é %b", R); L = calcsboxes(L[15:8],L[7:0]); // $display ("Valor de L é %b", L); R = calcpchoice(R); // $display ("Valor de R é %b", R); retorno = {L,R}; return retorno; endfunction endmodule