File tree Expand file tree Collapse file tree 7 files changed +27
-25
lines changed Expand file tree Collapse file tree 7 files changed +27
-25
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import soc._
1313 */
1414class 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
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import chisel3._
88 */
99abstract 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}
Original file line number Diff line number Diff line change @@ -11,25 +11,8 @@ package soc
1111import chisel3 ._
1212import 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-
3114abstract 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/**
Original file line number Diff line number Diff line change 11package wishbone
22
33import 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 )))
You can’t perform that action at this time.
0 commit comments