Chris Shucksmith
2012-05-02 11:46:13 UTC
Hello All,
I am trying to add support for a Lattice ECP3 35EA FPGA, as used on
the Lattice Versa development board. I am trying to write to the SPI
Flash which is reached 'through' the FPGA (schematics at
http://www.latticesemi.com/documents/EB62.pdf ).
The board uses a FT2232 chip with JTAG bus on interface 0, initially
the FPGA was recognised as an unknown lattice part. I added an entry
to data/lattice/PARTS to recognise the device as "lfe3-35ea".
There is a public BSDL model for the device published by Lattice
http://www.latticesemi.com/documents/lfe3_35ea_fpbga484.bsm When I
try to translate this into urjtag format, the lexer dies on line
#1066:
$ /usr/local/bin/bsdl2jtag lfe3_35ea_fpbga484.bsm lfe3_35ea
error: -E- error: Line 1066, Unsupported BSDL construct found.
error: -E- error: BSDL stage reported errors, aborting.
error: bsdl subsystem: Parser error, see log for details
The BSDL file comments suggest it conforms to "IEEE Standard
1149.1-2001" but the lexer source (in urjtag/bsdl/bsdl_flex.l )
suggests compatibility with 1149.1 "1990" (!). However I see that
someone has managed to put together a specification for lfec2-12e
lattice part so this must be possible - is there a secret or was it
translated by hand?
The errors seem to be caused by entries grouped under
"DIFFERENTIAL_CURRENT" but I don't know enough yet about the tools and
format to debug further. I don't care too much about being able to
drive pins for board testing, only looking to implement flash writes.
I would be able to hook up a logic probe on either the SPI flash or
the JTAG bus to record the commands issued by the vendor tooling if
that's required to figure out the write thru SPI commands.
Any help at this stage would be appreciated.
Chris
$ /usr/local/bin/jtag
UrJTAG 0.10 #2026
Copyright (C) 2002, 2003 ETC s.r.o.
Copyright (C) 2007, 2008, 2009 Kolja Waschk and the respective authors
UrJTAG is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for UrJTAG.
warning: UrJTAG may damage your hardware!
Type "quit" to exit, "help" for help.
jtag> cable FT2232 vid=0x0403 pid=0x6010 interface=0
Connected to libftdi driver.
jtag> detect
IR length: 8
Chain length: 1
Device Id: 00000001000000010010000001000011 (0x01012043)
Manufacturer: Lattice Semiconductors (0x043)
Part(0): LFE3_35EA (0x1012)
Stepping: 0
Filename: /usr/local/share/urjtag/lattice/lfe3-35ea/lfe3-35ea
error: system error: No such file or directory Cannot open file
'/usr/local/share/urjtag/lattice/lfe3-35ea/lfe3-35ea' to parse
jtag> quit
I am trying to add support for a Lattice ECP3 35EA FPGA, as used on
the Lattice Versa development board. I am trying to write to the SPI
Flash which is reached 'through' the FPGA (schematics at
http://www.latticesemi.com/documents/EB62.pdf ).
The board uses a FT2232 chip with JTAG bus on interface 0, initially
the FPGA was recognised as an unknown lattice part. I added an entry
to data/lattice/PARTS to recognise the device as "lfe3-35ea".
There is a public BSDL model for the device published by Lattice
http://www.latticesemi.com/documents/lfe3_35ea_fpbga484.bsm When I
try to translate this into urjtag format, the lexer dies on line
#1066:
$ /usr/local/bin/bsdl2jtag lfe3_35ea_fpbga484.bsm lfe3_35ea
error: -E- error: Line 1066, Unsupported BSDL construct found.
error: -E- error: BSDL stage reported errors, aborting.
error: bsdl subsystem: Parser error, see log for details
The BSDL file comments suggest it conforms to "IEEE Standard
1149.1-2001" but the lexer source (in urjtag/bsdl/bsdl_flex.l )
suggests compatibility with 1149.1 "1990" (!). However I see that
someone has managed to put together a specification for lfec2-12e
lattice part so this must be possible - is there a secret or was it
translated by hand?
The errors seem to be caused by entries grouped under
"DIFFERENTIAL_CURRENT" but I don't know enough yet about the tools and
format to debug further. I don't care too much about being able to
drive pins for board testing, only looking to implement flash writes.
I would be able to hook up a logic probe on either the SPI flash or
the JTAG bus to record the commands issued by the vendor tooling if
that's required to figure out the write thru SPI commands.
Any help at this stage would be appreciated.
Chris
$ /usr/local/bin/jtag
UrJTAG 0.10 #2026
Copyright (C) 2002, 2003 ETC s.r.o.
Copyright (C) 2007, 2008, 2009 Kolja Waschk and the respective authors
UrJTAG is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for UrJTAG.
warning: UrJTAG may damage your hardware!
Type "quit" to exit, "help" for help.
jtag> cable FT2232 vid=0x0403 pid=0x6010 interface=0
Connected to libftdi driver.
jtag> detect
IR length: 8
Chain length: 1
Device Id: 00000001000000010010000001000011 (0x01012043)
Manufacturer: Lattice Semiconductors (0x043)
Part(0): LFE3_35EA (0x1012)
Stepping: 0
Filename: /usr/local/share/urjtag/lattice/lfe3-35ea/lfe3-35ea
error: system error: No such file or directory Cannot open file
'/usr/local/share/urjtag/lattice/lfe3-35ea/lfe3-35ea' to parse
jtag> quit