Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

Before You Start

Introduction

This topic assumes that you satisfy the requirements outlined earlier in Expected Background and that you have reviewed the following sections to prepare:

It also assumes that you already have a board for which you want to write a driver. Before you start, use the following checklist to specify the driver you want to write:

Driver Types

Bus Types and Register Access

The xPC Target software supports the two standard PC bus types, ISA and PCI. The ISA bus is a 16-bit bus with an 8 MHz clock. Another form of ISA bus is the PC/104. The PCI bus is a 32-bit or 64-bit bus with a 33 MHz or 66 MHz clock. Another form of PCI bus is the PC/104+ (PC/104-Plus).

A driver performs I/O accesses through either I/O ports or memory addresses (memory mapped).

The xPC Target software accesses I/O port addresses for ISA and PCI buses as follows:

BusAccess
ISABoard switches or jumpers usually select I/O port address and any memory-mapped region.
PCIThe BIOS determines the I/O port address during PCI PNP (Plug and Play) configurations.

The memory space for I/O boards is different for ISA and PCI boards.

BusMemory Space
ISAThe xPC Target software only permits use of the memory address between 0xA0000 and 0xFFFFF
PCIUpper memory address space, typically greater than 2 GB

Register Access

A device board supports either I/O port or memory-mapped access to onboard registers. See the board manufacturer's register programming documentation.

Inlining xPC Target Drivers

You can choose to inline or not inline xPC Target drivers. Note the distinction between Simulinkand Real-Time Workshop® conditional compilation. Writing a device driver as an inlined S-function ensures that the driver can coexist with xPC Target device drivers.

Inlining drivers allows you to customize code generated from Real-Time Workshop. If you choose to create inlined drivers, you must use the Real-Time Workshop Target Language Compiler.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS