Its a royal PITA to specify the pinout of a 144 pin part! So there is no point to doing this more than once -- across the entire internet.
Its unfortunate that Lattice does not provide one, but their Demo project does not specify the IOs since they are not used.
In my code repository is a Diamond project that specifies all XP2 IOs as used by the Brevia board. And it sets the XP2 part up with 3 clocks, 400mhz, 50mhz, and 25mhz. Of course you can change these clock values by editing the "pll" module.
You checkout the entire project (recommended), or browse and pull down the key files to add into your own project:
top.v: the "main" verilog file
starter1.lpf: the file that places the verilog symbols onto particular pins
pll.v: autogenerated pll module that sets up the 3 clocks.
I was able to get the parallel port programmer that comes with the LatticeXP2 Brevia kit to work on 32bit Ubuntu 10.04. I suspect it should work on 64bit too but have not tried it. The reason why ispvm will not work with the supplied programmer is because the parallel port kernel modules are blocking direct access to the parallel port hardware registers. It is not enough to unload those modules after they have been loaded. Typically any hardware that can be powered off in system is powered down when a module is unloaded. Consequently, the parallel port will be powered down when the "parport" module is unloaded.
ReplyDeleteThe solution is to 1) run ispvm as "root" user to get permissions to access the hardware and 2) prevent the following modules from loading at boot time:
parport
parport_pc
lp
ppdev
Unfortunately I was unable to get blacklisting to work so I renamed these kernel modules and rebooted. Viola, it worked. The scan chain initialized, and re-programming the SoC demo was a success.
The kernel modules on my system are at "/lib/modules/2.6.32-24-generic/kernel/drivers/parport". Just be sure to rename the modules for the running kernel.
The best solution would be to figure out how to blacklist the parallel port modules at boot time. I use Xilinx tools with a Parallel Cable III and the linux cable driver needs ppdev. So if you use other logic design tools then be sure to keep the kernel modules around.
thanks for the tip! I'll give it a try in a few weeks (not near my Brevia board at the moment)!
ReplyDeleteEven if the thread is old...you're right.
ReplyDeleteFor stardard linux (crux distribution kernel 3.4.13) in order to detect the ispDOWNLOAD cable the kernel module parport_pc and ppdev must not be loaded at the startup. Also if the installation guide said to set the appropriate permesses with chmod.... and so on...