Binding Properties ('bind')

15 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$39.95
List Price:  $149.95
You save:  $110
₹1,480
List Price:  ₹9,995
You save:  ₹8,515
€38.44
List Price:  €144.28
You save:  €105.84
£31.93
List Price:  £119.86
You save:  £87.93
CA$57.45
List Price:  CA$215.64
You save:  CA$158.19
A$64.12
List Price:  A$240.67
You save:  A$176.55
S$54.27
List Price:  S$203.70
You save:  S$149.43
HK$310.47
List Price:  HK$1,165.34
You save:  HK$854.86
CHF 35.74
List Price:  CHF 134.15
You save:  CHF 98.41
NOK kr456.25
List Price:  NOK kr1,712.53
You save:  NOK kr1,256.27
DKK kr286.72
List Price:  DKK kr1,076.21
You save:  DKK kr789.48
NZ$70.92
List Price:  NZ$266.22
You save:  NZ$195.29
د.إ146.73
List Price:  د.إ550.75
You save:  د.إ404.02
৳4,792.38
List Price:  ৳17,987.92
You save:  ৳13,195.54
RM180.09
List Price:  RM675.97
You save:  RM495.88
₦62,179.77
List Price:  ₦233,388.17
You save:  ₦171,208.40
₨11,161.13
List Price:  ₨41,892.66
You save:  ₨30,731.52
฿1,376.19
List Price:  ฿5,165.47
You save:  ฿3,789.28
₺1,405.79
List Price:  ₺5,276.58
You save:  ₺3,870.78
B$246.73
List Price:  B$926.09
You save:  B$679.36
R734.27
List Price:  R2,756.05
You save:  R2,021.78
Лв75.23
List Price:  Лв282.40
You save:  Лв207.16
₩57,882.25
List Price:  ₩217,257.66
You save:  ₩159,375.41
₪145.78
List Price:  ₪547.21
You save:  ₪401.42
₱2,350.49
List Price:  ₱8,822.45
You save:  ₱6,471.96
¥6,261.91
List Price:  ¥23,503.72
You save:  ¥17,241.81
MX$810.63
List Price:  MX$3,042.66
You save:  MX$2,232.03
QR146.36
List Price:  QR549.38
You save:  QR403.02
P552.40
List Price:  P2,073.41
You save:  P1,521.01
KSh5,163.53
List Price:  KSh19,381.03
You save:  KSh14,217.50
E£2,034.16
List Price:  E£7,635.12
You save:  E£5,600.95
ብር5,099.95
List Price:  ብር19,142.37
You save:  ብር14,042.42
Kz36,674.10
List Price:  Kz137,654.10
You save:  Kz100,980
CLP$39,616.41
List Price:  CLP$148,697.91
You save:  CLP$109,081.50
CN¥291.59
List Price:  CN¥1,094.47
You save:  CN¥802.87
RD$2,439
List Price:  RD$9,154.65
You save:  RD$6,715.65
DA5,375.65
List Price:  DA20,177.19
You save:  DA14,801.54
FJ$92.73
List Price:  FJ$348.08
You save:  FJ$255.34
Q308.92
List Price:  Q1,159.54
You save:  Q850.61
GY$8,390.52
List Price:  GY$31,493.33
You save:  GY$23,102.81
ISK kr5,555.04
List Price:  ISK kr20,850.54
You save:  ISK kr15,295.50
DH402.49
List Price:  DH1,510.75
You save:  DH1,108.25
L735.86
List Price:  L2,762.03
You save:  L2,026.16
ден2,366.27
List Price:  ден8,881.68
You save:  ден6,515.40
MOP$320.99
List Price:  MOP$1,204.85
You save:  MOP$883.85
N$733.03
List Price:  N$2,751.42
You save:  N$2,018.38
C$1,476.03
List Price:  C$5,540.19
You save:  C$4,064.16
रु5,459.94
List Price:  रु20,493.58
You save:  रु15,033.64
S/149.71
List Price:  S/561.93
You save:  S/412.22
K162.56
List Price:  K610.15
You save:  K447.59
SAR150.11
List Price:  SAR563.45
You save:  SAR413.33
ZK1,109.90
List Price:  ZK4,165.96
You save:  ZK3,056.06
L191.30
List Price:  L718.05
You save:  L526.74
Kč966.19
List Price:  Kč3,626.54
You save:  Kč2,660.35
Ft15,901.88
List Price:  Ft59,686.78
You save:  Ft43,784.90
SEK kr440.95
List Price:  SEK kr1,655.10
You save:  SEK kr1,214.15
ARS$40,829.29
List Price:  ARS$153,250.37
You save:  ARS$112,421.08
Bs277.12
List Price:  Bs1,040.18
You save:  Bs763.05
COP$174,918.24
List Price:  COP$656,545.43
You save:  COP$481,627.19
₡20,168.90
List Price:  ₡75,702.82
You save:  ₡55,533.91
L1,018.04
List Price:  L3,821.16
You save:  L2,803.12
₲313,289.69
List Price:  ₲1,175,914.62
You save:  ₲862,624.93
$U1,782.11
List Price:  $U6,689.05
You save:  $U4,906.94
zł163.79
List Price:  zł614.79
You save:  zł451
Subscription
$149.95
$39.95
per week
Payment Plan
$149.96
$39.95
per week
4 payments
Already have an account? Log In

Transcript

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

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.