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

Reply

VHDL - Whats the use of Code inside an Entity Declaration

 
Thread Tools Search this Thread
Old 12-03-2007, 05:45 PM   #1
Default Whats the use of Code inside an Entity Declaration


I only realised today that I can put sequential statements inside an
entity, rather than an architecture.

So, other than asserts or similar to check the viability of given
generics, what useful code can but put in there?

From making a test entity, I also noticed that an assert I had that
checked a generic, was not processed until the first delta cycle in
modelsim. I had some outputs from another process written to the
console before the assert inside the entity failed.


Tricky
  Reply With Quote
Old 12-04-2007, 12:51 AM   #2
Andy
 
Posts: n/a
Default Re: Whats the use of Code inside an Entity Declaration
On Dec 3, 11:45 am, Tricky <Trickyh...@gmail.com> wrote:
> I only realised today that I can put sequential statements inside an
> entity, rather than an architecture.
>
> So, other than asserts or similar to check the viability of given
> generics, what useful code can but put in there?
>
> From making a test entity, I also noticed that an assert I had that
> checked a generic, was not processed until the first delta cycle in
> modelsim. I had some outputs from another process written to the
> console before the assert inside the entity failed.


I think you can put any code that does not update a signal or shared
variable in the entity statement part.

Concurrent statements, including concurrent assertion statements, are
implied processes, and processes execute in indeterminate order within
the same delta cycle.

If you really want something to fail prior to simulation starting, it
needs to cause an error in elaboration. Things like illegal object
declarations (subtype outside of root type's range, etc.) constant
initialization, port-signal bounds mismatches, etc. should do the
trick. But then the error message may not be too useful.

You might be able to declare a constant initialized with a function
call, taking the generic(s) as argument(s), and inside that function
have one or more assertion statements.

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
Error: Physical sythesis tool PALAC is not supported by Formal Verification tool Conf bbiandov Software 0 12-22-2008 05:25 AM
Cisco VPN Restrict Access by IP ? samirise Hardware 1 12-16-2007 03:17 PM
Spoke to Spoke Enhanced Config (ASA-PIX) NEED HELP ASAP!! T-Mak Hardware 1 10-27-2006 11:56 AM
Cisco 1841 and Pix506e VPN aimeruko General Help Related Topics 0 09-26-2006 08:50 AM
PIX 506e config via PDM mbvales General Help Related Topics 1 08-29-2006 10:54 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