wide_road的个人空间 https://blog.eetop.cn/1107155 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

VHDL 足迹(二)

已有 489 次阅读| 2013-7-11 13:50 |个人分类:学习

天气: 晴朗
心情: 平静

ENTITY testBaud_generator IS
END testBaud_generator; --! 类似于verilog中的 module testBaud_generator; 没有声明端口,因为此模块是用于仿真的不需要端口声明,底层是要例化要访问的模块的

--! vhdl中好多地方都在关键字后面,begin前面声明一些变量和变量,例如
ARCHITECTURE behavior. OF testBaud_generator IS       
    COMPONENT baud_generator
    Port ( rst : in STD_LOGIC;              --! Reset Input
     clk : in  STD_LOGIC;              --! Clock input
           cycle_wait : in  STD_LOGIC_VECTOR ((nBitsLarge-1) downto 0); --! Number of cycles to wait for baud generation
     baud_oversample : out std_logic;          --! Oversample(8x) version of baud (Used on serial_receiver)
           baud : out  STD_LOGIC);             --! Baud generation output (Used on serial_transmitter)
    END COMPONENT;
--! 上面的部分是声明architecture中要例化的模块
   --Inputs
   signal rst : std_logic := '0';                  --! Signal to connect with UUT
   signal clk : std_logic := '0';                  --! Signal to connect with UUT
   signal cycle_wait : std_logic_vector((nBitsLarge-1) downto 0) := (others => '0'); --! Signal to connect with UUT

  --Outputs
   signal baud : std_logic;     --! Signal to connect with UUT
   signal baud_oversample : std_logic;  --! Signal to connect with UUT
   -- Clock period definitions (1.8432MHz)
--! 上面是声明architecture内部互联的信号
   constant clk_period : time := 20 ns; -- 0.543us (1.8432Mhz) 20ns (50Mhz)
 --! begin后面才是architecture中的实际内容,也就是在architecture名字和begin之间都是一些声明,这些在verilog中是不需要的,也就是说verilog的语法结构更加简洁
BEGIN


点赞

全部作者的其他最新日志

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 1

    粉丝
  • 0

    好友
  • 0

    获赞
  • 2

    评论
  • 1029

    访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-18 08:22 , Processed in 0.013537 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部