# SPDX-License-Identifier: GPL-2.0-or-later

# Intel Cyclone III FPGA
# see Cyclone III Device Handbook
# Table 12-2: Device IDCODE for Cyclone III Device Family

#EP3C5     0x020f10dd
#EP3C10    0x020f10dd
#EP3C16    0x020f20dd
#EP3C25    0x020f30dd
#EP3C40    0x020f40dd
#EP3C55    0x020f50dd
#EP3C80    0x020f60dd
#EP3C120   0x020f70dd
#Cyclone III LS
#EP3CLS70  0x027010dd
#EP3CLS100 0x027000dd
#EP3CLS150 0x027030dd
#EP3CLS200 0x027020dd

if { [info exists CHIPNAME] } {
	set _CHIPNAME $CHIPNAME
} else {
	set _CHIPNAME cycloneiii
}

jtag newtap $_CHIPNAME tap -irlen 10 \
  -expected-id 0x020f10dd -expected-id 0x020f20dd \
  -expected-id 0x020f30dd -expected-id 0x020f40dd \
  -expected-id 0x020f50dd -expected-id 0x020f60dd \
  -expected-id 0x020f70dd -expected-id 0x027010dd \
  -expected-id 0x027000dd -expected-id 0x027030dd \
  -expected-id 0x027020dd

pld create $_CHIPNAME.pld intel -chain-position $_CHIPNAME.tap -family cycloneiii
