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
€37.25
List Price:  €139.81
You save:  €102.56
£31.94
List Price:  £119.88
You save:  £87.94
CA$54.65
List Price:  CA$205.14
You save:  CA$150.49
A$61.21
List Price:  A$229.74
You save:  A$168.53
S$54.31
List Price:  S$203.86
You save:  S$149.54
HK$312.76
List Price:  HK$1,173.93
You save:  HK$861.17
CHF 36.48
List Price:  CHF 136.93
You save:  CHF 100.44
NOK kr437.45
List Price:  NOK kr1,641.97
You save:  NOK kr1,204.51
DKK kr277.83
List Price:  DKK kr1,042.85
You save:  DKK kr765.01
NZ$67.04
List Price:  NZ$251.66
You save:  NZ$184.61
د.إ146.73
List Price:  د.إ550.75
You save:  د.إ404.01
৳4,378.17
List Price:  ৳16,433.22
You save:  ৳12,055.04
RM190.86
List Price:  RM716.38
You save:  RM525.52
₦50,617.44
List Price:  ₦189,989.64
You save:  ₦139,372.20
₨11,106.46
List Price:  ₨41,687.46
You save:  ₨30,581
฿1,479.17
List Price:  ฿5,552.01
You save:  ฿4,072.83
₺1,298.49
List Price:  ₺4,873.83
You save:  ₺3,575.33
B$205.63
List Price:  B$771.82
You save:  B$566.19
R759.59
List Price:  R2,851.08
You save:  R2,091.49
Лв72.88
List Price:  Лв273.56
You save:  Лв200.68
₩54,905.43
List Price:  ₩206,084.35
You save:  ₩151,178.92
₪151.64
List Price:  ₪569.19
You save:  ₪417.55
₱2,308.77
List Price:  ₱8,665.83
You save:  ₱6,357.06
¥6,214.04
List Price:  ¥23,324.04
You save:  ¥17,110
MX$681.36
List Price:  MX$2,557.45
You save:  MX$1,876.09
QR145.49
List Price:  QR546.12
You save:  QR400.62
P553.29
List Price:  P2,076.75
You save:  P1,523.46
KSh5,373.27
List Price:  KSh20,168.27
You save:  KSh14,795
E£1,913.46
List Price:  E£7,182.06
You save:  E£5,268.60
ብር2,268.32
List Price:  ብር8,514.01
You save:  ብር6,245.68
Kz33,458.12
List Price:  Kz125,583.12
You save:  Kz92,125
CLP$38,059.56
List Price:  CLP$142,854.36
You save:  CLP$104,794.80
CN¥289.47
List Price:  CN¥1,086.53
You save:  CN¥797.06
RD$2,346.22
List Price:  RD$8,806.41
You save:  RD$6,460.19
DA5,366.56
List Price:  DA20,143.10
You save:  DA14,776.53
FJ$91.56
List Price:  FJ$343.69
You save:  FJ$252.12
Q310.09
List Price:  Q1,163.91
You save:  Q853.82
GY$8,351
List Price:  GY$31,345.01
You save:  GY$22,994
ISK kr5,591.40
List Price:  ISK kr20,987
You save:  ISK kr15,395.60
DH404.82
List Price:  DH1,519.49
You save:  DH1,114.66
L711.55
List Price:  L2,670.77
You save:  L1,959.22
ден2,294.80
List Price:  ден8,613.40
You save:  ден6,318.60
MOP$321.89
List Price:  MOP$1,208.23
You save:  MOP$886.33
N$764.99
List Price:  N$2,871.35
You save:  N$2,106.36
C$1,468.33
List Price:  C$5,511.31
You save:  C$4,042.97
रु5,317.95
List Price:  रु19,960.64
You save:  रु14,642.68
S/148
List Price:  S/555.52
You save:  S/407.51
K151.64
List Price:  K569.20
You save:  K417.55
SAR149.83
List Price:  SAR562.40
You save:  SAR412.56
ZK1,042.20
List Price:  ZK3,911.85
You save:  ZK2,869.65
L185.37
List Price:  L695.78
You save:  L510.41
Kč938.56
List Price:  Kč3,522.84
You save:  Kč2,584.28
Ft14,621
List Price:  Ft54,879.10
You save:  Ft40,258.09
SEK kr434
List Price:  SEK kr1,629.02
You save:  SEK kr1,195.01
ARS$34,886.01
List Price:  ARS$130,942.62
You save:  ARS$96,056.60
Bs275.67
List Price:  Bs1,034.74
You save:  Bs759.06
COP$155,475.85
List Price:  COP$583,569.56
You save:  COP$428,093.70
₡20,009.70
List Price:  ₡75,105.25
You save:  ₡55,095.55
L984.80
List Price:  L3,696.38
You save:  L2,711.58
₲296,355.57
List Price:  ₲1,112,353.39
You save:  ₲815,997.81
$U1,532.08
List Price:  $U5,750.59
You save:  $U4,218.50
zł160.72
List Price:  zł603.27
You save:  zł442.54
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.