EasyManuals Logo

Xilinx MicroBlaze Reference Guide

Xilinx MicroBlaze
316 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #121 background imageLoading...
Page #121 background image
MicroBlaze Processor Reference Guide 121
UG984 (v2018.2) June 21, 2018 www.xilinx.com
Chapter 2: MicroBlaze Architecture
The standalone BSP provides the function microblaze_scrub() to perform scrubbing of
the entire LMB block RAM and all MicroBlaze internal block RAMs used in a particular
configuration. This function is intended to be called periodically from a timer interrupt
routine. One location of each block RAM is scrubbed every time it is called, using persistent
data to track the current locations.
The following example code illustrates how this can be done.
#include "xparameters.h"
#include "xtmrctr.h"
#include "xintc.h"
#include "mb_interface.h"
#define SCRUB_PERIOD ...
XIntc InterruptController; /* The Interrupt Controller instance */
XTmrCtr TimerCounterInst;/* The Timer Counter instance */
void MicroBlazeScrubHandler(void *CallBackRef, u8 TmrCtrNumber)
{
/* Perform other timer interrupt processing here */
microblaze_scrub();
}
int main (void)
{
int Status;
/*
* Initialize the timer counter so that it's ready to use,
* specify the device ID that is generated in xparameters.h
*/
Status = XTmrCtr_Initialize(&TimerCounterInst, TMRCTR_DEVICE_ID);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Connect the timer counter to the interrupt subsystem such that
* interrupts can occur.
*/
Status = XIntc_Initialize(&InterruptController, INTC_DEVICE_ID);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Connect a device driver handler that will be called when an
* interrupt for the device occurs, the device driver handler performs
* the specific interrupt processing for the device
*/
Status = XIntc_Connect(&InterruptController, TMRCTR_DEVICE_ID,
(XInterruptHandler)XTmrCtr_InterruptHandler,
(void *) &TimerCounterInst);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
Send Feedback

Table of Contents

Other manuals for Xilinx MicroBlaze

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Xilinx MicroBlaze and is the answer not in the manual?

Xilinx MicroBlaze Specifications

General IconGeneral
Architecture32-bit RISC
CacheConfigurable Instruction and Data Cache
CategorySoft Processor Core
Data Width32-bit
Memory Management Unit (MMU)Optional
Floating Point Unit (FPU)Optional
Interrupt ControllerConfigurable
Memory ManagementOptional MMU
ConfigurabilityHighly Configurable
Pipeline Stages3-stage
FPGA IntegrationXilinx FPGAs
Bus InterfacePLB
Debug InterfaceJTAG
Typical Clock SpeedVaries depending on FPGA and configuration (e.g., 100-400+ MHz)
ImplementationSoft core (synthesized logic)
Maximum PerformanceVaries with FPGA and configuration
Debug SupportIntegrated Debug Module

Related product manuals