Archive for category Web discoveries

Aurora Project: DIY liquid air

Aurora compressors (photo from the original website)


An ambitious overclocker put together one of the best DIY projects I’ve seen on the internet: a homebrew air liquefaction machine (site in French).

The setup is impressive, with 4 refrigeration stages equipped with compressors (like those in freezers, but bigger), hand-built heat exchangers (made from annealed copper tubes) and a huge list of various parts and bits (I wonder what the total project cost was, when home improvement retailers sell you a single valve for a dozen euros…)

I am not a big fan of overclocking, but I am excited by the other possibilities that such a project would bring. Do you want to cool down that thermal infrared camera? Ever wanted to play with superconductors? They are not so expensive, if you can cool them… Do you need a high vacuum, for, say, making your own triodes (french), building a cyclotron, making your own Nixie tubes (okay, you do not need that much of a vacuum for that, but why have two pumps) or VFDs, or for doing evaporative vapor deposition (DIY semiconductors, flexible PCBs, DIY OLEDs)? A sorption pump, commonly used as roughing pump in industrial setups and based on a molecular sieve costing a few dozen euros only, might provide you with what you want, but again requiring very low temperatures.

Way to go!

No Comments

Intel Atom processor core made FPGA-synthesizable

This interesting paper from Intel explains how they got a FPGA-based Atom processor running in a regular PC.

It gives some insight about how a modern processor is designed (entirely in SystemVerilog), how it could be ported to FPGA (including a lot of practical aspects), and about the debugging and testing phases (on real PC hardware).

“Once the netlist is produced by DC-FPGA, Xilinx ISE 10.1.03 is used to produce the final bitfile. However, it turns out that DC-FPGA in rare occasions can produce buggy netlist silently, even for a correctly developed RTL circuit that passes the RTL simulation”

“Though these behavioral RTL models can be naively passed to the logic synthesis tools which may sometimes infer appropriate FPGA-specific memory structures, for most structures we observed an explosion in LUT utilization.”

URL: http://portal.acm.org/citation.cfm?id=1508160

No Comments

New online bookmarks

After beginning to fill up the links category of this blog, I decided to move most of them to a more scalable page. Bonus, I get a classy Web 2.0 tag cloud.

http://lekernel.net/links/

No Comments

What Every Computer Scientist Should Know About Floating-Point Arithmetic

While searching for documentation to design the Milkymist FPU, I found this interesting paper, which describes how floating point arithmetic works in detail, and deals with its problems using a solid math basis. As its title says, I recommend it to anyone doing serious work with floating point numbers.

http://www.validlab.com/goldberg/paper.pdf

No Comments

re2c and Lemon, an elegant alternative to Flex and Bison

Now that the Milkymist hardware is sufficiently advanced, it’s time to run some real software on it.

I have started designing the subsystem that evaluates the per-frame and per-point equations ; a central component of the rendering process. Doing this requires parsing the preset code ; and this kind of task is usually done using a so-called compiler-compiler (or parser generator). Lex and Yacc (and often their GNU equivalents Flex and Bison) are perhaps the most popular tools, and were what I tried in the first place.

But it turned out that the code generated by them is laden with ugly global variables and, more importantly, not-so-portable glibc calls that would cause problems in the minimalistic Milkymist software environment, and which would require rather dirty hacks to solve. The cleanest option would have been to modify Flex and Bison, but, as often with GNU software, the code readability standard is pretty low and I would then have to maintain and distribute my modified tools ; turning the little technical problem into a development and management nightmare.

Fortunately, after some web crawling I found these two tools :

Both of them do not use global variables and no glibc calls, unless you enable assertions or debug output. I would say their only major problem is the scarcity of documentation ; and I basically ran into these two issues that could be pointed out better in the documentation :

  • Lemon associates numbers with each token type, and generates a include file listing them. You must use that include file. If you don’t, and try to supply your own numbers instead (coming straight from the lexer for instance), this will fail because the numbers are hardcoded in the parser (instead of using the identifiers from the generated include file).
  • Lemon uses a stack where it pushes tokens which did not cause a rule reduction yet. If you want to read the token string in the parser (and you often do), you will probably pass a pointer to the string to the Parse() function, and that pointer will be pushed on the parser stack. Then you have to be careful that the data pointed to is not modified until the parser is destroyed. A way to solve this problem is to make copies of the data and use the %token_destructor directive to make the parser automatically free those copies.
My re2c+Lemon parser dissecting a MilkDrop preset

My re2c+Lemon parser dissecting a MilkDrop preset

2 Comments

Big ideas (Don’t get any) Radiohead cover

You may already have seen this video, but I just love it :)

1 Comment

Designing the Milkymist warp engine

During the last days, I’ve been working on the warp engine for Milkymist. Warping is a computationally-intensive operation of the visualization rendering process which consists in taking the currently displayed picture and distorting it. This “distortion” can be of any kind – zooming, rotating, bumping, all at the same time, etc … and is configured by the MilkDrop preset.

The distorted picture has then some effects applied to it, waves and shapes are drawn to it, and the process repeats. This is basically how MilkDrop works.

The way warping is achieved is by using texture mapping on a triangle strip, which is done by your GPU when you run MilkDrop. Mathematically, this is a rather simple process, but when it comes to implementing it efficiently, it brings about long pipelines, precision problems and memory access issues. And CPUs, especially softcores, are way too slow for this task.

The new architecture is entirely based on the stream processing paradigm. Moving data around sometimes involves Verilog modules with nearly one hundred signals, but the resulting implementation should be very fast. Precision problems in linear interpolations are solved using Bresenham’s algorithm. Eventually, the warp engine launches pixel DMAs over the high-performance burst-oriented FML (Fast Memory Link) bus that has been designed as part of Milkymist.

sim_warper1

One last novelty is the use of  Verilator in the test bench. This free cycle-based simulator appears to be full of good ideas. Its main particularity is that it generates a C++ class that implements the behaviour of your IP core as if it was synthesized. This makes it a bit harder to use than other simulators, but brings about high performance and an easy connection of your simulated IP to the “outside world” – two key features when testing the warper engine where dozens of millions of transactions need to be simulated, and reading/writing to test images must be supported.

For smaller projects you can use Icarus Verilog and the GPL edition of CVer – two other good event-based simulators. With such tools, you can completely forget about Modelsim and other stuff with crazy licenses for most of your FPGA projects.

No Comments