Why mod.. when you can make?

User Tools

Site Tools


blog:is_zikzak_project_alive_yes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

blog:is_zikzak_project_alive_yes [2020/01/18 01:21] (current)
skeezix created
Line 1: Line 1:
 +====== Is Zikzak project alive? Yes! Enter, the FPGA.. ======
 +
 +A couple of years have gone by since I've updated this developer blog; wherever do the years go? (well, I have small kids.. the years go fast!) ​ So for awhile, real life did get the better of me, and I admit when I did get small tidbits of time I went to some low hanging yet very interesting fruits .. fiddling a bit with simple human shaped robots. Designed a simple chest, arm and leg robot, where definition of robot is.. chest had a couple of mini servos to make the arms and leg first segments move, while arms (and legs which were a variant of arm) had mini servos so they could bend in the middle. The arms were enough to be able to pick up small things when used as tongs, and the legs could stand it up and let it twist the hips or bend forward and back a bit. I stalled at getting walkingh and such to work, as that requires quite some kinetics and human bone structuring to work, and who has the time? ...
 +
 +Anyway, back to Zikzak, which was always about learning how to construct a computer from scratch, with varying degrees of scratch. (Does one go so far as to design their own cpu? their own LCD panel? where do you stop?); with zikzak sbc rev3 I got pretty happy with the results - it had the Z80 (eZ80) cpu, the ARM chip that pretended to be a GPU (to emit VGA), as well as being live programmable so it could take over other tasks, or even drive the clock on the eZ80, so the ARM could be used as a z80 debugger or to slow and speed the chip.. insane! We had a working cartridge port, and enough GPIO lines if we wanted to '​cheat'​ on the retro styled design and have SD cards or other peripherals. And it worked, more or less. 
 +
 +Video was a little wiggly, and the limits of having a high speed ARM chip triggering on interrupts while also working a lot of data on the bus via GPIO was showing limits. And writing it all in C rather than assembly, to keep life easier on the limited free time. The image was fairly sharp (see videos on youtube) but if you looked closely, especially under higher load operations, you could see some small wiggle .. the timing per pixel or per edge could get a little off and you'd see that in the video. Its amazing how well you can pick up the smallest timing misfire!
 +
 +At the time I often considered FPGAs, but that technology stack seemed a bridge too far .. while learning a fair amount of the basics, but at least being a very good software developer, meant I could at least focus on those digital electronics basics. But FPGA, thats an entirely different kind of development - going to Verilog or VHDL, and essentially designing your own chips. ​
 +
 +A year or two back I did pick up some basic FPGA stuff and experiment; I got into the Xilinx Spartan-6 line, because in general FPGAs were very expensive, with expensive toolchains, expensive dev boards, expensive programmers .. especially if you went with the branded stuff. But for Spartan-6 you suddenly were able to get some pretty inexpensive boards on ebay or Aliexpress, and knock-off ISP programmers and so on. FPGAs are where you essentially upload a chip design into _another_ chip, and when the FPGA powers on it pulls the config from that other location and starts running it a moment later. So not only do you need the FPGA, you need a flash chip or another micro or something to feed it, plus the supporting hardware for development. Yet with these little beay boards, you could get a low end Spartan-6 class dev board for $50-$150 depending what else you wanted on there (lcd? switches? GPIO pins? VGA outputs? etc). Nice! 
 +
 +The Spartan-6 platform, while extraordinarily flexible, is also fairly dated.. hence why the cost of the chips has gone down, and for some subset of those chips Xilinx will give away the old toolchain for free. But that toolchain ("​ISE"​) is pretty old and it shows, and is even relatively hard to install .. the typical runtime nowadays is a VM image that you can download and run in Virtualbox (say); and then you're runnin ginto client Linux to host Linux/​Windows issues with USB, but it does work pretty well.
 +
 +Documentation is intimidating and spread wide for Spartan-6 (15 or so PDFs if memory is right) but you can get sdtarted with some examples and walkthroughs pretty quick; the toolchain is deep and intimidating. The languages you generalyl use (Verilog or VHDL or both, depending on your preferences) are also not well documented out in the wild .. many books are very expensive textbooks or vendor books. Again, this is changing _fast_ .. 10 years ago, very expoensive and hard to find books and boards.. 2-3 years aog, boards showing up, books somewhat available but still not very present. ​ And the Spartan-6 chips I could afford and that worked with toolchains (such as XC6SLX9 say) weren'​t super powerful .. a fair number of logic units to '​compile to', but not much block ram or the like internally on the die; you really needed offboard RAM modules and peripherals,​ which complicated the design .. especially for beginners.
 +
 +That all said, its amazing how much work you can get done in an FPGA with very little code, once you get your head around it. ie: Some kinds of tasks ar super well suited to traditional processors or micros, but brutal to implement in an FPGA; other tasks are the reverse.. translate super cleanly to FPGA but a tonne of effort to get right in the traditional world. VGA is one of these tasks -- it really only takes a couple pages of '​code'​ to express a VGA output (sync, display a colour), with crisp perfect timings. Amazing!
 +
 +So, I did get a simple very basic 'video card' working in Spartan-6... and then timed passed, and real life hit again. Next up, Spartan-7...
 +
 +{{tag>​ez80 zikzak fpga}}
 +
 +
 +~~DISCUSSION~~
  
/home/skeezix/public_html/zikzak.ca/zikzak.ca/dokuwiki/__data/pages/blog/is_zikzak_project_alive_yes.txt ยท Last modified: 2020/01/18 01:21 by skeezix