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.

Code for controller when plane is designed using three points

Status
Not open for further replies.

abhijeet.kumar

Newbie level 5
Joined
Jun 23, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
delhi
Activity points
1,520
Hello everyone

i am designing a code to nevigate a robot in a plane which is designed by three points. For that i have designed this code but having some error please help me.

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
package controler is
constant rng_row : integer:= 2;
constant rng_clmn : integer:= 2;
constant gps_row : integer:= 2;
constant gps_clmn,lut_clmn: integer:= 2;
constant lut_row : integer:=7;
Type lut_datain is array (0 to lut_row,0 to lut_clmn)of std_logic;
Type gps_datain is array (0 to gps_row,0 to gps_clmn) of std_logic;
Type rng_datain is array (0 to rng_row,0 to rng_clmn) of std_logic;
--------function = (df_out1,df_out2:in gps_datain;df_out3:in lut_datain ) return std_logic;
end controler;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use WORK.controler.ALL;
entity code1f3p is
port (clk: in std_logic;
x1,x2,x3,x4,x5,y1,y2,y3,z1,z2,z3,a1,a2,a3,b1,b2,b3,c1,c2,c3:inout std_logic;
df_in1,df_in2:in gps_datain;
df_in3:in lut_datain; ------------df=direction finder
df_out1,df_out2:inout gps_datain;
df_out3: inout lut_datain;
mc_in1: in gps_datain;
mc_in2: in rng_datain;----------mc=motion control
mc_out1: inout gps_datain;
mc_out2: inout rng_datain;
mcomp_out,dcomp_out:eek:ut std_logic);
end code1f3p;
architecture Behavioral of code1f3p is
signal temp1,temp2: gps_datain ;
signal temp3:lut_datain;
signal temp5:gps_datain;
variable gps_data:gps_datain:=
((x1, y1, z1),
(x2, y2, z2),
(x3, y3, z3));
signal temp4:rng_datain;
variable rng_data:rng_datain:=
((a1, b1, c1),
(a2, b2, c2),
(a3, b3, c3));
SIGNAL i : integer := 0;
begin
-------------------------------for direction finder---------------------------------------------------------------
p1:process(clk)
type lut_datain is array (0 to lut_row,0 to lut_clmn)of std_logic;
constant lut_data:lut_datain:=(
('0','0','0'),
('0','0','1'),
('0','1','0'),
('0','1','1'),
('1','0','0'),
('1','0','1'),
('1','1','0'),
('1','1','1'));
begin
if ( clk = '1' and clk'event)then
for i in 0 to 5 loop
case i is
when 0 => temp1<= df_in1;
when 1 => df_out1<= temp1;
when 2 => temp2<= df_in2;
when 3 => df_out2 <= temp2;
when 4 => temp3 <= df_in3;
when 5 => df_out3<= temp3;
end case;
end loop;
if (df_out1 = df_out2 and df_out1 = df_out3) then
dcomp_out <= '1';
else
dcomp_out <= '0';
end if;
end if;
end process;
--------------------------for motion control----------------------------------------------
p2:process(clk)
begin
if (clk'event and clk = '1')then
for i in 0 to 3 loop
case i is
when 0 => temp5 <= mc_in1;
when 1 => mc_out1 <= temp5;
when 2 => temp4 <= mc_in2;
when 3 => mc_out2 <= temp4;


end case;
if (mc_out1 = mc_out2) then
mcomp_out <= '1';
else
mcomp_out <= '0';
end if;
end loop;
end if;
end process;
end Behavioral;

The list of ERRORS is:

Line 89: found '0' definitions of operator "=", cannot determine exact overloaded matching definition for "="
Line 109: found '0' definitions of operator "=", cannot determine exact overloaded matching definition for "="
Line 50: Unit <behavioral> ignored due to previous errors.
 

I'm not versed in this programming language, but I notice the errors have something to do with '0' and '='.

Is there a condition that does not permit a value of 0?
Such as a #0 array element?
Division by zero?
As a step value in a counting loop?
As a value passed to a function? Returned from a function?

Is the point in space allowed to have a value of zero in the X or Y or Z axis?

Sometimes the error message flags a previous line where the variable is defined, rather than the line where the error occurs.
 

YEAH the error is cause of '0' and '='
cause in vhdl '= ' oprator is not applicable befor defining it as a function.


thanks for ur response:)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top