#12 always block for combinational logic || always block in Verilog || explained with codes and ckt.
Вставка
- Опубліковано 12 січ 2025
- always block for combinational logic || always block in Verilog || explained with codes and ckt.
Verilog Language is a very famous and widely used programming language to design digital IC .
In this verilog tutorial always block for combinational logic has been explained in details. How to design a combinational logic using verilog always block has been discussed in simple way
Lesson-1 Why verilog is a popular HDL • #1 Why verilog is a po...
Lesson-2 Operators in verilog(part-1) • #2 Operators in Veril...
Lesson-2 Operators in verilog(part-2) • Operators in Verilog (...
Lesson-2 Operators in verilog(part-3) • Operators in Verilog( ...
Lesson-3 Syntax in verilog • #3 Syntax in Verilog ...
Lesson-4 Data types in verilog • #4 Data types in veril...
Lesson-5 Vector and Array in verilog • #5 {Error:check descri...
Lesson-6 Modules and port in verilog • #6 Module and port de...
Lesson-7 Gate level modelling in verilog • #7 Gate level modelin...
Lesson-8 Dataflow Modeling in verilog • #8 Data flow modeling...
Lesson-9 Behavioral Modeling in verilog • #9 Behavioral modelli...
Lesson-10 Structural Modeling in verilog • #10 How to write veri...
Lesson-11 always block in verilog • #11 always block in V...
Lesson-12 always block for combinational logic • #12 always block for c...
Lesson-13 sequential logic in design • #13{Mistake:check desc...
Lesson-14 always block for sequential logic • #14 always block for s...
Lesson-15 Difference between latch and flip flop • #15 Difference betwee...
Lesson-16 Synchronous and Asynchronous RESET • #16(MISTAKE-Read Descr...
Lesson-17 Delays in verilog • #17 Delays in verilog ...
Lesson-18 Timing control in verilog • #18 Timing control in ...
Lesson-19 Blocking and Nonblocking assignment • #19 Blocking vs Non Bl...
Lesson-20 inter and intra assignment delay in verilog • #20 Inter and intra as...
Lesson-21 Why delays are not synthesizable • #21 Why delays are not...
Lesson-22 TESTBENCH writing in verilog • #22 How to write TESTB...
Lesson-23 Multiple always block in verilog • #23 Multiple ALWAYS bl...
Lesson-24 INITIAL block in verilog • #24 INITIAL block in v...
Lesson-25 Difference between INITIAL and ALWAYS block in verilog • #25 Difference between...
Lesson-26 if else in verilog • #26 if-else in verilog...
Lesson-27 CASE statement in verilog • #27 "case" statement i...
Lesson-28 CASEX and CASEZ in verilog • #28 casex vs casez in ...
Lesson-29 FOR loop in verilog • #29 "for" loop in veri...
Lesson-30 WHILE loop in verilog • #30 "while" loop in ve...
Lesson-31 FOREVER in verilog • #31 " forever " in ver...
Lesson-32 REPEAT in verilog • #32 " repeat " in veri...
Lesson-33 GENERATE in verilog • #33 "generate" in veri...
Lesson-34 FORK-JOIN in verilog • #34 " fork and join " ...
Lesson-35 named block in verilog • #35 Named block in ver...
Lesson-36 TASK in verilog • #36 (MISTAKE-Read Desc...
Lesson-37 FUNCTION in verilog • #37 (MISTAKE-Read Desc...
Lesson-38 WIRE vs REG in verilog • #38 Wire vs Reg | when...
Lesson-39 FSM-MEALY state machine in verilog • #39 Finite state machi...
Lesson-40 FSM- MOORE state machine in verilog • #40 Finite state machi...
My mail id - email2vesystem@gmail.com
Please, don't send me mail asking for content(PPT,PDF) or any verilog code. For any other help you are most welcome.
**** Happy Learning ****
Like 👍 and Subscribe 🔔#
Don't forget to LIKE, COMMENT, SUBSCRIBE, SHARE
Best verilog tutorial in UA-cam .Thanks a lot
what a great job sir, this tutorial are the best I ever watch on YT about verilog. Greetings
from Spain
Thank you for your appreciation. Happy learning.
Finally I found very good channel for verilog and I am requesting sir please post more videos on registers,counters,alus,multipliers,etc.
Thank you. I will upload the video tutorial that you have mentioned but it needs a little time
Yes, friend he had nicely explained the concepts....
Nicely explained. Better than other UA-cam channel .
Yes, friend he had nicely explained the concepts....
at 12:06 for the adder, instead of * inside the sensitivity list can i write always@(a,b,c) ?? or should the output also be included??, if the output variables that is s,c is included , why? because the sensitivity list should contain variables that changes its value right??
You are absolutely right.
If something changes and it affects some others then mention that one in the sensitivity list.
Here (a,b,c) is enough.
But we generally mention * so that you don't need to remember each and every variable that are changing if the list of variable is huge.
Really really nice 👏👏👏 best tutorial of verilog in UA-cam .
Thank you .
Good one..
God bless u..
Very good video
You implemented full adder before using continuous assignment and now you are using procedural blocks. Are they equivalent or different? When do we use procedural instead of continuous or we can use either?
Both provide the same result. Continuous assignments are parallel execution and always block execution is sequential if there is no data dependency.Thanks.
You can use either. But combinational ckt are implemented in a procedural block for bigger design.
Thank you sir
Thank you so much
you are saying any changes in the event a,b,c,d without initializing and when it gets stopped??
In the real world every module works parallely. So every module gives output based on the input it gets from other modules. So when there is input from one module going into another module there will always be output. This process that is getting output only stops when input won't be provided from one module to another module.
Initialsation is not required. Think inputs are coming from out side world , this is how real time code works.
It is stopped when there is no input means a,b,c,d are no more changing.
Hope it helps. Please let me know if I am able to clear your query.Thanks.
I have one doubt sir.
Why we have to use reg?
As you tell reg is store variable like flip flop. It's work like a memory.
But we have to declare like
Output e;
reg e;
Why we have declare e at two time?
Output is by default wire, if we declare output as reg then it's storing the data(memory element) and not just a port.
output reg a // if we declare like this then no need of separate DECLARATION like
output a;
reg a;
sir what is that symbol after the sensitivity list(*) that you used at the last example(full adder)
Sorry, it's not a symbol,that's the crusor of the mouse |
thank you sir
Sir at 8: 18 time why does it give an error if we replaced reg by wire.
As per verilog rules, wire can't be used to assign value in a procedural block like always and initial.
left side of assignment operator must be reg type else shows error.
Every procedural block can store intermediate values and wire can't store a value as it's just a connection so reg is used inside a procedural block for assignment. Thanks.
Sir, in the mux code, can i write " assign sbar= (~s) " in the always block before or after " out = (a $ sbar) | ( b $ s) " expression ?
You can not write ASSIGN inside ALWAYS block. It is always outside.
Sir, in mux code, assign is used before " sbar= (~s) " expression but not " out = (a $ sbar) | ( b $ s) " expression. My ques is, when I will use assign keyword and when not. I am confused here.
assign is used for combinational circuit means which don't depends on clock.
It is like assigning right side things to left side and it's clock independent.
sir, how the values in the sensitivity list changes
These could be any signal such as you touch your touch screen and now sensor responds to it and open your app. You press any switch and the output of switch excites something to work. So here touch sensor output or switch output can be in sensitivity list.Even here the input to sensor or switch can be declared in sensitivity list . Sensitivity means system is sensitive to these signals.So it's any signal which helps to activate a piece of hardware or software.
Are you upload all about the verilog topic?
Yes, so far only verilog and VLSI related content has been uploaded in this channel. There is separate playlist for it.( Today I have uploaded Google classroom for students which is out of VLSI field.This is uploaded as govt of India has asked the school to use Google classroom for students during this pandemic.so I uploaded as the situation demanded)
Sir can't we write directly write ~s without declaring sbar in the example of mux2*1_bh
We can write with bracket like (~s)
What will happen if I use assign out = a&b&c&d instead of putting it in an always block
When ever a or b or c or d changes 'out' is updated with new value immediately.The same can be done using always block.
can we have ppt of this video?