Skip to content

Commit e1a20b9

Browse files
committed
Towards newer Chisel versions
1 parent 5274b6a commit e1a20b9

File tree

7 files changed

+12
-15
lines changed

7 files changed

+12
-15
lines changed

src/main/scala/arbiter/ArbiterTree.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package arbiter
22

33
import chisel3._
44
import chisel3.util._
5-
import chisel3.experimental.ChiselEnum
65

76

87
// Only one will be ready, as we cannot take two values

src/main/scala/debug/UartDebug.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package debug
33
import chisel.lib.uart._
44
import chisel3._
55
import chisel3.util._
6-
import chisel3.experimental.ChiselEnum
76

87
/**
98
* Poor mans debugger, using a UART instead of JTAG.

src/main/scala/s4noc/Network.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
package s4noc
88

99
import chisel3._
10-
import Const._
10+
import s4noc.Const._
1111

1212
/**
1313
* Create and connect a n x n NoC.

src/main/scala/s4noc/S4Router.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class S4Router[T <: Data](schedule: Array[Array[Int]], dt: T) extends Module {
2323

2424
// Just convert schedule table to a Chisel type table
2525
// unused slot is -1, convert to 0.U
26-
val sched = Wire(Vec(schedule.length, Vec(Const.NR_OF_PORTS, UInt(3.W))))
26+
val sched = Wire(Vec(schedule.length, Vec(s4noc.Const.NR_OF_PORTS, UInt(3.W))))
2727
for (i <- 0 until schedule.length) {
28-
for (j <- 0 until Const.NR_OF_PORTS) {
28+
for (j <- 0 until s4noc.Const.NR_OF_PORTS) {
2929
val s = schedule(i)(j)
30-
val v = if (s == -1) Const.INVALID else s
30+
val v = if (s == -1) s4noc.Const.INVALID else s
3131
sched(i)(j) := v.U(3.W)
3232
}
3333
}
@@ -38,9 +38,9 @@ class S4Router[T <: Data](schedule: Array[Array[Int]], dt: T) extends Module {
3838
// TODO: test if this movement of the register past the schedule table works, better here a register
3939
// val currentSched = RegNext(sched(regCounter))
4040

41-
for (j <- 0 until Const.NR_OF_PORTS) {
41+
for (j <- 0 until s4noc.Const.NR_OF_PORTS) {
4242
io.ports(j).out.data := RegNext(io.ports(currentSched(j)).in.data)
43-
io.ports(j).out.valid := RegNext(Mux(currentSched(j) === Const.INVALID.U, false.B, io.ports(currentSched(j)).in.valid), init = false.B)
43+
io.ports(j).out.valid := RegNext(Mux(currentSched(j) === s4noc.Const.INVALID.U, false.B, io.ports(currentSched(j)).in.valid), init = false.B)
4444
}
4545
}
4646

src/main/scala/s4noc/ScheduleHardware.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ import chisel3.util._
1515
class ScheduleHardware[T <: Data](schedule: Array[Array[Int]], dt: T) extends Module {
1616
val io = IO(new Bundle() {
1717
val in = Input(UInt(16.W))
18-
val out = Output(Vec(Const.NR_OF_PORTS, UInt(3.W)))
18+
val out = Output(Vec(s4noc.Const.NR_OF_PORTS, UInt(3.W)))
1919
})
2020

2121
// Just convert schedule table to a Chisel type table
2222
// unused slot is -1, convert to 0.U
23-
val sched = Wire(Vec(schedule.length, Vec(Const.NR_OF_PORTS, UInt(3.W))))
23+
val sched = Wire(Vec(schedule.length, Vec(s4noc.Const.NR_OF_PORTS, UInt(3.W))))
2424
for (i <- 0 until schedule.length) {
25-
for (j <- 0 until Const.NR_OF_PORTS) {
25+
for (j <- 0 until s4noc.Const.NR_OF_PORTS) {
2626
val s = schedule(i)(j)
27-
val v = if (s == -1) Const.INVALID else s
27+
val v = if (s == -1) s4noc.Const.INVALID else s
2828
sched(i)(j) := v.U(3.W)
2929
}
3030
}
3131

3232
val currentSched = sched(io.in)
3333

34-
for (j <- 0 until Const.NR_OF_PORTS) {
34+
for (j <- 0 until s4noc.Const.NR_OF_PORTS) {
3535
io.out(j) := currentSched(j)
3636
}
3737
}

src/main/scala/spi/SpiMaster.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package spi
22

33
import chisel3._
44
import chisel3.util._
5-
import chisel3.experimental.ChiselEnum
65

76

87
class SpiIO extends Bundle {

src/test/scala/s4noc/NetworkCompare.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import chiseltest._
1313
import org.scalatest.flatspec.AnyFlatSpec
1414

1515

16-
import Const._
16+
import s4noc.Const._
1717

1818
/**
1919
* A manually connected 2x2 NoC for testing.

0 commit comments

Comments
 (0)