Skip to content

Commit a2e796c

Browse files
committed
soc: rename classes
1 parent 4a51800 commit a2e796c

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package s4noc
2+
3+
import chisel3._
4+
5+
import soc._
6+
7+
class PipeConDeviceS4NoC[T <: Data](private val addrWidth: Int, private val dt: T) extends PipeConDeviceRV(addrWidth, dt, true){
8+
9+
}

src/main/scala/s4noc/PipeConS4NoC.scala

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/main/scala/s4noc/S4NoCTop.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class S4NoCTop(conf: Config) extends Module {
1919

2020
val s4noc = Module(new S4NoC(conf))
2121
for (i <- 0 until conf.n) {
22-
val ci = Module(new PipeConS4NoC(4, Entry(UInt(conf.width.W))))
22+
val ci = Module(new PipeConDeviceS4NoC(4, Entry(UInt(conf.width.W))))
2323
s4noc.io.networkPort(i) <> ci.rv
2424
io.cpuPorts(i) <> ci.cpuPort
2525
}

src/main/scala/soc/HardwareLock.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import chisel3._
1313
*
1414
* Could be extended to a multicore lock.
1515
*/
16-
class HardwareLock() extends PipeCon(2) {
16+
class HardwareLock() extends PipeConDevice(2) {
1717

1818
val lockReg = RegInit(false.B)
1919
val ackReg = RegInit(false.B)

src/main/scala/soc/HelloDevice.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import chisel3._
99
*
1010
* @param coreId
1111
*/
12-
class HelloDevice(coreId: Int) extends PipeCon(3) {
12+
class HelloDevice(coreId: Int) extends PipeConDevice(3) {
1313

1414
// TODO: following five lines are duplicated in PipeConRV, back to PipeCon class?
1515
val addrReg = RegInit(0.U(3.W))

src/main/scala/soc/PipeCon.scala renamed to src/main/scala/soc/PipeConDevice.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import chisel3._
66
* Just a CPU interface, without any additional connection.
77
*
88
*/
9-
abstract class PipeCon(addrWidth: Int) extends Module {
9+
abstract class PipeConDevice(addrWidth: Int) extends Module {
1010

1111
val cpuPort = IO(new PipeConIO(addrWidth))
1212

src/main/scala/soc/PipeConRV.scala renamed to src/main/scala/soc/PipeConDeviceRV.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import s4noc.Entry
1515
* TODO: make it generic and do a subtype for s4noc
1616
* TODO: have some better tests
1717
*/
18-
class PipeConRV[T <: Data](private val addrWidth: Int, private val dt: T, s4noc: Boolean = false) extends PipeCon(addrWidth) {
18+
class PipeConDeviceRV[T <: Data](private val addrWidth: Int, private val dt: T, s4noc: Boolean = false) extends PipeConDevice(addrWidth) {
1919

2020
val rv = IO(new ReadyValidChannelsIO(dt))
2121

src/test/scala/soc/PipeConRVTest.scala renamed to src/test/scala/soc/PipeConDeviceRVTest.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import chiseltest._
77
import org.scalatest.flatspec.AnyFlatSpec
88
import s4noc.Entry
99

10-
class PipeConRVTest() extends AnyFlatSpec with ChiselScalatestTester {
10+
class PipeConDeviceRVTest() extends AnyFlatSpec with ChiselScalatestTester {
1111
behavior of "The CpuInterfaceRV"
1212

1313
it should "do something" in {
14-
test(new PipeConRV(4, UInt(32.W))).withAnnotations(Seq(WriteVcdAnnotation)) {
14+
test(new PipeConDeviceRV(4, UInt(32.W))).withAnnotations(Seq(WriteVcdAnnotation)) {
1515
d => {
1616

1717
def step() = d.clock.step()
@@ -82,8 +82,8 @@ class PipeConRVTest() extends AnyFlatSpec with ChiselScalatestTester {
8282
}
8383

8484
// Connect a CPU interface to a FIFO
85-
class MyModule() extends PipeCon(4) {
86-
val cpif = Module(new PipeConRV(4, UInt(32.W)))
85+
class MyModule() extends PipeConDevice(4) {
86+
val cpif = Module(new PipeConDeviceRV(4, UInt(32.W)))
8787
val fifo = Module(new BubbleFifo(UInt(32.W), 4))
8888
cpuPort <> cpif.cpuPort
8989
cpif.tx <> fifo.io.enq
@@ -119,8 +119,8 @@ class PipeConRVTest() extends AnyFlatSpec with ChiselScalatestTester {
119119
val cpA = new PipeConIO(4)
120120
val cpB = new PipeConIO(4)
121121
})
122-
val cpifA = Module(new PipeConRV(4, UInt(32.W)))
123-
val cpifB = Module(new PipeConRV(4, UInt(32.W)))
122+
val cpifA = Module(new PipeConDeviceRV(4, UInt(32.W)))
123+
val cpifB = Module(new PipeConDeviceRV(4, UInt(32.W)))
124124
val fifoA = Module(new MemFifo(UInt(32.W), 4))
125125
val fifoB = Module(new MemFifo(UInt(32.W), 4))
126126

@@ -200,8 +200,8 @@ class PipeConRVTest() extends AnyFlatSpec with ChiselScalatestTester {
200200
}
201201

202202
// Connect a CPU interface to a FIFO with Entry
203-
class MyModule3() extends PipeCon(4) {
204-
val cpif = Module(new PipeConRV(4, Entry(UInt(32.W)), true))
203+
class MyModule3() extends PipeConDevice(4) {
204+
val cpif = Module(new PipeConDeviceRV(4, Entry(UInt(32.W)), true))
205205
val fifo = Module(new BubbleFifo(Entry(UInt(32.W)), 4))
206206
cpuPort <> cpif.cpuPort
207207
cpif.tx <> fifo.io.enq

0 commit comments

Comments
 (0)