snps_hsdk_4xd.cfg 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # Copyright (C) 2023 Synopsys, Inc.
  3. # Artemiy Volkov <artemiy@synopsys.com>
  4. # Adapted from tcl/target/snps_hsdk.cfg.
  5. #
  6. # HS Development Kit SoC.
  7. #
  8. # Contains quad-core ARC HS47D.
  9. #
  10. source [find cpu/arc/hs.tcl]
  11. set _coreid 0
  12. set _dbgbase [expr {$_coreid << 13}]
  13. # CHIPNAME will be used to choose core family (600, 700 or EM). As far as
  14. # OpenOCD is concerned EM and HS are identical.
  15. set _CHIPNAME arc-em
  16. proc setup_cpu {core_index expected_id} {
  17. global _coreid
  18. global _dbgbase
  19. global _CHIPNAME
  20. set _TARGETNAME $_CHIPNAME.cpu$core_index
  21. jtag newtap $_CHIPNAME cpu$core_index -irlen 4 -ircapture 0x1 -expected-id $expected_id
  22. target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
  23. $_TARGETNAME configure -coreid $_coreid
  24. $_TARGETNAME configure -dbgbase $_dbgbase
  25. $_TARGETNAME configure -event reset-assert "arc_hs_reset $_TARGETNAME"
  26. arc_hs_init_regs
  27. $_TARGETNAME arc cache l2 auto 1
  28. set _coreid [expr {$_coreid + 1}]
  29. set _dbgbase [expr {$_coreid << 13}]
  30. }
  31. # OpenOCD discovers JTAG TAPs in reverse order.
  32. setup_cpu 4 0x100c54b1
  33. setup_cpu 3 0x100854b1
  34. setup_cpu 2 0x100454b1
  35. setup_cpu 1 0x100054b1