JayV
Published © MIT

Build your soft Risc-V with XO4 in 5 steps

Beginners tutorial how to create a soft-core in a MachXO4 Flash-based fpga using Radiant and Propel tools in 5 steps

BeginnerFull instructions provided1 hour1
Build your soft Risc-V with XO4 in 5 steps

Things used in this project

Hardware components

Lattice Semiconductor LFMXO4-110-EVN
×1

Software apps and online services

Lattice Semiconductor Radiant Software
Lattice Semiconductor Propel System Builder

Story

Read more

Schematics

Schematic

Propel Builder Schematic

Code

Constraint File

Tcl
Hardware constraint file
## XLeds - bottom to top Red Diode [D6,D3,D5,D2,D1,D7,D8,D4] = Xled [5,2,4,1,0,6,7,3] = Pin[ F4,G4,G3,G1,H2,H1,J2,J1]
ldc_set_location -site {J1} [get_ports {gpio_00_io[0]}]
ldc_set_location -site {J2} [get_ports {gpio_00_io[1]}]
ldc_set_location -site {H1} [get_ports {gpio_00_io[2]}]
ldc_set_location -site {H2} [get_ports {gpio_00_io[3]}]
ldc_set_location -site {G1} [get_ports {gpio_00_io[4]}]
ldc_set_location -site {G3} [get_ports {gpio_00_io[5]}]
ldc_set_location -site {G4} [get_ports {gpio_00_io[6]}]
ldc_set_location -site {F4} [get_ports {gpio_00_io[7]}] 

## gpio 9th bit is input = SW3
ldc_set_location -site {D4} [get_ports {gpio_00_io[8]}] 

ldc_set_port -iobuf {IO_TYPE=LVCMOS33 DRIVE=8} [get_ports {gpio_00_io[*]}]

ldc_set_location -site {D3} [get_ports rstn_i]
ldc_set_port -iobuf {IO_TYPE=LVCMOS33 PULLMODE=UP} [get_ports rstn_i]

##custom RX/TX pins on X2 connector : pin1: GND, pin5 RX, pin7 TX
 ldc_set_location -site {C17} [get_ports uart_rxd_00_i]
 ldc_set_location -site {D14} [get_ports uart_txd_00_o]
 ldc_set_port -iobuf {IO_TYPE=LVCMOS33 PULLMODE=UP} [get_ports uart_rxd_00_i]
 ldc_set_port -iobuf {IO_TYPE=LVCMOS33 PULLMODE=UP} [get_ports uart_txd_00_o]

Credits

JayV
30 projects • 34 followers
Silicon crazy for profession, silicon do-it-yourselves at Home.

Comments