BLOCKING / NON-BLOCKING ASSIGNMENTS (PART 2)

  Рет қаралды 31,186

Hardware Modeling Using Verilog

Hardware Modeling Using Verilog

Күн бұрын

Пікірлер: 22
@anujpurwar1204
@anujpurwar1204 5 жыл бұрын
Sir in example no. 5 of multiple edge clock the variable c in always block should be a register type variable?
@jogeshsingh854
@jogeshsingh854 3 жыл бұрын
Yes, we cannot assign value to non-register data type in procedural block .
@anuragagarwal4576
@anuragagarwal4576 4 жыл бұрын
@17:05 shouldn't we use c as reg [7:0] instead of input [7:0] c
@naveenchander5349
@naveenchander5349 5 жыл бұрын
@17:05, Shouldn't the variable 'c' be defined as output[7:0] rather than input[7:0] ?
@shubhurv543
@shubhurv543 4 жыл бұрын
Yes exactly 👍👍
@anuragagarwal4576
@anuragagarwal4576 4 жыл бұрын
Shouldn't we just use it as a reg [7:0] c ?
@iwbnwif
@iwbnwif 3 жыл бұрын
@@anuragagarwal4576 Yes, but then we need to remove it from the list of ports in the module declaration. i.e., module multi_edge_clk (a, b, d, f, clk); ...
@Vishalkumar-ez5xy
@Vishalkumar-ez5xy 2 жыл бұрын
@@iwbnwif it should be module(a,b,d,c,f,clk), right?
@JayPatel-g8s
@JayPatel-g8s Жыл бұрын
Yes, I tried synthesis and end up getting error.
@arghya.7098
@arghya.7098 5 ай бұрын
15:07 can't we achieve the same functionality using blocking assignment?
@NitishKumar-xw9qt
@NitishKumar-xw9qt 3 жыл бұрын
sir @24.53 count[0 ] is assigned to 0 and 1 simultaneosly .So how can be decide whether the value of count[0] will be 1 or 0?
@gauravkaushal1037
@gauravkaushal1037 3 жыл бұрын
I think that assignment will take after the shift, just the value of it will be taken as 1 before rotation
@emmanuelinnocent4505
@emmanuelinnocent4505 2 жыл бұрын
Assignment will take place at the end of the procedural block and it's only the final update that will be reflected on count[0]. According to the code count[0] was supposed to be altered twice(the first and the second assignment statements) while the rest of the elements in the vector were supposed to be altered once( the first assignment statement). So for count[0] only the second assignment statement(since it's last alteration for count[0]) will be taken for update while for the rest the first assignment statement will be take for update(since that's the last alteration for them).
@aayushiaryam1844
@aayushiaryam1844 2 жыл бұрын
@@emmanuelinnocent4505 Y in ring counter the rotation is being carried out in clockwise direction!? Shouldn't the 1 rotate in anti-clockwise direction?
@emmanuelinnocent4505
@emmanuelinnocent4505 2 жыл бұрын
@@aayushiaryam1844 I do not understand the concept of rotation you're talking about. If you could explain it to me, it'll be appreciated. However, for a ring counter, I think what should matter is its ability to count from the lowest number possible to the highest number possible repeatedly. And in this case of the example given in this lecture, the ring counter does exactly that. How? We can see from the given sequence of bits - seven 0s and one 1- the combination of those sequence of bits that will give the highest number (unsigned) is 10000000 while the lowest is 00000001 (unsigned). And we can verify that the given code will do just that. If we start with 10000000 the code will give the following next results: 0000001, 00000010, 00000100, etc. Meanwhile, if we had started with 00000001 we'd get: 00000010, 00000100, etc. So what is essential about a ring counter is counting from lowest to highest number possible (or vise versa) repeatedly.
@arghya.7098
@arghya.7098 5 ай бұрын
@@emmanuelinnocent4505 thanks for your detailed explanation
@Shivamchaudhary-xx6ci
@Shivamchaudhary-xx6ci 2 жыл бұрын
What if we use blocking assignment in the example shown in time 9:00
@emmanuelinnocent4505
@emmanuelinnocent4505 2 жыл бұрын
For this case I think there will be no problem if you use the blocking assignment. That is it'll be the same result with the non-blocking. This is because the if-else statement has already created priority. Since it is only one expression of the if-else statement that is expected to evaluate to true, then it does not matter if assignment takes place immediately(as in blocking) or if it takes place at the end of the procedural block (as in non-blocking). Please let me know if this answers your question.
@avinasha237
@avinasha237 7 ай бұрын
Always is checking posedge or negedge of clock. But clock generation code is not written. clk1 =~clk1 clk2 = ~clk2
@arghya.7098
@arghya.7098 5 ай бұрын
ig the testbench program takes care of clk generation. correct me if i'm wrong.
@avinasha237
@avinasha237 5 ай бұрын
@@arghya.7098 it's right... Thank you
BLOCKING / NON-BLOCKING ASSIGNMENTS (PART 3)
28:59
Hardware Modeling Using Verilog
Рет қаралды 28 М.
BLOCKING / NON-BLOCKING ASSIGNMENTS (PART 1)
32:50
Hardware Modeling Using Verilog
Рет қаралды 46 М.
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
USER DEFINED PRIMITIVES
31:43
Hardware Modeling Using Verilog
Рет қаралды 32 М.
PROCEDURAL ASSIGNMENT
30:12
Hardware Modeling Using Verilog
Рет қаралды 47 М.
3
1:18:04
Diploma C21 Educational Videos
Рет қаралды 5
Lecture 1: Introduction to CS and Programming Using Python
1:03:30
MIT OpenCourseWare
Рет қаралды 914 М.
2,000 People Fight For $5,000,000
24:45
MrBeast
Рет қаралды 54 МЛН