Hey, UA-cam has decided to actually recommend this video to people. Thanks, faceless algorithm! Anyway, if you want more information, I forked the repo I show in the video and added some links to the README. github.com/SlithyMatt/Altera-Cyclone-IV-board-V3.0
My $0.02, Yeah you have to add in the new UDev rules to allow the JTAG daemon to access the USB device. Unplug the USB blaster then plug it back in to remount the device under the new rules. I don;t remember if you have to restart the JTAG daemon or not... its usually a systemctl service. Linux may be easier to work with vis-a-vis the board but whatever you are comfortable with... The board is booting from flash (as it were), the 4 DIP switches probably control what the FPGA loads its bitfile from. Ring out the 4 wires back to the FPGA and then use docs to determine how the switches should be set for a JTAG boot (if no docs available). When running in a JTAG boot mode, after a power recycle, there should be no activity on the board other than maybe some status LEDs. Speaking of LEDs there may be some to show the load status of the bitfile, from the internal loader in the FPGA.. not sure on that though, most of my experience is in the Xilinx devices. The manufacture may have cheaped out on those status LEDs as well. Cheers,
As a Linux and free software die-hard, I've been enjoying working with IceStorm and the Lattice ICE40 devices it targets. My current favorite dev board is the Upduino 3. Admittedly, this is a somewhat less powerful class of devices, but they do enough to be interesting, and being able to do FPGA development without proprietary vendor tools or Windows is quite nice. It was pretty close to plug and play, to the extent that any FPGA experience can be.
Matt, these boards have actually been around for years, I bought my first one perhaps 7 years ago, there is also a "Core Board" version which breaks all the peripherals out as separate add-on modules and to date, I've never had one not work yet. They have been around easily over 10 years already and are the mainstay and workhorse of university labs and student projects all across Asia and I'm sure, Africa as well. The nicer labs have some Terasic boards, but as they cost a lot more, there may not be enough to go around (might not even let you touch them unless you can prove that you're not going to blow it up). OMDAZZ in my perspective appears to be a relatively new player, most seem to have no name on them (mine certainly don't), so for OMDAZZ to go to the trouble of putting their name of theirs seems like they are trying to be a significant player. The other (lower cost China boards) ones to look out for with FPGAs are WaveShare, QMTech (QMTech has their own Github repos with all docs, and they have more Xilinx offerings), MicroPhase and Alinx which seems to be making quite an effort to become a trusted sources for development boards, but the latter ones, like Alinx have very pricey offerings. Take note that there are two types of "USB Blaster" - the really cheap, little blue one, and a bigger beige one. The cheaper blue one is an STM32F1 (no idea if original or clone, could itself be a clone) with a buffer chip, but the bigger beige one has an FTDI chip + Intel Max CPLD + buffer chip. I haven't had much luck with the little Blue one, they don't seem to last, but the Beige one seems to be working really well.
I had this same trouble with Linux + Quartus JTAG USB permissions a few years ago with a different board even (a high-quality Terasic board). It took a ton of fiddling with udev rules to finally get it working. I wish I could remember the steps I followed, but I seem to remember changing udev rules, unplugging and plugging in the probe, and killing the "jtagserver" process. Maybe not in that order, and I'm sure I had to do it several times.
Yeah, it looks like the same process that a lot of people have taken. Still not convinced that the USB Blaster I'm using is actually real, though. Doesn't work on Windows, either, it turns out.
Oh no! Yeah sounds like a bad probe indeed. When I had all my issues, swapping to Windows fixed it. I will say as a software developer by training, all the tooling for FPGA development was definitely the most frustrating part of the process.
I've got two Intel/Altera dev boards from Terasic and using Windows for them never really worked for me. Two of the only three times that I have ever had BSODs with Windows 10 were when I was trying to program these boards (the other time was when I had just upgraded my PC and one of the RAM modules was not seated properly). Of course, these boards did come with documentation, albeit sparse, but I managed to get them working under Linux quite nicely. I did something similar as shown in your video: adapt the Linux udev configuration. This is relatively simple and relatively safe. The USB blaster (built into the board) drivers work perfectly.
You can see in my follow up video, I got it working with Windows and Linux now with the Terasic USB Blaster. After making the Linux rules change, the knockoff blaster works, too.
@@slithymatt I am glad to hear it. I am changing my setup anyhow. When I first started out with electronics a little over four years ago, FPGAs were a total mystery to me. Truth to be told, they still are to a certain extent, but I have been able to improve my knowledge of electronics a bit more (I come from a IT background, not an electronics background). Instead of using my main PC for different things and having to switch between OSes, I now have a dedicated workstation for all my electronics work, with the exception of electronics design, which I still do on my main workstation, although design would be stretching the truth a bit, because I am an amateur at best.
Some clarifications. You did hit on many of these points, but a little expansion may be helpful if you're not aware. The USB blaster is the standard Altera tool to program over JTAG. You actually got a very good deal there, because it came with a stand alone blaster which usually costs around $50 by itself (at least it use to through Terasic). The purple on the PS/2 is just the plastic color. The connector doesn't care if it's a keyboard, a mouse, or a C64 disk-drive (you would obviously have to adapt the physical connector), the pins are just wires. What determines the function of the peripheral, is how the logic is attached to it. So if you put in a PS/2 mouse module then it's for a mouse, likewise for a keyboard. You could even use a module that can do both PS/2 keyboard and mouse via one of those Y cables. The EEPROM is to program a non-volatile image onto the board (the FPGA is empty when it first powers on, and can "boot" from the EEPROM first). Normally during development though, you program a volatile configuration into the configuration SRAM scattered throughout the FPGA via JTAG (the blaster). The Cyclone IV was released in 2009 - I'm not sure why the Chinese site claimed it was easier to learn though... maybe because you can touch the pins with an oscilloscope? The code provided by the git repo was Verilog, not VHDL. You can combine both languages in separate files, but not in the same file, so take notice of the difference. Also, VHDL cannot include Verilog headers and vice versa, so that's something else to keep in mind. The main reason you couldn't fit a CX16 in that FPGA is due to the size of the Vera and the required SRAM. Though it does have SDRAM, but the controller there will take up space too. It doesn't have enough SRAM for a C64 either, but you could probably fit a C64 using the DRAM instead of SRAM (or something like the CX16 using DRAM instead of SRAM and a simpler video chip). Also doing that, you would likely be able to run it at 50MHz+. Keep in mind that you can't just download a core from online and compile / program it. You need to glue the core(s) together with the physical interface (the I/O pins), and add a signal/pin constraint file.
You probably hit the famous issue running the programmer without the 32 bit udev library. You need to install it via the normal installer from your distro. And most likely make a symlink from the freshly installed libudev.so.1 to libudev.so.0 in the same directory. The path of the file differs from distro to distro, on my gentoo install this was in /lib64 but places like /lib/x86_64-linux-gnu seem to be common. The FPGA learning curve is more a brick wall than a curve, but once you can look over the edge, it suddenly becomes amazing what is possible.
Reminds me a bit of one of the DE boards from Terasic. Maybe a DE0 Edit: Those cheap blasters are notoriously a PITA. On Windows it bluescreen'd my computer immediately until I installed some sketch unsigned drivers. Altera wrote the Windows drivers from what I have gathered, hence them only working with the stupid expensive "official" blasters. I have heard it's easier in Linux, but apparently not haha. I think I saw someone else mention, I'd confirm any DIP switches are all configured correctly on the board as well. Otherwise it could be some udev stuff as I think I saw someone else mention.
Soldering, not welding. The difference is that you can undo soldering by removing the solder material without harming the parts that are joined, but welding can not be easily undone without destruction of the joint.
High quality welding lmao. You should buy these from a proper vendor to get access to the datasheets, schematics, etc. Makes it more approachable for beginners.
I don't think so. Nothing I've seen in any docs would indicate that. Generally, these things are made to be able to do networked reprogramming, no need to physically touch it.
LOL! I actually haven't ordered new checks in years. Still have a stack of them with my old address. Use about 2 or 3 a year. Those old checks will outlive me!
@@marcelhh2101 Having not ventured into the world of FPGAs yet, this board looks cheap enough and interesting enough for me to pick one up to tinker with. But what sort of retro cores will this board support? Will it do 16-bit core emulation, like the Commodore Amiga?
@@terrydaktyllus1320 I'm pretty sure this one isn't capable of that--according to the datasheet for the FPGA in this thing it has 6,000 logic elements, whereas the Motorola 68000 in an Amiga had 68,000 transistors. Obviously it takes more than one transistor to make a "logic element", but I'm pretty sure it doesn't take 11 of them, which is what would be required for this to support 68k. There are variants of this FPGA that would support enough logic elements to do that, but I would assume they're far more expensive.
Hey, UA-cam has decided to actually recommend this video to people. Thanks, faceless algorithm! Anyway, if you want more information, I forked the repo I show in the video and added some links to the README. github.com/SlithyMatt/Altera-Cyclone-IV-board-V3.0
My $0.02,
Yeah you have to add in the new UDev rules to allow the JTAG daemon to access the USB device. Unplug the USB blaster then plug it back in to remount the device under the new rules. I don;t remember if you have to restart the JTAG daemon or not... its usually a systemctl service. Linux may be easier to work with vis-a-vis the board but whatever you are comfortable with...
The board is booting from flash (as it were), the 4 DIP switches probably control what the FPGA loads its bitfile from. Ring out the 4 wires back to the FPGA and then use docs to determine how the switches should be set for a JTAG boot (if no docs available). When running in a JTAG boot mode, after a power recycle, there should be no activity on the board other than maybe some status LEDs.
Speaking of LEDs there may be some to show the load status of the bitfile, from the internal loader in the FPGA.. not sure on that though, most of my experience is in the Xilinx devices. The manufacture may have cheaped out on those status LEDs as well.
Cheers,
As a Linux and free software die-hard, I've been enjoying working with IceStorm and the Lattice ICE40 devices it targets. My current favorite dev board is the Upduino 3. Admittedly, this is a somewhat less powerful class of devices, but they do enough to be interesting, and being able to do FPGA development without proprietary vendor tools or Windows is quite nice. It was pretty close to plug and play, to the extent that any FPGA experience can be.
Matt, these boards have actually been around for years, I bought my first one perhaps 7 years ago, there is also a "Core Board" version which breaks all the peripherals out as separate add-on modules and to date, I've never had one not work yet. They have been around easily over 10 years already and are the mainstay and workhorse of university labs and student projects all across Asia and I'm sure, Africa as well. The nicer labs have some Terasic boards, but as they cost a lot more, there may not be enough to go around (might not even let you touch them unless you can prove that you're not going to blow it up). OMDAZZ in my perspective appears to be a relatively new player, most seem to have no name on them (mine certainly don't), so for OMDAZZ to go to the trouble of putting their name of theirs seems like they are trying to be a significant player. The other (lower cost China boards) ones to look out for with FPGAs are WaveShare, QMTech (QMTech has their own Github repos with all docs, and they have more Xilinx offerings), MicroPhase and Alinx which seems to be making quite an effort to become a trusted sources for development boards, but the latter ones, like Alinx have very pricey offerings. Take note that there are two types of "USB Blaster" - the really cheap, little blue one, and a bigger beige one. The cheaper blue one is an STM32F1 (no idea if original or clone, could itself be a clone) with a buffer chip, but the bigger beige one has an FTDI chip + Intel Max CPLD + buffer chip. I haven't had much luck with the little Blue one, they don't seem to last, but the Beige one seems to be working really well.
I had this same trouble with Linux + Quartus JTAG USB permissions a few years ago with a different board even (a high-quality Terasic board). It took a ton of fiddling with udev rules to finally get it working. I wish I could remember the steps I followed, but I seem to remember changing udev rules, unplugging and plugging in the probe, and killing the "jtagserver" process. Maybe not in that order, and I'm sure I had to do it several times.
Yeah, it looks like the same process that a lot of people have taken. Still not convinced that the USB Blaster I'm using is actually real, though. Doesn't work on Windows, either, it turns out.
Oh no! Yeah sounds like a bad probe indeed. When I had all my issues, swapping to Windows fixed it. I will say as a software developer by training, all the tooling for FPGA development was definitely the most frustrating part of the process.
I've got two Intel/Altera dev boards from Terasic and using Windows for them never really worked for me. Two of the only three times that I have ever had BSODs with Windows 10 were when I was trying to program these boards (the other time was when I had just upgraded my PC and one of the RAM modules was not seated properly).
Of course, these boards did come with documentation, albeit sparse, but I managed to get them working under Linux quite nicely. I did something similar as shown in your video: adapt the Linux udev configuration. This is relatively simple and relatively safe. The USB blaster (built into the board) drivers work perfectly.
You can see in my follow up video, I got it working with Windows and Linux now with the Terasic USB Blaster. After making the Linux rules change, the knockoff blaster works, too.
@@slithymatt I am glad to hear it. I am changing my setup anyhow. When I first started out with electronics a little over four years ago, FPGAs were a total mystery to me. Truth to be told, they still are to a certain extent, but I have been able to improve my knowledge of electronics a bit more (I come from a IT background, not an electronics background). Instead of using my main PC for different things and having to switch between OSes, I now have a dedicated workstation for all my electronics work, with the exception of electronics design, which I still do on my main workstation, although design would be stretching the truth a bit, because I am an amateur at best.
Some clarifications. You did hit on many of these points, but a little expansion may be helpful if you're not aware.
The USB blaster is the standard Altera tool to program over JTAG. You actually got a very good deal there, because it came with a stand alone blaster which usually costs around $50 by itself (at least it use to through Terasic).
The purple on the PS/2 is just the plastic color. The connector doesn't care if it's a keyboard, a mouse, or a C64 disk-drive (you would obviously have to adapt the physical connector), the pins are just wires. What determines the function of the peripheral, is how the logic is attached to it. So if you put in a PS/2 mouse module then it's for a mouse, likewise for a keyboard. You could even use a module that can do both PS/2 keyboard and mouse via one of those Y cables.
The EEPROM is to program a non-volatile image onto the board (the FPGA is empty when it first powers on, and can "boot" from the EEPROM first). Normally during development though, you program a volatile configuration into the configuration SRAM scattered throughout the FPGA via JTAG (the blaster).
The Cyclone IV was released in 2009 - I'm not sure why the Chinese site claimed it was easier to learn though... maybe because you can touch the pins with an oscilloscope?
The code provided by the git repo was Verilog, not VHDL. You can combine both languages in separate files, but not in the same file, so take notice of the difference. Also, VHDL cannot include Verilog headers and vice versa, so that's something else to keep in mind.
The main reason you couldn't fit a CX16 in that FPGA is due to the size of the Vera and the required SRAM. Though it does have SDRAM, but the controller there will take up space too. It doesn't have enough SRAM for a C64 either, but you could probably fit a C64 using the DRAM instead of SRAM (or something like the CX16 using DRAM instead of SRAM and a simpler video chip). Also doing that, you would likely be able to run it at 50MHz+.
Keep in mind that you can't just download a core from online and compile / program it. You need to glue the core(s) together with the physical interface (the I/O pins), and add a signal/pin constraint file.
Thanks for the info, I’ll think I’ll stick with my AMD-Xilinx arty board, it has suffice to internal memory for vic20 and C64 projects.
Beamoaning Windows promiscuity while being pushed into it's arms by your abusive Linux box. Priceless. 🙂
At the end of the day, I know that Linux loves me for who I am.
You probably hit the famous issue running the programmer without the 32 bit udev library. You need to install it via the normal installer from your distro. And most likely make a symlink from the freshly installed libudev.so.1 to libudev.so.0 in the same directory. The path of the file differs from distro to distro, on my gentoo install this was in /lib64 but places like /lib/x86_64-linux-gnu seem to be common. The FPGA learning curve is more a brick wall than a curve, but once you can look over the edge, it suddenly becomes amazing what is possible.
Reminds me a bit of one of the DE boards from Terasic. Maybe a DE0
Edit:
Those cheap blasters are notoriously a PITA. On Windows it bluescreen'd my computer immediately until I installed some sketch unsigned drivers. Altera wrote the Windows drivers from what I have gathered, hence them only working with the stupid expensive "official" blasters. I have heard it's easier in Linux, but apparently not haha. I think I saw someone else mention, I'd confirm any DIP switches are all configured correctly on the board as well. Otherwise it could be some udev stuff as I think I saw someone else mention.
would you be able to post the links in the description for the sites you visited during your research?
Sure, I'll get those tonight.
Soldering, not welding. The difference is that you can undo soldering by removing the solder material without harming the parts that are joined, but welding can not be easily undone without destruction of the joint.
Yeah, I think it was just a mistranslation.
High quality welding lmao. You should buy these from a proper vendor to get access to the datasheets, schematics, etc. Makes it more approachable for beginners.
Could there be a button / jumper to be pressed before flashing to enable programming it, like a reset switch? That may be an issue
I don't think so. Nothing I've seen in any docs would indicate that. Generally, these things are made to be able to do networked reprogramming, no need to physically touch it.
Wait. The new cheques that you've ordered? Do cheques still exist?! I haven't seen one for easily over a decade.
LOL! I actually haven't ordered new checks in years. Still have a stack of them with my old address. Use about 2 or 3 a year. Those old checks will outlive me!
the volume is so low I can't hear you.
Haha! "And if I turn it on.." Video goes blackscreen, then cue ads.
You cant use the latest and greatest with the older devices.
Really? It says it works with Cyclone IV dev boards and includes them as options for targets.
@@slithymatt Hmmm probably only from 4 and up. An yes thats a perfectly fine FPGA. Welcome to the club👍🏼
By the way board prices are going up steadily so no cheap FPGAs anymore. At least not the ones that are actually us-full for retro core’s.
@@marcelhh2101 Having not ventured into the world of FPGAs yet, this board looks cheap enough and interesting enough for me to pick one up to tinker with. But what sort of retro cores will this board support? Will it do 16-bit core emulation, like the Commodore Amiga?
@@terrydaktyllus1320 I'm pretty sure this one isn't capable of that--according to the datasheet for the FPGA in this thing it has 6,000 logic elements, whereas the Motorola 68000 in an Amiga had 68,000 transistors. Obviously it takes more than one transistor to make a "logic element", but I'm pretty sure it doesn't take 11 of them, which is what would be required for this to support 68k. There are variants of this FPGA that would support enough logic elements to do that, but I would assume they're far more expensive.
Those super cheap USB blaster clones are literal garbage, IMO. I don't remember the issue, but mine had serious problems when I tried to use it.
Yeah, I may have to pay twice what I did for the whole kit to buy a real one from Terasic
Just do a 'chmod 666 /dev/usb*'. If it isn't allowed use 'sudo' before it.
Might be a horrible systemd version Linux distro though