Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: afd0a89dd45f
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6184d6d5c7bd
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Mar 10, 2019

  1. Copy the full SHA
    a1d26ba View commit details
  2. Copy the full SHA
    6184d6d View commit details
Showing with 11 additions and 7 deletions.
  1. +11 −7 software/glasgow/applet/program/xc9500xl/__init__.py
18 changes: 11 additions & 7 deletions software/glasgow/applet/program/xc9500xl/__init__.py
Original file line number Diff line number Diff line change
@@ -288,7 +288,7 @@ async def identify(self):
xc95xx_iface = None
else:
xc95xx_iface = XC95xxXLInterface(self.lower, self._logger, self._frequency, device)
return idcode, xc95xx_iface
return idcode, device, xc95xx_iface

async def read_usercode(self):
await self.lower.write_ir(IR_USERCODE)
@@ -339,7 +339,7 @@ async def _fvfy(self, address, count):
isconf_bits = await self.lower.exchange_dr(isconf.to_bitarray())
isconf = self.DR_ISCONFIGURATION.from_bitarray(isconf_bits)
self._log("read address=%03x prev-data=%s",
dev_address, "{:0{}b}".format(self.device.word_width, isconf.data))
dev_address, "{:0{}b}".format(isconf.data, self.device.word_width))
words.append(isconf.data)

return words
@@ -356,7 +356,7 @@ async def _fvfyi(self, count):
isdata = self.DR_ISDATA.from_bitarray(isdata_bits)
if isdata.valid:
self._log("read autoinc %d data=%s",
index, "{:0{}b}".format(self.device.word_width, isdata.data))
index, "{:0{}b}".format(isdata.data, self.device.word_width))
words.append(isdata.data)
index += 1
else:
@@ -406,7 +406,7 @@ async def _fpgm(self, address, words):
for offset, word in enumerate(words):
dev_address = bitstream_to_device_address(address + offset)
self._log("program address=%03x data=%s",
dev_address, "{:0{}b}".format(self.device.word_width, word))
dev_address, "{:0{}b}".format(word, self.device.word_width))
strobe = (offset % BLOCK_WORDS == BLOCK_WORDS - 1)
isconf = self.DR_ISCONFIGURATION(valid=1, strobe=strobe, address=dev_address,
data=word)
@@ -434,7 +434,7 @@ async def _fpgmi(self, words):

for offset, word in enumerate(words):
self._log("program autoinc data=%s",
"{:{}b}".format(self.device.word_width, word))
"{:0{}b}".format(word, self.device.word_width))
strobe = (offset % BLOCK_WORDS == BLOCK_WORDS - 1)
isdata = self.DR_ISDATA(valid=1, strobe=strobe, data=word)
await self.lower.write_dr(isdata.to_bitarray())
@@ -472,8 +472,12 @@ class ProgramXC9500XLApplet(JTAGProbeApplet, name="program-xc9500xl"):
It is recommended to use TCK frequency between 100 and 250 kHz for programming.
The "program word failed" messages during programming do not necessarily mean a failed
programming attempt or a bad device. Always verify the programmed bitstream.
Some CPLDs in the wild have been observed to return failures during programming, possibly
because they are taken from the rejects bin or recycled, see [1]. The "program word failed"
messages during programming do not necessarily mean a failed device; if the bitstream verifies
afterwards, it is likely to operate correctly.
[1]: http://tech.mattmillman.com/making-use-of-recycled-xilinx-xc9500-cplds/
Supported devices are:
{devices}