projects
/
sifive-blocks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c47cc4
)
JTAG: make TRSTn optional for all helpers as well to match the IO.
author
Megan Wachs
<megan@sifive.com>
Sat, 25 Mar 2017 00:27:55 +0000
(17:27 -0700)
committer
Megan Wachs
<megan@sifive.com>
Sat, 25 Mar 2017 00:27:55 +0000
(17:27 -0700)
src/main/scala/devices/gpio/JTAG.scala
patch
|
blob
|
history
diff --git
a/src/main/scala/devices/gpio/JTAG.scala
b/src/main/scala/devices/gpio/JTAG.scala
index 947955f646ee0757c0160db4b1f40095da91b929..ba40bc663709e102d79d0a638185eedae2d4e8f7 100644
(file)
--- a/
src/main/scala/devices/gpio/JTAG.scala
+++ b/
src/main/scala/devices/gpio/JTAG.scala
@@
-13,28
+13,28
@@
import Chisel._
import config._
import jtag.{JTAGIO}
import config._
import jtag.{JTAGIO}
-class JTAGPinsIO extends Bundle {
+class JTAGPinsIO
(hasTRSTn: Boolean = true)
extends Bundle {
val TCK = new GPIOPin()
val TMS = new GPIOPin()
val TDI = new GPIOPin()
val TDO = new GPIOPin()
val TCK = new GPIOPin()
val TMS = new GPIOPin()
val TDI = new GPIOPin()
val TDO = new GPIOPin()
- val TRSTn =
new GPIOPin()
+ val TRSTn =
if (hasTRSTn) Option(new GPIOPin()) else None
}
}
-class JTAGGPIOPort()(implicit p: Parameters) extends Module {
+class JTAGGPIOPort(
hasTRSTn: Boolean = true
)(implicit p: Parameters) extends Module {
val io = new Bundle {
// TODO: make this not hard-coded true.
val io = new Bundle {
// TODO: make this not hard-coded true.
- val jtag = new JTAGIO(hasTRSTn
= true
)
- val pins = new JTAGPinsIO()
+ val jtag = new JTAGIO(hasTRSTn)
+ val pins = new JTAGPinsIO(
hasTRSTn
)
}
io.jtag.TCK := GPIOInputPinCtrl(io.pins.TCK, pue = Bool(true)).asClock
io.jtag.TMS := GPIOInputPinCtrl(io.pins.TMS, pue = Bool(true))
io.jtag.TDI := GPIOInputPinCtrl(io.pins.TDI, pue = Bool(true))
}
io.jtag.TCK := GPIOInputPinCtrl(io.pins.TCK, pue = Bool(true)).asClock
io.jtag.TMS := GPIOInputPinCtrl(io.pins.TMS, pue = Bool(true))
io.jtag.TDI := GPIOInputPinCtrl(io.pins.TDI, pue = Bool(true))
- io.jtag.TRSTn.
get := GPIOInputPinCtrl(io.pins.TRSTn, pue = Bool(true))
+ io.jtag.TRSTn.
foreach{t => t := GPIOInputPinCtrl(io.pins.TRSTn.get, pue = Bool(true))}
GPIOOutputPinCtrl(io.pins.TDO, io.jtag.TDO.data)
io.pins.TDO.o.oe := io.jtag.TDO.driven
GPIOOutputPinCtrl(io.pins.TDO, io.jtag.TDO.data)
io.pins.TDO.o.oe := io.jtag.TDO.driven