1 // See LICENSE for license details.
2 package sifive.blocks.devices.gpio
6 // ------------------------------------------------------------
7 // SPI, UART, etc are with their
8 // respective packages,
9 // This file is for those that don't seem to have a good place
10 // to put them otherwise.
11 // ------------------------------------------------------------
16 class JTAGPinsIO extends Bundle {
18 val TCK = new GPIOPin()
19 val TMS = new GPIOPin()
20 val TDI = new GPIOPin()
21 val TDO = new GPIOPin()
22 val TRSTn = new GPIOPin()
26 class JTAGGPIOPort()(implicit p: Parameters) extends Module {
29 // TODO: make this not hard-coded true.
30 val jtag = new JTAGIO(hasTRSTn = true)
31 val pins = new JTAGPinsIO()
34 io.jtag.TCK := GPIOInputPinCtrl(io.pins.TCK, pue = Bool(true)).asClock
35 io.jtag.TMS := GPIOInputPinCtrl(io.pins.TMS, pue = Bool(true))
36 io.jtag.TDI := GPIOInputPinCtrl(io.pins.TDI, pue = Bool(true))
37 io.jtag.TRSTn.get := GPIOInputPinCtrl(io.pins.TRSTn, pue = Bool(true))
39 GPIOOutputPinCtrl(io.pins.TDO, io.jtag.TDO.data)
40 io.pins.TDO.o.oe := io.jtag.TDO.driven