@@ -11,7 +11,7 @@ class CPUSingleCycle(
11
11
bitWidth : Int = 32 ,
12
12
instructionMemorySize : Int = 1 * 1024 ,
13
13
dataMemorySize : Int = 1 * 1024 ,
14
- numGPIO : Int = 8 ,
14
+ numGPIO : Int = 8
15
15
) extends Module {
16
16
val io = IO (new Bundle {
17
17
val GPIO0External = Analog (numGPIO.W ) // GPIO external port
@@ -69,7 +69,6 @@ class CPUSingleCycle(
69
69
memoryIOManager.io.UART0Port <> io.UART0Port
70
70
71
71
// --------------- CPU Control --------------- //
72
-
73
72
// State of the CPU Stall
74
73
stall := memoryIOManager.io.stall
75
74
when(! stall) {
@@ -98,7 +97,7 @@ class CPUSingleCycle(
98
97
ALU .io.ALUPort .b := Mux (
99
98
decoder.io.DecoderPort .use_imm,
100
99
decoder.io.DecoderPort .imm.asUInt,
101
- registerBank.io.regPort.rs2.asUInt,
100
+ registerBank.io.regPort.rs2.asUInt
102
101
)
103
102
104
103
registerBank.io.regPort.writeEnable := true .B
@@ -144,7 +143,7 @@ class CPUSingleCycle(
144
143
// Set PC to jump address
145
144
PC .io.pcPort.dataIn := Cat (
146
145
(registerBank.io.regPort.rs1 + decoder.io.DecoderPort .imm).asUInt()(31 , 1 ),
147
- 0 .U ,
146
+ 0 .U
148
147
)
149
148
}
150
149
}
@@ -190,7 +189,7 @@ class CPUSingleCycle(
190
189
dataSize := 2 .U
191
190
dataOut := Cat (
192
191
Fill (16 , memoryIOManager.io.MemoryIOPort .readData(15 )),
193
- memoryIOManager.io.MemoryIOPort .readData(15 , 0 ),
192
+ memoryIOManager.io.MemoryIOPort .readData(15 , 0 )
194
193
).asSInt
195
194
}
196
195
// Load Halfword Unsigned
@@ -203,7 +202,7 @@ class CPUSingleCycle(
203
202
dataSize := 1 .U
204
203
dataOut := Cat (
205
204
Fill (24 , memoryIOManager.io.MemoryIOPort .readData(7 )),
206
- memoryIOManager.io.MemoryIOPort .readData(7 , 0 ),
205
+ memoryIOManager.io.MemoryIOPort .readData(7 , 0 )
207
206
).asSInt
208
207
}
209
208
// Load Byte Unsigned
0 commit comments