Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Entity Generics Question

Reply
Thread Tools

Entity Generics Question

 
 
dohzer dohzer is offline
Junior Member
Join Date: Aug 2009
Posts: 1
 
      08-21-2009
I'm declaring the following interface and getting the following error:

Code:
entity entity_a is
	generic 
	(
		SIG_A_WIDTH 		: integer := 16;
		SIG_B_WIDTH 		: integer := 2;
		SIG_C_WIDTH		: integer := SIG_WIDTH_A - SIG_WIDTH_B;
	);

	port 
	(
		...
		blah
		...
	);
end entity_a;
Code:
Object 'sig_a_width' cannot be used within the same interface as it is declared
I want to be able to define "SIG_C_WIDTH" as a function of the other two widths, so is there an easier and/or more correct way to do it? Should I be declaring it in a separate package or somewhere else in the code?
 
Reply With Quote
 
 
 
Reply

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
Entity, problem with entity key ThatsIT.net.au ASP .Net 1 09-07-2009 02:20 AM
Entity Framework - Reassigning child entity's parent Norm ASP .Net 3 07-06-2009 07:28 PM
How to relate a SQL based entity with an Object based entity in Entity Framework markla ASP .Net 1 10-06-2008 09:42 AM
Entity Name or Entity Number? Samuel van Laere HTML 4 02-24-2007 10:11 PM
Can't convert a generics list of objects into a generics list ofinterfaces Juergen Berchtel Java 1 05-20-2005 02:07 PM



Advertisments