VHDL语法学习笔记

1/
   port's direction:
<               in
>               out
>               inout
>               buffer
>               linkage      (no confirmed direction, can link with any direction's signal.)
2/
   data type:
>        there's 10 typies of a data.but always use this one:
>               bit  (can be '1' or '0') and this type often be declared in 'std_logic' and 'std_logic_vector'
>              
3/
    block  usage:
>       [blockname]:
>        block
>        begin
>               .......
>        end block [blockname];
[ftc=#F68E54]block is a structure of VHDL expressions in block are collateral,which are different from process [/ft]
4/
   subprogram
>      there are two kinds of subprogram: function and procedure.And their usage:
>            function [function name] (<argument list>) is
>               return  [data name] is
>               [declaring expressiong]
>            begin
>               [access expression];
>                return [variable name];
>            end [function name];
>       ---------------------------------------------------------
>            procedure [procedure name] (<arguement list>) is
>            begin
>                [access expression];
>            end [procedure name];
And something should be noted is  [ftc=#F68E54]Expressions in function and procedure are ordinal  accessed[/ft]
5/
   package usage:
>      package [package name] is
>          {construction expression];
>      end [package name];
>      package body [package name] is
>                [construction statement];
>      end body;
[B] So you see , package's usage somewhat like Entity,but a little different: there isn't an 'of' in before 'is'.[/B]
[ftc=#f68e54]package is used to list out signals,constant,datatype,component,function,procedure 's defintion.Which ate exprected to be used.[/ft]
6/
   configuration
>     configuration [configuration name] of [entity name] is
>           [construction statement];
>     end [configuration name];
>     configuration [configuration name] of [entity name] is
?         for [config architecture name]
>        end for;
>      end [configuration name];
[ftc=#F597e9] this configuration didn't include block and component.and use to link different level's entity structure.[/ft]
7/
   custom datatype
      a.type usage:
             1) type [typename] is [type construction] of [base datatype];
             2) type [typename] is (enumerate list];
8/
type [array name] is array ([area]) of data type;
type [array name] is array ([flag type] range<>);
    example: type bit_vector is array(natural range<>);
  variable var : bit_vector(0 to 1);
to_stdlogicvecter(a);    change a from bit_vector to std_logic_vector.
to_bitvector(a); change a fron std_logic_vector to bit_vector.
to_stdlogic(a);
to_bit(a);
[ftc=#f68e54]this four functions are includeed in std_logic_1164 package.[/ft]

9/
  wait.
            wait ;
                     wait on [signal list];
                     wait for [time];
                     wait until [condition expession];
10/
 loop
                     example:
                        l2: loop
                          a:=a+1;
                           exit l2 when a>10;
                           end loop l2;
 and it's meaning is obvious.
11/
 while loop
                            [ loop flag:] ehile <condition> loop
                                <ordinal statement>
                                   end loop [loop flag];
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值