I'm using a xc9536 with a pc44 package...
I need to debounce som signals, there for I need a wait function...
I have a clk input at 1khz, and I need a vector to count so I get a 20 ms delay...
So the code would proberly look something like this,
VHDL is very new to me, so bare with me...
And my english isn't as good as well, I'm danish.
architecture Behavioral of cykel is
--clk signal
CLKIN : IN STD_LOGIC;
--vector for counting to 20, (5bits)
signal count : std_logic_vector (4 downto 0);
begin
if( a = "1"
{
count <= "0";
process ...
count <= count + "1";
}
if (count = "11111"
count <= "0"
--Here I will be able to check my a signal again I think?
-- And if it's still high, I will use it and send it on it's way...
Is the count function in the right place?
Can I make a separte function for counting?
Do u spot any troubles in my way of thinking?
I need to debounce som signals, there for I need a wait function...
I have a clk input at 1khz, and I need a vector to count so I get a 20 ms delay...
So the code would proberly look something like this,
VHDL is very new to me, so bare with me...
And my english isn't as good as well, I'm danish.
architecture Behavioral of cykel is
--clk signal
CLKIN : IN STD_LOGIC;
--vector for counting to 20, (5bits)
signal count : std_logic_vector (4 downto 0);
begin
if( a = "1"
count <= "0";
process ...
count <= count + "1";
}
if (count = "11111"
count <= "0"
--Here I will be able to check my a signal again I think?
-- And if it's still high, I will use it and send it on it's way...
Is the count function in the right place?
Can I make a separte function for counting?
Do u spot any troubles in my way of thinking?