A
Alex
Guest
I would greatly appreciate if someone could explain the behavior I'm
seeing for me.
In the inner most if-state, where I write to bDATA_OUT ---- if I run
the program as written, it does nothing (my DATA_OUT lines remain in
the state they were previously). If I remove the "else, bDATA_OUT <=
"11000000"" segment, it properly outputs 00001010. I don't understand
why it would work w/o the else, but not w/.
This is a snippet of a larger VHDL, trimmed down for debugging.
Thank you.
Alex McHale
entity driver is
Port ( CLOCK : in STD_LOGIC;
ACTIVE : in STD_LOGIC;
CLOCK_IN : in STD_LOGIC;
LATCH_IN : in STD_LOGIC;
DATA_IN : in STD_LOGIC_VECTOR (7 downto 0);
ADDRESS_IN : in STD_LOGIC_VECTOR (4 downto 0);
DATA_CLOCK_OUT : out STD_LOGIC;
CLOCK_OUT : out STD_LOGIC;
LATCH_OUT : out STD_LOGIC;
DATA_OUT : out STD_LOGIC_VECTOR (7 downto 0) );
end driver;
architecture Behavioral of driver is
signal mode : STD_LOGIC := '0';
signal column_out : STD_LOGIC_VECTOR(9 downto 0) := "0000000000";
signal bDATA_OUT : STD_LOGIC_VECTOR(7 downto 0);
begin
process( CLOCK )
begin
if( rising_edge( CLOCK ) ) then
if mode='0' then
CLOCK_OUT <= '0';
LATCH_OUT <= '0';
mode <= '1';
elsif mode='1' then -- DATA INCOMING
if column_out(0)='0' then
bDATA_OUT <= "00001010";
else
bDATA_OUT <= "11000000";
end if;
CLOCK_OUT <= '1';
LATCH_OUT <= '1';
column_out <= column_out + 1;
mode <= '0';
end if;
end if;
end process;
DATA_OUT <= bDATA_OUT;
end Behavioral;
seeing for me.
In the inner most if-state, where I write to bDATA_OUT ---- if I run
the program as written, it does nothing (my DATA_OUT lines remain in
the state they were previously). If I remove the "else, bDATA_OUT <=
"11000000"" segment, it properly outputs 00001010. I don't understand
why it would work w/o the else, but not w/.
This is a snippet of a larger VHDL, trimmed down for debugging.
Thank you.
Alex McHale
entity driver is
Port ( CLOCK : in STD_LOGIC;
ACTIVE : in STD_LOGIC;
CLOCK_IN : in STD_LOGIC;
LATCH_IN : in STD_LOGIC;
DATA_IN : in STD_LOGIC_VECTOR (7 downto 0);
ADDRESS_IN : in STD_LOGIC_VECTOR (4 downto 0);
DATA_CLOCK_OUT : out STD_LOGIC;
CLOCK_OUT : out STD_LOGIC;
LATCH_OUT : out STD_LOGIC;
DATA_OUT : out STD_LOGIC_VECTOR (7 downto 0) );
end driver;
architecture Behavioral of driver is
signal mode : STD_LOGIC := '0';
signal column_out : STD_LOGIC_VECTOR(9 downto 0) := "0000000000";
signal bDATA_OUT : STD_LOGIC_VECTOR(7 downto 0);
begin
process( CLOCK )
begin
if( rising_edge( CLOCK ) ) then
if mode='0' then
CLOCK_OUT <= '0';
LATCH_OUT <= '0';
mode <= '1';
elsif mode='1' then -- DATA INCOMING
if column_out(0)='0' then
bDATA_OUT <= "00001010";
else
bDATA_OUT <= "11000000";
end if;
CLOCK_OUT <= '1';
LATCH_OUT <= '1';
column_out <= column_out + 1;
mode <= '0';
end if;
end if;
end process;
DATA_OUT <= bDATA_OUT;
end Behavioral;