Skip to content

Commit d715bba

Browse files
authored
Removed usage of case class to maintain consistency (freechipsproject#168)
1 parent a064e05 commit d715bba

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

2.6_chiseltest.ipynb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,21 +210,13 @@
210210
"metadata": {},
211211
"outputs": [],
212212
"source": [
213-
"case class QueueModule[T <: Data](ioType: T, entries: Int) extends MultiIOModule {\n",
213+
"class QueueModule[T <: Data](ioType: T, entries: Int) extends MultiIOModule {\n",
214214
" val in = IO(Flipped(Decoupled(ioType)))\n",
215215
" val out = IO(Decoupled(ioType))\n",
216216
" out <> Queue(in, entries)\n",
217217
"}"
218218
]
219219
},
220-
{
221-
"cell_type": "markdown",
222-
"metadata": {},
223-
"source": [
224-
"> Note the `case` class modifer is not generally required but seems to be in order for\n",
225-
"this example to be re-used in multiple cells in Jupyter"
226-
]
227-
},
228220
{
229221
"cell_type": "markdown",
230222
"metadata": {},
@@ -249,7 +241,7 @@
249241
"metadata": {},
250242
"outputs": [],
251243
"source": [
252-
"test(QueueModule(UInt(9.W), entries = 200)) { c =>\n",
244+
"test(new QueueModule(UInt(9.W), entries = 200)) { c =>\n",
253245
" // Example testsequence showing the use and behavior of Queue\n",
254246
" c.in.initSource()\n",
255247
" c.in.setSourceClock(c.clock)\n",
@@ -286,7 +278,7 @@
286278
"metadata": {},
287279
"outputs": [],
288280
"source": [
289-
"test(QueueModule(UInt(9.W), entries = 200)) { c =>\n",
281+
"test(new QueueModule(UInt(9.W), entries = 200)) { c =>\n",
290282
" // Example testsequence showing the use and behavior of Queue\n",
291283
" c.in.initSource()\n",
292284
" c.in.setSourceClock(c.clock)\n",
@@ -339,7 +331,7 @@
339331
"metadata": {},
340332
"outputs": [],
341333
"source": [
342-
"test(QueueModule(UInt(9.W), entries = 200)) { c =>\n",
334+
"test(new QueueModule(UInt(9.W), entries = 200)) { c =>\n",
343335
" // Example testsequence showing the use and behavior of Queue\n",
344336
" c.in.initSource()\n",
345337
" c.in.setSourceClock(c.clock)\n",

0 commit comments

Comments
 (0)