Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help:how to solve this xilinx translate trouble

Status
Not open for further replies.

chiming

Newbie level 1
Joined
Jan 4, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
hi experts:
i am new to fpga,
i am using xilinx spartan6 to achieve PWM
i can synthesize it successfully, but i can not translate it successfully
following is my code:
Code:
module M_MAX (rst,clk,Adc6,m_max);
//============ parameter declared ==================
parameter ADC_min = 12'd2184;
//parameter ADC_min_t = 16'd2200;
parameter num = 18; // 4095 * 64 =262080 => 18 bit
parameter average_done = 7'd64; // 64 +28; div letency 28
parameter Xbit = 5'd24;
parameter Mbit = 4'd12;

//===================================================
input clk, rst;
input [11:0]Adc6 ;
output [Xbit-1:0] m_max;

//================= wire declared =================

wire [Mbit-1:0] m1_f,m1_i;
wire rfd;
wire [11:0] feedback_v1;

wire [Xbit-1:0] m_max;

//================ reg declared ===================
reg [num-1:0] feedback_v_tmp;
reg [6:0] cnt;
reg [Xbit-1:0] m_max_tmp;
reg [Xbit-1:0] m_old_f;
reg [11:0] cnt_tri;
reg [11:0] m_old_i;

//reg [11:0] Adc_tmp;
//reg [11:0] Adc[0:63];
//===================================================



//initial $readmemb (`code_in2, Adc);
assign feedback_v1 = feedback_v_tmp >>6 ;

DIV_12x12_FRA U1(.rfd(rfd), .clk(clk), .dividend(ADC_min), .quotient(m1_i), .divisor(feedback_v1), .fractional(m1_f));
assign m_max = m_max_tmp;


always@(posedge clk)
begin
if(rst)
begin
cnt_tri <= 12'd0;
cnt <= 7'd0;
feedback_v_tmp <= 18'd0;

end
else
begin

cnt_tri <= cnt_tri+1'b1;

if(cnt_tri == 12'd2666)
begin
feedback_v_tmp <= feedback_v_tmp +Adc6;
cnt <= cnt+1'b1;
cnt_tri <= 12'd0;
//Adc_tmp <= Adc[cnt+1];
end
else
begin
if (cnt == average_done)
begin
cnt <= 7'd0;
end
end

end
end
always@(posedge clk)
begin
if(rst)
begin
m_max_tmp <= 24'd0;
m_old_f <= 12'hCCC;
m_old_i <= 12'd0;
end
else
begin
if(cnt == average_done)
begin
m_max_tmp <= ({2'd0,m1_i,10'd0} + {4'd0,m1_i,8'd0} + {7'd0,m1_i,5'd0} + {8'd0,m1_i,4'd0} + {10'd0,m1_i,2'd0}+ {12'd0,m1_i}
+{2'd0,m1_f,10'd0} + {4'd0,m1_f,8'd0} + {7'd0,m1_f,5'd0} + {8'd0,m1_f,4'd0} + {10'd0,m1_f,2'd0} + {12'd0,m1_f});
m_old_f <= m1_f;
m_old_i <= m1_i;

end
else
begin
m_max_tmp <= ({2'd0,m_old_i,10'd0} + {4'd0,m_old_i,8'd0} + {7'd0,m_old_i,5'd0} + {8'd0,m_old_i,4'd0} + {10'd0,m_old_i,2'd0} + {12'd0,m_old_i}
+{2'd0,m_old_f,10'd0} + {4'd0,m_old_f,8'd0} + {7'd0,m_old_f,5'd0} + {8'd0,m_old_f,4'd0} + {10'd0,m_old_f,2'd0} + {12'd0,m_old_f});
m_old_f <= m_old_f;
m_old_i <= m_old_i;

end
end
end
endmodule


and this is error message ise report.
NgdBuild:809 - output pad net 'm1/m1_f<0>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<1>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<2>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<3>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<4>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<5>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<6>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<7>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<8>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<9>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<10>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_f<11>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<0>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<1>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<2>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<3>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<4>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<5>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<6>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<7>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<8>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<9>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<10>' has an illegal load:
ERROR:NgdBuild:809 - output pad net 'm1/m1_i<11>' has an illegal load:

how can i do? i have no idea

thank you in advance

ChiMing
 

Hey,
can you post code for module "DIV_12x12_FRA".
or have you tried to synthesize and translating DIV_12x12_FRA module.
I think problem is with this module.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top