Skip to content

Commit 3442833

Browse files
Add tasks and move over verilog generation
1 parent d5e148a commit 3442833

4 files changed

Lines changed: 38 additions & 15 deletions

File tree

.vscode/tasks.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Test",
6+
"command": "sbt run test",
7+
"type": "shell",
8+
"args": [],
9+
"problemMatcher": [],
10+
"presentation": {
11+
"reveal": "always"
12+
},
13+
"group": "build"
14+
}
15+
]
16+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package RISCV
2+
3+
import chisel3._
4+
import _root_.circt.stage.ChiselStage
5+
import scala.math._
6+
7+
/**
8+
* Object to generate Verilog/SystemVerilog for the module.
9+
* Customize firtoolOpts if needed.
10+
*/
11+
12+
object EmitVerilog extends App {
13+
// ChiselStage.emitSystemVerilogFile(
14+
// new Registers(),
15+
// firtoolOpts = Array(
16+
// "-disable-all-randomization",
17+
// "-strip-debug-info",
18+
// "-default-layer-specialization=enable"
19+
// )
20+
// )
21+
}

src/main/scala/RISCV/Hart.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import scala.math._
99
*
1010
* @param width Bit width (default: 32 bits)
1111
*/
12+
1213
class Hart(val width: Int = 32) extends Module {
1314
val io = IO(new Bundle {})
1415

src/main/scala/RISCV/Registers.scala

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,3 @@ class Registers(val width: Int = 32, val nreg: Int = 5) extends Module {
3434
regs(io.select) := io.in
3535
}
3636
}
37-
38-
/**
39-
* Object to generate Verilog/SystemVerilog for the module.
40-
* Customize firtoolOpts if needed.
41-
*/
42-
object Registers extends App {
43-
ChiselStage.emitSystemVerilogFile(
44-
new Registers(),
45-
firtoolOpts = Array(
46-
"-disable-all-randomization",
47-
"-strip-debug-info",
48-
"-default-layer-specialization=enable"
49-
)
50-
)
51-
}

0 commit comments

Comments
 (0)