em.tcl 834 B

1234567891011121314151617181920212223242526272829303132
  1. # Copyright (C) 2015, 2020 Synopsys, Inc.
  2. # Anton Kolesov <anton.kolesov@synopsys.com>
  3. # Didin Evgeniy <didin@synopsys.com>
  4. #
  5. # SPDX-License-Identifier: GPL-2.0-or-later
  6. source [find cpu/arc/v2.tcl]
  7. proc arc_em_examine_target { {target ""} } {
  8. # Will set current target
  9. arc_v2_examine_target $target
  10. }
  11. proc arc_em_init_regs { } {
  12. arc_v2_init_regs
  13. [target current] configure \
  14. -event examine-end "arc_em_examine_target [target current]"
  15. }
  16. # Scripts in "target" folder should call this function instead of direct
  17. # invocation of arc_common_reset.
  18. proc arc_em_reset { {target ""} } {
  19. arc_v2_reset $target
  20. # Set DEBUG.ED bit to enable clock in actionpoint module.
  21. # This is specific to ARC EM.
  22. set debug [arc jtag get-aux-reg 5]
  23. if { !($debug & (1 << 20)) } {
  24. arc jtag set-aux-reg 5 [expr {$debug | (1 << 20)}]
  25. }
  26. }