On 11/01/10 09:17, Attila Kinali wrote:
Programming the XP10.
---------------------
For this you need a cable and some software.  I've got UrJTAG to work
(with a Lattice parallel cable) under Linux.  I needed a patch, which
I've not tried to send out to anyone, but I can dig up for you.  (It
seems that I needed another reset of some kind during the detection
process).

Good, that's one thing less to worry about.
Could you send me that patch?

Here are the two patches, one is a slight modification to the source, and I don't really understand why it's needed. The second adds the information about the XP10 to the UrJTAG data base.

The patch is based off of the urjtag-0.10 release.

So, download that, apply the patch, configure, make, make install, then:

> /opt/urjtag/bin/jtag

jtag> cable Lattice parallel 0xe800
Initializing parallel port at 0xe800
jtag> detect
IR length: 8
Chain length: 1
Device Id: 00010001001001011100000001000011 (0x000000001125C043)
  Manufacturer: Lattice Semiconductors
  Part(0):         LFXP10e
  Stepping:     A1
  Filename:     /opt/urjtag/share/urjtag/lattice/lfxp10e/lfxp10e
jtag> svf /path/xp10-mod.svf stop progress ref_freq=100000
Parsing  35070/35074 ( 99%)
Scanned device output matched expected TDO values.
jtag>

You will have to change the "cable" command to match your JTag hardware. You might also have to run as root.

I don't really understand UrJtag fully. The ref_freq parameter changes the speed at which the programming is done. If it goes to fast (takes less than 30 seconds) then it will fail. The number I need here seems to change with the weather?

I hope this makes sense.

Mark.

PS.
Without the patch to the source I get this:

jtag> cable Lattice parallel 0xe800
Initializing parallel port at 0xe800
jtag> detect
IR length: 8
Chain length: 1
Device Id: 0 (0x0000000000000000)
chain.c(149) Part 0 without active instruction
chain.c(200) Part 0 without active instruction
chain.c(149) Part 0 without active instruction
diff -N -cwr urjtag-0.10-clean/data/lattice/lfxp10e/lfxp10e 
urjtag-0.10/data/lattice/lfxp10e/lfxp10e
*** urjtag-0.10-clean/data/lattice/lfxp10e/lfxp10e      1970-01-01 
01:00:00.000000000 +0100
--- urjtag-0.10/data/lattice/lfxp10e/lfxp10e    2009-11-04 10:48:56.000000000 
+0000
***************
*** 0 ****
--- 1,48 ----
+ #
+ # $Id:  $
+ #
+ # JTAG declarations for Lattice LFXP10e
+ # Copyright (C) 2002 ETC s.r.o.
+ #
+ # This program is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License
+ # as published by the Free Software Foundation; either version 2
+ # of the License, or (at your option) any later version.
+ #
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ # 02111-1307, USA.
+ #
+ # Written by Mark Marshall
+ #
+ 
+ #TODO: Add these?
+ #signal       EX_CS[0]        K26
+ 
+ # mandatory data registers
+ register      BSR             498     # Boundary Scan Register
+ register      BR              1       # Bypass Register
+ # optional data registers
+ register      DIR             32      # Device Identification Register
+ 
+ instruction length 8
+ # mandatory instructions
+ instruction EXTEST            00000000        BSR
+ instruction SAMPLE/PRELOAD    00011100        BSR
+ instruction BYPASS            11111111        BR
+ # optional instructions
+ instruction CLAMP             00100000        BR
+ instruction HIGHZ             00011000        BR
+ instruction IDCODE            00010110        DIR
+ 
+ # boundary scan register
+ 
+ #TODO: Add these?
+ #bit 497 C ? .
+ #bit 384 B ? GPIO[1] 369 1 Z
diff -N -cwr urjtag-0.10-clean/data/lattice/lfxp10e/STEPPINGS 
urjtag-0.10/data/lattice/lfxp10e/STEPPINGS
*** urjtag-0.10-clean/data/lattice/lfxp10e/STEPPINGS    1970-01-01 
01:00:00.000000000 +0100
--- urjtag-0.10/data/lattice/lfxp10e/STEPPINGS  2009-11-04 10:41:00.000000000 
+0000
***************
*** 0 ****
--- 1,26 ----
+ #
+ # $Id: STEPPINGS,v 1.1 2003/02/13 22:54:39 telka Exp $
+ #
+ # Copyright (C) 2002 ETC s.r.o.
+ #
+ # This program is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License
+ # as published by the Free Software Foundation; either version 2
+ # of the License, or (at your option) any later version.
+ #
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ # 02111-1307, USA.
+ #
+ # Written by Mark Marshall
+ #
+ 
+ # bits 31-28 of the Device Identification Register
+ 0000  lfxp10e         A0
+ 0001  lfxp10e         A1
diff -N -cwr urjtag-0.10-clean/data/lattice/PARTS urjtag-0.10/data/lattice/PARTS
*** urjtag-0.10-clean/data/lattice/PARTS        2009-04-17 21:24:11.000000000 
+0100
--- urjtag-0.10/data/lattice/PARTS      2009-11-04 10:41:44.000000000 +0000
***************
*** 28,30 ****
--- 28,31 ----
  0001100000010000  lc4128c-tqfp100       LC4128C-TQFP100
  0001001001110001  lfec2-12e             LFE2-12E
  0001100000001100  lc4064zc              LC4064ZC
+ 0001001001011100  lfxp10e               LFXP10e
diff -N -cwr urjtag-0.10-clean/data/Makefile.am urjtag-0.10/data/Makefile.am
*** urjtag-0.10-clean/data/Makefile.am  2009-04-17 21:24:13.000000000 +0100
--- urjtag-0.10/data/Makefile.am        2009-11-04 10:45:17.000000000 +0000
***************
*** 138,143 ****
--- 138,146 ----
        lattice/m4a3-256.192-fpbga256/m4a3-256.192-fpbga256 \
        lattice/m4a3-64.32-tqfp48/STEPPINGS \
        lattice/m4a3-64.32-tqfp48/m4a3-64.32-tqfp48 \
+       lattice/lfxp10e \
+       lattice/lfxp10e/STEPPINGS \
+       lattice/lfxp10e/lfxp10e \
        lexra/PARTS \
        lexra/lx5280/STEPPINGS \
        lexra/lx5280/lx5280 \
diff -N -cwr urjtag-0.10-clean/data/Makefile.in urjtag-0.10/data/Makefile.in
*** urjtag-0.10-clean/data/Makefile.in  2009-04-17 21:25:35.000000000 +0100
--- urjtag-0.10/data/Makefile.in        2009-11-04 10:47:48.000000000 +0000
***************
*** 337,342 ****
--- 337,345 ----
        lattice/m4a3-256.192-fpbga256/m4a3-256.192-fpbga256 \
        lattice/m4a3-64.32-tqfp48/STEPPINGS \
        lattice/m4a3-64.32-tqfp48/m4a3-64.32-tqfp48 \
+       lattice/lfxp10e \
+       lattice/lfxp10e/STEPPINGS \
+       lattice/lfxp10e/lfxp10e \
        lexra/PARTS \
        lexra/lx5280/STEPPINGS \
        lexra/lx5280/lx5280 \
diff -x Makefile -x '*~' -x '*.Po' -N -cwr 
../urjtag-0.10-clean/src/tap/detect.c src/tap/detect.c
*** ../urjtag-0.10-clean/src/tap/detect.c       2009-04-17 21:24:10.000000000 
+0100
--- src/tap/detect.c    2009-11-05 10:43:44.000000000 +0000
***************
*** 248,253 ****
--- 248,257 ----
        tap_reset( chain );
        tap_capture_dr( chain );
  
+       /* I need a second reset here? */
+       tap_reset( chain );
+       tap_capture_dr( chain );
+ 
        for (i = 0; i < chlen; i++) {
                part_t *part;
                tap_register *did = br;         /* detected id (length is 1 or 
32) */
Binary files ../urjtag-0.10-clean/src/tap/detect.o and src/tap/detect.o differ
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to