Skip to content

Commit 36c22cf

Browse files
committed
soc: rename classes
1 parent a2e796c commit 36c22cf

File tree

7 files changed

+27
-25
lines changed

7 files changed

+27
-25
lines changed

src/main/scala/s4noc/S4NoCTop.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import soc._
1313
*/
1414
class S4NoCTop(conf: Config) extends Module {
1515
val io = IO(new Bundle {
16-
val cpuPorts = Vec(conf.n, new PipeConIO(4)) // TODO: shall we use MultiCoreDevice here?
16+
val cpuPorts = Vec(conf.n, new PipeCon(4)) // TODO: shall we use MultiCoreDevice here?
1717
val cycCnt = Output(UInt(32.W))
1818
})
1919

src/main/scala/soc/PipeCon.scala

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package soc
2+
3+
import chisel3._
4+
/**
5+
* A simple IO interface, as seen from the slave.
6+
* ack is used for acknowledgement in the following clock cycle, or later. (like OCPcore in Patmos).
7+
* Can be used to stall the CPU.
8+
*
9+
* @param addrWidth width of the address part
10+
*/
11+
class PipeCon(private val addrWidth: Int) extends Bundle {
12+
val address = Input(UInt(addrWidth.W))
13+
val rd = Input(Bool())
14+
val wr = Input(Bool())
15+
val rdData = Output(UInt(32.W))
16+
val wrData = Input(UInt(32.W))
17+
val wrMask = Input(UInt(4.W))
18+
val ack = Output(Bool())
19+
}

src/main/scala/soc/PipeConDevice.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import chisel3._
88
*/
99
abstract class PipeConDevice(addrWidth: Int) extends Module {
1010

11-
val cpuPort = IO(new PipeConIO(addrWidth))
11+
val cpuPort = IO(new PipeCon(addrWidth))
1212

1313
assert(addrWidth >= 2, "Address width needs some size for byte addresses")
1414
}

src/main/scala/soc/ports.scala

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,8 @@ package soc
1111
import chisel3._
1212
import chisel3.util.DecoupledIO
1313

14-
/**
15-
* A simple IO interface, as seen from the slave.
16-
* ack is used for acknowledgement in the following clock cycle, or later. (like OCPcore in Patmos).
17-
* Can be used to stall the CPU.
18-
*
19-
* @param addrWidth width of the address part
20-
*/
21-
class PipeConIO(private val addrWidth: Int) extends Bundle {
22-
val address = Input(UInt(addrWidth.W))
23-
val rd = Input(Bool())
24-
val wr = Input(Bool())
25-
val rdData = Output(UInt(32.W))
26-
val wrData = Input(UInt(32.W))
27-
val wrMask = Input(UInt(4.W))
28-
val ack = Output(Bool())
29-
}
30-
3114
abstract class MultiCoreDevice(nrCores: Int, addrWidth: Int) extends Module {
32-
val ports = IO(Vec(nrCores, new PipeConIO(addrWidth)))
15+
val ports = IO(Vec(nrCores, new PipeCon(addrWidth)))
3316
}
3417

3518
/**

src/main/scala/wishbone/Wrapper.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package wishbone
22

33
import chisel3._
4-
import soc.PipeConIO
4+
import soc.PipeCon
55

66
/**
77
* A Wishbone wrapper for the our PipeCon interface.
@@ -11,7 +11,7 @@ class Wrapper(addrWidth: Int) extends WishboneDevice(addrWidth) {
1111

1212
// TODO: rename to PipeConIO at some point
1313
val cpuIf = IO(new Bundle {
14-
val cpuPort = Flipped(new PipeConIO(addrWidth))
14+
val cpuPort = Flipped(new PipeCon(addrWidth))
1515
})
1616
val cp = cpuIf.cpuPort
1717
val wb = io.port

src/test/scala/soc/MemoryMappedIOHelper.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import chiseltest._
77
* @param mmio
88
* @param clock
99
*/
10-
class MemoryMappedIOHelper(mmio: PipeConIO, clock: Clock) {
10+
class MemoryMappedIOHelper(mmio: PipeCon, clock: Clock) {
1111

1212
private var clockCnt = 0
1313

src/test/scala/soc/PipeConDeviceRVTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ class PipeConDeviceRVTest() extends AnyFlatSpec with ChiselScalatestTester {
116116
// Connect two CPU interfaces to two FIFOs
117117
class MyModule2() extends Module {
118118
val io = IO(new Bundle {
119-
val cpA = new PipeConIO(4)
120-
val cpB = new PipeConIO(4)
119+
val cpA = new PipeCon(4)
120+
val cpB = new PipeCon(4)
121121
})
122122
val cpifA = Module(new PipeConDeviceRV(4, UInt(32.W)))
123123
val cpifB = Module(new PipeConDeviceRV(4, UInt(32.W)))

0 commit comments

Comments
 (0)