




已阅读5页,还剩175页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
硬件描述语言VHDL及其应用 哈工大微电子中心王进祥 电话 6415979 806 2020 4 15 2 一 目的 了解目前电子设计系统方法及流程了解 掌握综合与验证工具能用VHDL设计复杂功能电路 二 内容 高层次设计概述如何写优化的VHDL代码examplesSoC设计方法学设计工具使用 三 如何学习本课程 带着实际课题学习 多提问题 一起分析 讨论 2020 4 15 3 一 高层次设计概述 EDA工具发展设计方法深亚微米设计问题测试综合 可测性设计 Top down设计流程硬件描述语言综合VHDL设计小结 2020 4 15 4 1 1EDA工具发展 2020 4 15 5 1 1EDA工具发展 Cont CAD 逻辑图输入 逻辑模拟 电路模拟 版图设计和版图验证分别进行 需要对两者结果进行多次比较 修改 设计规模较小 CAE 集逻辑图输入 逻辑模拟 测试码生成 电路模拟 版图设计 版图验证等工具一体 构成一个较完整的IC设计系统 EDA HDL取代逻辑输入 逻辑网表由综合工具自动产生 可管理性增强 易于维护和数据交换 SoC 采用深亚微米工艺生产技术 基于平台设计和IP复用技术 时序收敛性为首要目标 2020 4 15 6 自顶向下设计方法 Top down 系统行为设计结构设计逻辑设计电路设计版图设计 1 2设计方法 自底向上设计方法 Bottom up 系统功能划分单元设计功能模块设计子系统设计系统总成 基于平台设计方法 Platform based SoC设计普遍采用的方法 SoC平台和IP IntellectualProperty 其它设计 嵌入式设计方法 层次式设计方法等 2020 4 15 7 1 3深亚微米设计问题 连线延时时序模型器件模型信号完整性电磁干扰功耗设计工具 综合优化工具 布图规划工具 SDF PDEF SDF 标准数据格式 PDEF 物理设计交换格式 2020 4 15 8 1 4测试综合 目的 集成电路的测试简单化嵌入可测试结构 加速可测性设计产品制造前就可评价设计的可测性消除冗余逻辑诊断不可测的逻辑结构 内容 测试嵌入 设计规则检查 测试码生成 故障模拟 诊断和输出测试图样 测试综合包括了使测试成功的每一步骤 如加入带测试因素的电路 对逻辑综合增加约束条件以满足测试要求及对高级语言描述的可测结构的综合等都可归结为测试综合 2020 4 15 9 1 4测试综合 Cont 方法 FullScanPartialScanBISTBoundaryScan 标准 规范 IEEE1149IEEEP1500VSIARelatedSpec SoC可测试设计 IP可测试设计GlueLogic可测试设计测试存取结构 分类 1 Pass2 Pass 2020 4 15 10 1 5Top down设计流程 PLANNING SYNTHESIS FLOORPLAN P R EXTRACTION LVS DRC TIMING LTL 2020 4 15 11 1 6硬件描述语言 VHDL VerilogVHDLObjectEntity I O界面描述Architecture 功能定义Process 行为模块Library VHDLObject的集合Package 数据类型 子程序 子单元的集合Configuration Architecture Parameter选择 2020 4 15 12 1 6硬件描述语言 Cont VHDL中的端口 InOutInoutBuffer Entity 2020 4 15 13 1 7综合 Definition Synthesis Translation Optimization HDLcodegtechlogicnetlist min SpeedXAreaXPower Optimization technologyMapping BehavioralSynthesis SchedulingandAllocationAlgorithm 2020 4 15 14 1 8VHDL设计小结 一个完整的设计由一些子单元相互连接而成每个子单元有一个Entity和至少一个Architecture单元间数据传递是通过在Entity中描述中所声明的端口进行 通信端口的信号类型 端口宽度以及端口方向要匹配一个Architecture可包括Behavioral Dataflow和Structure风格语句子单元 Component 在使用之前要声明 2020 4 15 15 1 8VHDL设计小结 Cont RS 255 223 码译码器Top框图 2020 4 15 16 1 8VHDL设计小结 Cont RS 255 223 码译码器详细模块图 2020 4 15 17 1 8VHDL设计小结 Cont 2020 4 15 18 1 8VHDL设计小结 Cont 2020 4 15 19 1 8VHDL设计小结 Cont componentxor8port in1 in2 inbit8 xout outbit8 endcomponent signalctlN1m1 ctlN1 ctl254 ctl255 std logic signalctlobf synfb std logic signalfbo dout synout lstsfe bout bit8 signalcntout rsInt signaliffto syndout bit8 signalbmfo rsbit8 vector 0toN2 1 5 2020 4 15 20 1 8VHDL设计小结 Cont beginu1 controlportmap reset clk ctlN1m1 ctlN1 ctl254 ctl255 ctlobf synfb cntout u2 syndromeportmap reset clk decin synfb syndout u3 bmexpandportmap reset clk syndout cntout synout lstsfe bout u4 bmfftbufportmap reset clk ctl255 synout lstsfe bmfo u5 ifftportmap reset clk ctlN1m1 ctlN1 ctl254 bmfo iffto u6 fftobufportmap reset clk ctlobf iffto fbo u7 decbufportmap reset clk decin dout u8 xor8portmap fbo dout decout endstructural 6 2020 4 15 21 二 如何写优化的VHDL代码 数据类型并发 顺序赋值语句小结Process语句资源共享其它 2020 4 15 22 2 1数据类型 2020 4 15 23 2 1数据类型 Cont 2020 4 15 24 2 1 1赋值语句 i signalt s bit s 1 s t ii signalc bit vector 0to3 signald bit vector 3downto0 c 1011 d c ok c 0to3 d 0to3 ok d c ok c 0to3 d 0to3 No 2020 4 15 25 iii signals t w m bit signalc bit vector 0to3 c 1011 c s c 1 1 s 2 1 3 1 Ok 2 1 1赋值语句 Cont 2020 4 15 26 iv signala vec bit vector 0to11 a vec B 1100 0011 0011 1100 a vec 1100001100111100 a vec X C33C a vec X C3 3C 2 1 1赋值语句 Cont 2020 4 15 27 二进制 B Binary 八进制 O Octal 十六进制 X Hexadecimal 位串中的进制表示 2 1 1赋值语句 Cont 2020 4 15 28 v signalA B C bit vector 3downto0 C AandB 2 1 1赋值语句 Cont 2020 4 15 29 vi sliceofarrayentityVHDLisport A inbit vector 0to7 outp outbit endVHDL architectureE1ofVHDLisbeginoutp A 5 end signalC bit vector 0to7 C 4 1 C 0to3 1001 2 1 1赋值语句 Cont 2020 4 15 30 vii Compositedatatypetypedateisrecordyear integerrange1980to2030 month integerrange1to12 day integerrange1to30 endrecord subtypebit8isbit vector 7downto0 2 1 1赋值语句 Cont 2020 4 15 31 vii Compositedatatypesignalweekday today date weekday year 2003 weekday monty 2 weekday day 14 today weekday 2 1 1赋值语句 Cont 2020 4 15 32 2 1 2数据类型转换 强类型语言 VHDL具有丰富的数据类型 不同类型的对象 信号 变量 不能直接赋值 经常转换的数据类型 std logic bit std ulogic boolean signedunsigned std logic vector bit vector 数据类型转换三种方法 类型标记转换法 函数转换法和常数转换法 2020 4 15 33 类型标记转换法 std logicandstd ulogic std logic vectorandsignedstd logic vectorandunsignedintegerandreal等 signalastd logic vector 0to7 signalbunsigned 0to7 b unsigned a 2 1 2数据类型转换 Cont 2020 4 15 34 函数转换法 std logicandbitstd ulogicandbit booleanandbit std logic vectorandbit vectorintegerandstd logic vector unsigned等 signalastd logic vector 0to7 signalbintegerrange0to255 a to stdlogicvector X AF b conv ingeter a 2 1 2数据类型转换 Cont 2020 4 15 35 typetypeconv typeisarray std ulogic lowtostd ulogic high ofbit constanttypeconv typeconv type 0 L 0 1 H 1 others 0 signals std ulogic signala bit a typeconv s 常数转换法 2 1 2数据类型转换 Cont 2020 4 15 36 Howtotransformbittypetobooleantype signalbitty bit signalbooly boolean booly bitty 1 Discussion 2 1 2数据类型转换 Cont 2020 4 15 37 2 1 3逻辑运算与关系运算 运算符 and or not xor nand nor Discussion Whatistheresultofthefollowingrelationalstatement 2020 4 15 38 2 1 4算术操作 运算符 mod rem 操作数类型 std logic vector integer signed unsigned useieee std logic unsigned all 2020 4 15 39 2 1 4算术操作 Cont signala b std logic vector 3downto0 q1 unsigned a unsigned b q2 unsigned a signed b q3 signed a signed b q4 a b q5 0 2020 4 15 40 2 1 5连字符和聚集 连字符 concatenationoperator聚集 aggregates signalA B std logic vector 3downto0 signalC std logic vector 7downto0 signalD std logic C A 2020 4 15 41 C 7 1 6 D 5downto2 1 others 0 C 00000000 初始化 C 0 2 1 5连字符和聚集 Cont 2020 4 15 42 2 2并发 顺序赋值语句 并发赋值语句在architecture的begin和end之间 与书写顺序无关 每一条并发语句均可用一个process语句等价 顺序赋值语句只能在process和子程序的begin和end之间 它除信号赋值语句外 还有变量赋值 2020 4 15 43 2 2 1并发赋值语句 D A E A B C 2020 4 15 44 2 2 1并发赋值语句 Cont A B A 并发赋值语句 C A C B 组合逻辑环路 Multi driver needresolvedfunction 2020 4 15 45 2 2 2顺序赋值语句 D A E A B C 2020 4 15 46 2 2 2顺序赋值语句 Cont C A C B A B A 组合进程 No 时序进程 Ok 2020 4 15 47 2 3小结 一个设计由entity和architecture描述数据对象类型有bit boolean integer std logic等标准类型和用户自定义类型并发语句执行与书写顺序无关 orderindependent VHDL是一种强类型语言 类型不能自动相互转换 元件例化语句不能在process中 if语句和for语句用于并发语句时 只能是generate语句 并发语句无变量赋值语句 2020 4 15 48 2 3小结 Cont entityshiftisport reset clk instd logic din instd logic dout outstd logic endshift architecturestrofshiftiscomponentdffport reset clk instd logic d instd logic q outstd logic endcomponent signaltv std logic vector 0to7 beginforIin0to7generateifI 0generateu1 dffportmap reset clk din tv 0 endgenerate ifI 0andI 7generateu2 dffportmap reset clk tv I 1 tv I endgenerate endgenerate dout tv 7 endstr 2020 4 15 49 2 4process 描述电路功能或行为 由于综合后的电路对所有输入信号变化敏感 因此所有被读信号均应包含在敏感表中 否则 综合前的模拟结果与综合后的模拟结果不一致 2020 4 15 50 2 4 1syntax process label process sensitivitylist declarations beginstatements if loop case subprogramcalletcendprocess process label 2020 4 15 51 2 4 1syntax P1 process A B BeginD AorBandC EndprocessP1 P1 process A B C BeginD AorBandC EndprocessP1 2020 4 15 52 2 4 2communicationamongprocess architectureexample 2020 4 15 53 2 4 3ifthenelse语句综合 i 引入寄存器 entitydffisport d instd logic clk instd logic q outstd logic Enddff architecturertlofdffisbegininfer reg process d clk beginif clk eventandclk 1 thenq d endprocessinfer endrtl 2020 4 15 54 2 4 3ifthenelse语句综合 Cont ii 引入锁存器 Infer latch process A B beginif A 1 thenx B endprocessinfer infer latch Infer latch process A B Beginx 0 if A 1 thenx B endprocessinfer infer latch 隐含了A 0 时x x 不完全的else 2020 4 15 55 2 4 3ifthenelse语句综合 Cont iii 组合电路 entitycombisport a b inbit select inbit y outbit endcomb architecturearchofcombisbeginprocess a b select beginif select 1 theny b elsey a endif endprocess endarch 2020 4 15 56 2 4 3ifthenelse语句综合 Cont iv 异步复位 process reset clk d Beginif reset 0 thenq 0 elsif clk eventandclk 1 thenq d endif endprocess 2020 4 15 57 2 4 3ifthenelse语句综合 Cont v 三态逻辑 signals sel data std logic process sel data Beginif sel 1 thens data elses Z endif endprocess 1 2020 4 15 58 2 4 3ifthenelse语句综合 Cont v 三态逻辑 architecturebehoftribufissignalasel bsel a b s std logic beginpa process asel a begins Z if asel 1 thens a endif endprocesspa 2 pb process bsel b begins Z if bsel 1 thens b endif endprocesspb endbeh Multidriver 2020 4 15 59 2 4 3ifthenelse语句综合 Cont Discussion signala b use b bit process a b use b Beginif use b 1 thens b elseif use b 0 thens a endif endprocess 1 Latch 2020 4 15 60 2 4 3ifthenelse语句综合 Cont Discussion signala b use b std logic process a b use b Beginif use b 1 thens b elseif use b 0 thens a endif endprocess 2 Latch 2020 4 15 61 2 4 3ifthenelse语句综合 Cont Discussion elseassertfalsereport invaliduse b severityerror endif endprocess 3 what signala b use b std logic process a b use b Beginif use b 1 thens b elseif use b 0 thens a 2020 4 15 62 2 4 3ifthenelse语句综合 Cont vi 在一个进程中 一个信号只能对应一个三态驱动 process b ub a ua Begindout Z if ub 1 thendout b endif if ua 1 thendout a endif endprocess 2020 4 15 63 2 4 3ifthenelse语句综合 Cont vii Z 值使用规则 如 dout Z anddin 如 if sel Z then相当于iffalsethen 2020 4 15 64 2 4 3ifthenelse语句综合 Cont vii ifthenelse语句小结 2020 4 15 65 2 4 4case语句 i syntax case expression iswhenvalue statements whenvalue value statements whenvalue1tovalue2 statements whenothers statements endcase 2020 4 15 66 2 4 4case语句 Cont ii case语句规则 任意value互不相同 如无others分枝 必须穷尽所有可能的表达式值 如有others分枝 必须至少有一个表达值未列出 任意分枝中的语句可以有多条 2020 4 15 67 2 4 4case语句 Cont entitydecoderisport din instd logic vector 0to2 q outstd logic vector 0to7 enddecoder architectureexofdecoderisbeginprocess din begincase din when 000 qqq 00000100 when 011 qqqqqq endcase endprocess endex 2020 4 15 68 2 4 5forloop语句 i 语法 loop label forloop varinrangeloopsequentialstatements endlooploop label 说明 loop label可选 loop var不需声明 综合时 循环语句将unrolled Whyloopstatement 2020 4 15 69 2 4 5forloop语句 Cont entityparsumisport word instd logic vector 0to7 par outstd logic endparsum architectureaddxorofparsumisbeginprocess word variablets std logic begints 0 forIinword rangeloopts tsxorword I endloop par ts endprocess endaddxor Discussion 如果ts为信号 结果是什么 2020 4 15 70 2 4 6数据对象 constantvariablesignal i constantandvariable constantmask std logic vector 0to7 00000000 constantled zero bit vector 0to7 X 7E variabletsum std logic vector 3downto0 2020 4 15 71 2 4 6数据对象 Cont ii signalandvariable 相同点 值可变 可综合为逻辑或线 不同点 变量赋值有立即性 且只用于process和subprogram中 VHDL 1076 87 而信号除此之外 还可用于并行语句中 应用 简单计算signal复杂计算variable中间结果variable 2020 4 15 72 2 4 6数据对象 Cont signala b c x y shortprocess a b c beginc a x c 2 c b y c 4 endprocess signala b x y shortprocess a b c variablec short beginc a x c 2 c b y c 4 endprocess 2020 4 15 73 2 4 6数据对象 Cont signal variable 2020 4 15 74 2 4 6数据对象 Cont entitysigvarisport a b c d std logic q outstd logic endsigvar architecturesigofsigvarissignalint std logic Beginprocess a b c d int beginint aandbandc q intord endprocess endsig entitysigvarisport a b c d std logic q outstd logic endsigvar architecturesigofsigvarisBeginprocess a b c d variablelint std logic beginint aandbandc q intord endprocess endsig 2020 4 15 75 2 4 7wait语句 waituntil wait waiton waitfor wait语句表明了信号激活process的条件 在process中 如有wait语句 敏感表必须取消 在process中 如既无wait语句 也无敏感表 则不能正确模拟 综合工具仅支持waituntil语句 引入寄存器 2020 4 15 76 2 4 7wait语句 Cont libraryieee Useieee std logic 1164 all entitycount4isport updown instd logic clk instd logic dout outintegerrange0to15 endcount4 architecturebehaveofcount4issignalcnt integerrange0to15 beginprocessbeginwaituntilclk eventandclk 1 if updown 1 thenif cnt 15 thencnt 0 elsecnt cnt 1 endif elseif cnt 0 thencnt 15 elsecnt cnt 1 endif endif endprocess endbehave 2020 4 15 77 2 5资源共享 硬件资源 关系运算 算术运算 每个运算符均要消耗大量的硬件资源 并产生延时 如何用最小的资源实现相同的功能 2020 4 15 78 2 5资源共享 Cont i if sel a 1 thenz a t endif if sel a 0 thenz b t endif 1 2020 4 15 79 2 5资源共享 Cont i z a twhensel a 1 elseb t 或if sel a 1 thenz a t elsez b t endif 2 2020 4 15 80 2 5资源共享 Cont ii dout 0 found false forkin1to4loopif found false thenif a k 1 thendout b k c k found true endif endif endloop 1 2020 4 15 81 2 5资源共享 Cont ii t1 0 t2 0 found false forkin1to4loopif found false thenif a k 1 thent1 b k t2 c k found true endif endif endloop dout t1 t2 2 2020 4 15 82 2 5资源共享 Cont iii 多进程P1 processbeginwaituntilclk eventandclk 1 if sel 00 thenreg 0 dA dB endif endprocessP1 1 P2 processbeginwaituntilclk eventandclk 1 if sel 01 thenreg 1 dA dB endif endprocessP2 2020 4 15 83 2 5资源共享 Cont iii 多进程P3 processbeginwaituntilclk eventandclk 1 if sel 10 thenreg 2 dB dA endif endprocessP1 2 dout reg 0whensel 00 elsereg 1whensel 01 elsereg 2whensel 10 else0 资源 3个加法器 减法器 资源共享不能在多进程间实现 2020 4 15 84 2 5资源共享 Cont iv if addr 31downto20 000000000001 then 资源 两个12位比较器 资源 两个3位比较器 一个9位比较器 2020 4 15 85 2 5资源共享 Cont v s 0 A 1 thens k 1 elses k 0 endif endloop 资源 1个减法器 7个比较器 说明 模拟时间长 因为每进入循环均要计算一次减法 综合时间也会较长 因为综合工具要移去循环中的定值表达式 1 2020 4 15 86 2 5资源共享 Cont v s 0 tv thens k 1 elses k 0 endif endloop 资源 1个减法器 7个比较器 说明 模拟 综合时间短 2 2020 4 15 87 2 5资源共享 Cont v s 0 A thens k 1 elses k 0 endif endloop 资源 0个减法器 7个比较器 说明 下标运算不产生额外资源消耗 综合工具自动用2to8与A比较 模拟 综合时间短 3 2020 4 15 88 2 5资源共享 Cont vi sum 0 forkin0to7loopsum sum A k endloop dout sum 1 8个加法器 8级加法器延迟 2020 4 15 89 2 5资源共享 Cont vi cnt 8 forlin0to2loopcnt cnt 2 forkin0tocnt 1loopA k A k 2 A k 2 1 endloop endloop dout A 0 2 7个加法器 3级加法器延迟 2020 4 15 90 2 6其它 i 正确使用后到达的信号process A late B C D beginif A late B 24 thendout C elsedout D endif endprocess 1 2020 4 15 91 2 6其它 Cont i 正确使用后到达的信号process A late B C D beginif A late 24 B thendout C elsedout D endif endprocess 2 2020 4 15 92 2 6其它 Cont ii 仿真与综合结果不匹配processvariablecnt integerrange0to255 beginwaituntilclk eventandclk 1 cnt cnt 1 dout cnt endprocess 1 变量将引入额外的寄存器 2020 4 15 93 2 6其它 Cont ii 仿真与综合结果不匹配signalcnt integerrange0to255 processbeginwaituntilclk eventandclk 1 cnt cnt 1 endprocess dout cnt 2 但是 仿真时 当cnt的值为255时 再一次进入该process时 将报告越界错误 2020 4 15 94 2 6其它 Cont ii 仿真与综合结果不匹配signalcnt integerrange0to255 processbeginwaituntilclk eventandclk 1 if cnt 255 thencnt 0 elsecnt cnt 1 endprocess dout cnt 3 2020 4 15 95 2 6其它 Cont iii 避免不必要的重复调用函数functionadd8 in1 in2 bit vector 7downto0 isreturnbit vector 7downto0 sign bit add8 A B 7 lower nibble add8 A B 3downto0 2020 4 15 96 2 6其它 Cont iv 元件例化端口映射问题inst1 comp1portmap din 1 0 din 2 con A dout con out 当某一输入端口接固定电平时 必须引入中间信号 且中间信号不能在说明时赋初值 1 2020 4 15 97 2 6其它 Cont iv 元件例化端口映射问题componentdffport reset clk instd logic d instd logic q qn outstd logic enddff 当某一输出端悬空时 应连接open关键字 u1 dffportmap reset reset clk clk q dout qn open 2 2020 4 15 98 2 6其它 Cont v 避免阵列方向错误signaldata8 bit vector 0to7 signaldout bit vector 7downto0 dout data8 7downto0 2020 4 15 99 2 6其它 Cont vi 避免低效率语句signal l1 l2 bit P1 process l1 l2 A B C D begincase l1 Ok No 1 2020 4 15 100 2 6其它 Cont vi 避免低效率语句 signal l1 l2 bit P3 process l1 l2 A B C D subtypetwobitsisbit vector 0to1 begincase twobits l1 2 2020 4 15 101 2 6其它 Cont vii 桶移位寄存器 entitybarrel shifterisport clk inbit din inbit vector 0to31 k inintegerrange0to31 dout outbit vector 0to31 endbarrel shifter architecturebehaveofbarrel shifterisbeginprocessbeginwaituntilclk eventandclk 1 dout din kto31 上述模型不可综合 k是0 31中任意的数 属于不可计算的 但上述模型可仿真 1 2020 4 15 102 2 6其它 Cont vii 桶移位寄存器 architecturesyn1ofbarrel shifterisbeginprocessbeginwaituntilclk eventandclk 1 if k 0 thendout din elseforlin1to31loopif l k thendout din lto31 2 2020 4 15 103 2 6其它 Cont vii 桶移位寄存器 architecturesyn2ofbarrel shifterisbeginprocessbeginwaituntilclk eventandclk 1 case k iswhen0 doutdoutdout din 31 3 2020 4 15 104 2 6其它 Cont viii 三态使能寄存器 或锁存器 architecturertloftrienregisbeginprocess clk en din beginif en 0 thendout Z elsif clk eventandclk 1 thendout din endif endprocess endrtl entitytrienregisport clk instd logic en instd logic din instd logic dout outstd logic endtrienreg 2020 4 15 105 2 6其它 Cont ix 向量操作与forloop process scalar A vector B beginforkinvector B rangeloopvector C k vector B k andscalar A endloop endprocess 2020 4 15 106 2 6其它 Cont ix 向量范围 entitycase exisport a instd logic vector 4downto0 q outstd logic vector 2downto0 endcase ex architecturertlofcase exisbeginprocess a begincaseais when 00000 qqq 000 endcase endprocess endrtl 2020 4 15 107 2 6其它 Cont ix 向量范围 process a variableint integerrange0to31 beginint conv integer a caseintiswhen0 qqq 000 endcase endprocess 向量没有范围 因此 不能指定向量的范围 2020 4 15 108 2 6其它 Cont x 时钟信号 typenot single bitis X 0 1 Z signalinvalid clk not signal bit waituntilinvalid clk eventandinvalid clk 1 orif invalid clk eventandinvalid clk 1 then 沿触发时钟信号必须是能够用单比特编码的枚举类型 但std logic类型是一个例外 illegalusage 2020 4 15 109 2 6其它 Cont xi 综合结果多样性 entitycombisport a b c instd logic d outstd logic endcomb architecturertlofcombisbegind aandb orc endrtl 2020 4 15 110 2 6其它 Cont xii 使用中间数据项 Sum1 a b Sum2 a b c Sum3 a c Sum1 a b Sum2 Sum1 c Sum3 a c 2020 4 15 111 2 6其它 Cont xiii 消除潜在的latch process ctl a b c beginif ctl 2 thenx a y b z c elsex b endif endprocess 1 2020 4 15 112 2 6其它 Cont xiii 消除潜在的latch process bcd begincase bcd iswhen 000 zerozerozerozero one two endcase endprocess 2 2020 4 15 113 2 6其它 Cont xiii 消除潜在的latch process bcd begincase bcd iswhen 000 zeroonetwozero one two endcase endprocess 2 2020 4 15 114 2 6其它 Cont xiv 有限状态机 1 2020 4 15 115 2 6其它 Cont xv Clockgating moduleclkgate en data clk outp inputen clk input 7 0 data output 7 0 outp reg 7 0 outp Always posedgeclk if en outp data endmodule 2020 4 15 116 三 设计实例 ROMRAMFIFOADDERALUMCU 2020 4 15 117 3 1ROM libraryieee useieee std logic 1164 all packageROM Pissubtypebyteisstd logic vector 7downto0 typememoryisarray 0to255 ofbyte constantrom data memory 11010101 01001000 10101010 endROM P 2020 4 15 118 3 1ROM Cont libraryieee useieee std logic 1164 all useieee std logic unsigned all usework ROM P all entityrom eisport ren instd logic addr inbyte dout outbyte endrom e architecturerom aofrom eisbeginprocess ren addr beginif ren 1 thendout Z endif endprocess endrom a 2020 4 15 119 3 2优先编码器 2020 4 15 120 3 2优先编码器 Cont libraryieee useieee std logic 1164 all useieee std logic unsigned all usework ROM P all entityencoderisport inp instd logic vector 7downto0 y outstd logic vector 2downto0 endrom e 2020 4 15 121 3 2优先编码器 Cont elsif inp 4 0 theny 011 elsif inp 5 0 theny 010 elsif inp 6 0 theny 001 elsey 000 endif endprocess endencode
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 绿色建筑材料对室内空气质量的改善作用
- 石油化工企业知识管理与创新效率的关系分析
- 新型环保材料在钢铁生产中的使用研究
- 软装配件与家居风格的一致性
- 基于建筑能效分析的光伏系统优化设计与评估
- 消费者权益保护与市场监管能力的互动
- 基于学习分析的开放大学数学教学效果提升策略
- 水电经济运行中的区域性发展差异与对策
- 2025年液压与气压传动考试题及答案
- 2025年出入院护理考试题及答案
- 2025湖南益阳安化县事业单位招聘工作人员61人考试参考试题及答案解析
- 7 呼风唤雨的世纪 课件
- 《智能建造概论》高职完整全套教学课件
- 眼科学教学课件:眼睑病
- 国家教学示范中心-电子科学与技术中心-国防科技大学
- ZXONE8700技术规范书
- 沥青拌和站设备租赁合同参考
- 《关键对话》读书笔记-PPT课件
- 证据法的基本原则
- 天津大学无机化学课件第七章固体的结构与性质
- 中毒窒息事故应急处置卡
评论
0/150
提交评论