Binding Properties ('bind')

15 minutes
Share the link to this page
You need to have access to the item to view this lesson.
One-time Fee
List Price:  $149.95
You save:  $110
List Price:  ₹9,995
You save:  ₹8,515
List Price:  €137.95
You save:  €101.20
List Price:  £118.03
You save:  £86.58
List Price:  CA$204.13
You save:  CA$149.75
List Price:  A$223.98
You save:  A$164.31
List Price:  S$201.81
You save:  S$148.04
List Price:  HK$1,169.29
You save:  HK$857.76
CHF 36.31
List Price:  CHF 136.29
You save:  CHF 99.98
NOK kr426.36
List Price:  NOK kr1,600.35
You save:  NOK kr1,173.98
DKK kr274.23
List Price:  DKK kr1,029.33
You save:  DKK kr755.10
List Price:  NZ$244.93
You save:  NZ$179.67
List Price:  د.إ550.76
You save:  د.إ404.03
List Price:  ৳17,501.01
You save:  ৳12,838.35
List Price:  RM702.51
You save:  RM515.35
List Price:  ₦225,449.82
You save:  ₦165,385
List Price:  ₨41,630.94
You save:  ₨30,539.53
List Price:  ฿5,402.54
You save:  ฿3,963.19
List Price:  ₺4,829.06
You save:  ₺3,542.49
List Price:  B$765.26
You save:  B$561.38
List Price:  R2,727.55
You save:  R2,000.87
List Price:  Лв269.41
You save:  Лв197.64
List Price:  ₩203,736.74
You save:  ₩149,456.76
List Price:  ₪554.84
You save:  ₪407.02
List Price:  ₱8,681.23
You save:  ₱6,368.36
List Price:  ¥23,349.46
You save:  ¥17,128.65
List Price:  MX$2,488.47
You save:  MX$1,825.48
List Price:  QR545.03
You save:  QR399.82
List Price:  P2,025.14
You save:  P1,485.60
List Price:  KSh19,643.45
You save:  KSh14,410
List Price:  E£7,019.15
You save:  E£5,149.09
List Price:  ብር8,584.77
You save:  ብር6,297.59
List Price:  Kz127,228.42
You save:  Kz93,331.95
List Price:  CLP$133,883.92
You save:  CLP$98,214.28
List Price:  CN¥1,064.03
You save:  CN¥780.54
List Price:  RD$8,755.04
You save:  RD$6,422.50
List Price:  DA20,167.91
You save:  DA14,794.73
List Price:  FJ$334.11
You save:  FJ$245.10
List Price:  Q1,161.13
You save:  Q851.77
List Price:  GY$31,267.39
You save:  GY$22,937.06
ISK kr5,524.68
List Price:  ISK kr20,736.58
You save:  ISK kr15,211.90
List Price:  DH1,488
You save:  DH1,091.56
List Price:  L2,648.13
You save:  L1,942.61
List Price:  ден8,491.40
You save:  ден6,229.10
List Price:  MOP$1,201.11
You save:  MOP$881.11
List Price:  N$2,734.39
You save:  N$2,005.88
List Price:  C$5,502.22
You save:  C$4,036.30
List Price:  रु19,925.62
You save:  रु14,616.99
List Price:  S/558.12
You save:  S/409.43
List Price:  K580.42
You save:  K425.78
List Price:  SAR562.37
You save:  SAR412.54
List Price:  ZK3,814.83
You save:  ZK2,798.47
List Price:  L686.32
You save:  L503.47
List Price:  Kč3,408.66
You save:  Kč2,500.52
List Price:  Ft53,256.29
You save:  Ft39,067.64
SEK kr426.88
List Price:  SEK kr1,602.28
You save:  SEK kr1,175.39
List Price:  ARS$132,967.77
You save:  ARS$97,542.21
List Price:  Bs1,032.64
You save:  Bs757.52
List Price:  COP$572,269.23
You save:  COP$419,804.03
List Price:  ₡76,492.49
You save:  ₡56,113.20
List Price:  L3,700.58
You save:  L2,714.67
List Price:  ₲1,119,848.39
You save:  ₲821,495.98
List Price:  $U5,817.47
You save:  $U4,267.57
List Price:  zł587.52
You save:  zł430.99
per week
Payment Plan
per week
4 payments
Already have an account? Log In


Hello and welcome to lecture seven. In this lecture we'll see how to bind properties or a module that contains properties with a module that contains design. The best practices of system Verilog assertions require or at least I suggest, that do not put your properties in the same module as the design module. First of all synthesis may have troubles, your manager may not like that practice. And most importantly, there is a construct called bind available in system Verilog assertions. So then you can keep your properties separate, totally separate in a different module, and then bind the properties module with the design module.

Let's see how that works. So binding properties, let's say you have a module called design module with it puts the clock and output dB. I've used the for design, as you will see the reason for that, and it's a very simple assignment. Now, the now the second module is your property module. This property module will have properties that work on this design in the design module. And the property module can only have inputs, I mean, it's a module so you can have anything you like.

But it doesn't make sense to have outputs on the property module. It wants to work on the inputs of the inputs that come from the design module. So it has been a PvP p clock as inputs, and it has a very simple property called RC one which says if p is true, it implies PV Doesn't matter, it's a very simple. And as you can see the output of the design module module DB goes as an input, but we haven't made the connection yet. I'm just showing you that the DB goes as an input PB, but we haven't done a bind yet. So this is where you do a bind.

For example, you have a module called test, bind property. And in this module, you instantiate the design module VM, and you connect the design ports with a test bench ports like we normally do, there's nothing new here. Now here's a keyboard bind, which is a key word from the SBA language as a matter of fact, is exists in system Verilog also, but you can bind the design module with the property module. give it an instance name And connect just like you would normally connect the Verilog modules or the instances. So, pa property module a can also design a PV connects to dB and P clocks connect to the clock. Now, since we are connecting a module to Module What that means is that bind the module will bind the module but all instances of the module because we are binding a module to a module as opposed to binding the instance of design module with the property module here all the design module instances will be tied to the property image module.

Here only the instance of the design module will be bound to the property module and again we connect the The ports, which you have to so that way, now in that case, db is connected to PV as you see. And that's why this relationship I was showing here. As I just said, you have to name the bind instance. And that's pretty much it is actually a very straightforward process. And with this process or this feature in place, I don't see any reason why you might want to put properties within the design module. And let's see, a little bit more on this topic.

So what I'm showing here is that I have the property module just like the previous slide, but here I'm calling the the poor da DVD cloud doesn't matter. You can call it anything. But I'll tell you why. I'm doing that. Desert property, which is the same as in the last slide, and I'm setting and covering the property. What I'm doing here is from within the property module, as opposed to from a separate module, we have three modules here design property, and wind module.

But what I'm doing in this slide is that within the property module, I'm binding that design module. And he has a design module, which has a named da DVD clock. As we saw in the previous, and I purposely named the property module purports to be the DVD clock so that when you bind design module with property module, you can simply say dot start, because this is a very simple example. But I can assure you, you will have hundreds of signals between the property module and the design module. And one of the ways to make sure that you're doing can make mistakes is called the property module ports. The names of these ports will be the same as a design module.

So all you have to do is just put dot star. For those who wants to know even further detail of mine, this is the details that I presented is sufficient, more than sufficient for system Verilog assertions. But the as I just said, this is where a lot of language also can use this particular feature. And you can read the system or log LRM to get even further detail, but you don't need any further detail for the system or assertions. Okay, so there's one more caveat here. Let's say here's my design module with the same ports as before, but I have internal registers and I work on these internal registers as well as the input port But I basically want to write an assertion on the registers which are internal to the design module, they are not the ports.

So how do I bind the internals of the design module with the property module. This is the same property module that we have said in the last two slides. It's called scope visibility. And this is an excellent feature that the designers put in very glad that they put in. And here's your test the third module called bind property, and everything is the same. This one connects the ports two ports, like we have seen in the previous slides.

Now, observe this one here bind design module to the property map module, given the instance name, but what I'm doing is here the property module pa and PB because there's a property that uses These two input boards, I'm connecting them directly to our DA DA DB. In other words, you don't have to drag rd and our DB to external ports in order to bind those to the property module. I just imagine you may have thousands of internal variables, then there is no way I mean first of all synthesis will die if you had so many ports coming out that design is not real estate because the design doesn't have all those ports. So, the scope visibility means that everything under the design module all the internals are available to the property module. Simply by connecting you have to have those connecting ports in the property module, which is okay property module is not going to be synthesized and all the internal registers are visible directly to the when you do the bind, so, understand this carefully It's an excellent feature.

And that will help you further to keep your properties separate from the design module. Now, as I said earlier, and in this course I've said that, let's say you're a VHDL design house, you use VHDL. But VHDL does not have system Verilog assertions, they don't support Verilog. Of course, it's VHDL. They do support PSL. And you can use PSL to write assertions for VHDL by system Verilog assertions as VA is becoming an industry standard.

And what if you want to use that? So let me show you how you do it. This is a VHDL, quote unquote module or as it's called in VHDL. For entity, here's your entity CPU. It has two inputs A and B. And here's the architecture of the answer.

TT CPU. This is how the server works. If you're not familiar with VHDL, don't worry, you don't need to become a guru. I'm just showing this for the VHDL users. So here's your entity and architecture for, for a given quote unquote module like in Verilog. Now, system Verilog assertions work only in Verilog, or system around.

So here's the CPU properties here they add CPU. Here's a very large system Verilog modules, CPU props, and there is some assertion in there. How do you bind VHDL or Verilog, the same way that we had seen before you create module. But in in the visual world, when you bind a VHDL, or Verilog, people say, hey, create a wrapper doesn't matter. It's the same concept that I just described to you before. Bind CPU CPU is your entity in VA server like a module.

Very low work to CPU props, which is your properties module, give it a name CPU SV a bind, and bind it just like it would do. In a very low D connects to a, he can actually be an A, and here's a signal c that connects to f. So this is no different from what we saw in Verilog hundred percent Verilog world. So this is the beauty of SV, you have a VHDL entity, yellow Verilog properties module. And you can find them pretty much the same way you mind the Verilog design module with the Verilog assertions module. Now, how this works is very, very dependent on each simulator. So I've taken the example of presa which allows mixed mode simulation between VHDL and Verilog.

Because you need that, aka your mind VSL Verilog and basically, after you compile your design, you say vcm top SV wrapper, and this SV wrapper with your top level design will be compiled and simulated. And because you are simulating the SV wrapper, which is part of V log star dot v, these bind will take place. That's all there is to it. I mean, you can have that died VHDL design, you can write all your solutions in variable and you can bind them and you can compile, I'm sure criticism from mentor I'm sure the synopsis or cadence will have a different way of compiling and elaborating this particular scenario. So again, here's here's a simple design Verilog or VHDL modules or entities in VHDL world, he has your test bench Verilog. This is your existing.

The point I'm trying to make here in this slide is let's say you have legacy design for we could never wrote assertions. Maybe yes, we didn't do an exist in those days. But you realize that you had found bugs, either in silicon hopefully not, or during verification, and you had a tough time debugging. And there's a good chance you missed a few bugs. Now if you want to write assertions, so again, just like I showed in previous slides, write the assertions, properties and bind. That's it.

The existing design doesn't have to change nothing happens to the existing design for two different modules. And you can also right in addition to the module assertions, interface assertion, the interface of assertions between two modes And at the i o of the chip. These interface assertions just just as a side note are probably some of the most useful assertions you write. Because this is where the protocols take place. Some of these are standard protocols at the chip boundary, but the internal a inter module assertions are all specific to the design, and those need to be verified. And so when you put this interface assertions here, the module assertions we are binding them.

And I'm taking a very simple approach here. You can experiment with different styles, but basically I'm saying that put the interface assertions in include fi with hierarchical referencing of the interface signals. And voila, you go, that will that will work. And this is the last point that if you're using system Verilog, you can embed the system interface as sessions into the so called interface block, which is part of system Verilog. So you can have an existing design or legacy design and you can still take full advantage of the assertions methodology. So that's pretty much it for this lecture, you have seen how very long and or VHDL designs can be bound to a properties module, how you can keep the properties module separate from the design module, which is the methodology I highly recommend.

Thanks a lot for attending this lecture, and I'll see you in the next lecture.

Sign Up


Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.