-1

I'm trying the very first example supplied here: http://www.clifford.at/icestorm/

I'm trying to program the iCEblink40-HX1K board in windows using the digilent adept program https://reference.digilentinc.com/reference/software/adept/start?redirect=1#software_downloads

When I'm starting up Adept, the program says:

Loading board information... Warning: Could not find specific board information Default information loaded.

When I'm selecting the example.bin program from iCEstorm, the adept program says "Invalid address. Address must be entered as Binary, DEcimal, or Hexadecimal value.".

So I just entered zero, click on "file>>Device" to upload the binary file, and the program says:

Successfully read 32220 bytes from F:\me\fpga\example.bin.

However, the "blinking lights" demo that already came with the board just keeps running. Nothing seems to have changed.

I'm figuring that either the example.bin doesn't contain the correct address in the file, or that the lack of board info for the digilent adept program is the cause of the issue.

In any case, would anybody know what address it could be?

mime
  • 1
  • 3

2 Answers2

0

Thanks Clifford, now it works.

First a bit of a mini rant (directed at the guy who laid out the PCB).

  • There are numbers next to the header rows on the HX1K evaluation kit (page 4): http://www.mouser.com/pdfdocs/iCEblink40Datasheet.pdf These don't correspond to the actual pins on the vq100 package, and the datasheet doesn't mention what these numbers supposed to mean.

  • However, on page 14 it does mention which fpga pins end up at which connector.

  • the schematic guy didn't even bother to draw the vq100 package?!

A simple image or table with the vq100 pinout is also difficult to find. Lattice does supply one excel sheet: http://www.latticesemi.com/~/media/LatticeSemi/Documents/PinPackage/iCE/iCE40PinoutHX1K.xlsx?document_id=49383 but it assumes you know what "IOL_1A" means. The HX1K datasheet has no pinout overview.. What on earth is going on?

Anyway, back to business: I noticed that pin 11 on the vq100 package is a power pin, so the example for the ice40stick was never going to work with the same pinout. After reassigning the I/O pins to pin 1, 2, and 3, the example just worked! I flashed it using the iceutil.exe, for some reason the Adept software is refusing to do flash anything anymore.

Many thanks, now it's time to start playing around with the code a bit.

mime
  • 1
  • 3
-1

I don't have the solution yet but iCE40ProgrammingandConfiguration.pdf http://www.latticesemi.com/view_document?document_id=46502 on page 12 says:

Upon initial power-up, the start address is always 0x00_0000. After waiting eight additional clock cycles, the iCE40 device begins reading serial data from the SPI PROM.

So it looks like programming the .bin file from 0 should have worked.

I've tried programming with the iceutil programmer that comes with icecube2, as described in iCEblink40HX1KEvaluationKitUsersGuide.pdf http://www.latticesemi.com/view_document?document_id=45922

FPGA Bitstream Configuration File The required bitstream image is part of the iCEcube2 project. Multiple versions of the bitstream are stored in the _Implmnt\sbt\outputs\bitmap directory. The raw hexadecimal version of the bitstream is called _bitmap.hex. The alternate format of the same information is an Intel hexadecimal file called _bitmap_int.hex. Raw Hexadecimal Command Example /iceutil -d iCE40 -res -cr -m M25P10A -fh -w _bitmap.hex Intel Hexadecimal Command Example /iceutil -d iCE40 -res -cr -m M25P10A -fi -w _bitmap_int.hex

I presume that my file should be programmed as a binary file, using -fb

iceutil -d iCE40 -res -cr -m M25P10A -fb -w <my path>/example.bin

That seems to have programmed, the capsense demo stopped working on the board, the red power LED is on, the yellow "done" LED is on, and the iceutil tool says:

Doing partial erase of flash memory device Writing file /example.bin to flash memory device Bytes written to flash: 32220

However, the example file was supposed to and the inputs 1 and 10, and produce the output on 11. That's not working. Also all LEDs are dimly on, which seems wrong.

// example.v
module top (input a, b, output y);
  assign y = a & b;
endmodule

# example.pcf
set_io a 1
set_io b 10
set_io y 11

I've tried iceutil to program back the capsense demo and that works fine.

It is starting to look like I can't use the yosys binary file together with the iceutil programmer, unless I'm using the wrong syntax.

mime
  • 1
  • 3
  • The numbers in the .pcf file are pin number on the ice40 chip you have to look up the iceblink schematic to figure out where those pins go on the iceblink board. The default for unused pins is pull-up, so dimly on LEDS are to be expected when you don't drive the led pins. The icestorm github repo contains a working iceblink example. I'd recommend that you simply use that: https://github.com/cliffordwolf/icestorm/tree/master/examples/iceblink – CliffordVienna Jan 13 '17 at 11:56