当前位置:网站首页>Using the case statement will produce a latch condition
Using the case statement will produce a latch condition
2022-07-19 13:03:00 【data line】
Abstract
- In the use of case Statement and multiple outputs , Every case Branch statements should give the assignment of all outputs , Otherwise, the circuit will synthesize the latch .
- In the following example , Through the variable sel To select four outputs up、down、left、right Which is assigned 1, Two code implementation methods are given .
- In the first implementation , Every case The branch statement of gives all the output values .
- In the second way , Although the initial value of the variable is specified , But every case Statement does not assign values to all variables .
Code
`timescale 1ns / 1ps
module top(
input [1:0] sel,
input [1:0] sel1,
output reg up,
output reg down,
output reg left,
output reg right,
output reg up1=0,
output reg down1=0,
output reg left1=0,
output reg right1=0
);
[email protected](*)begin
up=0;down=0;right=0;left=0;
case(sel)
2'b00:up=1'b1;
2'b01:down=1'b1;
2'b10:right=1'b1;
2'b11:left=1'b1;
default:up=1'b1;
endcase
end
[email protected](*)begin
case(sel1)
2'b00:up1=1'b1;
2'b01:down1=1'b1;
2'b10:right1=1'b1;
2'b11:left1=1'b1;
default:up1=1'b1;
endcase
end
endmodule
Integrated circuit


It can be seen from the integrated schematic diagram , The second code implementation method produces LDCE( Asynchronously cleared latch)
边栏推荐
- 最小交換次數
- Flask源码分析(三):上下文
- Qiyue supplies cumof nanocrystals loaded with methylene blue | femof nanosheets grown in situ on foam nickel | oxide nanowires /zif MOFs sugar gourd like Composites
- Return to risk ratio: the most important indicator of investment opportunities 2020-03-14
- Competition notes: numpy learning notes
- Google developer community sharing - flutter animation sharing has been released
- The combination of fastadmin with and filed causes field failure
- Ultrasonic sensor (ch101 & ch201) - I
- CMOS开关学习(一)
- Att & CK actual combat series - red team actual combat (-)
猜你喜欢

水调歌头·明月几时有

减半行情会不会来?有何投资机会?2020-03-11

Arbitrum Nova release! Create a low-cost and high-speed dedicated chain in the game social field

MOF customized materials | ultra thin MOF nanobelts | magnetic Fe3O4 @cd-mof nanocomposites | zif-8/ graphene composite nanoparticles

深度梳理:机器学习建模调参方法总结

R语言--Cox模型校准曲线原理(一)数据来源

Yunxi focuses on store broadcast solutions to accelerate global layout

MOF customized product | n-k2ti4o9/g-c3n4/uio-66 ternary composite | paper based au-aginse2-zif-8 Nanocomposite
[email protected] Nanocomposites | zif-8/ poly"/>MOF customized materials | bimetallic CuNi MOF nano materials | core-shell structure [email protected] Nanocomposites | zif-8/ poly

关于TCP/IP协议漏洞的安全措施
随机推荐
Uio-66 - (COOH) 2 modified polyamide nanofiltration membrane | zif-8/pvp composite nanofiber membrane | uio-66-nh2 modified polyamide nanofiltration membrane
Learning record: call TFTLCD
Acwing785. Quick sort
Ossimport migration path
Brief analysis of circuit fault
光大期货网上开户安全吗?有没有开户指引?
Cobalt iron bimetallic organic skeleton cox/mil-100 (FE) | [email protected]
Amino metal organic framework material Fe MOF, fe-mil-88nh2 | Zr based metal organic framework catalyst (pt-uio-66) | Qiyue biology
Azkaban 安装文档
Method of converting video format to ffmpeg and exporting GIF dynamic graph
C语言进阶——自定义类型:结构体 枚举 联合
2022全球开发者薪资曝光:中国排第19名,平均年薪23,790美元
MOF customized product | n-k2ti4o9/g-c3n4/uio-66 ternary composite | paper based au-aginse2-zif-8 Nanocomposite
Harmonyos quick start: Hello World
C语言进阶——字符函数和字符串函数
Metal organic framework / nitrogen carbide nano sheet (uio-66/hocn) composite | mil-101 loaded Au Pd alloy nanoparticles | chemical reagent MOF customization
[dynamic planning]dp27 jumping game (II) - medium
Logical operator 1 (Gretel software - Jiuye training)
VMware导入ova/ovf虚拟机文件
JS operation string string string