So, welcome to this lecture on VHDL in the course digital system design with PLDs and FPGAs. The last class we have looked at the simulation and the various classes and data types. So, we will have a quick run and we will complete the data types and classes and we will go on to the basically the concurrent statement which will enable you to write start writing the codes for combinational circuit to start with. So, let us look at the slides the last lectures portions. We have talked about how kind of event driven computation enables the simulator to resolve concurrency. We have looked at the case where there is time delay. And we told that the time delay enables the simulator to keep track of the sequence. But in a logic simulation or functional simulation where there are no delays. This is problematic because if there is an event on A then x also the result will happen at the same time that will create an event here and the y everything changes at the same time. And you cannot keep track of the sequence or the one after the other it cannot be ordered. And the problem came because there was no delay. So, the solution is to add a small delay called delta delay. That is what we talked and do the event driven computation. So, if there is an event on A at 100 nanosecond. I look at the right hand side and then evaluate x and which is assigned after a delta delay. So, that creates an event on x at 100 plus delta. So, the simulation time move from 100 to 100 plus delta and this is evaluated and y is assigned at 100 plus 2 delta. And then there is nothing more to compute because there is nothing y does not come on the right hand side. So, everything gets stabilized. And that is shown pictorially initially we show the delta delay but everything is a delta is made 0 and everything is stabilized. Then you get the correct output A is going from 1 to 0 and you can see y is going from 0 to 1. And we also said like when you implement you can say that the delta delay how small it should be. It should be smaller than any circuit delay or any changes in the in input you know that these two are related in any way. Like you specify like delays you know change in the input kind of in relation to the delays you implement anyway. So far to kind of satisfy our curiosity we have looked at the case of feedback. We have taken a cross coupled nan latch and it was in reset mode and then we changed it to set mode. And it was a s and r both changed at 100 nanosecond and which kind of force evaluation of both z and y in the first place there is nothing z does not change there is nothing to be done y changes from kind of 0 to 1 which is assigned at 100 plus delta. The computation at 100 nanosecond is over. So, it is moved to 100 plus delta and that forces a computation on the z and z changes from 1 to 0 at 100 plus 2 delta that in done force this to be evaluated at 100 plus 2 delta. But there is no change y remains the same everything is stabilized delta is made 0 you get 100 and that is how it is shown here. It is going from kind of reset to set and you can see that this is the delta delays which is shown ultimately you can see y is going from 0 to 1. So, simulation in the case of feedback a functional simulation with feedback two things can happen either it can go on oscillating or it can kind of create a stable output after few delta delays depending on normally you can imagine it is related to number of levels of the logic you know as if there are multiple three levels of logic and you have three internal signal then it will take three sequence three steps for it to stabilize. Even in the case of feedback if it is going to stabilize in a cycle it depends on how many kind of levels of logic is there with the internal signal then it is going to be stable otherwise it will oscillate which is not an issue at all as far as simulation is concerned. And then we looked at this scenario where we had some 5 inputs maybe 6 inputs and we have some internal signal and we as we described earlier we implemented a process with this input signal in the sensitivity list. But now having known this delta cycle business we know that even though x, y, z is written in the proper order assignment with some if or case whatever then but x get assigned only after a delta cycle and when it comes to y it uses a current value of x and the change in x does not get reflected in y and change in I mean so y and z remains kind of old x is going to be assigned correct value after the delta cycle. So to be able to you know make this process compute correctly we need to put this x and y these internal signal in the sensitivity list. So x get assigned after a delta cycle which creates a simulation time I mean event on x so that comes back and runs through it y gets assigned again and even on y will make it to compute again and ultimately after 3 iteration it gets computed. So the rule is that basically you have to put the internal signals in the sensitivity list if there is one and as I said you could have written and a single expression for z then this is not required if you have internal signal then that need to be put in the sensitivity list. We also said that the concurrent statements are equivalent to the process that means you can think of concurrent statement as processor process with whatever is on the right hand side of concurrent statement in the process that means if you have multiple concurrent statement it is possible to write you know related to same kind of inputs then you can write a single process to kind of concisely represent all that concurrent statements. Similarly if you have a process with multiple output it is possible to kind of write equivalent multiple concurrent statements. So that should be understood and in any case if you have multiple process multiple concurrent statement everything is kind of concurrent to each other if an event happens then wherever that signal appears on the right hand side of concurrent statement wherever that signal appear in the sensitivity list of a process all will be computed by the simulator ok. Again when we talk about all the sensitivity list event definitely we are talking about simulation not synthesis as I said synthesis looks at the written code to infer the structure. So let us move on to the last part we have handled and ok we have looked at the synthesis and we said when you have kind of such a statement the sure way of synthesizing is to write a truth table and in this case we write the A, B as a column and you write equal output in terms of those inputs. But the problem is that as the data input width increases the complexity is exponential because it is everything expands in power of 2. So this become prohibitively kind of costly in terms of memory and computation. So most of the time the synthesis tool will infer equal means XOR plus means an adder plus 1 means an incrementer and so on ok. And normally these are implemented in the library with the proper code to implement the required circuit that means the plus will be the moment the plus is taken as a kind of function or an operator you go to the library then the adder is implemented there. Similarly when you get equal XNOR with the AND or XOR with the subsequent circuit is implemented in the library code that is how the synthesis is done not on truth table and because that can be prohibitively costly. And we have looked at the data objects classes we have 4 classes constant signals variables and files the syntax is class a name a data type signals are used everywhere the signal name and the data type constant is used for kind of some kind of generic implementation when you have a say counter then you can specify the width of the counter or the size of the counter in a constant. So that you do not have to go and change suppose you want a 16 bit counter in one place you change it and you write everything in terms of width you know wherever you say the counter output you say width minus 1 down to 0 then that is done. Variables are used for indexing temporary storage and simulation it can be used for synthesis but in a non-trivial case like a normal algorithm you take with variable then sometime it does not make sense we will see what is the use of variables. And this is the kind of syntax variable is a keyword a name in this case integer is specified and so you have to specify the range so that it can be inferred that is an 8 bit signal and files are used for test pages we will see it when we go to the test pages. Then that is the 4 classes and everything is explicitly kind of declared and the data types you have 2 types one is scalar the second one is a composite in the scalar you have enumerated integer and flow data types in the composite you have array and record and we have seen enumerated so you say type which is a keyword given name for the enumerated data type and in the bracket you write what are these values this state type can take. So in this case this is a state diagram with 5 states the names of the states are innate sample weight interrupt out whatever it means but internally this will be coded in kind of 3 bits because it is 5 states and it takes values like 0, 1, 2, 3, 4 and this assignment for whatever reason if you want to change it you could change using attributes we will see when we come to the functions and operators there this is useful. And we also have seen this particular data type here the Boolean is written which takes a false and true value and the type bit is defined with 2 values 1 is 0, 1 with codes around and this is quite restrictive so we use standard logic but the first thing defined is standard u logic and that can take values like u, x, 0, 1, z, w, lh and dash and the comments are written here and most of it is probably this is a bit of an overkill but then most of it is useful like u when a simulator starts simulating at the beginning before the signal get initialised it can be shown as uninitialised 0 and 1 are the whatever you know 0 and 1. When 0 and 1 clashes you get forcing unknown clashes in the sense that you have 2 tri-state gate both are enabled to the same line and one is driving 1 the other is driving 0. Then the resultant value is unknown so that can be represented by simulated as unknown this falls in the same line but l and h generally means weak 0 and weak 1 essentially it means that the drive is not a low resistance drive it is a high resistance drive. So when you have a line which is pulled up to the VDD then you have a h pulled down to the ground of VSS then you have the l and if l and h clashes as in the earlier case then you get weak unknown. Now mind you that just because you write an output is assigned with the l you will not get a pull up resistor or pull down resistor or a weak drive or something like that this is just a standard eulogic values the synthesis tool is not going to obey all that it is going to treat this as 0 and 1 that is a high impedance very useful and for synthesis we need like many a times we need to say something is down care and then the down care is used for simulation all these are meaningful but may not be the down care for synthesis normally we use 0, 1, z and down care. So that is a kind of standard eulogic definition and standard logic is defined as subtype standard logic is resolved standard eulogic we will see that what is this but essentially it is that when multiple standard eulogic outputs are driving a line in synthesis again it does not matter because you put tri-state gate there is no issue but when you simulate if more than 2 outputs are driving it by mistake then the resultant value is not has to be computed by the simulator, simulator has no knowledge of that because simulator just know that the standard logic takes these values. So this function this particular function resolved kind of resolve that multiple drive you know that if 0 and 1 come together this function will tell what is the resultant value okay that always need not be x because 0, 1 is x but then if both are 0 then it can be 0. And similarly if there is an h drive and 0 so 0 it can be still 0 because a weak one and a forcing 0 then the resultant value can be 0 nothing no short circuit happens like even 0 and 1 then you have a short circuit but then whenever there is L or h then there is a there is assumed to be a kind of high resistance drive so it is not a short circuit. So let us move to the integer and floating and physical types the internally this is the internal definition of the integer type integer is range like minus 2 raise to 31 to plus 2 raise to 31 okay you know the kind of 2 complement range one is the positive side is one less but then you can imagine that and the weight use it as variable suppose for a variable we are using integer then variable a name count integer range 0 to 255 always we have to specify the range because this integer range is defined as it is a big range so you have to find the equivalent width of the bus so always we limit the range or you say constant width integer colon equal to 16 whenever you say colon equal this is not like the assignment we use for the signal this is an immediate assignment. So when we assign a signal we use the symbol less than or equal to for assignment that has a significance like delta cycle and all that but this does not have any kind of delta cycle assignment or timing assignment this is assigned immediately whenever is colon equal to is used. Let us come to floating type the floating type is internally defined in the standard library as type real is range minus of 1 into 10 raise to 38 to plus same range so that is the kind of floating point number once again just because you have a data type do not imagine you take two floating point numbers and multiply the synthesis tool is going to implement a floating point multiplier it may not happen at all. So there is unlike the sequential languages we need a time in VHDL or hardware description language so that is specified as time so that is called a physical data type so you have type is a keyword time is range again the same range as this and the units one important thing is that this is integer and floating point these are mere numbers but this is physical type so you need a unit so the units is defined like that you start with units keyword the end units is the end of that kind of body then you specify the units like the basic unit is fs which stands for femtosecond then ps which is pico second equal to 1000 femtosecond nanosecond is equal to 1000 pico second microsecond so on up to hour. So in a simulator and the VHDL code you are able to specify you are able to say after 10 nanosecond after 100 femtosecond after 1 minute and so on whether it makes sense or not but you can specify the signals with the time delay you require and that is enabled through this physical data type. So these are the kind of predefined the data type internally you have enumerated you have integer you have floating type which is called real and the physical type like time. One more thing is that you can define suppose you have any of this type you can define a sub type of the type so here you see the definition is a sub type which is a keyword my end is integer range 4856 so wherever you use my end it is the integer with range 4856 similarly you have sub type ux01 it is just a name any name is resolved standard u logic resolved means it causes a resolution function range u21 that means it takes in the standard logic all the values from ux01 you know that is the meaning of it u21. So like but then you might ask you could have written like this you know we have written sub type a name is integer range 4856 but you could have also define a type of your own like saying type my end is range 4856.  So essentially whatever operators define for my end can be used here. So you can use the plus minus division multiplication whatever was defined for integer can be used by this particular when you use this. But if you define your own range then you have to overload those operators for your type. So it is not a kind of simple difference so if you can live with a sub type always use a sub type then defining your own data type because if you define your own data type then you have to overload all the operators whatever you need for that particular data type like suppose you are defining your own integer you have to go to the integer operators and overload for this new data type. So you will end up writing a lot of functions to overload for plus minus multiplication exponentiation and so on. So always try to use a sub type if at all is required. So let us move on let us see some we have seen the definition of what is standard. But you could define your own data types say take this case just as an example. But when you do design try to use the inbuilt data types because operators are specified you will have less headache than defining kind of your own data type. So these are some of the user defined examples of user defined data type. Say type MEL is u,0,1,z it is a user defined enumerated data type. Similarly type index is range 0 to 15 this is a user defined integer. The next one word length is range 31 down to 0 it is a user defined integer data type. Type volt range is 3.3 down to 1.1. So it takes all the real values so it is a user defined real type. Similarly this type current range is 0 to 1 in generation 9 which is again a user defined real type. And this is a user defined physical type which is type current is range 0 to 1 in ion. Then you define units nano ampere, micro ampere, milli ampere and ampere and there is which shows a sub type kind of declaration. So that is a user kind of data types the scalar ones enumerated integer real then the physical types this can be predefined this can be user defined. So let us look at the composite data type look at this definition of an array. So here it is defined as type word type is a keyword for a data type word is a name is array again keyword 15 down to 0 bit which we are saying that whenever we use word it is a 16 bit bus you know that is the meaning of it. And then you can declare signal address east of type word that means address is a 16 bit bus or a 16 bit signal. And like in libraries many a times arrays are declared unconstrained that means here you say take this example which is in the standard logic 1164 package which say type standard logic vector is array natural range this means unlimited that means whatever is a natural number defined in the standard library mostly that is 0 to 2 raise to 32-1 of course of standard logic that means that this standard logic vector means such a huge unconstrained array. But that is why when we declare we use standard logic vector we constrain it to proper size like here signal a is standard logic vector 3 down to 0 so it is 4 bit because at the time of definition it is unconstrained so we constrain it while using it that is the kind of standard logic vector. So this is a kind of single dimensional array but nothing stop you from you know using it for two dimensional or multi dimensional array. So an example is shown here type a name is array 0 to 7, 0 to 3 of standard logic. So you can imagine this is an 8 element array each element is of 4 bits you know that is a meaning of it like 4 bits or 4 standard logic values. So it is an 8 by 4 two dimensional array and you see how this data type is used constant XOR that is the type this particular two dimensional type equal to then you have 8 values which is in kind of double quotes each value because it is multiple bits and each value is of 4 bits and an underscore is put to just separate you can use underscore whenever there is a kind of string to separate and if you carefully look at it this is nothing but the truth table of 3 input XOR gates you have these are the inputs and this is output. So this is a clever way of writing the truth table so that is array so nothing stop you from using it for multi dimensional array if it is useful there are you know kind of two dimensional structures sometime used in hardware. So in such places it will be advantageous to use two dimensional or multi dimensional array and let us come to this record type which is similar to the structures of C. So here how it is defined is an example is shown type IOSL is record and you say n record and within it you can include multiple signals. So here you have an input signal called you know buffer input is standard logic vector 7 down to 0 enable is standard logic buffer out is again 8 bit vector just comprises of two 8 bit signal and one single bit signal it just mere signals there is no logic but you can imagine this as say you have a tri state gates 8 of them gang together to connect to an 8 bit bus maybe then this can be treated as the input of the tri state buffer this is the output of the tri state buffer and enable is the enable signal of the tri state buffer. So this is something you know in hardware which comes together so maybe it is worthwhile to put it together in a record so not very much used but then can be useful. So this shows the usage you have a signal which is bus A, bus B, bus C is of type IOSL it means that there are three kind of similar structures you know input output and enable and we have a vector which is 8 bit. Now in principle you can assign this vector input 8 bit vector to the input of bus A output of bus B and so on ok. So let us see how it is used so here you say bus A dot buffer input means for this particular bus the buffer input is assigned with the vector which is an 8 bit you know vector which is defined here similarly you can say bus B buffer input is bus A buffer input it means that they are tied together you have two inputs tied together bus B enabled is one means that you are driving one to it bus C is bus B means that again these are everything is connected together you know that is same. Suppose you want a logic you really want to synthesize type C logic between this input and output then you say bus A for particular bus bus A dot buffer out is assigned bus A dot buffer input when bus A dot enabled is one else others Z ok. Now we will see soon what is others Z others Z means all the values all the 8 bits if it is in the case of 8 bit is tristated that is the meaning of it. So we will the record is not much used but then in principle you could combine kind of signals with the correct contacts you can combine put it together which may be useful to kind of a kind of modular code useful to understand all that. And let us come to this keyword Elias this is nothing but suppose you have a 32 bit address signal address is standard logic vector 31 down to 0. And many a times you want to use some top bits of address for something may be memory decoding like when you have an address bus the lower address line goes to the address addressing the memory and peripherals it is a higher bits which fix the memory map. So that is used for chip select decoding so maybe we have an suppose we need we are doing the top 4 bit for this kind of chip select decoding and we do not want to write all the time address 31 down to 28. So we give use an Elias or another name called say top add then how it is defined is you say Elias the name how many bit it is standard logic vector 3 down to 0 it is 4 bit is now that 4 bit comes from where is written here is address 31 down to 28 that means that we have a 4 bit signal which is 31 down to 28 of address is now known by a different name. So wherever you stop add you will get this properly ok that is a basic idea. Now let us come to when you have an array how to assign the array so please have a look at this various type of assignments. So the signal is defined as a row which is standard logic vector 7 down to 0. So this is a row signal which is an 8 bit vector so it can be assigned in these ways you know say row assigned 1 0 like individual bits and if you remember our component instantiation this is like a positional association like 7th bit is 1, 6th bit is 0 and so on ok. So that kind of prompts us you can use the kind of named association so we can say row get 7th position is 1, 6th position is 0, others is 1 means all others other than 7 and 6 all others are 1 ok and you could even write like a complete string you said you put double quotes and write the value like as a single string say 1 0 1 1 1 1 1 1 like that you could write. You could use others along with the positional association like you say row is 1 0 and all others are 1 others like it is equal to and greater than 1 ok. You could use various bases you say row is x bf that means row get you know kind of 1 0 1 1 1 1 1 1 1 which is the hexadecimal equivalent of this whatever assignment done here you could use octal binary specifiers also the pieces also and you could say like this you know many times at the initialization you may want to make everything 0 or tricep then you can say row gets others assign 0 that means everything is 0, row others z that means everything all the 8 bits of row are z that is what is you know written here bus a dot buffer out is bus a dot buffer input when bus a enabled is 1 else is tristated is the thing. So I think that concludes the data type which is a little boring the class and of you know the objects data type so the last part we have seen the composite data type array you can have arrays a multidimensional arrays you can assign them in various ways you can use record to combine something kind of which comes together like in an IO cell and things like that so that is and we have seen this array assignment for the row. So let us move on now with the serious the VHDL so all kind of different models of description how the simulator works what are the classes what are the data types all that is kind of we have covered now let us get on to the serious business of writing the codes which need basically the constructs of the statements and we will go to the statement. So first let us take the concurrent statements when I say concurrent statement these are the statements written in the architecture declaration region as a concurrent kind of statement that means it is not written in the process not written in the function not written in the procedure ok. Procedure can have concurrent statement but any of the sequential bodies you cannot have the concurrent statement so normally it appears in the architecture statement region. So let us come back to the slide you have two types of concurrent statement one is called with select when and the second one is called when else ok. These are the two concurrent statements there are loop like generate loops which we have seen we will take that up later after maybe the sequential statement also. So let us look at the syntax for with select when the syntax is like this with that is a keyword cell is some input it can be single bit multiple bit select ok that means we are going to define an output in terms of the various values of this input signal that is a game and you say some output signal it can be y z or any name assigned to say some expression of inputs a when choices choices mean the values of select line ok. If select is 2 bit you say y gets 1 when 00 ok y gets 0 when 01 and so on ok. So the rule is that so this is the output signal output signal single bit or multiple bit this is an input signal and the choices means all the values of input signal or mutually exclusive values you cannot specify 00 here and again here this has to be mutually exclusive and one more thing is that if you write an expression then this is composed of input. So you have inputs here you have inputs here your outputs here and now you think what is happening when you have some input signal you are telling the output for all the values of input signal ok and this can be as I said this need not be an expression in terms of input it can be some 1 and 0s or numerical values. So you must be getting the idea that for some input signal all the values of input signal you are specifying the output this is nothing but the truth table ok. So I am bringing it early on because many textbooks show some typical examples which we will discuss it which looks as if the width select is kind of man for that particular hardware and so on. So that is to avoid this confusion I am talking about the truth table. So basically we are specifying the truth table for an output signal in terms of the input signal and let us see some examples say here you take this example which says that there is an input called A which is let us take it as 2 bit with A select Y is the output Y gets 0 when A is 00 0 when 10 1 when 11 0 when others ok I will come to this in a moment which says that Y is 1 when A1 is 1 and A0 is 1 else it is 0. So you quickly get this is nothing but an AND gate. So it is very simple it is a truth table of an AND gate which is quite complete here there is nothing to add but you may be wondering about what is this game like the syntax also we said some expression last one is when others that means when you come to the last one whatever is not covered here can be covered you know can be written here. So in principle we could have written 1 when others instead of when 1 1 ok. Now mind you this is if you do not write the tools are going to complain because you should know that assume that we are using standard logic then each standard logic bit can take the 9 values. So if A is 2 bit as a combination it can take 8 to 1 values and we are only specifying 4 of them and the simulator should know what should be the output if none of this condition match. So you need to say what is like for 9 into 9-4 77 cases are not specified what is the output for those 77 cases need to be specified that is what this is doing and this you could combine with the last one there is no absolutely no need to write an extra kind of statement ok. So basically the truth table of this looks like this you have A1 A0 because it is 2 bits 0 0 is 0 0 1 is 0 1 0 is 0 and 1 1 is 1 so it is the equation is nothing but y is A1 and A0. So this is a very simple case of with select. So let us add some kind of expression and see what is happening like we said some expression in terms of the input. So let us write one statement for that so let us see this. So we say with A select y gets B when 0 0 y gets not of P when 0 1 y gets C when 1 0 y gets B when 1 1 and when others it really does not matter and this definitely helps in debugging and all that something goes wrong when you simulate like if you give a proper value then this can be easily kind of you know debugged from some whatever is happening at the output. So that is a one kind of side effect of this when others. So if you look at this you know that 0 0 is B 0 1 is not B 1 0 is C and 1 1 is B. So the truth table you have A as 2 bits A1 A0 you have B and C so y is written in terms of this when it is 0 0 you can see y is 0 when B is 0 y is 1 when B is 1. So that is the meaning of the first one y gets B when 0 0 y gets not of P when 0 1 so when these are 0 1 B is 0 the y is opposite of that. Similarly come to the 1 0 when 1 0 is there the y is nothing but exactly same. So but only thing is that each statement you can see now because of this inclusion of B and C expanded into multiple rows and when it is 1 1 this is nothing but y is B so 0 0 1 is 1. So if you write the equation the equation comes like this. So here the equation is y gets A1 bar A0 bar A1 bar and A0 bar and B that comprises of this two rows which is combined. So basically equations comes as the min terms okay you like in this wherever there is one the min term is there but here we do not know we are not working with numerical values so we have to write everything. So this captures this particular two rows and the next like A1 bar A0 is capturing this y is nothing but not of B 0 y is 1. So that is an B bar so that is this two rows and this is or so if it is 1 0 then the y is nothing but C if it is 1 1 then y is nothing but B. So that is shown here. So each of this kind of equation is translated to is coming from two rows in the simple case if there are numerical value then it is it will be coming from a single row. So that is how the two table is formed in this case. So let us go to another example so that you are thorough you should not think you should not be confused about with select. So let us okay this is what I have told now mind you one thing when you write such a code if anything any event happens on the input okay like input can be A, input can be B then this the simulator will compute this particular concurrent statement. So if there is an event on A event on B event on C anywhere this will be computed that you should keep in mind but when it comes to synthesis tool it does not matter it looks at this code and you know come out with the implementation either through two table or through the operator whichever is kind of easier. So that is what is summarized here for all the mutually exclusive values of input signal output is specified which is nothing but two table and each choice represent a min terms and the output equation is that min term or another min term because both condition cannot happen at the same time. So you have or of min terms wherever there is one happens when output is expressed as a function of some input then this can be translated to each row each statement can be translated to multiple rows in a truth table. But in equation it can be written as a single statement not an issue. Similarly you can work out the equation looking at the truth table and we said that simulator whenever there is an event on input simulator computes but synthesis tool look at the code and try to kind of generate the circuit. So let us look at another example which is a 4 to 1 multiplexer. So you have four inputs A, B, C, D of some width can be 4 bit or 8 bit or whatever or even a single bit and y is again the same size as A, B, C, D and select line is 2 bits and now we write y in terms of the various values of select line so width, cell, select that is this y gets A, A when 0, 0 when this is 0, 0, A will go to y, 0, 1, B, 0, 1, 0, C, 1, 1, D. So that shows the kind of multiplexer implementation using the width select. Now this can be little unfortunate because most textbooks kind of specify this as a standard example but the trouble is that people will think that from the syntax this is something specific for multiplexer but as we have said that it is a truth table we are specifying in some kind of basic level or little abstract level. So basically any combinational circuit can be implemented using width select, multiplexer looks little natural for you know the syntax. So that is the multiplexer with cell select 0, 0, y gets A and so on. Now let us derive the equation and you know that irrespective of the number of bits the equations are going to be same. Suppose you have y3 to y0 then the path between A3 and y3, A2 and y2 is same as the path between A1 and y1, A0 and y0 and so on okay. So the equation is that you go row by row so you have yi is nothing but a of i like if it is y0, a of 0 when select 1 bar and select 0 bar okay that is this or like b of i when select 1 bar and select 0 okay. So that is the second kind of choice or the third and so on. So basically you work out the equation as the min terms or the product terms here or the next product term and so on. That is how the equation is defined as I said absolutely this syntax has got nothing to do with the multiplexer this is used for combinational circuit and the multiplexer looks like a natural fit for this kind of syntax. But mind you you should know always remember in the case of multiplexer the select line is going to the input of the AND gates and sometime the picture convey a message saying that this is something controlling which when it is become 1 the input goes to output and so on like a thyristor but then it is very unfortunate because we know that the select is also an input ABCD is also input okay. So in principle so when I want to kind of summarize so with select it can be used in any combinational circuit suppose you have multiple inputs ABC and an output y then in principle you can choose any of the input and you can say with say let us pick b you can say with b select y gates now we have to specify the y because we are going to specify 00 of b. So when you decode that min terms come properly but when you write y now for you have to write as a function of a and c because that is not specified. So for this case when the value is 1 the y is function 1 of a and c value is to another function of a and c and so on. Ultimately we say when others you know comprising of all the cases which is not discussed. And in principle you can even write a multiplexer with as a select line okay. So there is nothing you can write to say with a select y gates function of BCD and select various functions of BCD and select. It is like in the case of a multiplexer if you do that it is going to be quite cumbersome and it may not make much sense. So it is natural that we use a select signal as the real select signal of the concurrent statement. So that is about the concurrent statement and this is used for combinational circuit without any priority and you can also it is not that you have to specify suppose you have this function and this function are kind of same then you can say same function when value 1 or value 2 okay that is what is shown here. You can have multiple choices in a single statement say here you say we have a prime number kind of detection for 3 bit input. The num is a 3 bit kind of input prime is output we say when it is 2, 3, 5 and 7 the prime number is high. So you say prime gets 1 when 010 or 011 or 101 or 111, 0 and others. So you could use the choices in the case of with select to combine. So the next one is when else maybe we will take that in the next class because we will not be able to cover it. So a quick recap of what we have done today like this is what we have done this index with select and output signal is specified in terms of the mutually exclusive values of some input signal the output can be numerical values or some expression of the various input signal. And the rule is that you have to specify the mutually exclusive everything mutually exclusive values and when you say when others it captures everything which is not specified. And when you use standard logic this is quite useful because there are lot of each standard logic position take 9 values. So if there are multiple bits then there are lot of unspecified thing which simulator would like to know how to handle it. So that is why we specify that and we have seen a simple example of an AND gate which is straight forward you know you have the truth table. And how the equation comes you write the minterm of wherever there is one or minterm of the if there is a one another places but here it is only in one place. And we have seen a little more complex example where the output is a function of not only the select line but the input then you have the equations coming as a1 bar a0 bar and b and so on. So we have seen a truth table where a single statement expand multiple rows and when you write equations again it becomes concise. And we have seen that a multiplexer you know the code to be familiar but as I said this is with select has got nothing to do the multiplexer. In principle any combinational circuit can be coded with the with select. So you have multiple inputs you pick up one input write the output as different functions of other inputs for each values of b that is the basic idea of with select. And it is used wherever there is no priority. So any combinational circuit without priority you can implement you can specify choices using what kind of multiple choices using vertical bar. So I think I wind up today's lecture please go back and read that whatever we have covered in the data type basically the integer physical user defined then the arrays and records. Then we have looked at the syntax of with select please go and revise it write some simple program if you can with with select very simple combinational circuit you can take and write it using the with select. So we will continue with the concurrent statement and the sequential statement next class we will have a look at the other concurrent statement called when else. Then we will follow it up with the if then case when sequential statement and try to complete the combinational circuit part very soon. So thank you wish you all the best.


Hello everyone, welcome to theCUBE's coverage here at AWS Reinvent 2022. This is the executive summit with the center. I'm John Furrier, your host of theCUBE. We've got two great guests coming on today, really talking about the future, the role of humans. Radically human is going to be the topic. Paul Dardi, the group chief executive, technology and CTO at Accenture, and Jim Wilson, global managing director of thought leadership and technology research center. Gentlemen, thank you for coming on theCUBE for this conversation around your new hit book. Radically human. Thanks John, it's great to be with you. Great to be present at Reinvent. We've been following you guys for many, many years, now over a decade. You always have the finger on the pulse. As these waves come in, it's really important to understand impact and more than ever, we're kind of in this, I call it the systems thinking revolution that's going on now where things have consequences and machines are now accelerating their role. Developers are beginning the front lines of running companies, seeing a massive shift. This new technology is transforming the business and shaping our future as humans. And so I love the book, very, very strong content, really right on point. What was the motivation for the book? And congratulations, but you know, I noticed you got the structure part one and part two. This book seems to be packing a big punch. What was the motivation and what was some of the background in putting the book together? That's a great question, John. And I'll start and then Jim, my co-author and colleague and partner on this, on the book can join in too. You know, if you step back from the book itself, we'd written a first book called Human Plus Machine, which talked about the, folks, a lot on artificial intelligence and talked about the potential and future of artificial intelligence to create a more human future for us with the Human Plus Machine pairing. And then when we started working on the next book, COVID was kind of the COVID era. COVID came online as we were writing the book. And that was causing really an interesting time in technology for a lot of companies. I mean, think back to what you were doing, you know, once COVID hit, every company became more dependent on technology. Technology was the lifeline. And so Jim and I got interested in what the impacts of that were on companies. And what was different from the first research we had done around our first book. And what we found which was super interesting is that, is that, you know, pre-pandemic, the leading companies, the digital leaders that were applying cloud data AI and related technologies were outperforming others by a factor of two X. And that was before the pandemic. After the pandemic, we redid the research and the gap wide into five X. And I think that's, and that's kind of played a lot into our book. And we talk about that in the opening of our book. And the message there is exactly what you said is technology is not just the lifeline, you know, from the pandemic, but now technology is the heart and soul of how companies are driving innovation, how they're responding to global crises around, you know, inflation, energy, supply chain crisis because of the war in Ukraine, et cetera. And companies need the technology more than ever. And that's what we're writing about in Radically Human. And we're taking a step beyond our previous book to talk about what we believe is next. And it's really cloud data and AI and the metaverse that signal out is three trends that are really driving transformative change for companies. And the first part of the book to your question on the structure talks about the roadmap to that. We talked about the ideas framework, five areas where you need to change your thinking, flip your assumptions on how to apply technology. And then the second part of the book talks about the differentiators that we believe are going to set companies apart as they look to, you know, to implement this technology and transform their companies for the future. Jay, why are you in on this flipping the script, flipping the assumptions? You used a really important word there and that is systems. I think when we think about artificial intelligence and when Paul and I have been out talking to companies, a lot of executives think of AI as kind of a point solution. They don't think about AI in terms of taking a systems approach. So we were trying to address that. All right, if you're going to build a roadmap, a technology roadmap for applying intelligent technologies like artificial intelligence, how do you take a holistic systematic view? And that's really the focus of the first section of the book. And then as Paul mentioned, how do you take those systems and really differentiate using your talent, focusing on trust experiences and sustainability? You know, I like how it reads. It's almost like a masterclass book because you kind of set the table. It's like, because people right now are like in the mode of, you know, what's going on around me. Been living through three years of COVID. We're coming out the other side. The world looks radically different. Humans are much more important. Automation is great, but people are finding out that the human's key. But people are trying to figure out, where am I today? So I think the first part really to me hits home, like here's the current situation. And then part two is here's how you can get better. And it's not just about machines, machines, machines and automation, automation, automation. We're seeing examples where the role of the human, the person in society, whether it's individually or as part of a group, are really now key assets in that kind of this new workforce, this new production system or, you know, society. Yeah. And just to take a couple examples from the book and highlight that, I think you're exactly right. That's where you're radically human. You know, the title came from. And, you know, what's happening with technology is that technology itself is becoming more human-like in its capability. I mean, think about the power of the transformer technologies and other things that we're reading about a lot. And, you know, the whole hypothesis or premise of the book, I should say, is that the more human-like the technology is the more radically human, or the more radical the human potential improvement is, the bigger the opportunity, it's pairing the two together rather than, as you said, just looking at the automation or the machine side of it. That's really the radical leap. And one thing Jim and I, you know, talk about, you know, talk about in context of the book is companies really often haven't been radical enough in applying technology to really get the dramatic gains that they can get. Just a couple of examples from the ideas framework. The ideas is each of the ideas framework is the first part of the book, the five areas to flip your assumptions. The I stands for intelligence. And we're talking about more human and less artificial in terms of the intelligence techniques. Things like common sense learning and other techniques that allow you to develop more powerful ways of engaging people and engaging humans in the systems that we built using the kind of systems thinking that Jim mentioned. And you know, things like emotional AI, common sense AI, new techniques, in addition to machine, the big data-driven machine learning techniques which are essential to vision and solving big problems like that. So that's just an example of, you know, how you bring it together and enable that human potential. I love the ideas framework. Go ahead, Jim. I was going to say we've been used to adapting to technology, you know, contorting our fingers to keyboards and so on for a long time. And now we're starting to see that technology is in fact beginning to adapt to us and become more natural in many instances. One point that we make is now in the human technology nexus, in fact, the human is in the Ascended. That's one of the big ideas that we try to put out there in this book. You know, I love the idea of flipping the script, flipping the assumptions but ideas framework is interesting. I for intelligence, D for data, E for expertise, A for architecture, S for strategy. Notice the strategies last. Normally in the old school days, it's like, hey, strategy first and execution. Really kind of interesting, kind of how you guys put that together. It kind of feels like business is becoming agile and iterative in how it's going to be forming. Can you guys, I mean, that's my opinion, but I think, you know, observing how developers are becoming much more part of the app. I mean, if you take digital transformation to his conclusion, the application is the company. It's not a department serving the business. It is the business. Therefore, developers are running the business, so to speak. This is really radical. I mean, this is kind of how I'm seeing it. What's your reaction to that? Do you see similar parallels to this transformation if you take it down to a conclusion and strategy is just what you do after you get the outcomes you need. Is that, can you, what's your reaction to that? Yeah, I think one of the most lasting elements of the book might be that chapter on strategy in my opinion, because you need to think about it differently. The old way of doing strategy is dead. You can't do it the way you used to do it. And that's what we tried to, you know, to lay out with the S and ideas, you know, the strategy. And the subtitle of that chapter is we're all technology companies now. And if you're a technology-driven company, the way you need to think about and every company is becoming, that's what I hear when I talk to these weeks and CEOs and boards is everybody's recognizing the essential role that technology plays. And therefore they need to master technology. Well, you need to think about strategy differently then because of the pace of technology innovation. And so you need to throw out the old way of doing it. We suggest three new archetypes of how to do strategy that I think are really important. It's about continuous strategy in all cases. An example is one of the techniques we talked about forever beta, which is, you know, think about a Tesla or companies that, you know, it's never quite done. They're always improving. And the product is designed to be connected and improving stuff. It changes a lot, you know, the product and the strategy along how you deploy it to consumers changes as you go. And that's an example of a very different approach to strategy that we believe is essential to consider as you look at the future. You know, those multi-month strategy sessions, you know, might play out over two or three quarters are going away and strategy and execution are becoming almost simultaneous these days, as Paul was saying. It's interesting because that's the kind of the trend you're seeing with more data, more automation, but the human plays a much critical role. And just as a side of the Tesla example, you know, it's well-documented. I think I wrote about it in a post just this week that during the Model 3, Elon wanted full automation and had to actually go off script and get the humans back in charge because it wasn't working properly. Now they have a balance. But that brings up the part two, which I like, which is, you know, this human piece of it. You know, we always talk about skills gaps. There's not enough people to do this, that and the other thing. And talent was a big part of that second half, you know, trust, talent, experiences, that's the more the person's role either individually as part of a collective group. Is talent the scarce resource now where that's the goal, that's the key? Because, I mean, it all could point to that in a way. You know, skills gap kind of points to, hey, you know, humans are valuable. In fact, the value is going up if it's properly architected. What's your reactions to that, guys? Because I think, you know, that's something that's not, it's kind of a nuanced point, but it's a feature, not a bug maybe. I don't know, what's your thoughts? Yeah, it's, go ahead, Jim. I was going to say it, you know, we're dramatically underestimating the amount of focus we need to put on talent. That's why we start off that second part of the book, you know, really zooming in on talent. I think, you know, you might think that for every, you know, $100 that you put into a technology initiative, you know, you might put 50 or 75 into reskilling initiatives to really compliment that. But what we're seeing is companies need to be much more revolutionary in their focus on talent. We saw an economic analysis recently that pointed out that for every $1 you spend on technology, you're likely going to need to spend about $9 on intangible human capital. That means, you know, on talent, on getting the best talent, on reskilling, and on changing processes and work tasks. So there's a lot of work that needs to be done really that's human focus. It's not just about adopting the technology. Certainly the technology is critical, but we're underestimating the amount of focus that needs to go into the talent factors. That's a huge point. I think some of the elements of talent that become really critical that we talked about in the book are becoming a talent creator. We believe that the successful companies of the future are going to be able not just to post a job opening and hire people in because there's not going to be enough. And a lot of the jobs that companies are creating don't exist because the technology is changing so fast. So companies that succeed are going to know how to create talent, bring in people of predestines and such and shape the talent as they go. We're doing a significant amount of that in our own company. You're going to be learning-based organizations where you'll differentiate, you'll get the best employees if you provide better learning environments because that's what employees want. And then democratizing access to technology, things like Amazon's Honeycoat as an example, your low-code, no-code development, spread development to wider pools. Those types of things are really critical going forward to really unlock the talent potential. And really what you end up with is yeah, the human talent's important, but it's magnified and multiplied by the power of people, giving them essence superpowers and using technology in new ways. I think you nailed it. That's super important. That point about the force multiplier when you put things in combination with its group constructs, two pizza teams flexing, leveraging the talent. I mean, this is kind of a new configuration. You guys are nailing it there. I love that piece. And I think groups and collectives, you're going to start to see a lot more of that. But again, with talent comes trust when you start to have these kind of ephemeral and or forming groups that are forming production systems or experiences. So trust comes up a lot. You guys see the metaverse as an important part there. Obviously metaverse is a pretext to the virtual world where we're going to start to create these group experiences and create new force multipliers. How does the metaverse play into this new radically human world? And what does it mean for the future of business? I think the metaverse is radically kind of misunderstood to use a word title, word about when we're out of the title of our book. And we believe that the metaverse does have real big potential, massive potential. And I think it'll transform the way we think about digital more so than we've changed our thinking on digital in the last 10 years. So that's the potential of the metaverse, not just about the consumer things. It's about metaverse in the enterprise. It's about the new products you create using distributed ledger and other technologies. And it's about the industrial metaverse of how you bring digital twins and augmented workers online in different ways. And so I believe that it has tremendous potential. We write about that in the book and it really takes radically human to another level. And one way to think about this is cloud is really becoming the operating system of business. You have to build your enterprise around the cloud as you go forward. That's going to shape the way you do business. AI becomes the insight and intelligence of how you work infused with the human talents and such as we said. And the metaverse then reshapes the experience layers. You have cloud, AI building on top of this metaverse providing a new way to generate experiences for employees, citizens, consumers, et cetera. And that's the way it unfolds. But trust becomes more important because just as AI raise new questions around trust, every technology raises new questions around trust. The metaverse raises a whole new set of questions. And in the book, we outline a five part framework or five essential parts of the framework around how you establish trust as you implement these new technologies. Yeah, we're seeing that about three quarters of companies are really trying to figure out trust, certainly with issues like the metaverse more broadly across their IT. So they're focusing on security and privacy, transparency, especially when you're talking about AI systems, explainability. One of the more surprising things that we learned when doing the book, when we're doing the research is that we saw that increasingly consumers and employees want systems to be informed by kind of a sense of humanity. So one company that we've been looking at that's been developing autonomous vehicles, self-driving car systems, they're actually training the system by emulating human behavior. So kind of turning the cameras on test drivers to see how they learn and then train the AI, kind of using that sense of humanity because the other drivers on the road find human behavior more trustworthy. And similarly, that system is also using explainable AI to actually show which human behaviors that that AI system is learning from. But it's a really interesting innovations kind of happening in that trust space, John. Jim, I think you bring up a great point that's worth talking more about because you're talking about how human behaviors are being put into the design of new things like machines or software. And we're living in this era of cloud scale, which is compressing this transformation timeline. And we've been calling it super cloud, some call it multi-cloud, but it's really a new thing happening where you're seeing an acceleration of the transformation. We think it's going to happen much faster in the next five to 10 years. And so that means these new things are emerging, not just, hey, I'm running a virtual event with Chad and some video, you know, it's group behavior, it's groups convening, talking, getting things done, you know, debating, doing things differently. And so this idea of humans informing design decisions or software with low code, no code. This completely changes strategy. I mean, this is a big point of the book. Yeah, and I go back to, you know, one of the, the E and the ideas framework is expertise. And we talk about, you know, from machine learning to machine teaching, which is exactly that. You know, machine learning is, you know, maybe humans tag data and stuff and feed into algorithm. Machine teaching is how do you really leverage the human expertise in the systems that you develop with AI? One of the examples we give is one of the, the large consumer platforms that uses human designers to give the system a sense of aesthetic design and product design, a very difficult thing, especially with changing fashion interest and everything else to encode in algorithms and to even have AI do, even if you have fast amounts of data, but with the right human insight and human expertise injected and you can create, you know, amazing new capability that responds to consumers in a much more powerful way. And that's an example of what you just said, John, of bringing the two together. Yeah, what's interesting is I want to get your thoughts as we get wrap up here soon. How do you apply all these human-centric technologies to the future of business? As you guys talk to leaders in the enterprise of their businesses, as they look at the horizon, they see the future, they got to start thinking about things like genera of AI and how they can bring some of these technologies to the table where, you know, we were talking about if open source continues to grow the way it's going, there might not be any code to write it. It just writes itself at some point. So you got supply chain issues with security. These are new things. You guys are hitting on this in the book where these are new dynamics, new power dynamics in how things get built. So if you're a business owner and leader, this is a new opportunity, a challenge, certainly, that is an opportunity. How do you apply all this stuff for business? No, I'll go first than Jim Kanade. But the first thing I think starts with recognizing the role that technology does like and investing accordingly in it. So the right technology talent, you know, rethinking the way you do strategy as we talked about earlier and recognizing how you need to build a foundation. That's why, you know, the fact you're at re-invent is so important because companies are, you know, again, rebuilding that operating system of their business in the cloud. And you need that, you know, as the foundation to go forward to do, you know, to build the other types of capabilities. And then I think it's developing those talent systems as well. You know, do you have the right talent brand? Are you attracting the right employees? Are you developing them in the right ways that you have the right future talent going forward? And then you marry the two together and that's what gives you the radically human formula. Yeah, when, you know, when we were developing that first part of the book, Paul and I did quite a bit of research and this was just, and Paul kind of alluded to that research earlier. But one of the things that we saw in really the first year of the pandemic was that there was a lot of first time adoption of intelligent technologies like artificial intelligence. You know, one statistic is that 70% of there was a, there was a, of companies that had never tried AI before went ahead and tried it during the pandemic. So first time adoption rates were way up. But the thing is companies are not, or we're not trying to do it themselves and to, you know, to necessarily, you know, build an AI department, they were partnering. And it's really important to find a partner off of a cloud partner as a way to get started, start small scale and then scale up doing experiments. So that was one of the key insights that we had. You don't need to do it all yourself. If you see the transformation of just AWS, we're here at re-invent, just since we've been covering the events since 2013, every year there's been kind of a thematic thing. It was, you know, startups, the enterprise, now builders and now change your company. This year it's continuing that same thing where you're starting to see new things happen. It's not just lift and shift and running a SaaS application on the cloud. People are changing and refactoring and re-platforming categorical applications in for this new era. And, you know, we're calling it super cloud, super services, super apps, because they're different. They're doing different things and leveraging large scale CAPEX, large scale talent pools or talent pools in certain ways. So this is real. Something's happening here. And, you know, we've been talking about it a lot lately. So I have to ask you guys, how does the company know if they're radical enough? Like, what is radical? How can I put a pin in that? Can I take a temperature? Are we like radical enough? What some tell signs can you guys share for companies that are really leaning into this new next inflection point? Because there are new things happening. How do you know if you're pushing the envelope radical enough to take advantage? Yeah, I think, Yeah, I was going to say, one of the tests is, is, you know, the impact on your business. You have to start by looking at all this in the context of your business. It isn't really taking you to another level. You said it perfectly, John. It used to be, we used to talk about migration and workloads to the cloud and things like that. Yeah, that's still something you need to do. But now our focus, you know, with a lot of our customers is on, how do you innovate and grow your business in the cloud? What's the platform that you're using for the new digital products and services you're offering to your consumers? I mean, it is the business. And I think that's the test of what you've been radical enough, is on the one hand, is this really, are you really using the technology to drive differentiation in real growth and change in your business? And are you equipping people, your human talent with the capabilities they need to perform in very different ways? And those are the two tests that I would give. Totally agree. You know, interesting enough, we love this topic and guys, again, the book is spot on, very packs of big punch on content, but very relevant in today. And I think, you know, one of the things we were looking at is that people who do things differently, take advantage of some of these radical approaches like ideas, your framework, and understand where they are and what's available and what's coming around the corner, they stand out in the pack or create new business opportunities because the CapEx has taken care of, you know, you got your cloud, I mean, you're building clouds on top of clouds or something's happening. You can, I think you see it, like companies like Snowflake, it's a data warehouse on the cloud. What does that mean? They didn't build a cloud, they used Amazon. So you're starting to see these new things pop up. Yeah, and that's a good example. And it sounds like a simple thing, data warehouse in the cloud, but the new business capability that a technology like that allows the portability to be able to connect and use data across cloud environments and such is tremendously powerful. And I think that's why you talk about companies doing things differently. That's why it's great, again, that you're at re-invent. If you look in the index of our book, you'll see AWS mentioned a number of times because we tell a lot of customer and company stories about how they're leveraging AWS capabilities in cloud and AI to really do transformative things in their business. And I think that's what it's all about. Yeah, and one of the things too, in the book, it's great because it has kind of the systems thinking, it's got really relevant information, but you guys have seen the movie before, I think one of the wild cards in this era is global. We're a global economy, you got regions, you got data sovereignty, you're seeing all kinds of new things emerging, thoughts on the global impact because you take your book and you overlay that to business, you got to operate all over the world as a human issue, it's a geography issue. What's your guys take on the global impact? Well, that's why the kind of thing about cloud is one technology we talked about in the book and cloud is, I think a lot of people think, well, cloud, it's almost old news maybe, it's been around for a while, as you said you've been going to re-invent since 2013. Cloud is really just getting started and it's because the reasons you said, when you look at what do you need to do around sovereign cloud capability? If you're in Europe, for many companies, it's about multi-cloud capabilities that need to deploy differently in different regions and they need to, in some cases, for good reason, they have hybrid cloud capability that they match on their own and then there's the edge capability which comes into play in different ways and the architecture becomes very complex. We talk about the A and ideas as architecture, we talk about all this and how you need to move from the old conception of architecture which was more static and just modularity was kind of the key thing you thought about some more of the idea of a living system, a living architecture that's expanding and it's much more dynamic and I think that's the way you need to think about it as you manage the global environment today with the pace of technology advancement. You know, the innovation is here, it's not stopping, how do you create some de facto standards while not stunting the innovation is going to be a big discussion as these new flipped assumptions start to generate more activity. It's going to be very interesting to watch. Gentlemen, thank you so much for spending the time here on theCUBE as we break down your new book, Radically Human and how business leads can flip the script on their business assumptions and put ideas and actions to work. This is a big part of the cloud show at Reinvent. Thanks so much for sharing and congratulations on a great book. You know, thanks John. And just one point I'd add is that one of the things we do talk about in talent is the need to reskill talent. You know, people who need to be relevant to the rapidly changing future. And that's one area where I think we all as institutions, as communities and individuals need to do more is to help those who need the reskilling. The final point I mentioned is that we mentioned at the end of the book that all proceeds from the book are being donated to not NGOs and nonprofits that are focused on reskilling those who need the skill refresh and light the radically human new change in technology that's happening. Great, buy the book. Proceeds go to a great cause and it's a very relevant book. If you're in the middle of this big way that's coming, this is a great book as a guidepost and also give you some great ideas to reset and re-flip the scripts, refactor, re-platform. Guys, thanks for coming on and sharing. Really appreciate it. Again, congratulations. Thanks John, great discussion. Okay, you're watching theCUBE here covering the executive forum here at AWS Reinvent 20. I'm John Furrier, your host with Accenture. Thanks for watching.


Hello! Do you want to learn how to deploy your CodeRoachDB cluster on Kubernetes and OpenShift? Then, this video is for you. My name is Alex Soto, Director of Developer Experience at Red Hat. And if you want to stay updated with all the content that we are delivering, remember to follow me on Twitter and subscribe to the channel. Okay, let's start here. I've got my OpenShift cluster running. Remember that OpenShift is just an implementation of Kubernetes. So, OpenShift is Kubernetes. Let's go to the terminal. I can do, for example, keepCuttleGetNode. So, you can see that, you know, I've got all these my nodes. I've got like six worker nodes and three master nodes running on AWS in front form. And now, let's deploy a cluster. Do I do keepCuttleGetPot? Do you see that keepCuttleGetPot? Do you see that I've got no POT deployed here yet? Let's deploy a CodeRoachDB cluster. The only thing that I need to do is just use Helm. So, I can do Helm repo at stable. And I put it, this, the KubernetesChart.storage.boggleAPI.com. I added the repo. Okay, then I need to, usually I just do a Helm repo update to just update to the last things. Probably now it's already the last one, but it's always nice to have it updated. And then I need to create some YAML file with the specific parameters of my installation. So I'm going, for example, to create a BI Cook RoachDB.yaml. Since I'm using Helm, most of the parameters are okay. But if I want to set it somewhere of all, I need to create a specific YAML file. In this case, notice that I'm just setting the limits and the records of the memory. So I just want to use one GWT RAM. The cache is a quarter of the old memory, so it's 256. And then my service, the service that is exposing Cook RoachDB, I wanted to not be a cluster IP, but a load balancer. Then I can just save the file and do Helm install. Let's call it, for example, Quarkus release, because at the end, someday we will deploy a Quarkus application, right? As we've seen in the previous video, in the description you can find it, the link where we develop a Quarkus application using Cook RoachDB as a database. So here we're just learning how to deploy it to Kubernetes, and you can take that application and deploy it here. So we've got, again, Helm install Quarkus release, minus, minus, minus values. It's going to, we call it Cook RoachDB.yaml and we want to use the stable slash Cook RoachDB. Okay, now I install it. It might take some time, but at the end, you know, now it works and I can do Cook RoachDB.getPort. And you can see that now my Cook RoachDB cluster is starting with three nodes by default, so you can set it more nodes if you wish in your, in your.yaml file, but in this case, I just leveraged to the forward stream. Notice that the init has completed so that my cluster is initialized. It's still, you know, waiting. Notice that now the node zero is running but not ready yet. The reason is that because not all the cluster is up and running. Let's wait a bit more. Okay, now notice that this is up and running and the other ones are running. They are waiting for the synchronization. Meanwhile, I can do Cook RoachDB.getServices. And you can see that here I've got two services, one which is the cluster AP and another one which is the Quarkus release co-group public, which is the load balancer. Remember that I said it to be a load balancer and this is the URL to connect. And in case of your application, you always need to do it through the public service. It doesn't matter if it's a load balancer or cluster AP or whatever, but always the service should be the Minus public one, not this one. This one is used for internal communications. And if you check the Cook RoachDB documentation, it says that you need to always use this service. Okay, the public one. Let's see if I've got all the pods up and running yet. Now, okay, I can just go here, copy the URL. Go to the IDE and maybe sometimes with Amazon it takes some time to publish, but I think that now it works. You can see that now I've connected to the Cook RoachDB dashboard and notice that, as I said, we've got three nodes. And here you can see also the hostname or the node name with all the memory, all the versions and so on and so forth. So really easy to deploy Cook RoachDB cluster inside a Kubernetes cluster. Remember that in the description, you've got the link on how to develop a Quarkus application using Cook RoachDB as a database. Now you've learned how to deploy the Cook RoachDB in Kubernetes. And in the next video, you're going to learn how to use Cook RoachDB in a multi-cluster environment. Thank you very much.


with the speed of light, the cloud of dust, and a hardy high old silver, the Lone Ranger. With his faithful Indian companion, Tonto, the masked writer of the planes led the fight for law and order in the early western United States. The stories of his strength and courage, his daring and resourcefulness have come down to us through the generations, and nowhere in the pages of history can one find a greater champion of justice. Return with us now to those thrilling days of yesteryear. From out of the past come the thundering hoofbeats of the great horse Silver, the Lone Ranger rides again. Everyone in Pottsville likes Squire Tubs, the banker. They not only like the overweight genial man who laughed so easily, they trusted him. But Tubs was worried. Apprehension showed in every line of his face as he hurried on foot through the moonlight. He glanced over his shoulder several times to make sure no one had seen him, as he made his way toward a small shack outside of town. Both of us soon asleep. She doesn't awaken easily. She couldn't have hurt me leave the house, and no one else was there to hear me. I hope I can fix things up somehow. The shack Squire Tubs approached was dark. He wondered if the men he was to meet had changed their plans. They wouldn't change him, though. They were too determined. All right, Tubs. Hold it. There you are. Just waiting here to make sure you came alone. You're hooded. That's right. All the rest will be hooded the same as me. So there's no use to your trying to find out who you're talking to. I see. I'll go ahead and admit it, the shack. Is anyone there? Everyone's there. Oh, I didn't see a light. I thought you... The windows are covered so a light won't show. We don't do things by half. Get going. Good thing you came here alone. If you hadn't, the whole deal would have been called off. You wouldn't have the chance to keep your peace of mind. There's no use talking to you. I'll talk when I see the head man. Wait there. Tubs is here. Open the door. Come in, Tubs. So you've got your head covered too. You look at the six men sitting around the table there. You'll see they're all hooded. Chair at the ends for you. Sit down. Yes, all right. Guard, stay outside and keep your eyes open. All right. Tubs, there's no use trying to make out who we are because we took special pains to keep our faces a secret. If you think you recognize any of our voices, don't jump at conclusions. Yes, sir. You want to know some details, I suppose. Well, we'll give them to you. You said you had information about my son. That's right. And we told you what you'd have to do to get that information. Did you bring the cash? I have it here. Put it on the table near the oil lamps as we can see it. Here's the money. But first you've got to prove that you really do have information about my boy. I'll tell you what we know about him. He joined the army and went to the war. Yes. Yes, that's right. You didn't have word from him for a long time. Then you had word that he was dead. That's all you know about him. But tell me, is that the truth? We never were sure. His mother's lived in hope for years. Might he eager to know the truth, huh? I'm ready to pay for it.  Why did you insist that I keep this meeting a secret? Not so fast, dubs. We can tell you all about Jim. But maybe you wouldn't like to hear the truth. I would. I must hear the truth.  He was a... No, no, he... Listen to me. He was a traitor. And he was shot by a firing squad. I... I don't believe it. I reckon his mother wouldn't like to hear that, would she? It... It would kill her. What about his wife and son? How did that pretty girl he married feel to know that her husband turned out that way? And what did that young boy think of his father? I don't believe you. Jim wasn't that kind.  You're lying to me.  Right here in this envelope is the proof of all I said. There's sworn statements from men in his regiment here. How did you get those sworn statements? I made it my business to get them. They mean a lot of cash to me. Cash you're going to pay. If I give you this money for them, will... Will you go away and say no more? That cash in the table there? That cash is ours already, tubs.  If you want this envelope of evidence, it'll take a lot more cash. More? You own a bank. You're a rich man. But I'm not the rich man. You can get your hands at all the cash we need. I won't touch other people's money. Well, that's too bad. I'll just have to send this information to your folks. You fiend! You rotten shithead! Put him in this chair.  Him? In all my life, I've never heard of a means of... Save your breath, Tubs. Now, they'll talk a little common sense.  Die the hero's death. It'll be worth all you've got to keep them from the only truth, wouldn't it? You want me to steal from my own bank? Well, what's the odd? It's your son's reputation or your own. Fact is, you won't even need to hurt your reputation. We'll give you a hand and help you make it look like outsiders did the stealing. I'd never hurt a man in all my life. But if I could do it, I'd kill you as I would a tarantula. Well, how much do you want? Hey, now you're getting practical. There's $1,000 in cash. Right here. I'll take that to start with. This envelope, as I figured, is worth $10,000. No, it isn't. Hey, what's the matter with you? Get back! No! Grab that man! Shoot him! Stop him! When the sudden shot smashed the light, wild disorder filled the room. Hard blows fell on unprotected chins, chairs filled to the floor, and men cried wildly for the capture of the one who'd so suddenly leaped into action. Then, a splintering crash of glass. There he goes, the winner. Stop him! Shoot him!  Get him! Get that door open. See where the guard's at. Get a light in the air. He grabbed the cash and the envelope out of my hand. Here's the guard. He's tied and gagged. I'm getting the light.  Let me get my hands on him. Cut the gag and rope for that guard. Here's the light. Put it here in the table. Who was sitting next to that ombre? I was Steve. I never noticed anything about him. Wasn't it lefty? Well, I thought it was, but... Steve. Look, here on the table. Wait a minute. You guard, what happened? Speak fast. It was the Redskine. He grabbed me before I get yellow warning and gagged and roped me. That's all I know. It was the Redskine. He got me just after I let Tubbs into the shack. Ah, Steve, Steve, look here. Well, watch this. This was on the table near the lamp. It's a cartridge. Silver. Solid silver. The silver bullet.  You're still going to pay. Only now you'll pay twice as much. I'll get that proof all over again. You'll pay us 20,000 instead of 10. And if you know who we are, it won't help you one bit. Well, I know who you are. You're Steve Smith. Yeah? Well, remember your wife, your daughter-in-law, and your grandson.  Now, what's that about a silver bullet? Steve, don't you know what it means? One of the men that was sitting here with us was the Lone Ranger. Lone Ranger? Yes, sitting right where Lefty was supposed to be. Then where's Lefty? I don't know. Well, find him and find the Lone Ranger and find that Indian. They'll pay for this trick. And Tubbs, you'll pay too. You'll pay plenty. Lone Ranger rained up in a small camp in the woods where a man laid tied and gagged on the ground. Oh, there's silver bullet. Oh, I hope. Well, Lefty, I'll take that gag out of your mouth now and we'll talk. You know what's good for you? You'll answer my questions as fast as I ask them. There you are. You'll pay for this. I've heard that before. Don't look for help. That horse you hear is Tottos. I went to that meeting in your place, Lefty. You know what was planned? What if it do? And you're even lower than I thought. And I saw you here trying on the hood and found the paper in your pocket, telling where the meeting was. I didn't suspect what kind of a scheme was involved. What are you going to do about it? Everything all right, Tunnel? All right. How about the guards? Him not hurt much. Half of them are on ground. Keep an eye on him while I glance at these papers. The men at the meeting said these would prove that Jim Tubbs was a coward who was shot by a firing squad. Oh, me hear that. I'd better poke up the fire a little to read them. Oh, me fix it. Not too much like Tottos. If you don't want this, can't be found with the men who'll be looking for us. Ah. Lefty, how did your gang know about Jim Tubbs? Find out for yourself. Are these affidavits true? You can read them, can't you? I don't believe they are. Who's the boss of your gang? Now, look here. If I talk to you, I'll be sure to get killed. I know what'll happen if I squeal.  You know who I am? Yes, I do. I knew it the minute you called that horse Silver.  And he won't kill me no matter what I say or don't say. So I'm saying nothing. Now, what are you going to do about it? Finish your game for keeps by burning these affidavits right in this fire. Nice, Savvy. Now, I think your gang will have a hard time proving that Jim Tubbs died as you claim. Cut those ropes and then find your way back to Tunnel and Foot. I'll delay you long enough for Tunnel and me to get away. There. Run up again, Tunnel. We go now. Yes. We'll leave the fire in case Lefty wants to spend the night here. Steady, Silver. All right, Tunnel. Get him up, scoundrels. The lone ranger and Tunnel rode a short distance from the camp before they slowed the horses to a walk so they could talk more easily. Tunnel, I don't think Jim Tubbs is what those men claimed. Those Tunnels plenty crooked. He died as they claim his father would certainly have heard about it before this. I think it's just a scheme to get Tubbs to let them rob his bank. I don't know what we can do about it right now. But you burn papers. They can get more papers. Those were really affidavits. The gang will have nothing left to hold out to the banker. They can show him other affidavits. We'll know they force them. And we'll see if we can't find out the truth about Jim Tubbs. Oh, that'd be good. Other people are concerned, Kimusabi. Mother and the wife and the son are holding to an ideal. I think the banker will do almost anything to protect their happiness. Let's cook rob bank. Hello? Yes, I'm mistaken. Tubbs would do more than that to keep his son of this grace a secret. The next day, Steve Smith wrapped in the door of the Tubbs' house. Martha Tubbs responded to the summons and... Oh, it's Steve Smith. Good morning, Mr. Smith. What brings you here? I looked for the banker, and he wasn't at his office. Oh, no, he's in his room. He felt sick this morning, so he didn't go to the office. Hello, Steve. How are things at the general store? Oh, first straight. First straight, Abby. How's that boy of yours? Fine and dandy. He's getting more like his paw every day. Oh, was there any mail for us, Steve? No. I expect we might as well stop asking. It must be a bother having to handle all the mail as well as running your store, Steve. Oh, I don't mind. I sure wish I could bring you later as the letter you're open for, but I can't. Somehow I feel that sooner or later we'll have word to Jimmy. Maybe so, ma'am. Maybe so. Never can tell. I wanted to see the banker if I can. Oh, yes? Who's there? It's Steve Smith, the storekeeper. Oh, come in here, Smith. You can go right back. You know where his room is. Thanks, Miss Tubbs. Are you coming? I'm coming, Tubbs. Well, I hear you're down sick. Who's that door? Steve Smith.  Because I'm afraid you've left things so my wife will learn the truth. But so help me if I ever see you talking to her, Rabbie, in a friendly way again. I'll forget myself and do murder. Ah, that'd be downright foolish. You hear what I said. Why are you here? I figured you'd want to talk to me, Tubbs. There's some business we left that wasn't finished. They said oh. Well, what about it? I've got no choice. You can rob my bank. If heaven help all the poor people who have trusted me. The curtain falls on the first act of our Lone Ranger story. Before the next exciting scenes, please permit us to pause for just a few moments. To our story, in a room in Banker Tubbs' home, Steve Smith sat with a satisfied grin on his ugly face as he met the eyes of the banker.  You'll give me no choice. I'd die sooner than to have Martha and Abby and my grandson learn anything that would destroy their love for Jimmy. Well, you'll be insensible. I wondered if you thought that mask man could get away with what he tried last night. But he took that envelope. Ah, that wasn't the real thing. That held copies of the letters I've got. Copies? Sure. I've got the real letters where they won't be found. They'll stay there till I get the cash I'm after. Oh, they're simple enough. We'll just help ourselves to the cash you've got at your bank. You'll see, too, that we don't get interfered with. That's all there is to it. When? The sooner we get the cash, the sooner you'll have those letters. What about the letters the mask man took? I told you, they're just copies. What if he comes to me and demands money for those? Then what can I do? Tubbs, one of the things you will get when you deal with me is protection against him. Just let him show himself around here. We'll deal with him. Yes. I'm glad you found out who I was. Makes it easier to talk business. Now, uh, I'll let you know just how you're to help us. When is this? This robbery is a big place. I'll let you know that, too. And you'd better see, too, that there's plenty of cash in the bank for us. Good day, Tubbs. I did my son have to die when he didn't like that to allow it to live. Maybe, maybe Jimmy did let fear overpower him. He loved life. He wasn't a boy that wanted to die heroically. He wanted to live. To live for his wife and his son. Of course, he feared. Oh, he can't be blamed for that. He can't be condemned. Jimmy. Jimmy, I'll do anything to keep you the boy we knew. The boy who loved life. Mr. Tubbs. Past. How did you get in here? I came in through the window. That voice. The silver bullet. Last night. Yes, I was at the meeting. Why did you do it? What are you going to do now? I thought I knew who you were. I thought you were the Lone Ranger. Yes, I am. Here's your money. I took at the meeting. Then you are going to do what, what that other man is doing to me. I want to help you. There's nothing you can do. Who's the man who left here? The storekeeper. How did he know about your son? I don't know. Tubbs, you don't want anyone to help you. There is no help. I have no choice. I've got to do what he wants. Let him rob the bank? Please, please, Lone Ranger. Leave here. I, I appreciate what you want to do. But there isn't anything he could be done. He has the whip hand. I heard most of what was said here. Yes, I assumed as much. Tubbs, I've got to ask one thing. Postpone things as long as you can. What do you mean? Make him think you've got to get cash into the bank. Tell him anything so the robbery won't take place for a few days a week. Longer if you can stall him. Why? The storekeeper. He has the post office too. There's a chance, one chance that something can be done. It'll take some time. Give me a week.  You saw the Silver Bullet pay. I don't know what you could possibly do. But I'll give you as much time as I can. Night, Steve Smith had a message which took him from his home. Polly was gone. The Lone Ranger and Tonto stepped into the house. Tonto, we've got to work fast. He won't be gone long. It takes plenty long time to search whole house. We look under carpet first. I'll open these drawers. Spread these papers around. Me hunt under a bed blanket. Turn the bed around. We won't have to search the whole house, Tonto. We'll just make it look as if we'd gone through it. In a few minutes, Steve Smith will be back. And we'll see what he does. Steve Smith entered his house and lighted a candle quite late at night. He saw that the house was badly upset. Papers were strewn about the floor. The bed had been pulled apart and rugs turned over. So there's been a search here. Well, someone will pay for this. Someone as sure as shooting is going to... Yeah, I better see if anything important was stolen. Outside the house, the Lone Ranger and Tonto stood at a window and watched. Look, he's going to the fireplace. There's a loose rock there. That's where he got secret hide in place. We'd never have found a Tonto. No. I'm making him think that this house has been searched. I'm making him sure it's his hiding place. We'll have a look there as soon as he goes to bed. Steve looked at some papers in the secret hiding place behind one of the stones in the fireplace. He found his papers all there and undisturbed. He chuckled us softly and then went about the task of putting the room in order before he went to bed. Several days later, Steve Smith called his men to a meeting and reported the progress of his plan. On the first place, boys, you might as well keep those hoods you made to cover your faces with, because we'll use them when we rob the bank. When's that to come off? I'm getting tired of waiting. You take it easy, Lefty. Remember, you almost spoiled our game by letting that Lone Ranger get you. You heard any more about him?  I figure he was the one that did it. He didn't find anything, did he? Of course not. I don't leave important papers lying around loose. I wish I could get my hands on that Lone Ranger. Well, if he shows up, he'll find it real unhealthy. How about the bank? Tubbs has finally fixed the time. It's Saturday night. Saturday night? Good. Will he have plenty of cash there? Plenty. Now, the reason I called this meeting is this. I don't figure on letting Tubbs tell the law that we robbed the bank. Yeah, that worried me. When he gets the papers, you'll give him what's to stop him from telling about it. That's right, Steve. If he can tell the sheriff who did it, can he? Not the way I've got things planned. We can't rob the bank if he don't help us, can we? It'd be hard. Yeah, he can help a lot. Well, after we've got what we want, then we just take charge of Mr. Banker Tubbs. Take charge? How do you mean? Well, we move him away from here. Jake, you have a buck board and a good team ready. All right. Tubbs goes for a trip, and he's not coming back. You mean we're gonna... When the bank is robbed, folks will find reason to think Tubbs took that cash and scooted out of town for parts unknown. Well, that ends, and he guesses about who done it before they get started. You know, they're smart. Downright smart. Any questions? No, it sounds good. Boys, we're all set then. We'll find the door of the bank unlocked when we go there Saturday night. We'll find Mr. Tubbs waiting for us. It's dark on Saturday with no moon to shed the faintest light on the group of men that halted in front of the bank shortly after midnight. I've got the team and buck board over yonder near the trees, Steve. Good enough, Jake. All of us here now? Yep. The door's unlocked. I tried it. There's Tubbs inside. He better be here. You got that envelope with you, Steve? You wanna see? I've got it. Come on now. Stay close behind me and keep your guns ready in case someone comes along. The office is back here. You on him, Tubbs? I'm here in the office. Plenty dark in here. This way, Smith. Did you bring something for me? Yes. I just got here. I'll light the lamp. You leave the light out. I'll strike matches to see all I wanna see. Is your safe open? Yes. Good thing it'll save time. But what is the safe to do with it? You were going to bring me an envelope. Where is it? I've got it. All right, clean out the safe. Now, hold on. You can't do that. What is this, a robbery? Huh? What the Sam Hill do you think it is? You can't do this. Don't bring me an envelope. Where is it? Let me light the lamp and see it.  This is our party from now on.  All right. Left or you get him a rope. Group, save your breath, Tubbs. Stand back. Hey, what? What's the safe? Deputy, get that light going. The first man to make some moves stops later. What is this? You had this coming, Steve Smith. Set a trap for me, eh? Well, you'll never get over-regretten, Miss. There's the light.  Take their guns first and then those hoods they're wearing. We'll see who's with Steve Smith in this party. Are you paid, Tubbs? You'll wait for your wife when happy here. Well, if it isn't Jake. Oh, no, no, no. Wait, Chief. Let me explain. You're lifty. See who else there is here, boys? I can explain everything. Your boss explained plenty, Jake, before he knew we were here waiting for him. Here. Here, Sheriff, take this envelope. You will see why we're here. We came to sell it to Tubbs. You can't charge us with robbery. There's not one of us that touched a certain of the bank's cash. That's right. All right, so far, Steve, about not touching the bank's money. You can't say we broke in here because we didn't. No. The door was unlocked. That's right, Steve. You know quite a bit of law, don't you? There's not a thing you can do with us. Now, you're mistaken about that. You see, you did do a robbery. That's not true. The fact is you'd have been better off to rob the bank than to rob the United States mail. What? Mail? We never robbed. And from the way you all came here, I guess the law can find all of you in cahoots on the mail robbery. That's not true. We never touched the mail. Steve, there was one letter that was addressed to Banker Tubbs. Have you forgotten that one? Here, letter. Tubbs. The one you kept behind the stone in your fireplace. I guess it's still there, ain't it? Steve, what's he mean? Tell us his local. All right. How'd you know about it? Oh, I was told about it. That letter was from the best friend Jimmy Tubbs had in the Army. You know what it said, Steve. You stole it instead of delivering it. And by Juniper, when a jury hears the scheme you try to pull, they'll give you the rest of your life in jail. Tell me more. I did what the Lone Ranger asked me to do. I came here. I'll let you and your men come here. Tubbs? The Lone Ranger's in the next room right now.  He is. Yep. And you know what he's got with him? What? You've got to be patient for a minute more so as I can explain things straight. He figured that Steve must have had some way of knowing that you'd never heard from your son. He figured that Steve had all the mail so he healed a few tricks and found a letter you never saw. He told how your son was badly wounded in the fighting and how he risked his life to save his captain. Yes, sir. He'd been a long time getting over his wounds. He's still not over him. But the captain who had him in his own house figured he was well enough to come here. So he wrote and asked you to send for your son. Jim, write himself. Tubs, he couldn't. Now you'll be sure of this. He will get well, but it'll take time and a lot of care. Where is Jim? Let me go after him.  They'll lose him back to health. That's the way the captain figured. That's how the Lone Ranger figured, Tubs. I'll open the door now. The Lone Ranger must have gone. But you better come in here, Tubs. Go on. Then where is Jimmy? Tell me where he is so I can go... Jim! He's sleeping now. He's mighty weak after the trip here. My son... My son has come back. We'll help you carry him home. Yes. Yes, sir. But who brought Jim back? I want to thank him. Who brought him back? Don't you know, Tubs? Don't you know? You have just heard as a copyrighted feature of the Lone Ranger Incorporated.