Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - generic

 
Thread Tools Search this Thread
Old 11-06-2009, 12:58 PM   #1
Default generic


I am tying to create a module with a generic, but something is not
correct. Please help. How do I do this correctly?

entity downsample_by_two is
generic (
wordlength : integer := 14;
ce_clk48_polarity : std_logic := '1' -- 1: hi, 0: lo
);
port(
-- INPUT PORTS --
x : in std_logic_vector(wordlength-1 downto 0);
ce_clk48 : in std_logic;
-- OUTPUT PORTS --
7 : out std_logic_vector(wordlength-1 downto 0)
);
end entity;


then on down in the code I want to use


if ce_clk48 = ce_clk48_polarity then


Brian
  Reply With Quote
Old 11-06-2009, 02:09 PM   #2
Andy
 
Posts: n/a
Default Re: generic
On Nov 6, 6:58*am, Brian <brianwfar...@gmail.com> wrote:
> I am tying to create a module with a generic, but something is not
> correct. Please help. How do I do this correctly?
>
> entity downsample_by_two is
> * * * * generic (
> * * * * * * * * wordlength * * * * * * *: integer * * * := 14;
> * * * * * * * * ce_clk48_polarity * * * : std_logic := '1' -- 1: hi, 0: lo
> * * * * * * * * );
> * * * * port(
> * * * * * * * * -- INPUT PORTS --
> * * * * * * * * x * * * * * * * : in std_logic_vector(wordlength-1 downto 0);
> * * * * * * * * ce_clk48 * * * *: in std_logic;
> * * * * * * * * -- OUTPUT PORTS --
> * * * * * * * * 7 * * * * * * * : out std_logic_vector(wordlength-1 downto 0)
> * * * * * * * * );
> end entity;
>
> then on down in the code I want to use
>
> if ce_clk48 = ce_clk48_polarity then


Your output port name is not a legal identifier in VHDL.

Andy


Andy
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
USB ports reporting all installs as Generic USB Hubs jmcgovern Computer Support 3 03-05-2007 12:30 AM
DVD super multi drive cd write problem.. ashjas Computer Support 0 07-16-2006 06:14 AM
Serial to usb generic driver? =?Utf-8?B?aWFuc2lja282NjY=?= Windows 64bit 3 03-07-2006 05:21 PM
Re: Generic Host Process Error Message on Startup Wizard Computer Information 0 03-14-2005 09:08 AM
generic ink epson C82? Jethro Bodine Computer Information 0 11-22-2003 03:59 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46