em.tcl 833 B

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