Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > a crazy problem

Thread Tools

a crazy problem

Rock Lee Rock Lee is offline
Junior Member
Join Date: Jun 2007
Posts: 1
I'm a begginer in VHDL
I want to describe 74193 with the VHDL but I fail
the code is:
library ieee;
use ieee.std_logic_1164.all;
USE ieee.Std_logic_unsigned.all;

entity counter is
port (
aftellen : in std_logic; -- kloksignaal aftellen
optellen : in std_logic; -- kloksignaal optellen
clear : in std_logic; -- clear
enable : in std_logic; -- enable signaal
load : in std_logic; -- load
data_in : in std_logic_vector(3 downto 0); -- data ingangen
data_out : out std_logic_vector(3 downto 0); -- telleruitgangen
carry_out : out std_logic -- carry out
end counter ;

architecture gedrag of counter is
signal uit : std_logic_vector(3 downto 0); --signaal variable (buffer)
if (optellen'event and optellen = '1')then --event driven (als de flank omlaag gaat)
if(clear = '0')then
if (uit = "1111") then --als op max. komt dan
uit <= (others =>'0'); --teller op min. zetten
uit <= uit + 1; -- optellen --anders optellen
end if;
end if;
elsif (aftellen'event and aftellen = '1') then --event driven
if(clear = '0')then
if (uit = "0000") then --als teller op min. komt
uit <= "1111"; --teller op max. zetten
uit <= uit - 1; -- aftellen --anders aftellen
end if;
end if;
elsif (clear = '1') then --als clear hoog is
uit <= (others =>'0'); --clear buffer
elsif (load'event and load = '1') then --event driven (werkt niet in simulatie) als load laag wordt
if(clear = '0')then
data_out <= data_in after 2 ns; --data_out wordt data_in
end if;
end if;
data_out <= uit; --zet buffer in data_out
end process;
end gedrag;
6 errors at the same line(red)said: can't infer register for signal"uint[3]"because signal dose not hold its value outside clock edge
Can anyone help me?
Reply With Quote

Thread Tools

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crazy jar resource access problem JavaEnquirer Java 7 02-27-2006 10:30 AM
Crazy Image Problem Mr Newbie ASP .Net 3 09-22-2005 05:20 AM
Crazy (?) C problem Jason Sewall C Programming 14 01-17-2005 03:32 PM
crazy browser go crazy dr greg Computer Support 7 01-14-2005 09:13 PM
CRAZY new problem I have never seen affecting 3750G and 2970G ccs Cisco 0 07-30-2004 02:38 AM