Efinix Trion T20 Implementing PulseRain Reindeer RISC-V Soft CPU

Logic Home

Introduction

This introduction into the Efinix Trion T20 FPGA Evaluation Kit walks through implementing PulseRain’s Reindeer RISC-V Soft CPU on Efinix Trion T20 BGA256. Topics include connecting a JTAG, installing Efinity, building the RISC-V, programming the on-board configuration memory, and running example RISC-V projects.

Hardware Requirements

Base Boards

Accessories

Hardware Setup USB JTAG

Trion T20 JTAG H6 Header

TDO 3V3
TCK TDI
TMS nRST
GND GND

C232HM-DDHSL-0

Vcc Red
TCK Orange
TDI Yellow
TDO Green
TMS Brown
GPIOL0 Grey
GPIOL1 Purple
GPIOL2 White
GPIOL3 Blue
GND Black

Hardware Setup USB Serial

BANK1D_1E

49 48
47 46
45 44
GND GND

TTL-232R-3V3

GND Black
CTS# Brown
VCC Red
TXD Orange
RXD Yellow
RTS# Green

Software

Efinity® Integrated Development Environment

This project requires Efinity® Integrated Development Environment v2019.3.272

Zadig USB driver installation made easy

Download Zadig, which is a Windows application that installs generic USB driver

  • Open the Zadig software.
  • Choose Options > List All Devices.
  • Turn off Options > Ignore Hubs or Composite Parents.
  • Select the Trion T20 Development Board.
  • Select libusbK (version) next to Driver.
  • Click Replace Driver.
  • Repeat with the C232HM-DDHSL-0 JTAG


GitHub Desktop - Clone PulseRain Reindeer Trion Project

Download GitHub Desktop, so we can clone RTL code of PulseRain Reindeer.

1: File → Clone Repository
2: URL Tab
3: GitHub - PulseRain/Reindeer_Trion: PulseRain Reindeer RISC-V Soft CPU for Efinix Trion T20 BGA256 Development Kit

Arduino IDE

Download Arduino IDE

Building Reindeer Trion Project

Open: Project

./Reindeer_Trion/build/Reindeer_Trion.xml

Open Interface Designer

Generate Efinity Constraint Files

Close the Interface Designer after generation.

Start Synthesis

Flow → Synthesize

***** Ending stage netlist pre-processing *****
Wed February 5 20 14:19:31 - Flow data refreshed. Elapsed time = 0m 7.447s VM : 72.892 MB RSS : 106.912 MB
Wed February 5 20 14:19:31 - Running synthesis flow done. Duration = 0m 24.632s

Start Placement

Flow → Place

Wed February 5 20 14:20:54 - Flow data refreshed. Elapsed time = 0m 6.983s VM : 149.564 MB RSS : 186.184 MB
Wed February 5 20 14:20:54 - Running placement flow done. Duration = 0m 39.952s

Start Route

Flow → Route

Wed February 5 20 14:22:22 - Flow data refreshed. Elapsed time = 0m 12.47s VM : 572.36 MB RSS : 600.54 MB
Wed February 5 20 14:22:22 - Running routing flow done. Duration = 0m 26.69s

Start Generate Bitstream

Flow → Generate Bistream

Wed February 5 20 14:23:52 - C:/Efinity/2019.3/bin/efx_pgm finished. Exit code = 0 Exit status : Normal
Running hex generation flow done.
 
Wed February 5 20 14:23:52 - Running bitstream generation flow done. Duration = 0m 3.682s

Program the Kit through JTAG

Start Programmer

Tools → Open Programmer

  • USB Target: C232HM-DDHSL-0
  • Image: ./build/outflow/Reindeer_Trion.hex
  • Programming Mode: JTAG

Wed February 5 20 14:47:09 - Programming 'C:/GitHub/Reindeer_Trion/build/outflow/Reindeer_Trion.hex' via JTAG at freq 3.0 MHz
Wed February 5 20 14:47:09 - Device ID read from JTAG: 0x00210A79
Wed February 5 20 14:47:15 - ... finished with JTAG programming

Setup Arduino IDE

Additional Boards Manager URLS:

https://raw.githubusercontent.com/PulseRain/Arduino_RISCV_IDE/master/package_pulserain.com_index.json

Show verbose output during:

  • compilation
  • upload

  • Add support for the Reindeer thru Arduino’s “Boards Manager”

  • Board Manager: Select Efinix Trion T20 BGA256 Development Kit


Arduino RISC-V Example

void setup() {
  Serial.print(" ====================");
  GPIO_P3 = 0xAA;
  delay (2000);
}
 
uint32_t i = 0;
uint8_t led_position = 0;
 
void loop() {
  Serial.print (i);
  i = (i + 1) %(1024);
  Serial.print(" ==================== \n");
  delay (600);
  led_position = (led_position + 1) % 8;
  GPIO_P3 = ~(1 << led_position);
}

Comments

Any questions or comments please go to our TechForum: TechForum