- Joined
- May 9, 2008
- Messages
- 5
- Reaction score
- 0
good morning, well,
I have a problem with the assigments of asignal to an ouput pin, the signal ACUMULADOR start in 1111111 but when I change it, and assign it to OUTDEVOLUCION in the simulation OUTDEVOLUCION appears undetermined (there are pins with xxxx). Anybody know how to fix this?
Thanks for the help
library ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
use ieee.numeric_std.all;
use ieee.std_logic_unsigned.all;
entity dispensador is
port(
clk : in std_logic; --entrada de reloj
devolucion : in bit; --solicitar devolucion del producto
outdevolucion : out std_logic_vector(5 downto 0) --
);
end entity;
architecture arc_dispensador of dispensador is
signal acumulador: std_logic_vector(5 downto 0) := "111111";
--signal temp: u(5 downto 0) := "111111";
BEGIN
PROCESS (clk, devolucion)
BEGIN
if devolucion = '1' then
acumulador<= acumulador-"100100";
outdevolucion<=acumulador;
else
--acumulador<=acumulador-"011111";
outdevolucion<=acumulador;
end if;
end process;
end architecture;
I have a problem with the assigments of asignal to an ouput pin, the signal ACUMULADOR start in 1111111 but when I change it, and assign it to OUTDEVOLUCION in the simulation OUTDEVOLUCION appears undetermined (there are pins with xxxx). Anybody know how to fix this?
Thanks for the help
library ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
use ieee.numeric_std.all;
use ieee.std_logic_unsigned.all;
entity dispensador is
port(
clk : in std_logic; --entrada de reloj
devolucion : in bit; --solicitar devolucion del producto
outdevolucion : out std_logic_vector(5 downto 0) --
);
end entity;
architecture arc_dispensador of dispensador is
signal acumulador: std_logic_vector(5 downto 0) := "111111";
--signal temp: u(5 downto 0) := "111111";
BEGIN
PROCESS (clk, devolucion)
BEGIN
if devolucion = '1' then
acumulador<= acumulador-"100100";
outdevolucion<=acumulador;
else
--acumulador<=acumulador-"011111";
outdevolucion<=acumulador;
end if;
end process;
end architecture;