Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5950219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:21:45+00:00 2026-05-22T17:21:45+00:00

With Ada I can split my modular units into specification and body with .ads

  • 0

With Ada I can split my modular units into specification and body with .ads and .adb files.

Is it possible to separate VHDL entity and architecture? If so, is there a naming convention or recommended style for doing this? And can the entities be placed in a custom library/package?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:21:46+00:00Added an answer on May 22, 2026 at 5:21 pm

    Libraries

    Everything gets compiled into a library. By default this is called “work”, but you can override this. I rarely have to use that though – it’s occasionally useful with external IP if there are namespace clashes. As Chiggs commented, using libraries to create namespaces is a good practice. Most synthesizers can deal with multiple libraries now, although it wasn’t always the case. All the simulators can (as far as I know). There’s also a bit more hassle involved in setting them up (you have to tell the compiler where they all are).


    maybe an example – say you have an i2c controller and an spi controller. You could call both blocks controller and compile them into their own libraries called i2c and spi and then instantiate them like this:

    i2c_instance:entity i2c.controller...etc
    spi_instance:entity spi.controller...etc
    

    or you could call them i2c_controller and spi_controller and do:

    i2c_instance:entity work.i2c_controller...etc
    spi_instance:entity work.spi_controller...etc
    

    And libraries are not “just the same” as hard disk folders. They are managed by the VHDL compiler, so you create and map them using whatever syntax the tool uses.

    For example with Modelsim, vlib creates a library at a particular place in the filesystem (so it does look like a folder at this point) and vmap tells the compiler how to map a use some_lib; clause to a particular bit of the filesystem.

    Entities, architectures, packages

    You can separate your entity and architecture (or even more than one architecture per entity) into multiple files, or keep them in one file. Keeping the architecture in a separate file means that when you recompile it, you don’t recompile the entity, which means you don’t have to recompile everything that instantiates it.

    Similarly with packages and package bodys – bodies in a separate file means you can just recompile that part without recompiling everything else. Note that packages are not for putting entities in.

    (Aside – Modelsim has a -just switch that allows you to keep everything in one file and just compile selected bits of the files, for example, just the architecture and/or body part(s))

    Summary

    • Compile re-useable cores into their own library to protect their namespace
    • Compile everything else into the work library
    • Put useful constants, functions, procedures, type definitions into one or more packages
    • Putting entities and architectures into one or more files is a matter of taste and development style more than anything else
    • Putting packages and package bodies into one or more files is a matter of taste and development style more than anything else
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using GNAT Programming Studio to update some ada files. I have a style
Can you call C++ functions from Ada? I'm wondering if there is a way
I hope you guys can give me a hand here. I have an Ada
Anyone can show me some examples, simple, how to use GTK with Ada? examples,
I know this can be done in Ada but I'm new to Java and
I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS.
I'm coming from Java/C++ to Ada and am having trouble figuring out the small
Has anyone here created a Flash site or application that is ADA (Section 508)
I'm trying to build GCC for use with an AVR microcontroller and avr-ada, and
When I attempt to open a file to write, I get an error: Ada.IO_Exceptions.Name_Error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.