#23 Multiple ALWAYS block in verilog | procedural blocks in verilog | Multi driver error in verilog

  Рет қаралды 8,198

Component Byte

Component Byte

Күн бұрын

Пікірлер: 16
@bhuwanbisht2488
@bhuwanbisht2488 3 жыл бұрын
each and every thing is clear thanks brother
@ComponentByte
@ComponentByte 3 жыл бұрын
Welcome. Happy learning
@insight3985
@insight3985 4 ай бұрын
Sir can I ask a doubt .........a case where I need to update my array. I use always@(posedge) block to update my array. At that time I need to get my old mapping in that array , so that I use an always@(*) block to get the old value using a combinational logic. I am getting output with my old value whenever the input given, but problem is whenever the new write happens in my array at rising edge clock the same new value is also coming as out since I need only old value , means my old value is overwritten so how can I block always@(*) block in preventing updating by the new value
@vaibhavgarg2934
@vaibhavgarg2934 3 жыл бұрын
Procedural Statement would still execute in sequential manner even if we use non blocking assignments?
@ComponentByte
@ComponentByte 3 жыл бұрын
Procedural statements are executed sequentially. You are correct. Non blocking assignment may get executed sequentially or parallely.its also true but It's execution depends on data dependency. In real hardware everything is executed parallely as all hardware are run independently. Non blocking assignments are used to model sequential logic and sequential logic stores previous data.This statement is enough to understand what is the purpose of using non blocking assignment. If you understand the real hardware execution and not just the code execution theory then you will understand what is the use of non blocking assignment or its purpose and how it is executed not by simulator but by underlying hardware I always try to explain verilog code interms of hardware as verilog is a HDL. Thank you for your query as it will help other to understand in better way. Thank you.
@vaibhavgarg2934
@vaibhavgarg2934 3 жыл бұрын
@@ComponentByte it was a doubt about the code itself as a coder's logic I wanted to know in virtual environment where synthesis does not matter, where only behavioural modeling is understood irrespective of practicality, in that environment if I try to write a swap code would it work or not.
@vaibhavgarg2934
@vaibhavgarg2934 3 жыл бұрын
@@ComponentByteyour stuff is actually very gripping, thank you for your service.
@ComponentByte
@ComponentByte 3 жыл бұрын
It will definitely work if RTL coding guidelines are followed. Most of the time we write a software code than a hardware code and fully dependent on software tools to catch the error. I believe you are smart enough to understand what you are coding for. Thanks.
@abhilash4384
@abhilash4384 2 жыл бұрын
Nice videos thanks sir
@unknowneditz4864
@unknowneditz4864 2 жыл бұрын
Sir your said statements inside always block are executed one by one that is sequentially but those should be non-blocking statements right as discussed earlier so they will get executed simultaneously ?? Can you clear this please
@ComponentByte
@ComponentByte 2 жыл бұрын
Blocking means evaluate and assign immediately.(hence suitable for combinational logic) Non blocking means evaluate immediately and assign once all the evaluation are done in one time step.(sequential logic) This is what you have to remember for blocking and non blocking . If go deep then At stimulation level(all software code run this way) everything runs sequentially(both blocking and non blocking) if no data dependency and at hardware level it runs parallelly.
@akhilnair9165
@akhilnair9165 2 жыл бұрын
Procedural statements inside always block should always be non blocking?
@ComponentByte
@ComponentByte 2 жыл бұрын
Not always. It depends on the type of logic we design. So before writing any code , first logic ckt is designed and then decided how to write code for it following proper RTL guidelines. If it's combinational logic then usually we use blocking and for sequential it's non blocking.
@vishal_moladiya_music
@vishal_moladiya_music 3 жыл бұрын
Nice explanation
@ComponentByte
@ComponentByte 3 жыл бұрын
Thank you.
@arpitapatil19
@arpitapatil19 3 жыл бұрын
Tq u sir.
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН
Почему Катар богатый? #shorts
0:45
Послезавтра
Рет қаралды 2 МЛН
The Latest Celebrity Tech Scam…
19:21
Linus Tech Tips
Рет қаралды 2,5 МЛН
Where Does Bad Code Come From?
42:21
Molly Rocket
Рет қаралды 212 М.