已阅读5页,还剩17页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
信号与变量 区别 联系 2 非静态与静态数据对象 非静态数据处理signal variable静态数据处理constant generic常量和信号是全局的 用于顺序代码及并行代码变量是局部的 只用于顺序代码 process function procedure 且值不能直接向外传递 3 常量 常量可以在包集 实体或结构中声明 包集 调用包集的所有实体使用实体 对该实体的所有结构体可用结构 仅在结构体中使用 4 信号 代表逻辑电路的 硬 连线 用作输入 出端口 内部连接所有端口默认为信号定义的地方同常量当信号用在顺序描述语句 如process 内部 其值不立刻更新 信号值是在相应的进程 函数或过程完成后才进行更新对同一个信号进行多重赋值 编译器可能给出警告并退出综合过程或仅认为最后一次赋值是有效的 MaxplusII给出警告 5 计数向量中 1 的个数 信号不立即更新变量立即更新 libraryIEEE useIEEE STD LOGIC 1164 ALL entitycount onesisport din instd logic vector 7downto0 ones outintegerrange0to8 endcount ones architecturenot okofcount onesissignaltemp integerrange0to8 beginprocess din begintemp 0 foriin0to7loopif din i 1 thentemp temp 1 endif endloop ones temp endprocess endarchitecturenot ok libraryIEEE useIEEE STD LOGIC 1164 ALL entitycount onesisport din instd logic vector 7downto0 ones outintegerrange0to8 endcount ones architectureokofcount onesisbeginprocess din variabletemp integerrange0to8 begintemp 0 foriin0to7loopif din i 1 thentemp temp 1 endif endloop ones temp endprocess endarchitectureok 8 分频器设计 libraryIEEE useIEEE STD LOGIC 1164 ALL entityfreq dividerisport clk clr instd logic out1 out2 bufferstd logic endfreq divider architectureBehavioraloffreq dividerissignalcount1 integerrange0to7 begin process clk clr variablecount2 integerrange0to7 beginif clr 1 thencount1 0 count2 0 out1 0 out2 0 elseif clk eventandclk 1 thencount1 count1 1 count2 count2 1 if count1 thenout1 notout1 count1 0 endif if count2 thenout2 notout2 count2 0 endif endif endif endprocess endBehavioral 10 Cnt1 sigCnt2 var2 2 2 3 4 4 11 触发器设计 libraryIEEE useIEEE STD LOGIC 1164 ALL entitydffisport d clk instd logic q bufferstd logic qbar outstd logic enddff architecturenot okofdffisbeginprocess clk beginif clk eventandclk 1 thenq d 进程结束后才生效qbar notq 进程结束后才生效 q的值此时还没更新 endif endprocess endarchitecturenot ok 12 qbar延迟了一个周期 13 改进的设计 libraryIEEE useIEEE STD LOGIC 1164 ALL entitydffisport d clk instd logic q bufferstd logic qbar outstd logic enddff architectureokofdffisbeginprocess clk beginif clk eventandclk 1 thenq d endif endprocess qbar notq endarchitectureok 14 qbar赋值与进程并发 q变化 qbar立即更新 15 寄存器数量 一个信号的赋值是以另一个信号的跳变为条件时 即发生同步赋值时 编译后产生寄存器 process function procedure中 如果一个变量在还没有进行赋值操作时已被使用 那么综合后就好产生寄存器 一个变量在一个信号跳变时赋值 并且该值最终又被赋给了另外的信号 则综合后会产生寄存器 如果变量的值没有被进程 函数或过程 以外的代码调用 那么不一定产生寄存器 16 17 18 libraryIEEE useIEEE STD LOGIC 1164 ALL entitydffisport d clk instd logic q bufferstd logic qbar outstd logic enddff architecturenot okofdffisbeginprocess clk beginif clk eventandclk 1 thenq d 进程结束后才生效qbar notq 进程结束后才生效 q的值此时还没更新 endif endprocess endarchitecturenot ok 19 改进的设计 libraryIEEE useIEEE STD LOGIC 1164 ALL entitydffisport d clk instd logic q bufferstd logic qbar outstd logic enddff architectureokofdffisbeginprocess clk beginif clk eventandclk 1 thenq d endif endprocess qbar notq endarchitectureok 20 移位寄存器 entityshiftisport din clk inbit dout outbit endshift architectureshiftofshiftisbeginprocess clk variablea b c bit beginif clk eventandclk 1 thendout c c b b a a din endif endprocess endarchitectureshift entityshiftisport din clk inbit dout outbit endshift architectureshiftofshiftisbeginprocess clk variablea b c bit beginif clk eventandclk 1 thena din b a c b dout c endif endprocess endarchitectureshift entityshiftisport din clk inb
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025-2026年信息安全技术专项训练题库
- 2025-2026年生物多样性保护与生态农业考点题库
- 2025-2026年天津市护理学专业社区护理学考核题库
- 叶紫《古渡头》课件
- 古诗里的春天课件
- 2026智慧农业传感器网络部署与数据应用场景
- 2026再生医学在糖尿病治疗中的应用价值探讨
- 吉祥航空空乘全真模拟强化试卷及答案
- 2026年中级能量回收系统故障检修考试试卷及答案
- 《物流控制与管理》课件
- 2025年山东水利二级造价师计量与计价实务真题及参考答案
- 地下管线保护培训课件
- 双重预防体系培训学习内容
- 车速重新鉴定申请书
- JB-QBH-FS5101W火灾报警控制器安装使用说明书
- 信息技术课程期末测试题设计范例
- DBJT15-261-2023 海绵城市建设技术标准
- 2023年11月软考中级系统集成项目管理工程师下午真题(第一批)
- 心包积液护理疾病查房
- 护理操作无菌技术课件
- 艺术专业技能中国舞表演竞赛规程
评论
0/150
提交评论