1
0
rocket-chip/src/main/scala/uncore
Megan Wachs 3dd51ff734 This commit adds Logic & test support for JTAG implementation of Debug Transport Module.
- The DebugTransportModuleJtag is written in Verilog. It probably could be written in
  Chisel except for some negative edge clocking requirement.
- For real implementations, the AsyncDebugBusTo/From is insufficient. This commit
  includes cases where they are used, but because they are not reset asynchronously,
  a Verilog 'AsyncMailbox' is used when p(AsyncDebug) is false.
- This commit differs significantly from the earlier attempt. Now, the
  DTM and synchronizer is instantiated within Top, as it is a real piece of
  hardware (vs. test infrastructure).
-TestHarness takes a parameter vs. creating an entirely new TestHarness class.
It does not make sense to instantiate TestHarness when p(IncludeJtagDTM) is false,
and it would not make sense to insantiate some other TestHarness if p(IncludeJtagDTM)
is true.

To build Verilog which includes the JtagDTM within Top:

make CONFIG=WithJtagDTM_...

To test using gdb->OpenOCD->jtag_vpi->Verilog:

First, install openocd (included in this commit)

./bootstrap
./configure --prefix=$OPENOCD --enable-jtag-vpi
make
make install

Then to run a simulation:

On a 32-bit core:

$(ROCKETCHIP)/riscv-tools/riscv-tests/debug/gdbserver.py \
  --run ./simv-TestHarness-WithJtagDTM_... \
  --cmd="$OPENOCD/bin/openocd --s $OPENOCD/share/openocd/scripts/" \
  --freedom-e300-sim \
  SimpleRegisterTest.test_s0

On a 64-bit core:

$(ROCKETCHIP)/riscv-tools/riscv-tests/debug/gdbserver.py \
  --run ./simv-TestHarness-WithJtagDTM_... \
  --cmd="$OPENOCD/bin/openocd --s $OPENOCD/share/openocd/scripts/" \
  --freedom-u500-sim \
  SimpleRegisterTest.test_s0
2016-08-19 16:08:31 -07:00
..
agents reorganize moving non-submodule packages into src/main/scala 2016-08-19 13:45:23 -07:00
coherence reorganize moving non-submodule packages into src/main/scala 2016-08-19 13:45:23 -07:00
converters reorganize moving non-submodule packages into src/main/scala 2016-08-19 13:45:23 -07:00
devices This commit adds Logic & test support for JTAG implementation of Debug Transport Module. 2016-08-19 16:08:31 -07:00
tilelink reorganize moving non-submodule packages into src/main/scala 2016-08-19 13:45:23 -07:00
unittests reorganize moving non-submodule packages into src/main/scala 2016-08-19 13:45:23 -07:00
util reorganize moving non-submodule packages into src/main/scala 2016-08-19 13:45:23 -07:00
Builder.scala reorganize moving non-submodule packages into src/main/scala 2016-08-19 13:45:23 -07:00
Consts.scala reorganize moving non-submodule packages into src/main/scala 2016-08-19 13:45:23 -07:00
Package.scala reorganize moving non-submodule packages into src/main/scala 2016-08-19 13:45:23 -07:00