Hans

Hardware description?

Recommended Posts

Hi Jack,

 

sorry to bother, but is the hardware description for the current RetroCade Synth bitstream available on github?  I'd like to try out a few things, but the master branch of git://github.com/GadgetFactory/ZPUino-HDL.git does not seem to contain the right ISE project. Or does it?  Any pointer would be greatly appreciated!

 

Thanks,

Hans

Share this post


Link to post
Share on other sites

Hans,

 

The correct location for the RetroCade Synth HDL is here:

https://github.com/GadgetFactory/ZPUino-HDL/tree/master/zpu/hdl/zpuino/boards/papilio-pro/S6LX9/variants/retrocade

 

Alvie does all of his development using a make file instead of the Xilinx ISE IDE and I started following his lead. He used to generate ISE project files when I requested them in the past and I would include them, but I found it easier to just open a cygwin terminal and use make to perform synthesis. It might be easier for you too? You would just need to make sure Xilinx tools are installed and in the path and that the ZPUino tools are installed and in the path.

 

If you want to use an ISE project then I can ask Alvie to generate one for us, or you can take a try at making an ISE project by just adding the files, but that might get tedious. The other option that might work is taking an ISE project from the papilo-one directory and modify it for use with Spartan 6.

 

Jack.

Share this post


Link to post
Share on other sites

yes, the mingw version should be fine. I think you could even use a windows version of make, I don't think the makefile depends on unix tools, not sure though. I just happen to have cygwin already installed so I go ahead with that.

 

Jack.

Share this post


Link to post
Share on other sites

Jack,

 

thanks for the help!  I'll happily avoid ISE, and the make based flow seems to work fine.  I could not rebuild the bitstream in the directory zpu/hdl/zpuino/boards/papilio-pro/S6LX9/variants/retrocade though:

 

 

aspirin 631_% pwd
/home/hans/papilio/ZPUino-HDL/zpu/hdl/zpuino/boards/papilio-pro/S6LX9/variants/retrocade
aspirin 632_% make
mkdir -p xst/projnav.tmp/
xst -intstyle ise -ifn papilio_pro.xst -ofn papilio_pro.syr
ERROR:Xst:427 - Entry File papilio_pro.xst not found 
make: *** [papilio_pro.ngc] Error 1
 
In the directory zpu/hdl/zpuino/boards/papilio-pro/S6LX9, the build succeeds, and the two papilio_pro_top.vhd in these directories are identical, but I wonder if I'm on the right track there.  Can you confirm?
 
Thanks!
Hans

Share this post


Link to post
Share on other sites

I'm sorry to have to require so much hand holding, but I think I'm almost there:  Pending confirmation about the directory confusion (above), I can rebuild the hardware using ISE and I can also build the sketch using the Arduino IDE.  The Bitstream ends up in a .bit file, and as far as I understood, the bitstream includes a boot loader that can load ZPU code from Flash.  How exactly do I need to combine the .bit file and the (supposedly) .bin file that the Arduino IDE generates, and how do I program these into the board using papilio-prog?

 

-Hans

Share this post


Link to post
Share on other sites

Hans,

 

I just added the missing files (xst and ut) to the retrocade variant directory. We definitely want to work out of the variant directory, that top directory is just supposed to be a template for variants.

 

Your next step is to write the bit file that gets generated to SPI Flash. Then you can use the ZPUino IDE to write your sketch to the Papilio Pro. Just make sure that LX9 board type is selected... Oh wait, if you made your own ZPUino IDE then you probably don't have the board type available.

 

Add the following to your hardware/zpuino/boards.txt file:

 

zpuino_papilio_prolx9v.name=ZPUino on Papilio Pro (LX9)zpuino_papilio_prolx9v.upload.protocol=zpuino-serialzpuino_papilio_prolx9v.upload.maximum_size=8388608zpuino_papilio_prolx9v.upload.size_sections=allzpuino_papilio_prolx9v.upload.speed=115200zpuino_papilio_prolx9v.build.f_cpu=96000000Lzpuino_papilio_prolx9v.build.core=zpuinozpuino_papilio_prolx9v.build.toolchain=zpuzpuino_papilio_prolx9v.build.extraCflags=-D__ZPUINO_PAPILIO_PRO__ -DBOARD_ID=0xA4041700 -DBOARD_MEMORYSIZE=0x800000 -nostartfileszpuino_papilio_prolx9v.build.extraSflags=-DBOARD_ID=0xA4041700##############################################################

Then select that board and just upload the sketch, you can hold the left ctrl key in order to write directly to SDRAM and bypass the longer SPI Flash write, but it will be temporary.

 

Jack.

Share this post


Link to post
Share on other sites

Jack,

 

thanks for the extra info.  There is still a missing file, though:

aspirin 661_% makemkdir -p xst/projnav.tmp/xst -intstyle ise -ifn papilio_pro.xst -ofn papilio_pro.syrERROR:Xst:438 - Can not open file : papilio_pro.prj

 

I will try using the IDE for uploading the changed files, but I hope to be able to work without it in the future.  Is there any description on how papllio-prog must be used on the command line (i.e. how to load bitstreams and compiled sketches)?

 

Thanks,

Hans

Share this post


Link to post
Share on other sites

Jack,

 

I helped myself with an edited version of the .prj file in the ZPUino-HDL/zpu/hdl/zpuino/boards/papilio-pro/S6LX9 directory, but I'm not sure if that'd be the right one.  If you could commit and push yours, I'd appreciate it.

 

Thanks!

Hans

Share this post


Link to post
Share on other sites
Jack,

 

thanks for the extra info.  There is still a missing file, though:

aspirin 661_% makemkdir -p xst/projnav.tmp/xst -intstyle ise -ifn papilio_pro.xst -ofn papilio_pro.syrERROR:Xst:438 - Can not open file : papilio_pro.prj

 

I will try using the IDE for uploading the changed files, but I hope to be able to work without it in the future.  Is there any description on how papllio-prog must be used on the command line (i.e. how to load bitstreams and compiled sketches

There is an undocumented tool called bitmerge that is used to merge the contents of a sketch and smallfs into a final bit file. I'm attaching it here, but don't have time to make a wiki page for it quite yet. You have to get the dat file and smallfs file from the temporary directory that the Arduino IDE creates. You can turn on verbose output under the Arduino IDE preferences to see where the temp directory is located.

 

 

Thanks,

Hans

bitmerge.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now