Skip to content

Commit

Permalink
fix #381 Help proper interation of the JTAG FSM
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed May 21, 2024
1 parent 6b4e787 commit c3fe32b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/main/scala/spinal/lib/com/jtag/JtagTap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ case class Jtag(useTck : Boolean = true) extends Bundle with IMasterSlave {
//══════════════════════════════════════════════════════════════════════════════
// define Jtag States
//
object JtagState extends SpinalEnum {
object JtagState extends SpinalEnum(binarySequential) {
val RESET, IDLE,
IR_SELECT, IR_CAPTURE, IR_SHIFT, IR_EXIT1, IR_PAUSE, IR_EXIT2, IR_UPDATE,
DR_SELECT, DR_CAPTURE, DR_SHIFT, DR_EXIT1, DR_PAUSE, DR_EXIT2, DR_UPDATE
Expand All @@ -48,7 +48,7 @@ class JtagFsm(jtag: Jtag) extends Area {
val stateNext = JtagState()
val state = RegNext(stateNext) randBoot()
stateNext := state.mux(
default -> (jtag.tms ? RESET | IDLE), //RESET
RESET -> (jtag.tms ? RESET | IDLE),
IDLE -> (jtag.tms ? DR_SELECT | IDLE),
IR_SELECT -> (jtag.tms ? RESET | IR_CAPTURE),
IR_CAPTURE -> (jtag.tms ? IR_EXIT1 | IR_SHIFT),
Expand Down

0 comments on commit c3fe32b

Please sign in to comment.