• Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by johnbeetem

  1. johnbeetem

    How does data get from the PC to the Spartan-6 Flash

    I've never programmed the Flash: I always use Papilio DUO connected to a PC. So when I power on my DUO it loads the original bitstream from Flash and the LED blinks, along with all the other pins. Once the initial configuration is loaded, I can overwrite it from the PC by downloading a bitstream over the Xilinx JTAG pins, which are connected to port 0 of the FTDI chip. JTAG is always available no matter which other configuration mode is selected by M0/M1. I don't know how to reprogram the Flash. I think Gadget Factory has a bitstream you can download using JTAG which temporarily turns the FPGA into a Flash programmer. Hope this helps!
  2. johnbeetem

    Flavia: the Free Logic Array

    XXICC rev 0.0r has just been released. The main improvements are integer nets and operators, so you no longer need to express all logic as Boolean. The Flavia back ends for Papilio One 250K/500K and Papilio Duo are unchanged. Here's the release 'blog: The XXICC Anthology rev 0.0r has new material for integers in Chapter 10 (GCHD) and splits the second part of Chapter 12 (Flavia) into new Chapters 13-14. GCHD now has a back end for the open-source IceStorm tools for Lattice iCE40 FPGAs.
  3. johnbeetem

    Flavia: the Free Logic Array

    Flavia, the Free Logic Array, is a programmable device intended primarily as a teaching tool for FPGAs and CPLDs. Unlike every commercial device I'm aware of, Flavia's tool suite is free-as-in-liberty open-source software (FLOSS). This means it can run on platforms other than x86 PCs, including Raspberry Pi (tested) and BeagleBoard/Bone (not fully tested yet). Flavia is a "CPLD in an FPGA", which uses FPGA look-up tables (LUTs) to implement both logic and routing. Since Xilinx documents ways to find the locations of your LUTs and flip-flops in their otherwise undocumented bitstreams, it's possible to program those LUTs to make a reasonably nice CPLD that can be programmed using FLOSS tools. Flavia's first implementation uses the Papilio One 250K as its underlying FPGA. The 250K Spartan-3E FPGA has enough logic resources to make a useful CPLD and the FT2232D provides an easy programming interface for Flavia's software. If you're interested, take a look at my 'blog at element14, which has links to all the software and documentation. This post has been promoted to an article
  4. johnbeetem

    Papilio One Availability

    Thank you for the quick reply and the info on Papilio Unity. Will it have provision for JTAG, even if just an unpopulated header? When I'm developing for FPGAs I like to blast a bitstream directly into the FPGA rather than program an SPI flash. If the target board doesn't have an FT2232D/H, I use a US$15 Adafruit FT232H Breakout Board as a JTAG programmer. It's basically a single-channel FT2232H. I'll miss Spartan-3E/A. But they're on the way out and Spartan-6 is now the "sweet spot" last time I looked. Spartan-6 is a very complex architecture which makes life extra difficult for the new user. Fortunately there's the Lattice iCE40 if you want a simple, easy-to-understand architecture :-)
  5. johnbeetem

    Papilio One Availability

    The Papilio DUO uses the FT2232H, which is great (high-speed USB, 480 Mb/s). The Pro uses the FT2232D (full-speed USB, 12 Mb/s). I don't have a Pro so I have no personal experience. I get 200 ms or so for the Papilio One 250K, which is within human reaction time. The 500K is more like 500 msec, which adds significant delay to compiling and loading a small design. This is with my Flavia software, so the compile step is less than a second for a small design.
  6. johnbeetem

    Papilio One Availability

    Is the Papilio 250K coming back some day? For a long time I've recommended it as the best value for getting started with FPGAs and I'd like to know if I should still be doing so. I was playing with mine today and I love it way it downloads so quickly.
  7. johnbeetem

    Need help in programming the board

    Yes. You can create designs using the standard Xilinx ISE and VHDL or Verilog.
  8. johnbeetem

    Using FPGA - Am I right to do so?

    GPMC can probably be used synchronously, but I suspect most people use it to talk to async devices such as SRAM and NOR Flash. If async buses are dead, I guess it was a bad idea to put asynchronous SRAM on Papilio DUO, eh? Seriously, an async parallel bus is still a good way to talk to lots of peripherals and has the advantage that you don't need a device driver -- you can just use mmap(). This can be an important feature for a Linux newbie who doesn't want to become a device driver guru. The Spartan-6 LX9 has lots of dual-port RAM, so an effective way to do data acquisition is to store inbound data to one side of a dual-port RAM and have the other side talk to the CPU. "Long dead" reminds me of an early unix "man" page for assembly language. IIRC, the page read "Assembly language is dead. Necrophilia will be punished." Funny, you don't see that page any more if you enter "man as"
  9. johnbeetem

    Using FPGA - Am I right to do so?

    For talking to a Papilio I agree with Alvie that SPI is the way to go. While I suppose it's bad manners to mention other FPGA boards here, you might want to check out the ValentF(x) LOGI-Bone, which is a Spartan-6 LX9 FPGA board that plugs directly into a BeagleBone. This gives you the option of treating the FPGA as a 16-bit wide memory using BeagleBone's General-Purpose Memory Controller (GPMC). You also have SPI and I2C. LOGI-Bone is a nice solution provided you don't have to separate the boards too often since it's a pain to pry those connectors apart.
  10. johnbeetem

    Using FPGA - Am I right to do so?

    While I'm a huge fan of FPGAs, what you want to do might be an excellent fit for the BeagleBone's Programmable Real-time Unit (PRU) Sub-System (PRUSS). In addition to its ARM Cortex-A8 BeagleBone's SoC has two 200 MHz RISC processors for real-time I/O and signal conditioning. Here's a good starting point:
  11. johnbeetem

    Programming the fpga and spiritual flash

    The FTDI FT2232H USB chip has two serial channels, A and B. The FPGA programming software needs to talk to Channel A which is connected to the FPGA JTAG pins. My understanding is that the RX and TX LEDs are on Channel B which talks to ordinary FPGA I/Os, so if RX is blinking it means your programming software is talking to the wrong channel. See if Felix's suggestion works. If it doesn't, please indicate what OS and software you're using to program the FPGA.
  12. First, on latches: The Xilinx Spartan-6 does support latches. The registers in a CLB can be edge-triggered flip-flops or level-sensitive latches. The are other FPGA families that only have edge-triggered flip-flops. The CLK placement error is more serious. This error usually means that there's a conflict between two or more clock signals trying to use the same clock buffers. Your conflict might be the latch clock, or it could be something else. Spartan-6 clocking is very complex (see the Xilinx "Spartan-6 FPGA Clocking Resources User Guide UG382). Take a look at all the signals in the Map/Placement report that Xilinx thinks are clocks, and how Xilinx has assigned them to pins and clock buffers. There may be some surprises there. I've found it useful to print out some of the clock diagrams in UG382 to check for conflicts. It might be useful to post your VHDL source. I mostly do Verilog myself, but others in this community might see from the VHDL why you're having problems. In FPGA designs, it's usually best to have a single clock. You then sample inputs using this clock, usually with an extra flip-flop stage to reduce metastability. Slower clocks are often simulated by the FF's clock enable to convert the master clock to a slower clock.
  13. johnbeetem

    Papilio DUO for a graduate course on Xilinx FPGAs ?

    1) You just need a Mini USB cable. Papilio DUO has an FTDI USB peripheral chip that talks to the FPGA's JTAG pins for programming. The Mini USB also provides enough power for most projects, assuming you get a cable that has wires thick enough to carry the current. 2) I recommend Gadget Factory's Button/LED Wing: you do need something more than DUO's single LED and slide switch for reasonable projects. There are a bunch of other Wings for more advanced projects like VGA:
  14. johnbeetem

    Fast internal clock on DUO

    cawhitely: If you haven't already done so, add a clock frequency constraint to your UCF (User Constraint File). This will tell the Xilinx tools to take timing more seriously when doing map/place & route and give a warning if it can't meet your constraint. You may have to reduce your clock multiplier to get your design to work.
  15. johnbeetem

    Fast internal clock on DUO

    This means that some part of your design has a delay path that's 47.081 ns from clock to clock and you shouldn't clock your design faster than 21.240 MHz. This is assuming worst case temperature (electrons move slower at higher temperature), worst case supply voltage (electrons move slower at lower supply voltage), and worst case process (some chips are faster than others when manufactured). At room temperature with good voltage regulation (which you get with Papilio DUO), you can go faster than this -- maybe as much as a factor of 2. I don't know if the timing analysis considers the PLL multiplier -- I've never used Xilinx PLLs or DLLs, so someone will have to help me out here. If the timing analysis doesn't consider the PLL, your design is nowhere near fast enough for a 248 MHz clock. If timing analysis considers the PLL, it's telling you that the maximum reference clock is 21.240 MHz. That means Papilio DUO's 32 MHz oscillator is 50% too fast, which may be OK at room temperature. If the clock is too fast, the fast parts of your design will work but the slow parts will be unreliable. Update: alvieboy says timing analysis considers the PLL multiplier, so in your case the maximum reference clock is 21.240 MHz, which means Papilio DUO's 32 MHz oscillator is too fast for reliable operation. It may be that your design is working as far as timing is concerned, but that you don't have the BRAM configured properly. BRAM options are complex, and you have to get the pipelining correct. For example, when reading from BRAM you set up the address in the current clock cycle, but the data isn't available until the next clock cycle. Individual blocks in an FPGA are very fast, like the 300 MHz BRAM and look-up tables which are around a nanosecond. What's slow in an FPGA is the routing, especially when a design gets large and signals have lots of fanout. My Flavia (Free Logic Array via...) Spartan-6 design is basically a bunch of multiplexers that connect to each other. I get a 16 ns minimum clock cycle even though the logic is pretty shallow. All the delay is in the routing, which has to go all over the chip. Most designs are going to be a LOT better than that.
  16. johnbeetem

    Fast internal clock on DUO

    I've never tried a very fast clock on an FPGA because a 3 ns or faster clock requires extremely simple combinational logic between registers. You probably can't do much of anything in 1 ns. Most of my designs are 33-50 MHz (30-20 ns clock period) which allows quite a few levels of logic and routing. When you run the Xilinx tools for your tests, what clock period or frequency do you get for post-P&R timing analysis?
  17. johnbeetem

    Disable AVR JTAG pins

    I'm only using the FPGA on my Papilio DUO, so I force the AVR into reset by setting ARD_RESET (FPGA pin 139) low. I think this makes all AVR I/Os high-impedance.
  18. Over a decade ago I looked into Xilinx Virtex-II Pro (FPGA + Power PC CPU) for my then-employer. It seemed like an excellent match, since we used Power PC processors. The pricing of the chips convinced us otherwise, as did the difficulty in getting a Virtex-II Pro FPGA running. IIRC, you had to configure the FPGA before you could use the CPU, which meant that you couldn't use the CPU to download the FPGA. I don't know how many mistakes Xilinx chose to retain for Zynq. We ended up using an AMCC (now Applied Micro) PPC405EP, a low-cost SoC with dedicated SDRAM interface and 32-bit PCI bus connected to a Xilinx Spartan-IIE. That worked beautifully. Unfortunately Applied Micro has deemphasized Power PC in favor of ARMv8, so it's really hard to find suitable Power PC parts nowadays. I consider Power PC to be a superior architecture, but ARM has the ecosystem on its side.
  19. Thank you for this perspective. I was wondering about this aspect of working with Zynq. Along with cost, this may help explain why Zynq doesn't seem to be getting a lot of traction.
  20. Adding to Jack's comment, it seems like they have an awful lot of boards there which is going to dilute their effort quite a bit. While the $55 is impressive, you'll probably need a base board to do anything useful with it. So add $10 for "down connectors" and another $55 for the piSmasher and now you're at $120, which is not so impressive. As is usual for me, I also object to their calling it "Open Source" without noting that the Xilinx Vivado software is absolutely not open-source and that there's no open-source tool-chain for Zynq that I know of. Please correct me if I'm wrong!
  21. johnbeetem

    Altera Intel impacts

    True, most tool users aren't going to modify their tools. However, others do improve open-source software and all users benefit from the results. The reason GNU/Linux and GCC have such high quality is that since the source code is available bugs can be found and fixed, and people who redistribute the improved software are required to make the modified source code available so that improvements can be incorporated back into the mainstream code. IMO the fact that we can get cheap, high-performance microprocessors and microcontrollers is largely because chip manufacturers can adopt GNU/Linux and GCC and only modify drivers, greatly reducing software development and licensing issues so they can concentrate on the silicon. FPGA manufacturers could have taken advantage of this same opportunity if they had opened their bitstreams and IMO this could have made FPGAs a mainstream technology instead of something expensive and esoteric. Fortunately, it's not too late for them to come around. The reality is that most FPGA vendor software has a steep learning curve and since there's no competing software there's no incentive for vendors to improve things. I've found the learning curve gets steeper with each new FPGA family, and recently spent hours debugging a problem because the Xilinx ISE error message steered me in the wrong direction. Can I improve the error message? Nope, because it's not open source. Regarding RMS, I think his MacArthur Fellowship and his long list of honorary doctorates and professorships speak for themselves. Regarding IceStorm, I've been playing with IceStorm tools and arachne-pnr over the last month and I'm very impressed with their reliability and speed. I'm planning to incorporate them into my XXICC software.
  22. johnbeetem

    Interesting FPGA board ICARUS

    Icarus is a great name for an ambitious project that you expect to crash and burn.
  23. johnbeetem

    Altera Intel impacts

    Based on my research over decades, my opinion is that FPGA implementation software isn't that complex. You just need to go through the steps one by one. It has about the same level of complexity as a good optimizing compiler. Like an optimizing compiler, the actual complexity depends on the source language and the target architecture. Like CPU architectures, some FPGAs are a lot more regular and it's easier to write tools for them. A major difference is that you can buy good books on writing (or "crafting") compilers, whereas writing FPGA tools requires you to find lore from all over the place -- often hiding in expensive journals and conference proceedings. Now that bitstreams are finally getting published -- with Project IceStorm leading the way -- we should see rapid progress. IceStorm targets the Lattice iCE40, which is a simple architecture so an excellent first step. While there are decades of work to do, we can use useful results from compiler writing and other areas that have occurred in these last decades, so it's not like we have to start from zero. Plus, computers are a lot more capable (and cheaper!) than they were decades ago, so lack of computer performance isn't holding us back. There's now the Internet, so people can find resources that would be difficult or impossible to find decades ago. And there are twice as many people on the planet, so more people to do the work :-) JMO/YMMV
  24. Here's my opinion offered WITHOUT WARRANTY: I think you can hold the FT2232H in reset by pulling pin 14 to ground. You can do this by soldering a jumper wire on 10K resistor R28, which is next to FT2232H pin 14. The FT2232H data sheet doesn't explicitly say what happens to the I/O pins when in reset. However, FTDI does have an application note on the subject: According to AN_184, the programmable I/O pins are tri-stated but some have pull-ups.
  25. johnbeetem

    Altera Intel impacts

    We had a short discussion on this topic at element14 a few weeks ago: I'll repeat my main comment: I think it's great news... for Xilinx. Intel has a way of buying companies or technologies and letting them wither on the vine due to lack of resources. I've often observed the "Business Area One" or "Cash Cow" phenomenon at large companies. Basically, whichever part of the company is bringing in the most money gets to call the shots, and any upstart alternate technologies within the company get crushed or at least held back by Business Area One who sees an internal threat. Examples include IBM 370 mainframes versus PowerPC, Microsoft Windows versus internal tablet OS work, and Intel x86 versus all of its RISC processors (Strong ARM, DEC Alpha, i432, i860, i960). The key to FPGA success is software, not silicon. Intel is a great company when it comes to high-performance silicon. OTOH, when I think of Intel software I think of PL/M. The smartest thing Intel could do with Altera is to open up the bitstream format and let the open source world take over FPGA software. Open documentation is IMO one of the most important reasons Intel processors have been so successful. They could revolutionize FPGA software by doing the same with Altera FPGAs. However, I really doubt they'll do it. JMO/YMMV