snps_hsdk.cfg 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright (C) 2019,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. #
  7. # HS Development Kit SoC.
  8. #
  9. # Contains quad-core ARC HS38.
  10. #
  11. source [find cpu/arc/hs.tcl]
  12. set _coreid 0
  13. set _dbgbase [expr {$_coreid << 13}]
  14. # CHIPNAME will be used to choose core family (600, 700 or EM). As far as
  15. # OpenOCD is concerned EM and HS are identical.
  16. set _CHIPNAME arc-em
  17. # OpenOCD discovers JTAG TAPs in reverse order.
  18. # ARC HS38 core 4
  19. set _TARGETNAME $_CHIPNAME.cpu4
  20. jtag newtap $_CHIPNAME cpu4 -irlen 4 -ircapture 0x1 -expected-id 0x200c24b1
  21. target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
  22. $_TARGETNAME configure -coreid $_coreid
  23. $_TARGETNAME configure -dbgbase $_dbgbase
  24. # Flush L2$.
  25. $_TARGETNAME configure -event reset-assert "arc_hs_reset $_TARGETNAME"
  26. set _coreid [expr {$_coreid + 1}]
  27. set _dbgbase [expr {$_coreid << 13}]
  28. arc_hs_init_regs
  29. # Enable L2 cache support for core 4.
  30. $_TARGETNAME arc cache l2 auto 1
  31. # ARC HS38 core 3
  32. set _TARGETNAME $_CHIPNAME.cpu3
  33. jtag newtap $_CHIPNAME cpu3 -irlen 4 -ircapture 0x1 -expected-id 0x200824b1
  34. target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
  35. $_TARGETNAME configure -coreid $_coreid
  36. $_TARGETNAME configure -dbgbase $_dbgbase
  37. $_TARGETNAME configure -event reset-assert "arc_common_reset $_TARGETNAME"
  38. set _coreid [expr {$_coreid + 1}]
  39. set _dbgbase [expr {$_coreid << 13}]
  40. arc_hs_init_regs
  41. # Enable L2 cache support for core 3.
  42. $_TARGETNAME arc cache l2 auto 1
  43. # ARC HS38 core 2
  44. set _TARGETNAME $_CHIPNAME.cpu2
  45. jtag newtap $_CHIPNAME cpu2 -irlen 4 -ircapture 0x1 -expected-id 0x200424b1
  46. target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
  47. $_TARGETNAME configure -coreid $_coreid
  48. $_TARGETNAME configure -dbgbase $_dbgbase
  49. $_TARGETNAME configure -event reset-assert "arc_common_reset $_TARGETNAME"
  50. set _coreid [expr {$_coreid + 1}]
  51. set _dbgbase [expr {$_coreid << 13}]
  52. arc_hs_init_regs
  53. # Enable L2 cache support for core 2.
  54. $_TARGETNAME arc cache l2 auto 1
  55. # ARC HS38 core 1
  56. set _TARGETNAME $_CHIPNAME.cpu1
  57. jtag newtap $_CHIPNAME cpu1 -irlen 4 -ircapture 0x1 -expected-id 0x200024b1
  58. target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
  59. $_TARGETNAME configure -coreid $_coreid
  60. $_TARGETNAME configure -dbgbase $_dbgbase
  61. $_TARGETNAME configure -event reset-assert "arc_common_reset $_TARGETNAME"
  62. set _coreid [expr {$_coreid + 1}]
  63. set _dbgbase [expr {0x00000000 | ($_coreid << 13)}]
  64. arc_hs_init_regs
  65. # Enable L2 cache support for core 1.
  66. $_TARGETNAME arc cache l2 auto 1