Xilinx 3.2 manual Core with Acceptance Filtering

Page 26

Chapter 4: Detailed Example Design

Five messages are written in sequence:

1.The first message is written to the TXHPB and is a standard data frame.

2.The second message is written to the TX FIFO and is a standard data frame.

3.The third message is written to the TX FIFO and is a standard remote frame.

4.The fourth message is written to the TX FIFO and is an extended data frame.

5.The fifth message is written to the TX FIFO and is an extended remote frame.

After each message is written, the test bench waits for the assertion of the interrupt line. When the interrupt line is asserted, the following conditions occur:

The bits set in the ISR are displayed.

The RX FIFO is read if the RXOK bit is set. The message received is compared with the message previously transmitted.

The ICR is written to. This clears the bits in the ISR that are set.

With no acceptance filtering, all five messages are received in the RX FIFO.

Core with Acceptance Filtering

The demonstration test bench performs the following tasks:

Input clock signals are generated.

A reset is applied to the example design.

The Baud Rate Prescalar register and Bit Timing registers are written to. These registers are read from and the values read are compared with the values written.

The Interrupt Enable Register is written to enable interrupts for TXBFLL and RXOK bits. This register is read from and the value read is compared with the value written.

Acceptance Filter ID Register 1 and Acceptance Filter Mask Register 1 are written to. These registers are read from and the values read are compared with the values written.

The Acceptance Filter Register is written to enable Acceptance Filter pair 1. This register is read from and the value read is compared with the value written.

The Mode Select Register is written to select Loop Back mode. This register is read from and the value read is compared with the value written.

The Software Reset Register is written to enable CEN bit. This register is read from and the value written is compared with the value read.

Five messages are written in a sequence.

1.The first message is written to the TXHPB and is a standard data frame.

2.The second message is written to the TX FIFO and is a standard data frame.

3.The third message is written to the TX FIFO and is a standard remote frame.

4.The fourth message is written to the TX FIFO and is an extended data frame.

5.The fifth message is written to the TX FIFO and is an extended remote frame.

After each message is written, the test bench waits for the interrupt line to be asserted. When the interrupt line is asserted, the following conditions occur:

The bits in the ISR that are set are displayed.

The RX FIFO is read if the RXOK bit is set. The message that is received is compared with the message that was transmitted.

The ICR is written to. This clears the bits in the ISR that are set.

26

www.xilinx.com

CAN Getting Started Guide

 

 

UG186 April 19, 2010

Image 26
Contents LogiCORE IP can UG186 April 19Revision History Version RevisionTable of Contents Detailed Example Design Schedule of Figures 1Example DesignCan Getting Started Guide Conventions Guide ContentsAbout This Guide Online Document Preface About This Guide Convention Meaning or Use ExampleWindows IntroductionAbout the Core System Requirements LinuxTechnical Support Recommended Design ExperienceAdditional Core Resources FeedbackLicense Options Licensing the CoreBefore you Begin Simulation OnlyInstalling Your License File Obtaining Your License KeyQuick Start Example Design OverviewGenerating the Core Quick Start Example DesignSimulating the Example Design Setting up for SimulationImplementing the Example Design Implementing the Example DesignFunctional Simulation Timing SimulationDetailed Example Design Directory and File Contents Componentname/doc Directory and File ContentsComponentnameexample design Name DescriptionComponentname/simulation Componentname/implementComponentname/implement/results 5Implement Directory Name DescriptionComponentname/simulation/functional Simulation/timing Implementation Scripts Implementation ScriptsSimulation Scripts Example Design Configuration 1illustrates the example design configurationDemonstration Test Bench Demonstration Test BenchTest Bench Functionality Core with Acceptance Filtering Customizing the Demonstration Test Bench Changing the DataDetailed Example Design