In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to use Verilog Basics". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Always Blocks
As its name suggests, the always block executes always, unlike the initial block, which executes only once at the start of the simulation.
The always statement block also has a sensitivity list that tells the always statement block when to execute the code block.
always @ (a or b or sel)begin y = 0; if (sel == 0) begin y = a; end else begin y = b; endend
The @ symbol is followed by the condition triggered by the always statement block. Only variables of type reg can be driven within the always statement block.
The above example is 2:1 mux, inputs a and b; sel is the select input, and y is the mux output.
In any combinational logic, whenever the input changes, the output changes. This means that the code in the always statement block is executed whenever the variables contained in the sensitive list change, i.e. a, b, and sel.
There are two types of sensitivity lists: level sensitive (for combinational circuits) and edge sensitive (for flip flops). The code below is the same 2:1 Mux, but the output y is now the flip flop output.
always @ (posedge clk )if (reset == 0) begin y
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.