Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 2.1_first_module.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "import chisel3._\nimport chisel3.util._\nimport chisel3.tester._\nimport chisel3.tester.RawTester.test"
"source": "import chisel3._\nimport chisel3.util._\nimport chiseltest._\nimport chiseltest.RawTester.test"
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -376,4 +376,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
6 changes: 3 additions & 3 deletions 2.2_comb_logic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
Expand Down Expand Up @@ -503,4 +503,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
4 changes: 2 additions & 2 deletions 2.3_control_flow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions 2.4_sequential_logic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions 2.5_exercise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
Expand Down
38 changes: 7 additions & 31 deletions 2.6_chiseltest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@
"import chisel3.util._\n",
"import chisel3.experimental._\n",
"import chisel3.experimental.BundleLiterals._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
">This bootcamp requires some slight differences from the imports you might see \n",
"elsewhere for chisel. The `import chisel3.tester.RawTester.test` brings in \n",
"elsewhere for chisel. The `import chiseltest.RawTester.test` brings in \n",
"version of `test(...)` below that is designed specifically for the bootcamp"
]
},
Expand Down Expand Up @@ -194,15 +194,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Modules with Decoupled Interfaces\n",
"In this section we will look at some of the tester2's tools for working with `Decoupled` interfaces.\n",
"`Decoupled` takes a chisel data type and provides it with `ready` and `valid` signals.\n",
"ChiselTest provides some nice tools for automating and reliably testing these interfaces.\n",
"\n",
"## A queue example\n",
"The `QueueModule` passes through data whose type is determined by `ioType`. There are `entries` state elements inside the `QueueModule` meaning it can hold that many elements before it exerts backpressure."
]
"source": "# Modules with Decoupled Interfaces\nIn this section we will look at some of ChiselTest's tools for working with `Decoupled` interfaces.\n`Decoupled` takes a chisel data type and provides it with `ready` and `valid` signals.\nChiselTest provides some nice tools for automating and reliably testing these interfaces.\n\n## A queue example\nThe `QueueModule` passes through data whose type is determined by `ioType`. There are `entries` state elements inside the `QueueModule` meaning it can hold that many elements before it exerts backpressure."
},
{
"cell_type": "code",
Expand Down Expand Up @@ -295,11 +287,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> One more important take away from the last section is that the functions we just saw, `enqueueNow`, \n",
"`enqueueSeq`, `expectDequeueNow`, and `expectDequeueSeq` are not complicated special case logic in ChiselTest.\n",
"Rather they are examples of the kinds of harness building that ChiselTest encourages you to build from the ChiselTest primitives. To see how these methods are implemented check out [TestAdapters.scala](https://github.com/ucb-bar/chisel-testers2/blob/d199c5908828d0be5245f55fce8a872b2afb314e/src/main/scala/chisel3/tester/TestAdapters.scala)"
]
"source": "> One more important take away from the last section is that the functions we just saw, `enqueueNow`, \n`enqueueSeq`, `expectDequeueNow`, and `expectDequeueSeq` are not complicated special case logic in ChiselTest.\nRather they are examples of the kinds of harness building that ChiselTest encourages you to build from the ChiselTest primitives. To see how these methods are implemented check out [TestAdapters.scala](https://github.com/ucb-bar/chiseltest/blob/main/src/main/scala/chiseltest/TestAdapters.scala)"
},
{
"cell_type": "markdown",
Expand All @@ -311,19 +299,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this section we will look at running sections of a unit test concurrently. In order to do this we will introduce two new features of testers2.\n",
"\n",
"| method | description |\n",
"| :--- | :--- |\n",
"| fork | launches a concurrent code block, additional forks can be run concurrently to this one via the .fork appended to end of the code block of the preceeding fork |\n",
"| join | re-unites multiple related forks back into the calling thread |\n",
"---\n",
"\n",
"In the example below two `fork`s are chained together, and then `join`ed. In the first `fork` block the `enqueueSeq` will continue to add elements until exhausted. The second `fork` block will `expectDequeueSeq` on each cycle when data is available.\n",
"\n",
">The threads created by fork are run in a deterministic order, largely according to their order as specified in code, and certain bug-prone operations that depend on other threads are forbidden with runtime checks. \n"
]
"source": "In this section we will look at running sections of a unit test concurrently. In order to do this we will introduce two new features of ChiselTest.\n\n| method | description |\n| :--- | :--- |\n| fork | launches a concurrent code block, additional forks can be run concurrently to this one via the .fork appended to end of the code block of the preceeding fork |\n| join | re-unites multiple related forks back into the calling thread |\n---\n\nIn the example below two `fork`s are chained together, and then `join`ed. In the first `fork` block the `enqueueSeq` will continue to add elements until exhausted. The second `fork` block will `expectDequeueSeq` on each cycle when data is available.\n\n>The threads created by fork are run in a deterministic order, largely according to their order as specified in code, and certain bug-prone operations that depend on other threads are forbidden with runtime checks. "
},
{
"cell_type": "code",
Expand Down Expand Up @@ -526,4 +502,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
6 changes: 3 additions & 3 deletions 3.1_parameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
Expand Down Expand Up @@ -959,4 +959,4 @@
},
"nbformat": 4,
"nbformat_minor": 1
}
}
6 changes: 3 additions & 3 deletions 3.2_collections.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test\n",
"import chiseltest._\n",
"import chiseltest.RawTester.test\n",
"import scala.collection._"
]
},
Expand Down Expand Up @@ -607,4 +607,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
4 changes: 2 additions & 2 deletions 3.2_interlude.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions 3.3_higher-order_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
Expand Down Expand Up @@ -401,4 +401,4 @@
},
"nbformat": 4,
"nbformat_minor": 1
}
}
6 changes: 3 additions & 3 deletions 3.4_functional_programming.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test\n",
"import chiseltest._\n",
"import chiseltest.RawTester.test\n",
"import chisel3.experimental._\n",
"import chisel3.internal.firrtl.KnownBinaryPoint"
]
Expand Down Expand Up @@ -620,4 +620,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
6 changes: 3 additions & 3 deletions 3.5_object_oriented_programming.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.experimental._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
Expand Down Expand Up @@ -501,4 +501,4 @@
},
"nbformat": 4,
"nbformat_minor": 1
}
}
4 changes: 2 additions & 2 deletions 3.6_types.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"source": [
"import chisel3._\n",
"import chisel3.util._\n",
"import chisel3.tester._\n",
"import chisel3.tester.RawTester.test"
"import chiseltest._\n",
"import chiseltest.RawTester.test"
]
},
{
Expand Down
Loading