Summary of Building a PIC18C and System-on-a-Chip in an FPGA
The PIC18C project involves designing a synthesizable VHDL model of the Microchip PIC18C microcontroller, verifying it with assembly and C programs, and implementing it on an FPGA. The core is fully compatible with the PIC18 series, enabling high-level language development.Parts used in the PIC18C FPGA Project:
- Data Processing Unit (DPU)
- Arithmetic-Logic Unit (ALU)
- Multiplier
- Rotater
- Bit-Operation Processor (BOP)
- Instruction Decoder
- Fetcher
- Instruction Register
- Program Counter
- Hardware Return Stack
- Block RAM
- Constant Data Fetcher
- Register File
- Reset
- Watchdog Timer
- ROM
- Spartan-II Development Kit
- Xilinx Spartan-II XC2S100 FPGA
- Standard text-based LCD module
- MPLAB development system
Description
The goal of the PIC18C project is to design, develop a synthesizible VHDL model, verify it using test programs, and implement a core of the Microchip PIC18C microcontroller. The microcontroller core is fully compatibile with the PIC18 series allowing program development using high-level programming languages such as C.
The project phases are described below.
1. Design
The design phase involves the detailed study of the architecture and instruction set. The key elements of the architecture are defined: instruction fetcher, decoder, register file, etc. The instruction set is examined and grouped to facilitate decoding.
2. VHDL Model Development
The key architectural components derived from the design phase are used to form the VHDL model hierarchy. The hierarchy is shown below.
PIC
Data Processing Unit (DPU)
Arithmetic-Logic Unit (ALU)
Multiplier
Rotater
Bit-Operation Processor (BOP)
Instruction Decoder
Fetcher
Instruction Register
Program Counter
Hardware Return Stack
Block RAM
Constant Data Fetcher
Register File
Block RAM
Reset
Watchdog Timer
ROM
Block RAM
3. Verification
The initial PIC operation verification is done by writing a single assembly language test file for each instruction. The program was assembled using Microchip’s MPLAB development system. A simple C program is used to convert the output of the Assembler (HEX format) into a format suitable for cut-and-paste into the ROM array.
4. Implementation & Demonstation
The PIC is sucessfully synthesized and implemented using Spartan-II Development Kit with Xilinx Spartan-II XC2S100 FPGA. The PIC operation is demonstrated by displaying a “Hello world” type string onto a standard text-based LCD module. This milestone is reached on April 20th.
Photo Album



Source: Building a PIC18C and System-on-a-Chip in an FPGA
Quick Solutions to Questions related to PIC18C FPGA Project:
-
What is the primary goal of the PIC18C project?
The goal is to design, develop a synthesizable VHDL model, verify it using test programs, and implement a core of the Microchip PIC18C microcontroller. -
How is the microcontroller core verified?
Verification is done by writing a single assembly language test file for each instruction and using a simple C program to convert assembler output into a format for the ROM array. -
Which hardware platform was used for implementation?
The PIC was successfully synthesized and implemented using the Spartan-II Development Kit with Xilinx Spartan-II XC2S100 FPGA. -
Can the core be programmed using high-level languages?
Yes, the microcontroller core is fully compatible with the PIC18 series allowing program development using high-level programming languages such as C. -
What tool was used to assemble the test programs?
The program was assembled using Microchip's MPLAB development system. -
What demonstration was performed after implementation?
The PIC operation was demonstrated by displaying a Hello world type string onto a standard text-based LCD module. -
What are the key architectural elements defined in the design phase?
The key elements include the instruction fetcher, decoder, register file, and the instruction set which is examined and grouped to facilitate decoding. -
How was the assembler output prepared for the ROM array?
A simple C program was used to convert the output of the Assembler in HEX format into a format suitable for cut-and-paste into the ROM array.
Related projects
Interfacing and Communicating with the 68HC05/705 Microcontroller Family
This document provides information necessary to interface the Andromeda Research EPROM+ programming system to certain members of the Motorola 68HC05/705 microcontroller family....
Other MicrocontrollersAVR Microcontroller Based Electronic Voting Machine
Introduction The use of electronic voting machines has become common in many countries due to technological advancements. However, the emergence of the...
Other MicrocontrollersSimulating the Water Cycle in a Desert
Abstract: The objective of my project is to create an automated watering system for succulent plants. In this project, an Arduino microcontroller...
Other MicrocontrollersHow to get started with TensorFlow Lite for Microcontrollers
Want to build your own TinyML application? This is a detailed approach to getting started with TensorFlow Lite for Microcontrollers! Story Introduction...
Other MicrocontrollersTemperature Access Point Using an AVR® DA Microcontroller
Inspired by COVID-19 prevention, we have developed a system that measures the temperature of persons before they enter a building by Temperature...
Other MicrocontrollersIn-depth: TensorFlow Lite for Microcontrollers – Part 2
This blog details the inner workings of TensorFlow Lite for Microcontrollers and the role of Flatbuffers in them. Story of TensorFlow Lite...