QUIZ 4: PCI Bus Protocol

16 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
€36.79
List Price:  €138.12
You save:  €101.32
£31.03
List Price:  £116.48
You save:  £85.45
CA$55.18
List Price:  CA$207.13
You save:  CA$151.95
A$60.88
List Price:  A$228.52
You save:  A$167.64
S$53.68
List Price:  S$201.48
You save:  S$147.80
HK$311.86
List Price:  HK$1,170.57
You save:  HK$858.70
CHF 35.30
List Price:  CHF 132.49
You save:  CHF 97.19
NOK kr438.96
List Price:  NOK kr1,647.61
You save:  NOK kr1,208.65
DKK kr274.61
List Price:  DKK kr1,030.75
You save:  DKK kr756.13
NZ$67.75
List Price:  NZ$254.32
You save:  NZ$186.56
د.إ146.73
List Price:  د.إ550.76
You save:  د.إ404.02
৳4,693.24
List Price:  ৳17,615.82
You save:  ৳12,922.57
RM186.06
List Price:  RM698.39
You save:  RM512.32
₦63,760.20
List Price:  ₦239,320.20
You save:  ₦175,560
₨11,119.57
List Price:  ₨41,736.66
You save:  ₨30,617.09
฿1,438.81
List Price:  ฿5,400.52
You save:  ฿3,961.70
₺1,318.40
List Price:  ₺4,948.55
You save:  ₺3,630.15
B$225.52
List Price:  B$846.48
You save:  B$620.96
R729.24
List Price:  R2,737.18
You save:  R2,007.93
Лв71.97
List Price:  Лв270.15
You save:  Лв198.17
₩55,370.14
List Price:  ₩207,828.61
You save:  ₩152,458.47
₪146.16
List Price:  ₪548.63
You save:  ₪402.46
₱2,334.53
List Price:  ₱8,762.55
You save:  ₱6,428.01
¥6,174.98
List Price:  ¥23,177.45
You save:  ¥17,002.46
MX$731.63
List Price:  MX$2,746.14
You save:  MX$2,014.50
QR145.69
List Price:  QR546.84
You save:  QR401.15
P544.15
List Price:  P2,042.44
You save:  P1,498.29
KSh5,223.46
List Price:  KSh19,605.96
You save:  KSh14,382.50
E£1,931.12
List Price:  E£7,248.35
You save:  E£5,317.23
ብር2,309
List Price:  ብር8,666.71
You save:  ብር6,357.71
Kz34,861.80
List Price:  Kz130,851.76
You save:  Kz95,989.96
CLP$37,838.24
List Price:  CLP$142,023.64
You save:  CLP$104,185.40
CN¥289.71
List Price:  CN¥1,087.42
You save:  CN¥797.70
RD$2,365.82
List Price:  RD$8,879.99
You save:  RD$6,514.16
DA5,368.53
List Price:  DA20,150.48
You save:  DA14,781.94
FJ$90.22
List Price:  FJ$338.65
You save:  FJ$248.42
Q309.80
List Price:  Q1,162.81
You save:  Q853.01
GY$8,357
List Price:  GY$31,367.51
You save:  GY$23,010.51
ISK kr5,509.10
List Price:  ISK kr20,678.10
You save:  ISK kr15,169
DH392.83
List Price:  DH1,474.48
You save:  DH1,081.65
L709.09
List Price:  L2,661.53
You save:  L1,952.44
ден2,267.85
List Price:  ден8,512.26
You save:  ден6,244.40
MOP$321.10
List Price:  MOP$1,205.24
You save:  MOP$884.13
N$738.32
List Price:  N$2,771.26
You save:  N$2,032.94
C$1,470.07
List Price:  C$5,517.83
You save:  C$4,047.76
रु5,349.05
List Price:  रु20,077.37
You save:  रु14,728.31
S/149.47
List Price:  S/561.03
You save:  S/411.56
K154.47
List Price:  K579.82
You save:  K425.34
SAR149.87
List Price:  SAR562.56
You save:  SAR412.68
ZK1,042.84
List Price:  ZK3,914.27
You save:  ZK2,871.42
L182.92
List Price:  L686.60
You save:  L503.67
Kč933.70
List Price:  Kč3,504.62
You save:  Kč2,570.91
Ft14,381.08
List Price:  Ft53,978.55
You save:  Ft39,597.47
SEK kr431.31
List Price:  SEK kr1,618.92
You save:  SEK kr1,187.60
ARS$37,133.35
List Price:  ARS$139,377.89
You save:  ARS$102,244.53
Bs275.97
List Price:  Bs1,035.86
You save:  Bs759.88
COP$161,467.72
List Price:  COP$606,059.71
You save:  COP$444,591.99
₡21,118.70
List Price:  ₡79,267.84
You save:  ₡58,149.13
L989
List Price:  L3,712.17
You save:  L2,723.16
₲302,921.40
List Price:  ₲1,136,997.84
You save:  ₲834,076.44
$U1,608.54
List Price:  $U6,037.57
You save:  $U4,429.03
zł157.26
List Price:  zł590.27
You save:  zł433.01
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 the quiz on PCI rate protocol. In this quiz, I'll present a simple PCI master and target system. And in the lab will of course, learn about temporal domain assertions at sensitive assemble value functions, consecutive reputation, Boolean expressions, etc. So here's a very simple PCI system. So to say, PCI is a parallel bus compared to the latest PCI Express, which is a serial bus. So in this system, you will have a PCI master a PCI target and PCI protocol property This is where you will code your properties.

And under the test, we say protocol module all three are associated. So in system, the master drives or frame indicating the start of a cycle then if a service is ready meaning the initiator or master is ready, then it drives commands and vital levels while the target decodes the address put on the bus and assess device select if it has been selected, and then it says t ready to indicate that it is ready to receive or transmit data and then address and data bus which are obviously bi directional and then you have your reset and clock. Here's a simple PCI read protocol. PCI bus is a very complex bus and I have only chosen the right protocol for this spreads. So as I was saying, the transactions starts when frame is asserted low and when frame is asserted that PCI master will address and byte intervals on the bus, meaning they are qualified when crime is asserted low.

And then it would want to start transferring data, while target decodes the address that is put on the bus and considers itself selected if that was belongs to the target. And then once a Master says that I'm ready, that target may or may not be ready. So the next word target is not ready yet we are in great state. But the clock after that target said I'm ready. So at that time I ready is assert 811 is asserted and device elect is asserted and the data transfer takes place. Then target says I'm not ready for the next data transfer.

So it goes into a wait state and so on and so forth. So this is how data transfer takes place in a in a PCI system. So there are Five different checks that you need to call and these are very simple assertions and what are the things I like to say that when you look at this bus protocol, you can think of some other checks also that you would like to code. So, you can go beyond this five checks. So, the first check is that on falling at your frame address, a data bidirectional bus and command and vital revolvers cannot be unknown. So, sometimes, this simple assertion will catch many errors.

And then when both Iranian t radio are asserted, that ad again a dn CBE cannot be unknown. And then when frame can be D asserted only if it is asserted. So here, you look at the the frame the frame meaning the bus is over is is asserted going high only when I ready is still low. So, at this clock frame can be asserted only if I read is low and then I read he will complete the very next crop. So, we need to check for that ad t ready can be asserted only if device selected asserted so. So, here for example, this T ready cannot be asserted, if device select is not asserted.

So, T ready can be asserted only if device selected asserted. And finally, once the cycle starts that is the frame is asserted, command and byte interval bus cannot flow and it should remain in non flow condition until frame is d Ascetic. So, these are the five checks that we would like to code in this quiz. So let me show you a bit about the and all the files that you need are available on my website, which is defined here.com slash BNF. The lab files. This is the page where all the labs have input, meaning all the files that you can download.

So for this particular quiz, look for a Udemy lab PC protocol, and you will see all the files, the master target files as well as all the compile and run scripts that are on the page, simply download them and simulate them. So let me show you a few of the files, PCI master dot v. You really don't need to understand this file. This is just to show that there is a PCI master dot v module is a simple state machine. Customized basically to do a read transaction Then there is the PCI target.me which is which is reflective of the target module and again another simple state machine that completes basically a read cycle. And when you look at this code you may get a little outrageous, should I say confused because I have lots of if def and these if tariffs are there to introduce specific bugs into the design so that the assertion that your code can catch this bugs, then, then the next file is of interest to you.

So, here's the fine ready we'll call your assertions is called PCI protocol property dot v. So, it is fine just like in all the other quizzes, I have put in a dummy line meaning you are To delete this line and put the correct assertion that you need, everything else is given there for you, including the sampling edge, and assertion of property and everything, all you have to do is delete this line and put your particular assertion in there. And so that's true for Jacquard check to check three check for and check fi everywhere, simply delete this slide and put your code in there. And then there is the test, test PCI protocol module where I'm instantiating master target and the property module. And we are all connected via the airports. And then all I do is simply do a reset of the system. So let's see how how you would run this particular lab.

So, graded directory, whatever you want to call it. And then open PCI protocol property.sv that I just showed you this why and and remove the dummy line and put your code in there. And then after removing the dummy line and coding your assertion, you will you will do this for basically all the checks check 1234 and five now every time you change and add your assertion for example for check one, then run run underscore check one.do. Now this commands let me show you the file run check one dot two. Now this file is created all the commands are that for Cuesta mentors quest simulator, so if you had to use it cadence, incisive or synopsis vcas you will have to change the compile and simulation commands, but request Are you compiled with V log, and then you simulate with the VC. So you don't need to worry about how this file works.

All you do is inside the question simulator said do a run underscore check one.do and it will simulate and create the log file. The log file will be created a test PCI protocol check one dot log. Similarly, for check two, there's a do file check three, four and five there are do fives and each simulation will create either check one dot log check two dot log, and so on and so forth. So basically, this is how you simulate chain the PCI protocol property.sv for a given check, and then do run check one.do or for the other checks the same way. Now So that is how you can very simple all everything you need has been given to you. And now let's look at the solution.

So as I've said in my previous squeezes, even though I'm giving you the solution, at least tie my solution into the PCA protocol dot v phi by removing the Gumby line and at least code exactly what I have. I have shown here and again, rerun the run check one or two or the other.do files. So that way you can see in the submission log file that the the check and the assertion have fired and the bug have been detected. So the first check is on falling edge of frame address and command by Carnaval cannot be unknown. So it's a very simple assertion. All you have to do is add pauses of clock everything is based on the sampling as positive of a desirable if and only if reset.

And, like in every assertion that I've taught you during the course always try to figure out what the antecedent is. So, in this case everything seems to start for this particular check, but frame is asserted, meaning it goes from high to low. So whenever frame is a certain starting that clock overlapping operator, ad cannot be unknown, or CMV cannot be unknown. So that's it in a simple Boolean. With function, you can check to see whether address and command lines are not unknown. Now Believe me this is a very simple assertion, but when you start tackling your project rights are similar assertions and you'll be surprised how many bugs you'll find just with a simple assertion that jak two is when I read E and D ready or assert a that address and command cannot be in unknown state.

So, here the antecedent is that at bothers of law, if I ready is low and T ready is low, that address and command and vital level cannot be in a known state. So that's quoted this way. So here the antecedent is different from the check one antecedent, and the third is when frame frame can go higher only if I already is asserted. So again, the antecedent here is that if frame goes from zero to one, it means that at that time overlapping already is low. So if at all the frame goes high, and I ready Not low, either in the weight phase or data transfer phase, then it's about and again a simple assertion like this will check for the precept protocol very nicely. And similarly, check number four, where t ready can be asserted only if device electors asserted.

Now, this looks very benign. So, let me show you how you can make a mistake. So, T ready can be assert a bank t ready eight means that at that time device elect is also low. But in case you end up coding saying that if device elect is low than T ready is low thinking that is one in the same this is incorrect. Why? Because, if you you have to carefully look at the specification.

If device elect is low, then t ready may or may not be low and is not required. device can be selected but target may not be ready. So this if you just reverse these two signals, you are coding an incorrect assertion. When t ready is low, device select must be low, but when device select is low, it's not necessary the tea ready must be low. So read the specification very carefully, otherwise you will make mistakes in your own assertion. And check that once the cycle starts which is when the frame is asserted.

Command align should not flow until frame is yesterday. So we don't know when the frame is gonna be the asset and the cycle can be hundreds of clocks long. So the way to do this is again what is the antecedent antecedent is the assertion of frame so when Dollar fell frame and frame goes high to low commodity byte enable bugs cannot be unknown with a bang here until many this behavior should continue from now until forever until frame is the asserted meaning it goes from low to high. So, we have seen consecutive reputation operators in many examples and is one of the most powerful features of the language. So, again command right enable cannot be a node and this behavior this particular behavior should continue consecutively it should remain not unknown, until the way to read this is until frame is deserted. Now, in 2012 LRM there is an operator called until go make life even easier.

So, one of my suggestion would be To remove this particular line, this particular operator consecutive reputation operator and use until instead of these words here, put until and see how it works. So, again, these are very simple assertions. But just like with other quizzes, see if you can find more specifications for which you need to write assertions, and also try to write the same assertion with different operators. There is no one way to write an assertion. So that's pretty much it. It's a simple quiz.

All the files you need are available on my website. All the four quiz files are available on the website and for PCI protocols, they are here. Thank you.

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.