Skip to content

Commit

Permalink
Remove Unused DANA Control Signals
Browse files Browse the repository at this point in the history
I've removed the following signals from the control request because they
are not used:
* ASID
* TID
* nodesInNextLayer
* currentNode
* nodesInCurrentLayer
* nodesInNextLayer
  • Loading branch information
seldridge committed Feb 21, 2016
1 parent 9bfeb4b commit 0a6e455
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
4 changes: 1 addition & 3 deletions src/main/scala/Cache.scala
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ class Cache extends DanaModule {
// Number of neurons in this layer
controlRespPipe(1).bits.data(0) :=
compressedLayers(controlRespPipe(0).bits.data(0))(12 + 10 - 1, 12)
// Number of neurons in the next layer
controlRespPipe(1).bits.data(1) :=
compressedLayers(controlRespPipe(0).bits.data(0))(22 + 10 - 1, 22)
// data(1) is currently unused
// Pointer to the first neuron
controlRespPipe(1).bits.data(2) :=
compressedLayers(controlRespPipe(0).bits.data(0))(12 - 1, 0)
Expand Down
8 changes: 3 additions & 5 deletions src/main/scala/Control.scala
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Control extends DanaModule {
io.cache.req.bits.layer := layer
io.cache.req.bits.location := location
}
def reqPETable(valid: Bool, cacheIndex: UInt, asid: UInt, tid: UInt,
def reqPETable(valid: Bool, cacheIndex: UInt,
tIdx: UInt, locationInput: UInt, locationOutput: UInt,
inputIndex: UInt, outputIndex: UInt, neuronPointer: UInt,
decimalPoint: UInt) {
Expand Down Expand Up @@ -120,7 +120,7 @@ class Control extends DanaModule {
io.cache.resp.ready := Bool(true) // [TODO] not correct
reqCache(Bool(false), UInt(0), UInt(0), UInt(0), UInt(0), UInt(0))
// io.petable defaults
reqPETable(Bool(false), UInt(0), UInt(0), UInt(0), UInt(0), UInt(0),
reqPETable(Bool(false), UInt(0), UInt(0), UInt(0),
UInt(0), UInt(0), UInt(0), UInt(0), UInt(0))
// io.regFile defaults
io.regFile.req.valid := Bool(false)
Expand Down Expand Up @@ -187,9 +187,7 @@ class Control extends DanaModule {
// The specific cache entry where the NN configuration for
// this PE is located
io.tTable.req.bits.cacheIndex, // cacheIndex
// Transaction Table index (ASID/TID) aren't needed?
io.tTable.req.bits.asid,
io.tTable.req.bits.tid,
// Table Index, no ASID/TID are used
io.tTable.req.bits.tableIndex,
// Clever input/output location determination
Mux(io.tTable.req.bits.inFirst, e_LOCATION_IO,
Expand Down
12 changes: 0 additions & 12 deletions src/main/scala/TransactionTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class TransactionState extends XFilesBundle {
val currentNodeInLayer = UInt(width = 16) // [TODO] fragile
val currentLayer = UInt(width = 16) // [TODO] fragile
val nodesInCurrentLayer = UInt(width = 16) // [TODO] fragile
val nodesInNextLayer = UInt(width = 16) // [TODO] fragile
val neuronPointer = UInt(width = 11) // [TODO] fragile
val countFeedback = UInt(width = feedbackWidth)
val countPeWrites = UInt(width = 16) // [TODO] fragile
Expand All @@ -47,14 +46,9 @@ class ControlReq extends XFilesBundle {
val tableIndex = UInt(width = log2Up(transactionTableNumEntries))
val cacheIndex = UInt(width = log2Up(cacheNumEntries))
val nnid = UInt(width = nnidWidth) // formerly nn_hash
val asid = UInt(width = asidWidth)
val tid = UInt(width = tidWidth)
// State info
val currentNode = UInt(width = 16) // [TODO] fragile
val currentNodeInLayer = UInt(width = 16) // [TODO] fragile
val currentLayer = UInt(width = 16) // [TODO] fragile
val nodesInCurrentLayer = UInt(width = 16) // [TODO] fragile
val nodesInNextLayer = UInt(width = 16) // [TODO] fragile
val neuronPointer = UInt(width = 11) // [TODO] fragile
val decimalPoint = UInt(width = decimalPointWidth)
}
Expand Down Expand Up @@ -292,7 +286,6 @@ class TransactionTable extends XFilesModule {
table(io.control.resp.bits.tableIndex).needsLayerInfo := Bool(false)
table(io.control.resp.bits.tableIndex).currentNodeInLayer := UInt(0)
table(io.control.resp.bits.tableIndex).nodesInCurrentLayer := io.control.resp.bits.data(0)
table(io.control.resp.bits.tableIndex).nodesInNextLayer := io.control.resp.bits.data(1)
table(io.control.resp.bits.tableIndex).neuronPointer := io.control.resp.bits.data(2)
// Update the inFirst and inLast Bools. The currentLayer
// should have already been updated when the request went out.
Expand Down Expand Up @@ -397,14 +390,9 @@ class TransactionTable extends XFilesModule {
entryArbiter.io.in(i).bits.tableIndex := UInt(i)
entryArbiter.io.in(i).bits.cacheIndex := table(i).cacheIndex
entryArbiter.io.in(i).bits.nnid := table(i).nnid
entryArbiter.io.in(i).bits.asid := table(i).asid
entryArbiter.io.in(i).bits.tid := table(i).tid
// State info
entryArbiter.io.in(i).bits.currentNode := table(i).currentNode
entryArbiter.io.in(i).bits.currentNodeInLayer := table(i).currentNodeInLayer
entryArbiter.io.in(i).bits.currentLayer := table(i).currentLayer
entryArbiter.io.in(i).bits.nodesInCurrentLayer :=table(i).nodesInCurrentLayer
entryArbiter.io.in(i).bits.nodesInNextLayer := table(i).nodesInNextLayer
entryArbiter.io.in(i).bits.neuronPointer := table(i).neuronPointer
entryArbiter.io.in(i).bits.decimalPoint := table(i).decimalPoint
}
Expand Down

0 comments on commit 0a6e455

Please sign in to comment.