Hello dear students, I am Megha Mahla, Working Assistant Professor from Electronics and Communication Department and today I'm going to talk about or else I'm going to share something about the definitions from the unit module 3 that is behavioral modeling. So in the behavioral modeling we will discuss some definitions and terminology. which are very much needed for us.
So in the behavioral modeling, as I know that, as we have discussed already, behavioral modeling is one of the high level of abstraction modeling. Ascent is a keyword, so ascent is a keyword not assigned always at the block. Always at the rate is a keyword where we are using or else it is a keyword which is meant for the program to be written in terms of behavioral modeling.
So coming to the behavioral modeling, so behavioral modeling in Merilloc It contains procedural assignment statements. So in the behavioral modeling, we have come across different types of statements. So each statement consists of some assignments. The statements are meant in terms of assignment statements. So assignment statement consists of the to the left of the assignment operator, we have the variables to be mentioned, to be declared and to the right of the assignment operator, we have, we do or is we need to mention the expression.
So here, It contains procedural statements. The execution of these procedural statements is executed sequentially. They execute sequentially one after the other. Which controls the simulation and manipulate variables of each data type.
Here in the behavioral modeling, we can manipulate and simulate all such procedural assignments. Manipulations of the attritions can be done easily. As well as the simulation can be done easily. Thank you for watching.
okay the synthesizing and simulation simulation of the behavioral modeling can be observed easily with respect to the data types that you are considering this is all about the behavioral modeling remember that behavioral modeling is a high level of abstraction modeling and then what is procedural constructs in our behavioral modeling so in the behavioral modeling as i said you we have we have few assignments right assignment statement the statements are concerned with respect to the assignment statement somehow continuous assignment statement some are implicit continuous assignment explicit continuous assignment some are procedural assignment and some are blocking and non-blocking assignment so uh the procedural construct so what are these procedural constructs in behavioral modeling is now the very log always procedural block in the infinite loop that repeatedly executes a statement within the loop in order for some simulation time to advance the loop must contain some type control or event control so here there are some constructs in the behavioral modeling and those constructs always uh it starts okay always starts with the keyword always always at the rate is a basic keyword in order to start or is in order to write some assignments okay so basic keyword is always at the right and uh in the these procedural constructs they are of different other is assign and dsn for can release so what is a sin and dsn that means as i said you we can simulate and manipulate we can manipulate right that means what we can change we can give the values or else we can remove the values so if you are considering this constraint construct assign and de-assign we have to make sure that if you are adding some values to this data types that means what we need a keyword assigned and if you are omitting some values out of the data types then you have to use a keyword d assign and similar fashion if a force and release okay force and release also are similar to this assignment assignment so forcing forcing means uh if you want to uh give some value soils if you want to uh if you want to give some if you want to add something to the code then this is nothing but the force and if you want to release uh from really some statements and that is nothing but the release so these are the two procedural constraints that construct that we can find out you know in the assignment statements and then what is procedural assignment so procedural assignments are used for updating register data types and memory data types as well so these uh procedural assignments are they you they are meant for updating the register type data register data types and as well as a memory so in order to updating the register and memory so this procedural assignments are made used right that and the expression in the blocking procedure assignments is evaluated and assigned when the statement is encountered so basically in the blocking statement blocking statements are uh or else blocking statements are represented with equal to symbol and non-blocking statements are represented with like this In the blocking procedure assignments, we see these assignments are evaluated and assigned when the statement is encountered. So when you are encountered with the blocking statement then such blocking statements can be evaluated. So the evaluated is nothing but as I said you this is the assignment operative and on to LHS and on to RHS.
We have the expression. and on the values we have the variables right so in order to manipulate something okay in order to uh execute the this particular assignment statements then you can evaluate okay you can evaluate the variables or the values and also and assign when the statement is encountered right then this can be in the form of fixer delays so here the delays are observed as fixed there is no change in the uh particular uh procedural assignment statements and they are represented with as we have discussed few lexical tokens the representation of delay is observed as ash delay until an expression evaluates as true represented within the wait keyword now our thing is to see whether the expressions are true or false in order to know the expression is true or false then we have to wait in that waiting procedure In order to wait for the particular things to be evaluated, then the wait is a keyword where we have to use. So, in order to wait after the evaluation, if you want to know the condition whether it is true or false, we must wait.
So, in order to wait that we are using a keyword called wait. So, all these things you will be observed in this procedural assignment statements. Then, Coming to the loop, in the behavioral modeling we have few looping statements and those looping statements are about the for loop, while loop, if else loop, if else if else loop and so on. So what is a loop basically? It is most widely used, a for loop is a most widely used loop.
So here in the looping systems we have if loop, if else loop and for loop. So among if and if else and for loop, for loop is used most widely. okay more by uh most widely for loop is loose in the software but it is primarily used to replicate hardware logic in very long so here uh why are we going or it's why are we considering the for loop as a priority because uh just to replicate the hardware logic just to uh show the hardware logic okay hardware logic is nothing but for example if you're considering the mux so max is or the output of max is observed purely on the selection lines and as well as the input right the output is observed purely on the selection lines and as an input so this is nothing but the logic so this is nothing but the hardware logic so here just to replicate the hardware logic uh for loop is most widely used then the idea behind for a for loop is to iterate to set the statements given within the loop as long as the given condition is true so as long as the given condition is true the for loop is kept on executing the statements you unless and until if you find the true the for loop is kept on executing the statement it just iterate the loop is to be iterated continuously to set the statements within the given the loop as long as it is meant for the true okay if it is meant for the true and therefore suppose if it is meant somewhere it is around false so what happens is again the for loops come into existence with the following conditions for I is equal to 0 I less than 1 and then i++ so here you will see the expression this is the expression this is nothing but the condition right this is not the condition and it's nothing but the increment other automatic incrementing incrementing this is what you will observe in the for loop so unless and until you observe the output is or else the condition must be true then the for loop it keeps on executes as many as time then here the representations of for loop in a proper coding is represented as initialization condition and update as well so here first we will initialize we will initialize and then we will the condition goes like this so this is a condition I less than 1 and then our what happens this is update right so here initial an initial value of the variable is set it is executed only once so this initial value it is set once and it is executed only once that means I is equal to 0 some value is set right for example i can take i is equals to 10 that that represents i less than 1 and then i plus plus or is i less than 10 i plus plus so first thing is in the initial initialization what am i doing the initial value of the uh the initial value of the variable this is a variable and initial value of the variable is set and then it is executed only once execution is uh the execution is done only once in the initialization and then goes with the condition so this is a condition so in the condition our expression is evaluated so here the expression is evaluated in the condition the expression is evaluated to be true body for the loop are executed as a loop terminates so once in the expression this is nothing but the condition the expression goes with the condition and if it is true meant for the true and then finally the for loop it will terminate if you are observing anywhere it's false and what happens is that the for loop again it takes this position back it start executing until unless if you find the condition is meant for the true it just keeps on then update, update is nothing but after execution after execution for for loop the variable value is to be updated the value of that particular variable is to be updated so this is a small example where he has given module for example initial array here we have a 10 bits and initial begin update the array now for using the for loop using for loop what how we were writing is for integer i is equals to zero this is initialization this is a condition okay and this is the update so initializing i is equals to zero and the state uh execution uh the expression with respect to the condition follows as i less than size of an array that means i less than here 10 here the array is 10 right so i less than 10 and then goes with i plus plus and now i'm beginning the array okay how i plus plus goes on at a i which is equals to i into Then I am ending the initial or the begin. The mechanism of this initializing condition and the update. The next part is all about the display.
The display array elements with respect to the for loop goes i is equal to 0, i less than, i plus plus. So the display and end module end. okay so this part is all about the mechanism and this part is all about the display so the output how will i observe is as i am considering this a for loop of array 10 okay for loop of array 10 uh by using a multiplication i is equals to 1 into 1 so array 0 0 and if it is 1 1 and 2 2 into 2 4 3 into 3 9 4 into 4 16 5 into 5 like that 9 into 9 okay so this is how the execution of a particular procedural assignment statements goes on and now coming to conditional statements so we all know the conditional statements so the conditional statement starts with the if this conditional statements are make a decision yes obviously the condition is nothing but it just used to make some decisions on either statements when the if block should be executed or not so it's purely depends upon the to make a decision in order to make a decision whether the if statement is meant to be executed or not although sometimes it may go with true and sometimes it may go with a false statement so here we have a statement and if condition goes with the expression and as well as a statement and then one more expression with a statement finally if not if it is true if not true what happens if it is false right so if not true else is false and then with the executed of the statements finally and module right so here the expression is divided this expression is evaluated if it is true this expression is evaluated if it is true that is if it has non zero value non zero value means one that means what if my I is equals to one then the expression goes as true so the first statement executes right and then if it is false what is that when it is false then when my I becomes zero if it is non-zero then the condition goes with the true if it is zero the condition goes with the false and then if there is an else statement so here in the particular code we observe the else statement so what is this else statement else statement is if it is not true obviously else it is false so the else statement executes if it is not true else that if the condition goes going as per the non-zero value as true else the it may goes with the zero values of false If the numeric value of it is executed is tested for being 0, certain shortcuts are possible. As if it is going with the else as false, certain shortcuts are possible. There are few shortcuts just to overcome this conditional statement if and else.
Coming to the while loop, this while loop is used in software language. In C language, we come across a while loop. to run some code for an indeterminate indeterminate amount of time okay so the while loop does some actions until the condition it is checking is no longer true so here what is while loop is talking about is until and unless the until and unless if you are going to observe the true okay if you are going to observe the true the while loop keeps on executing so it is checking the it is it is checking no longer true okay that means what if you observe somewhere else false then what happens the while loop will start execute it will terminate so here if you observe a statement repeat expression statement repeat expressions begin statement and end so here the while loop unless and until the statement goes true well the statement is no longer true if it is no longer true that means if it is false what happens the statements get repeated okay the statements will get redundancy of the statements can be observed if there is no longer the true is followed okay so that is about the while loop then uh there are few constructs as we have discussed in the procedural construct we have discussed about the assign and the assign right uh force and release so these are the constructs likewise uh we have one more construct in the behavioral modeling that is a weight construct so what is this weight constructor weight construct it makes a simulator wait for the specific expressions to be true before proceeding with the following statements or group of assignments so this weight construct construct it will make the simulator to be a weight okay for a specific time period it will make the constructed to be weight to be to weight to be true before the preceding experience that means what here for example wait for the clock okay the this is this statement the constructor using the weight constructor what are we doing is we are just making that statements to be in an idle position wait clock at two delay of seconds okay at a is equals to b the delay of two delay of seconds we are we are making that statements or as a stand statements to be that assignment particular assignment statements to be in a hold position okay to be in a hold position unless and until if you are observing in a true condition is to be satisfied till that position okay till that uh till that end we are making to we are making to uh wait the constructs right so that is nothing but the weight construct so the weight statement is used to see hold the system for a certain time duration so we are making that construct to hold okay to hold here i am making it to hold for two nanoseconds of time delay sometimes the weight statements can hold up to 10 nanoseconds of time delay so it is just it is nothing but just to hold the statement or the system to certain time duration and it can be used in three different ways so this weight statement or this weight constructs can be used in three different ways one is wait until wait on wait for so what is this wait until it is synthesizable statements so wait until wait until clock is equals to one okay so until the clock signal goes as one until the clock signal goes as one the weight construct the weight has the construct has to or the statement has to wait okay so that is nothing but the wait until and then wait on it is also synthesizable and holds system until the defined signal is changed that means what wait on clock so until some changes until some uh uh transition of a clock changes from zero to one hours from one to zero from clock to one clock or one clock to clock it has to wait that means what the weight on clock will hold the system until clock changes from 0 to 1 or from 1 to 0 so this sort of concept also we can make use of uh we can make use in order to uh write when we are writing the code based on the weight constructs and one more construct pertaining to this weight is wait for so wait for is a wait for is a non-synthesizable okay where it is uh wait until and wait hold they synthesize okay that means what they simulate or they look uh they just look out for the uh any errors or bugs but whereas here wait for is a non-synthesizable uh it and it holds the system for a defined time example wait for 20 nanoseconds that means it will hold the system for 20 nanoseconds so wait for 20 nanoseconds that means what here if the system is going to hold for 20 nanoseconds we cannot do we cannot able to do anything but whereas here wait until we can able to manipulate others we can able to uh sort out the things easily in between in the process when the process is going on in between the process we can able to do it but whereas in the wait for construct we cannot we cannot make any changes or else attritions cannot be done okay so the system has to be in hold for 20 nanoseconds if it is mentioned for 20 if it is 10 10 seconds so this is about the weight construct and coming to blocking assignment so as i said you blocking we are representing it with equals to non-blocking assignment is represented with like this so blocking assignments are all assignments within an initial or an always block done through equality so this is a blocking assignment statement representation so these are executed sequentially so blocking executes they execute sequentially uh if you observe here module register 8 bits of registered story and we have a b c d and totally five modules that we are executing uh initially what am i doing is my a is about 10 hex or 10 bits of hexadecimal number and I'm displaying it with ABC and my B is about that with 10 delay 10 nanoseconds of delay and with 8 bits of hexadecimal with number and displaying and see also going as per the 8 bits of hexadecimal number and then finally After presenting these numbers.
What am I doing is I am ending up this and then initial begin now ABCD I have ABCDE right so a b c i am just representing it with the different things c a f 30 h 30 right and now what am i doing is 5 5 and e so for 5 and e i am representing the 8 bit of nanoseconds of uh 8 uh 8 hexadecimal bits as a a and 55 and n modules so in all these things if you observe okay if you observe so if you observe here clearly all the statements are all the statements are happening with a equals to right so equals to are nothing but the blocking assignments right so we have representing all this all the variables a b a to e we are representing some numbers okay we are representing some numbers so those numbers representations are considered with respect to the hexadecimal if it is with binary binary decimal if it is of the upper number of representation so binary representation of numbers can be observed over here and then with some time delay so for a b in in from a to e only for b b d and e b d and e all the representations the binary representations are done uh with respect to the delay okay with respect to some delays but whereas the other numbers uh directly we have confined with some uh numbers so these are the blocking assignments and coming to the non-blocking assignment so here if you observe the non-blocking assignments are represented like this so There are basic similarities between blocking and non-blocking. Whereas, only in non-blocking assignment, the representation goes like this. This is the only difference. If the assignments are to be effected concurrently, a facility called the assignment is variable. For such conditions, a symbol signifies a non-blocking assignment.
This is a symbol where it is significant the non-blocking assignments and the execution of all the statements. the non-blocking statements execution of non-blocking statements are Done concurrently as well like the blocking statement So this is nothing but the same register It has a 8 bit of memory where 8 bit of memory all the bits all 8 bit of memory are segregated Or is it given to each and every each and every specified Variables ABCDE with the delays as well. Okay with the delays as well.
So this is about the non blocking assignment and here also in the blocking and non-blocking assignments there are few constructs with the help of few constructs we can easily code the blocks so here what are the parallel blocks all the procedure assignments within a fork join are executed concurrently and one can use a fork join block within a begin and block or vice versa so here fork join assign the assign uh fork join okay uh as an as in for join force force and release force and release so these are the few procedural constructs in the behavior modeling so come in the parallel blocks all the procedural assignments within the fork and jerk okay fork and jerk are executed constantly concurrently so here fork and jerk are nothing but they are the constructs so if you are coding if your code is in terms of the fork and jerk construct then you have to add that then in that case the statements the statements which are executed all the statements are executed concurrently That means one can use a fork join block within the begin and or vice versa. So within the begin and you can use folk okay folk folk a b like that okay we can use but but most of the constraints we cannot use within the beginning and they can be used out of the beginning and some can be used out of module and end module as well okay so these are the parallel block then define always construct so what is this always constructs in the behavioral modeling the basic keywords that is meant to use is always at the rate block right so the process has to be flagged off by an event or change in a net or a register so here the process has to be flagged off uh by an event or change the process can be meant to change within the register or else within the with respect to the net with respect to the register register we all know what is a net net is nothing but they are the variables variables where they are meant for the connectors right they're meant to connect the device whereas register is nothing but it is a it is also a variable we means it doesn't mean that it's a register where it stores information but we say that this is one of the data type that is nothing but the data type then the process can have one assignment statement or multiple assignment statement so here in the always construct that means what always at the rate always at the rate we can say pause hedge pause edge is nothing but if you are uh if your code is in terms of considering the flip-flops or latches then always set the rate remembering the positive edge so likewise this positive edge is meant only for the positive transition in the flip-flop so the process can have one statement or the multiple statements as well then in contrast to the initial statement always statement executes repeatedly so uh always statement always set the block these are the statements meant for the in the behavioral modeling so these statements they execute repeatedly okay we can see the repeatedly the these always at the rate statements can be executed and although execution started time C is equal to zero so the execution of the always at the always assignment takes place but at with respect to time T is equal to zero so this is there's a small syntax goes with this always timing control procedural assignment so in this procedure assignment we can write always at the rate okay timing control that means delay always delay a 10 nanosecond at the rate or else uh 10 nanoseconds here and gate or some gates we can write this is how we can represent the uh always constructs and we may use example where we have to provide clock signal in terms of very low so here see as i said you always in the ring positive clock edges or with respect to the clock of 5 nanoseconds which is equals to negation of clock okay so this is how the representations of the initial statement initial way always constructs can be written over the statements different types of statement procedure assignment statement or non procedure assignment statement and this always statements produces a waveform with a 10 period of units and that once that only change upon a positive change okay positive weight of this signal so here uh we can change the uh the delays can be or else we can change the 10 nanoseconds of units that only change upon a positive weight so only this positive weight the final seconds of delay can be altered can be changed so you will will see uh in this sort of things can be observed only if you are considering the construct as to be weight only always uh sorry it's always always construct so this is about um the few few definitions pertaining to this behavioral modeling and in this behavioral modeling we have discussed about different types of constructs and different types of all we've discussed about the statements blocking statements non-blocking statements procedure assignment statements and also in the so far like in the module 3 behavioral modeling we have discussed about different types of statements as well and the constructs as well right and also how to represent the statements in the coding format and if you want to write a coding in terms of constructs there are different constructs we have in behavioral modeling fork and jerk is one construct force and release is another construct and assign and deassign weight is another construct weight is another construct weight is another construct all these constructs will help the designer all these constructs will help the designer okay we'll help the designer in order to execute all the statements some statements can be executed concurrently some statements can be executed sequentially okay and also we have uh see this is a weight constant which is very important in the exam point of view if you have come across the weight constructs uh these are the things that you have to mention it very clearly and if you mention with an example it's well and fine you'll uh you'll score good marks and then come into the looping statements in the looping statements we have discussed about the for loop while loop and the conditional loops as well so for loop y loop among for loop y loop and conditional loop if conditional statements if statements we see that the for loops like it weights up it weights more than the other other looping statements right why because in the for loop we come across the initialization we come across the execution and also and as well we come across see in the for loop initialization condition and updation the for loop is meant for initialization initializing the thing i is equals to zero the condition i less than 10 and the updation i plus plus okay so this is what we will see in the in the for loop so in the for loop unless and until if you're observing the output or is the condition is meant for the true okay till that extent the for loop keeps on executing unless uh until if you find the true the output as true then in that moment the for loop it executes okay it terminates it terminates so that is about the for loop and as well as the behavioral modeling and the procedural constructs and all these things all the delays pertaining to this uh we have discussed so far so i hope you all understood all the definitions and the terminologies uh which are meant in this behavioral modeling module 3. thank you like share and subscribe hit the bell icon for more updates