Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > forcing 1,0 internal signal

Thread Tools

forcing 1,0 internal signal

Posts: n/a

In Xilinx XST document, I took 4bit counter example and modified it.

I am wondering this will work in read chip, while the simulation after
place and route, seems okay.

--4-bit unsigned up counter
--an asynchronous clear and a clock enable.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity counter is
C, CLR, CE : in std_logic;
Q : out std_logic_vector(3 downto 0)
end counter;

architecture archi of counter is
signal tmp: std_logic_vector(3 downto 0);
signal clear: std_logic; -- modified
signal enable: std_logic; -- modified

clear <= CLR; -- modified
enable <= CE; -- modified

clear <= '0'; -- modified : ground connect?
enable <= '1'; -- modified : VCC connect ?

process (C, CLR)
if (CLR='1') then
tmp <= "0000";
elsif (C'event and C='1') then
if (CE='1') then
tmp <= tmp + 1;
end if;
end if;
end process;
Q <= tmp;
end archi;

Reply With Quote
Mike Treseler
Posts: n/a
Elinore wrote:

> I am wondering this will work in read chip, while the simulation after
> place and route, seems okay.

If you expect it to no never CLR and always CE
then yes. It might be easier to just edit the

process (C)
if rising_edge(C) then
tmp <= tmp + 1;
end if;
end process;

-- Mike Treseler

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
Assignment to output signal from internal signal not istantaneous dibacco73 VHDL 1 02-12-2009 11:28 PM
Re: How to make an internal signal embedded deep in hierarchy to a gloal output signal Weng Tianxiang VHDL 2 01-30-2007 12:58 PM
Internal Client Accessing Internal Server Via Public IP Address GeekMarine1972 Cisco 1 01-15-2005 02:49 AM
Redirect Internal IP to Different Internal IP on Same Subnet & Interface EG Cisco 5 12-30-2004 02:10 AM
internal to internal NAT? Mike Cisco 1 04-21-2004 12:15 PM