VHDL allows the user to define own data types.

1 user-defined integer types  

-- This is indeed the pre-defined type integer
type integer is range - to +; -- indeed the pre-defined type natural
type natural is range to +; -- user-defined subset of integers
type my_integer is range - to ; -- user-defined subset of integers or naturals
type student_grade is range to ;

2 user-defined enumerated types

-- This is indeed the pre-defined type BIT
type bit is ('0','1'); -- user-defined subset of std_logic
type my_logic is ('','','Z'); -- indeed the pre-defined type of BIT_VECTOR
-- range <> is used to indicate that the range is unconstrained
-- NATURAL range <> indicate the range must fall within the NATURAL range
type BIT_VECTOR is array (NATURAL range <>) of BIT; -- an enumerated data type, typical of finte state machines
type state is (idle, forward, backward, stop); -- another enumerated data type
type color is (red, green, blue, white)

  The encoding of enumerated types is done sequentially and automatically. For example, for the type color above, two bits are necessary (there are four states), being ‘‘00’’ assigned to the first state (red), ‘‘01’’ to the second (green), ‘‘10’’ to the next (blue), and finally ‘‘11’’ to the last state (white).

VHDL之User-defined data types的更多相关文章

  1. ExtJS笔记 Ext.data.Types

    This is a static class containing the system-supplied data types which may be given to a Field. Type ...

  2. Data Types in the Kernel &lt;LDD3 学习笔记&gt;

    Data Types in the Kernel Use of Standard C Types /* * datasize.c -- print the size of common data it ...

  3. Data Types

    原地址: Home / Database / Oracle Database Online Documentation 11g Release 2 (11.2) / Database Administ ...

  4. Primitive Data Types

    Primitive Data Types (The Java™ Tutorials > Learning the Java Language > Language Basics) http ...

  5. Oracle Schema Objects——Tables——Oracle Data Types

    Oracle Schema Objects Oracle Data Types 数据类型 Data Type Description NUMBER(P,S) Number value having a ...

  6. NetCore + Mysql + EF:No coercion operator is defined between types 'System.Int16' and 'System.Boolean',

    总结三种解决办法: 1.Mysql升级到7 2.Nuget安装Pomelo.EntityFrameworkCore.MySql 2.2.0替代MySql.Data.EntityFrameworkCor ...

  7. C and SQL data types for ODBC and CLI

    C and SQL data types for ODBC and CLI   This topic lists the C and SQL data types for ODBC and CLI a ...

  8. allow zero datetime=true导致datetime转换失败:MySql.Data.Types.MySqlDateTime”的对象无法转换为类型“System.Nullable`1[System.DateTime]

    allow zero datetime=true导致datetime转换失败:MySql.Data.Types.MySqlDateTime”的对象无法转换为类型“System.Nullable`1[S ...

  9. "SQL Server does not handle comparison of NText, Text, Xml, or Image data types."

    "SQL Server does not handle comparison of NText, Text, Xml, or Image data types." sql2000 ...

随机推荐

  1. Laradock 快速搭建PHP开发环境

    可能你并不清楚 Docker 是什么,更不了解 Laradock是什么,送上语句自己特别喜欢的一句话 Use Docker First And Learn About It Later 大概意思就是 ...

  2. 实验十二 团队作业8:软件测试与Alpha冲刺 第四天

    项目 内容 这个作业属于哪个课程 老师链接 这个作业的要求在哪里 实验十二 团队作业8:软件测试与Alpha冲刺 团队名称 Always Run! 作业学习目标 (1)掌握软件测试基础技术 (2)学习 ...

  3. Java基础学习总结(69)——匿名内部类与Lambda表达式

    前言 Java Labmda表达式的一个重要用法是简化某些匿名内部类(Anonymous Classes)的写法.实际上Lambda表达式并不仅仅是匿名内部类的语法糖,JVM内部是通过invokedy ...

  4. noip2013 Day2 T2 花匠 解题报告

    题目: 3289 花匠 2013年NOIP全国联赛提高组 时间限制: 1 s 空间限制: 128000 KB 题目描述 Description 花匠栋栋种了一排花,每株花都有自己的高度.花儿越长越大, ...

  5. 开源GIS软件 1

    1. 在线地图浏览器 GMap.NET GMap.NET 是一个强大.免费.跨平台.开源的.NET控件,它在Windows Forms 和WPF环境中能够通过Google, Yahoo!, Bing, ...

  6. 用CSS3实现带有阴影效果和颜色渐变的按钮

    这里讲下如何利用css3里的两个新属性 box-shadow和transition来实现如下所示的带有阴影和颜色渐变效果的按钮(下面这个只是图片:本想直接在这个页面下嵌html的,,试了后发现有些cs ...

  7. ScheduleJobFactory

    /* * file name: ScheduleJobFactory.java * copyright: Unis Cloud Information Technology Co., Ltd. Cop ...

  8. luogu1063 能量项链

    题目大意 有一串项链,项链上的每个珠子有首尾两个数字,首尾相连的两个珠子的尾数字和头数字相同.每次选择相连的一对珠子,得到第一个项链的首数字*第一个项链的尾数字(第二个项链的首数字)*第二个项链的尾数 ...

  9. 利用安卓手机搭建WEB服务器

    背景介绍 Android是一种基于Linux的自由及开放源代码的操作系统 所以是用安卓来搭建服务器是完全可行的.接下来将教大家如何利用AndroPHP和Feel FTP(或者其他FTP管理器)来在安卓 ...

  10. 杂项-Company:ShineYoo

    ylbtech-杂项-Company:ShineYoo 1. 网站返回顶部 1. 2. 3. 4. 2. 网站测试返回顶部 1. 2. 3.家服宝返回顶部 0.首页 http://www.jiafb. ...