Difference between revisions of "Extend IOP16 minimal example"

From Land Boards Wiki
Jump to navigation Jump to search
Line 7: Line 7:
 
== Clone Sources ==
 
== Clone Sources ==
  
Clone the two repositories to the same directory level since relative paths are used for source files
+
* Clone the two repositories to the same directory level since relative paths are used for source files
 +
** [https://github.com/douggilliland/IOP16 IOP16 GitHub repository]
 +
** [https://github.com/douggilliland/Design_A_CPU Design a CPU GitHub repository]
  
* [https://github.com/douggilliland/IOP16 IOP16 GitHub repository]
+
=== Alternately download ZIP files ===
* [https://github.com/douggilliland/Design_A_CPU Design a CPU GitHub repository]
+
 
 +
* Alternately you can download the two ZIP files from GitHub
 +
 
 +
[[file:IOP16_PortingGuide_Download-Zip-Files.PNG]]
 +
 
 +
* Unzipped into the same folder
 +
 
 +
[[file:IOP16_PortingGuide_Unzipped-to-Folder.PNG]
 +
 
 +
* Rename the folders to remove the -main from the folder path
 +
 
 +
[[file:IOP16_PortingGuide_Remove-main.PNG]
  
 
== Build Minimal Example ==
 
== Build Minimal Example ==

Revision as of 11:18, 11 April 2022

Overview

Clone Sources

Alternately download ZIP files

  • Alternately you can download the two ZIP files from GitHub

IOP16 PortingGuide Download-Zip-Files.PNG

  • Unzipped into the same folder

[[file:IOP16_PortingGuide_Unzipped-to-Folder.PNG]

  • Rename the folders to remove the -main from the folder path

[[file:IOP16_PortingGuide_Remove-main.PNG]

Build Minimal Example

Start by building the minimal example in Quartus II

  • Open the Project file in Quartus II
  • Entities in Quartus should look like

IOP16 PortingGuide Entities.PNG

  • This example does not cover porting to a different FPGA card
    • Will need to adjust I/O pin assignments if a different FPGA is used
  • May need to re-point to the ROM .MIF file since Quartus II sometimes "forgets"
    • Double clicking on the IOP_ROM file

IOP16 PortingGuide Selecting ROM 2.PNG

Steps

  • Copy baseline design
  • Select/add peripherals
  • Create new peripherals
  • Write assembly code

Baseline Design

  • Starts from IOP example
    • Similar to Arduino "Blink Sketch" and uses the resources
      • Timer Unit 0 1 second timer
      • On-board LED
    • The Timer unit could be removed if desired
      • Timer makes Blink easier
  • Copy the minimal design to a new folder

Select Peripherals

Create new peripherals

Write Assembly code

Test the build