jtjj222

Question about the toolchain and open source

Recommended Posts

I just saw this project, and it looks really cool. I especially love that it is open source and hackable. I saw an answer on stackoverflow about FPGA's that suggested that a lot of proprietary tools were needed to use any FPGA, and this had me worried. I was wondering, what proprietary software is needed (if any) to develop and create designs for the Papillio? Is it possible to do anything useful using only open source software?

 

Thanks for the help!

Share this post


Link to post
Share on other sites

Xilinx - WebPACK

 

it is free but not OSS.

 

you should check out the Papilio DesignLab posts (this is the current one but you want to check out the getting started parts)

 

http://forum.gadgetfactory.net/index.php?/files/file/236-papilio-designlab-ide/

 

jack also has some nice youtube videos.

 

there is a walkthrough on how to get everything running.

 

sorry for the short answer but busy @ work

 

// F

Share this post


Link to post
Share on other sites

Is there anything like the icestorm project in the works for the Xilinx fpgas?

The best work I've seen for reverse-engineering Xilinx is "From the bitstream to the netlist" by Jean-Baptiste Note and Éric Rannaud.  The paper is quite a few years old and I don't know if their software is available anywhere or how complete the implementation was.  They used Xilinx Design Language (XDL) as their Rosetta Stone.

 

There's also my Flavia project, but I only change look-up tables, flip-flop init bits, and I/O pin pull-up/down and keeper config bits.  Flavia is a tool for learning about programmable logic and your are limited to CPLD-level logic complexity.  I don't touch or reverse-engineer the routing.  Xilinx has provided a bitgen option for locating LUTs and FFs, so it seemed I could play with those without risking legal problems.  When you do IceStorm's level of reverse-engineering in the USA you can expect legal problems.  They should be safe in Austria.

 

Here are some Flavia links if you're interested:

 

http://www.element14.com/community/groups/fpga-group/blog/2014/07/21/flavia-the-free-logic-array

http://www.element14.com/community/community/raspberry-pi/blog/2015/05/16/raspberry-pi-2-meets-papilio-duo

http://www.element14.com/community/docs/DOC-68250/l/taming-the-wild-bitstream

 

I think IceStorm is pretty amazing and I'm going to take a close look at it.  I looked at the Lattice iCE40 a couple years ago and IIRC it's a simple, clean architecture.  Having a documented bitstream makes iCE40 very interesting indeed.

Share this post


Link to post
Share on other sites

do you think it could be easily applied to the papilio arcade stuff?   i wanted to see about a way to change the arcade dip switches before uploading to the fpga, without recompiling the whole thing but couldnt figure out a way to do it.

 

(sorry for the thread hijack)

 

//F

Share this post


Link to post
Share on other sites

Just "wire" the dip switches up to I/O pins on the FPGA and compile. It's pretty trivial actually, it only takes a few lines of code.

Share this post


Link to post
Share on other sites

i want to change dipsw the same way we merge the roms into the bitstream without recompiling, but without using brams. :)

Share this post


Link to post
Share on other sites

i want to change dipsw the same way we merge the roms into the bitstream without recompiling, but without using brams. :)

 

I'm not familiar with the Papilio Arcade, so these are general comments.

 

If you have a register in your design and want to change how it's initialized without resynthesizing, there's a couple ways to do it.

 

1.  You can open the Xilinx FPGA Editor, which lets you edit the post-place&route design graphically.  Find your register (not too hard if it has a distinctive name), open up the logic cells, and change the set/reset configuration.  Then generate a bitstream from the changed design, which I believe you can do in the FPGA Editor.

 

2.  You can also use Xilinx Design Language (XDL), which may or may not be in your ISE release.  Try running "xdl" from the command line.  If it's there, it will give you some help information.  Xilinx's FPGA Editor uses an NCD (Native Circuit Description) file, an undocumented binary format.  XDL translates NCD into an ASCII representation, which you can then edit using a text editor or any other text-processing program.  Then you can translate XDL back to NCD and run bitgen to get a new bitstream.

 

There's a small problem translating Spartan-6 XDL back to NCD, at least for ISE 12.4.  XDL -ncd2xdl inserts extraneous "PRE_EMPHASIS::#OFF" attributes.  You need to delete them before converting back to NCD or DRC fails.

 

3.  Once you have two bitstreams, you can compare them with a binary compare and see where the init bits actually are in the bitstream.  Then you can go in and modify them individually, and generate a new bitstream.  However, you also need to produce a new CRC for the bitstream, which is fairly easy once you know how.  My Flavia project (post #6 above) uses this technique.

 

Hope this helps!

 

Disclaimer: modifying bitstreams at this level can potentially create a bitstream that could damage your FPGA or connected circuits.  My comments are offered WITHOUT WARRANTY and if you use my suggestions you must agree that I have NO LIABILITY if something goes wrong.

Share this post


Link to post
Share on other sites

John,

 

Thank you very much for sharing that information. It wasn't something I have ever heard of, it is good to know about XDL and the ability to convert an NCD file to ASCII format. I'll keep that in mind in the future.

 

Thanks!

Jack.

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