@@ -21,7 +21,7 @@ third-party components and libraries, code written by other people. To do this
2121we use a tool called a ** package manager** . In the ** Process Design Team** , the
2222package manager we use is called [ vcpkg] ( https://vcpkg.io/ ) . While ` vcpkg ` is
2323nominally a package manager for C/C++ projects, it's suitable to be used with
24- any collection of files including with our System Verilog projects.
24+ any collection of files including with our SystemVerilog projects.
2525
2626One of the dependencies we'll be interested in for the purposes of verification
2727will be a test framework. A test framework provides utilities for running and
@@ -43,28 +43,29 @@ not yet written. We will need to add it ourselves.
4343## Registries
4444
4545A ** registry** is a collection of information about ** packages** , where packages
46- are the source code files (System Verilog , C++, or even cmake files) that we wish
46+ are the source code files (SystemVerilog , C++, or even cmake files) that we wish
4747to use in our project. We keep track of the registries we're using in a given
48- project with the ` vcpkg-configuration .json ` file.
48+ project with the ` vcpkg.json ` file.
4949
50- If you look at the ` vcpkg-configuration .json ` file in the Lab 4 repo, you will
51- find something that looks like the following:
50+ If you look at the ` vcpkg.json ` file in the Lab 4 repo, you will
51+ find something that looks like the following under ` "vcpkg-configuration" ` :
5252
5353```
5454{
5555 "default-registry": {
5656 "kind": "git",
57- "baseline": "b4f29c54450ddfc7efd2989cb9d32158ae291b40 ",
57+ "baseline": "6046e48163a26252f7a8f4aa036cbdd9eb793c20 ",
5858 "repository": "https://github.com/microsoft/vcpkg.git"
5959 },
6060 "registries": []
6161}
6262```
6363
64- This is a registry listing, a json file that tells ` vcpkg ` where to look for
64+ This is a registry listing, a json object that tells ` vcpkg ` where to look for
6565packages. In this case, the only registry listed is the ` default-registry ` ,
6666which is where ` vcpkg ` will search if a requested package is not listed for
67- any other registry. Here the ` default-registry ` is pointed at a git repo managed by Microsoft, which has many useful packages in it. The ` registries ` list, which
67+ any other registry. Here the ` default-registry ` is pointed at a git repo managed
68+ by Microsoft, which has many useful packages in it. The ` registries ` list, which
6869would contain all other registries we wish to use, is empty.
6970
7071We will need to add a registry to the registry list. The required fields for a
@@ -116,8 +117,8 @@ tells `vcpkg` that this registry will provide every package that begins with
116117
117118## Dependencies
118119
119- Now take a look at ` vcpkg.json ` , this file describes our project. It should
120- look something like this:
120+ Now take a look at the rest of ` vcpkg.json ` , this file describes our project. It
121+ should look something like this:
121122
122123```
123124{
@@ -129,7 +130,10 @@ look something like this:
129130 "Vito Gamberini <[email protected] >" 130131 ],
131132 "license": "CC0-1.0",
132- "dependencies": []
133+ "dependencies": [],
134+ "vcpkg-configuration": {
135+ ...
136+ }
133137}
134138```
135139
@@ -139,7 +143,7 @@ where we'll list the packages we need `vcpkg` to fetch for us.
139143The packages we'll need for this lab are:
140144
141145* ` nyu-cmake ` : Utility functions for ` cmake ` . These functions make working with
142- System Verilog more convenient
146+ SystemVerilog more convenient
143147
144148* ` catch2 ` : The catch2 test framework mentioned above
145149
@@ -179,8 +183,8 @@ We're actually going to create a special kind of library called an ***interface
179183library*** . This differs slightly from a "normal" library because an interface
180184library can consist of code and files that aren't compiled immediately.
181185
182- Our System Verilog files cannot be compiled directly, so they're a good fit for
183- this style of library. To create our System Verilog library, add the following
186+ Our SystemVerilog files cannot be compiled directly, so they're a good fit for
187+ this style of library. To create our SystemVerilog library, add the following
184188line to the CML:
185189
186190``` cmake
@@ -205,7 +209,7 @@ Now we can add code to the `rtl/CMakeLists.txt` file, and it will be run by
205209` cmake ` when it reaches the ` add_subdirectory() ` command.
206210
207211One of the important commands that the ` nyu-cmake ` package gives us is
208- ` nyu_add_sv() ` , which lets us associate System Verilog files with a library (or
212+ ` nyu_add_sv() ` , which lets us associate SystemVerilog files with a library (or
209213any other ` cmake ` "target").
210214
211215In the ` rtl ` CML file, add the following lines:
@@ -286,18 +290,18 @@ use the `add_executable()` command to create an executable named `tests` and
286290the ` target_sources() ` command to add all the ` .cpp ` files in the ` dv ` directory
287291as sources.
288292
289- We also need to associate the ` lab4 ` System Verilog library to our executable.
293+ We also need to associate the ` lab4 ` SystemVerilog library to our executable.
290294We do this with the following command from the ` nyu-util ` package:
291295
292296``` cmake
293297nyu_link_sv(tests PRIVATE lab4)
294298```
295299
296- This takes all the System Verilog files we associated with the ` lab4 ` library,
300+ This takes all the SystemVerilog files we associated with the ` lab4 ` library,
297301and also associates them with our ` tests ` executable. But we still need to tell
298302` cmake ` what to do with these files.
299303
300- To transform a System Verilog file into a _ model_ , like the ones in Lab2 and
304+ To transform a SystemVerilog file into a _ model_ , like the ones in Lab2 and
301305Lab3, we need to tell the ` verilator ` tool which modules we would like to be
302306exposed for simulation. These exposed modules are called *** top modules*** , and
303307we'll need to tell ` cmake ` and ` verilator ` about them explicitly.
@@ -391,7 +395,7 @@ it using the same procedure used for the previous two labs.
391395* What is a package?
392396
393397* What's the difference between an interface library and a "normal" library or
394- executable? Can you think of any uses for this besides System Verilog files?
398+ executable? Can you think of any uses for this besides SystemVerilog files?
395399(Think about source code used for generic programming)
396400
397401* What is a top module?
0 commit comments