Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Multiple errors in VHDL

 
Thread Tools Search this Thread
Old 06-06-2008, 01:12 PM   #1
Default Multiple errors in VHDL


I can't see where is the problem with this code. Can someone help me?

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_SIGNED.ALL;

entity Practica is

generic (N : integer range 0 to 16:=16);

port (
x : in STD_LOGIC_VECTOR (9 downto 0);
en_in : in STD_LOGIC;
y : out STD_LOGIC_VECTOR (9 downto 0);
en_out: out STD_LOGIC;
clk : in STD_LOGIC;
reset : in STD_LOGIC);

end Practica;

architecture Behavioral of Practica is

--Senyals d'enable:
signal ena_comptN: STD_LOGIC;
signal ena_sum : STD_LOGIC;
signal ena_mult : STD_LOGIC;
signal ena_div : STD_LOGIC;

--Senyals de clear:
signal clr_comptN: STD_LOGIC;

--Senyal comptador:
signal Ns : integer range 0 to 16;
signal compt_r : STD_LOGIC;

--Senyals mult:
signal mult_out : STD_LOGIC_VECTOR (19 downto 0);
signal mult_in : STD_LOGIC_VECTOR (9 downto 0);
signal mult_r : STD_LOGIC;

--Senyals sumador:
signal add_m : STD_LOGIC_VECTOR (12 downto 0);
signal add_out : STD_LOGIC_VECTOR (9 downto 0);
signal add_r : STD_LOGIC;

--Senyals divisor:
signal div_out : STD_LOGIC_VECTOR (9 downto 0);
signal div_r : STD_LOGIC;

--Senyals de la maquina d'estats:
type estats is (e0,e1,e2,e3,e4,e5,e6,e7);
signal estat :estats;
signal proper_estat:estats;

--Senyals del registre:
signal r_x :STD_LOGIC_VECTOR (9 downto 0);


begin

reg_xrocess(clk,reset,en_in)
begin
if (reset='1') then
r_x <=(others=>'0');
elsif (clk'event and clk='1') then
if (en_in='1') then
r_x<=x;
end if;
end if;
end process;

mult_in<=r_x;


comptN: process(clk,clr_comptN,ena_comptN)
begin
if (clr_comptN='1') then
Ns<=0;
elsif (clk'event and clk='1') then
if (ena_comptN='1') then
Ns<=Ns+1;
end if;
end if;
end process;

mult: process(clk,mult_r,ena_mult)
begin
if (mult_r='1') then
mult_out<=(others=>'0');
elsif (clk'event and clk='1') then
if (ena_mult='1') then
mult_out <= mult_in*mult_in;
end if;
end if;
end process;

add: process(clk,add_r,ena_sum)
begin
if (add_r='1') then
add_m<=(others=>'0');
elsif (clk'event and clk='1') then
if (ena_sum='1') then
add_m<= add_m + (mult_out(1 & mult_out(1 & mult_out(1 & mult_out (18 downto 9));
end if;
end if;
end process;

add_out<=add_m(12 downto 3);

div: process(clk,div_r,ena_div)
begin
if (div_r='1') then
div_out<=(others=>'0');
elsif (clk'event and clk='1') then
if (ena_div='1') then
div_out<=add_out(9) & add_out(9) & add_out(9)& add_out(9)& add_out(9 downto 4);
end if;
end if;
end process;

y<=div_out;

maq_comb: process(estat, en_in)
begin
if (reset='1') then
proper_estat<=e0;
else
ena_mult <= '0';
ena_div <= '0';
ena_sum <= '0';
ena_comptN <= '0';
en_out <= '0';
clr_comptN<='0';
mult_r<='0';
add_r<='0';
div_r<='0';

case estat is
when e0 =>
mult_r<='1';
add_r<='1';
div_r<='1';
clr_comptN<='1';
if (en_in='1') then
proper_estat<=e1;
end if;
when e1 =>
ena_mult<='1';
if en_in='1' then
proper_estat<=e1;
end if;
when e2 =>
ena_sum<='1';
ena_mult<='1';
ena_comptN<='1';
if (Ns=16) then
proper_estat<=e3;
end if;
when e3 =>
ena_sum<='1';
proper_estat<=e4;

when e4 =>
ena_div<='1';
proper_estat<=e5;
when e5=>
proper_estat<=e6;
when e6=>
en_out<='1';
proper_estat<=e7;
when e7=>
proper_estat<=e0;

end case;
end if;
end process;

maq_sincrocess(clk)
begin
if (clk'event and clk='1') then
estat<=proper_estat;
end if;
end process;

end Behavioral;

Info: Duplicate registers merged to single register
Info: Duplicate register "div_out[6]" merged to single register "div_out[5]"
Info: Duplicate register "div_out[7]" merged to single register "div_out[5]"
Info: Duplicate register "div_out[8]" merged to single register "div_out[5]"
Info: Duplicate register "div_out[9]" merged to single register "div_out[5]"
Warning: No clock transition on "Ns[0]" register due to stuck clock or clock enable
Warning: Reduced register "Ns[0]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "Ns[1]" register due to stuck clock or clock enable
Warning: Reduced register "Ns[1]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "Ns[2]" register due to stuck clock or clock enable
Warning: Reduced register "Ns[2]" with stuck clock_enable port to stuck value GND

Warning: No clock transition on "Ns[3]" register due to stuck clock or clock enable
Warning: Reduced register "Ns[3]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "Ns[4]" register due to stuck clock or clock enable
Warning: Reduced register "Ns[4]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[7]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[7]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[8]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[8]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[9]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[9]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[10]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[10]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[11]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[11]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[12]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[12]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[6]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[6]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[5]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[5]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[4]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[4]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[3]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[3]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[2]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[2]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[1]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[1]" with stuck clock_enable port to stuck value GND
Warning: No clock transition on "add_m[0]" register due to stuck clock or clock enable
Warning: Reduced register "add_m[0]" with stuck clock_enable port to stuck value GND
Warning: Reduced register "div_out[0]" with stuck data_in port to stuck value GND
Warning: Reduced register "div_out[2]" with stuck data_in port to stuck value GND
Warning: Reduced register "div_out[3]" with stuck data_in port to stuck value GND
Warning: Reduced register "div_out[4]" with stuck data_in port to stuck value GND
Warning: Reduced register "div_out[5]" with stuck data_in port to stuck value GND
Info: State machine "|Practica|estat" contains 8 states
Info: Selected Auto state machine encoding method for state machine "|Practica|estat"
Info: Encoding result for state machine "|Practica|estat"
Info: Completed encoding using 8 state bits
Info: Encoded state bit "estat.e7"
Info: Encoded state bit "estat.e6"
Info: Encoded state bit "estat.e5"
Info: Encoded state bit "estat.e4"
Info: Encoded state bit "estat.e3"
Info: Encoded state bit "estat.e2"
Info: Encoded state bit "estat.e1"
Info: Encoded state bit "estat.e0"
Info: State "|Practica|estat.e0" uses code string "00000000"
Info: State "|Practica|estat.e1" uses code string "00000011"
Info: State "|Practica|estat.e2" uses code string "00000101"
Info: State "|Practica|estat.e3" uses code string "00001001"
Info: State "|Practica|estat.e4" uses code string "00010001"
Info: State "|Practica|estat.e5" uses code string "00100001"
Info: State "|Practica|estat.e6" uses code string "01000001"
Info: State "|Practica|estat.e7" uses code string "10000001"
Warning: Output pins are stuck at VCC or GND
Warning: Pin "y[0]" stuck at GND
Warning: Pin "y[1]" stuck at GND
Warning: Pin "y[2]" stuck at GND
Warning: Pin "y[3]" stuck at GND
Warning: Pin "y[4]" stuck at GND
Warning: Pin "y[5]" stuck at GND
Warning: Pin "y[6]" stuck at GND
Warning: Pin "y[7]" stuck at GND
Warning: Pin "y[8]" stuck at GND
Warning: Pin "y[9]" stuck at GND
Warning: Pin "en_out" stuck at GND
Warning: Design contains 13 input pin(s) that do not drive logic
Warning: No output dependent on input pin "x[9]"
Warning: No output dependent on input pin "x[8]"
Warning: No output dependent on input pin "x[7]"
Warning: No output dependent on input pin "x[6]"
Warning: No output dependent on input pin "x[5]"
Warning: No output dependent on input pin "x[4]"
Warning: No output dependent on input pin "x[3]"
Warning: No output dependent on input pin "x[2]"
Warning: No output dependent on input pin "x[1]"
Warning: No output dependent on input pin "x[0]"
Warning: No output dependent on input pin "clk"
Warning: No output dependent on input pin "en_in"
Warning: No output dependent on input pin "reset"


degrau3
degrau3 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CRC Errors palepups Hardware 0 03-10-2007 06:34 AM
Multiple DVD editions Bernie Woodham DVD Video 13 04-04-2006 08:21 PM
Multiple DiVX/VCDs on a DVD Sabian Smith DVD Video 11 10-02-2004 01:46 PM
Multiple DiVX/VCDs on a DVD Sabian Smith DVD Video 0 09-29-2004 04:23 AM
JVC Camcorder Errors "REMOVE AND REATTACH BATTERY" or "UNIT IN SAFEGUARD MODE" or E04 Juan Carrera DVD Video 0 06-22-2004 05:34 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46