Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 252
» Latest member: VoidStar
» Forum threads: 102
» Forum posts: 295

Full Statistics

Online Users
There are currently 14 online users.
» 0 Member(s) | 12 Guest(s)
Google, Yandex

Latest Threads
Beginner Tutorials
Forum: General Questions
Last Post: Mudkip177
6 hours ago
» Replies: 3
» Views: 46
Loader for MacOS?
Forum: General Questions
Last Post: prebys
08-11-2020, 09:17 PM
» Replies: 0
» Views: 20
Reading motor speed using...
Forum: General Questions
Last Post: john.tilghman@protonmail.com
07-30-2020, 11:28 PM
» Replies: 0
» Views: 94
Au/Cu new version boards ...
Forum: General Questions
Last Post: john.tilghman@protonmail.com
07-29-2020, 10:13 PM
» Replies: 2
» Views: 269
Au clean Vivado project a...
Forum: General Questions
Last Post: LMN128
07-23-2020, 02:16 PM
» Replies: 0
» Views: 115
Understanding I/O
Forum: General Questions
Last Post: jdeschamps
07-22-2020, 04:50 PM
» Replies: 4
» Views: 2,176
Unable to upload sketch t...
Forum: General Questions
Last Post: RedPants
06-17-2020, 04:34 AM
» Replies: 3
» Views: 669
How to implement a simple...
Forum: General Questions
Last Post: MichaelTuckwell
06-15-2020, 11:35 PM
» Replies: 2
» Views: 396
lucid analog input tutori...
Forum: General Questions
Last Post: alchitry
06-15-2020, 07:52 PM
» Replies: 4
» Views: 1,075
Alchitry in Linux
Forum: General Questions
Last Post: alchitry
06-15-2020, 07:45 PM
» Replies: 5
» Views: 988

  Help with Lucid - Structs and Globals
Posted by: Rory - 03-09-2019, 05:28 PM - Forum: General Questions - Replies (1)

I was hoping that somebody (probably at Alchitry) might feel like writing a short tutorial about how to use Structs and Globals.
I feel like they could help simplify my designs, but I am honestly at a loss for how to use them. 

I bought Justin's book (see cheesy photo), and that was a great help when I was just starting with my first projects, but the sections on structs and globals have just left me confused.

For instance, how "global" really is a globally defined struct? 
Can I define it in one module, then make an instance of it in another module, and assign members to different things like a dff?
Can I even have multiple instances of the same struct? 
Is that question even meaningful? 
Does a struct either have to be wholly an input or wholly an output?
If something is a global (like a struct), why would I bother putting it in a module port list as an input or output, since I should just be able to refer to it from anywhere. ???

I have read the relevant sections multiple times, and attempted to just figure out structs/globals out by trial and error, but honestly, I'm just confused as hell.

I'll keep spreading the good word about Alchitry/Lucid regardless, but any help would be greatly appreciated. 

[Image: JjxLMYMhB6SeljFYb2tFaQpOySwnoCOLgTlixdfX...42-h159-no]

  Cu Demo Project fails to build with IceStorm
Posted by: kitlaan - 03-07-2019, 01:23 AM - Forum: General Questions - Replies (7)

Using Alchitry Labs 1.0.3 on Linux using the ubuntu-provided IceStorm packages (fpga-icestorm et al).

I had the IDE create a new Lucid "Cu IO Element Demo" project and built it.

It fails with:


Finished synthesis.

Project IceStorm doesn't support .sdc constraints. "/home/.../CuDemo/work/constraint/alchitry.sdc" will be ignored.
seed: 1
device: 8k
read_chipdb +/share/arachne-pnr/chipdb-8k.bin...
 supported packages: cb132, cb132:4k, cm121, cm121:4k, cm225, cm225:4k, cm81, cm81:4k, ct256, tq144:4k
read_blif /home/.../CuDemo/work/alchitry.blif...
read_pcf /home/.../CuDemo/work/constraint/alchitry.pcf...
fatal error: $_TBUF_ gate must drive top-level output or inout port

Finished placement.
Error: Failed to open input file.

Bin file (/home/.../CuDemo/work/alchitry.bin) could not be found! The build probably failed.

  Unable to build project
Posted by: iggyglass - 03-06-2019, 08:30 PM - Forum: General Questions - Replies (3)

Whenever I attempt to build a project that I'm working on, I get the following error, and I'm unsure as to how to fix it:

Bin file (C:\Users\[My Username]\OneDrive\Documents\alchitry\CPU\work\vivado\CPU\CPU.runs\impl_1\au_top_0.bin) could not be found! The build probably failed.
I haven't tried anything to fix it yet, as since the error is a bit cryptic, I'm not sure what to try. 

Let me know if you need any additional information. 

Any help would be appreciated! Thanks!

  Using Virtual Machine
Posted by: serge - 03-03-2019, 11:10 AM - Forum: Tips and Tricks - Replies (1)

I am currently working on a Mac OS machine and to access the Cu/Au board I am using a virtual machine running debian buster.

To get the loader to work I had to use the new one and install the udev rule (obviously, as documented), but this is not sufficient per-se.

Usually, once the VM is running I'm doing everything from the MacOS terminal by ssh-ing to the VM (to avoid to deal with the «GUI» of the VM). When doing this the loader does not work (or in a very chaotic way). In particular it would «see» the board only if it was plugged in during the boot, flashing would sometime stop and reset in the middle of the process… (I am sure it is not a «board problem» since they work perfectly well with a «real» debain buster machine).

Indeed there seems to be small compatibilities issues with vritualbox; so here are the workarounds I have found to get a working solution :

* Setting the VM to use the xHCI (USB3.0) controller (in the configuration->ports->USB)
* Opening a GUI session on the VM (even if not really using it)

With this on (the «proper» virtual USB controller, and the session being opened) I can use the loader (indeed even within my ssh session rather than the «local session within the VM»).

These indeed seems to me more problems from virtual-box than from the Alchitry software, but I guess some other might be trying to using a similar technique to work on a Mac (or other unsupported OS).

Hope this will help.

  Alchitry Cu Serial Interface
Posted by: rrc - 02-28-2019, 08:20 PM - Forum: General Questions - Replies (2)

in the schematic I can see, that two pins of the ICE40 are connected as RxD and TxD to the FTDI chip. Is this a serial interface to communicate the FPGA?
If yes: how do I connect to on PC side? The FTDI did not appear as /dev/tty* device on my Linux machine.


Wink Alchitry Loader on 32-bit Machines (Linux)
Posted by: rrc - 02-28-2019, 06:04 PM - Forum: Tips and Tricks - Replies (10)

For other users using the ancient 32-bit processor architecture the software package is not executable directly as it is only compiled for 64-bit computers. Fortunately it is possible to emulate such a processor with qemu-x86_64 contained by the qemu-user package in the Debian distribution. I was successfully able to upload a bitstream to my Alchitry Cu by executing

qemu-x68_64 ./tools/loader -f  test.bin
in the extracted package directory of Alchitry Loader.
I don't think that it is possible to launch the GUI easy like this. But in my usecase it is all I wanted since I use project Icestorm directly to develop my stuff on that FPGA.


For the Alchitry Cu there is a way better solution in using the iceprog tool of project IceStorm.
I was able to upload the bitstream by just executing
iceprog test.bin
This tool should be available for many devices. For Debian it is in the package fpga-icestorm

  Alchitry Cu and Io Pulldown Resistors
Posted by: Geo747 - 02-26-2019, 09:37 PM - Forum: General Questions - Replies (1)

I've been trying to get the Io board to work with the Cu today. I'm using verilog and Icecube2 with the alchitry loader (not using the alchitry ide). I'm trying to set up a .pcf file for the IO and have all the LEDs working correctly but cant get the switches or buttons to work. I believe this is because I need to set the inputs to have pull down resistors, as per the schematic, however I cant find any documentation of the iCE40-HX8K that suggests it has pull down resistors available on its inputs. In the icecube2 pin constraints editor only pull up resistors are available, and they havent helped in my scenario. When I have the pullup enabled, I just get a constant high logic level from that pin, and when the pullup isnt enabled it has erratic behaviour and will turn on or change state when i touch the button's casing, without actually depressing the button.

If someone knows what im missing to get it to work that would be much appreciated.


  Cu - how to start?
Posted by: wing - 02-24-2019, 06:46 PM - Forum: General Questions - Replies (5)

Hi ,
   Just received the Alchitry Cu, look great.
May I ask how to get started? It seem the tutorials are still for "mojo v3" and using Xilinx tools.


  Alchitry Io Switches with Au
Posted by: garthberry - 02-22-2019, 03:22 PM - Forum: Tips and Tricks - No Replies

After trying to get the switches (DIP and pushbutton) Alchitry Io working for a little too long it finally occurred to me that pulldowns need to be enabled for each of the pins attached to a switch. If pulldowns are not enabled the pin will typically float high. The pulldown resistor can be enabled on a pin by pin basis in the  constraints file as follows:

set_property PACKAGE_PIN C4 [get_ports {dip_sw[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports {dip_sw[0]}]
set_property PULLDOWN TRUE [get_ports {dip_sw[0]}]

  Clocking with Lattice Parts
Posted by: samuelcomeau - 02-22-2019, 06:25 AM - Forum: General Questions - Replies (2)

So with the Mojo, the way to get new clocks was to use coregen via the awesome installed button. Since Cu is a Lattice part there is obviously not a coregen option. Therefore, how do I get my higher or lower clock signal?