Menu

Mecrisp-Ice Port to Large FPGAs

2026-01-28
2026-02-17
  • Aaron Viejo

    Aaron Viejo - 2026-01-28

    I am experimenting with porting Mecrisp-Ice to larger FPGAs (e.g. Lattice Certus).
    The selected source folder is the mecrisp-ice-master/hx8k.
    Radiant is the FPGA IDE with nucleus.hex initialized dpram 8192x16 (just 2-port not true).

    1. Setting up the build environment in linux appears to be an issue. Running compile:
      atod2@H97M-VM:~/Documents/mecrisp-ice-master/hx8k$ compile
      Tidy up...
      Compile nucleus...
      tdp 101E tcp 0
      Compile Ice Cream Machine...
      ./compile: line 12: fpc: command not found
      Compile additional Forth sources...
      ./compile: line 16: ./emulator/icecreammachine: No such file or directory
      Generate initial data for RAM blocks...
      ./compile: line 19: python: command not found
      Synthesize design...
      ./compile: line 22: yosys: command not found
      Place and Route...
      ./compile: line 25: arachne-pnr: command not found
      Create Bitstream...
      ./compile: line 28: icepack: command not found
      ./compile: line 29: icemulti: command not found
      Finished.

    2. The hx8k nucleus.fs compiles only up to main. The basisdefinitions.fs extended definitions need to be added to the bitstream but do not compile in the script.

    3. I have been able to get nucleus.hex to run and display the startup banner but terminal input of a single number or a word always results in a space ? on the terminal output. The uart Rx data was verified after key in accept by an io! to the eval board leds. Unicode is not needed since the input is from a uart.

    Any comments or suggestions would be appreciated.

     
    • Matthias Koch

      Matthias Koch - 2026-02-05

      Hi Aaron,

      looks as if you are missing build dependencies. To compile and synthesise, Mecrisp-Ice needs GForth, the Freepascal Compiler, and the oss-cad-suite for the FPGA flow one can download from here: https://github.com/YosysHQ/oss-cad-suite-build/releases

      Matthias

       
  • Igor M

    Igor M - 2026-02-16

    Aaron, with Radiant IDE you do not need yosys suite. What you need is the gforth and fpc (freepascal). I've been playing with xilinx in ise14.7, so it is a similar situation. I installed the gforth and fpc into linux mint and while in the HX8k it will then compile the bram memory hex file fine (simply with ./compile). You will get errors with yosys but you do not need yosys. so ignore them simply. You need only 1 hex file from the built directory (iceimage.hex) with the bram memory content. Put it into your Radiant environment and include it into the Radiant bitstream build (there is the command in a verilog file which reads it). It may happen you have to adjust the paths for the includes.. And of course you have to collect all necessary verilog files and the constraint file into your Radiant env too.. Not a Sunday afternoon project if doing it first time, however..

     

    Last edit: Igor M 2026-02-16
  • Igor M

    Igor M - 2026-02-17

    Here are the necessary files for building up the j1a with mecrisp. The ucf file is the constraints file with pin defines (might be different ext name and format in Radiant). As I wrote above the verilog files may need some finetuning/editing when using with different IDEs and fpgas..

    PS: A decade++ back I started with mecrisp on stm32 and then moved to ice40UP5k. Tried various IDEs and environments (Yosys, IceCube2, Radiant, Apio). Here is the repo with my experiments, made for beginners .. Mind that in my repo the stuff is of some age, Matthias has made many improvements in mecrisp-ice since then.. I've been using the floating point lib you may find there even today on Xilinx..

    https://github.com/igor-m/UPduino-Mecrisp-Ice-15kB/tree/master

     

    Last edit: Igor M 2026-02-17

Log in to post a comment.

MongoDB Logo MongoDB