• It enables sharing of compiled designs and hides the source code from the users.
• Commonly used functions, procedures and user data types can be compiled into a user defined library for use with all designs.
• Library should be declared before each entity declaration even if it is in the same VHDL file.
• To declare a library (i.e. to make it visible to the design) two lines of code are needed , one containing name of the library, the other a use clause.
• A library structure can be as follows:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQZ9zEYMPrDMe9QcBVTbZUPql6c8m1R3g3urhYPM8X4FIPP2vmNMJnXaqcwwD_y9M3hz3KMWQWGGUutlMJWAmrLqAO7xBaiLa0mcIK7i8j0iqHhKafrk9yu_SQ5DsU7FoU15E1jL8HWZL2/s320/library.png)
Library syntax
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTUXuo4W1lWUUHTRHnu6psTZ3u2JDsn1yvbt_v9ySythh9w4fQgGq8tJCBZATpLgjEiqxTOTOTXJyDaETEvnS27jCoCnKCP4FQ1ZL4gjTBZHHH7ljbWe70Gv9yOpU_0lT_4-hjumoQmnAy/s320/syntax.png)
Example
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYJ3Db4Q48eLsFntnC7rEmHkwEL9rMw3t7CGUBBdmQWd57CrASjEy0GbfaYWDtQlvb4Ta2tbgzqIkxfjDHelbbzkZqBxI-Lw_gEIl7ZAh6tHUeBUnHkYTqwbKhTHMx7LRrJASKvep5M8mV/s320/exam.png)
Library details
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6pBpPaV0lVgwGVr3oBR8S4Bay7PusbXsnX245Md_x8gIZdnkQW2XQEBP1QPViMHArV9hgORDVdircLYp7DaGkZQ2ySCzxff0nOGDOYnfxKmFZz74dkh27zViUDE0UXRaUXtNbyj86fcKp/s320/libdetail.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvwh2nAHr7VfBIJ8IuUC55zkWZYOlRG31Jnplu10WhenVXRurGBC79om6edigH9xwh4BWDC_571pFaoXKOjdhuMyT11OXJ1Qu-gx3qlpWjYzwZIk9eEQ-QZh4kRdXFXkjV7ovSKrvM6Bs3/s320/detail+2.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX6Gy3yCCix077-1khfkqf_OPTGF2O0QxFmzV-IEdl1OFBIog-sE1fH8dm6CrLyU7ENWr8A3nbsGDPTnXyodb2I5sqlu6bP7YEdU3R5frZYvQV5YVF5rkm9FoLCFMztkDzihRuog1mqmoq/s320/detail+3.png)
information shared by www.irvs.info