Difference between revisions of "Extend IOP16 minimal example"

From Land Boards Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
* This is not the same as [[Embed_IOP16|Embedding the IOP16 into another design]]
 
* This is not the same as [[Embed_IOP16|Embedding the IOP16 into another design]]
 
* This guide requires general familiarity with [[IOP16_16-bit_I/O_CPU_Design|IOP16 16-bit I/O CPU Design]]
 
* This guide requires general familiarity with [[IOP16_16-bit_I/O_CPU_Design|IOP16 16-bit I/O CPU Design]]
 +
 +
= Baseline Design =
 +
 +
* Starts from [https://github.com/douggilliland/IOP16/tree/main/Higher_Level_Examples/TestIOP16_Minimal|minimal 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
 +
 +
== Steps ==
 +
 +
* Copy baseline design
 +
* Select/add peripherals
 +
* Create new peripherals
 +
* Write assembly code
  
 
== Clone Sources ==
 
== Clone Sources ==
Line 54: Line 70:
  
 
[[file:IOP16_PortingGuide_ROM_TestTimer.PNG]]
 
[[file:IOP16_PortingGuide_ROM_TestTimer.PNG]]
 
== Steps ==
 
 
* Copy baseline design
 
* Select/add peripherals
 
* Create new peripherals
 
* Write assembly code
 
 
= Baseline Design =
 
 
* Starts from [https://github.com/douggilliland/IOP16/tree/main/Higher_Level_Examples/TestIOP16_Minimal|minimal 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 [https://github.com/douggilliland/IOP16/tree/main/Higher_Level_Examples/TestIOP16_Minimal|the minimal design] to a new folder
 
  
 
= Select Peripherals =
 
= Select Peripherals =

Revision as of 11:38, 11 April 2022

Overview

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

Steps

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

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

IOP16 PortingGuide Unzipped-to-Folder.PNG

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

IOP16 PortingGuide Remove-main.PNG

Build Minimal Example

Start by building the minimal example in Quartus II

  • 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
  • Open the Project file in Quartus II

IOP16 PortingGuide Open-Project-File.PNG

  • Entities in Quartus should look like

IOP16 PortingGuide Entities.PNG

  • Build FPGA (click the blue "Start Compilation arrow)
  • Build does not verify the ROM file
    • 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

  • Hit finish, if you get error

IOP16 PortingGuide ROM Error.PNG

  • Re-point to the ROM file
  • Make sure to select .MIF file extension

IOP16 PortingGuide ROM TestTimer.PNG

Select Peripherals

Create new peripherals

Write Assembly code

Test the build