25.11.2014 Views

RealView ARMulator ISS User Guide - ARM Information Center

RealView ARMulator ISS User Guide - ARM Information Center

RealView ARMulator ISS User Guide - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong><strong>ARM</strong>ulator</strong> 参 考<br />

4.10.4 <strong>ARM</strong>ul_BusRegisterPeripFunc<br />

外 围 设 备 模 型 必 须 调 用 此 函 数 来 向 <strong><strong>ARM</strong>ulator</strong> 进 行 注 册 这 可 使 <strong><strong>ARM</strong>ulator</strong> 在<br />

任 何 时 候 都 可 以 通 过 访 问 属 于 外 部 的 存 储 器 地 址 来 调 用 此 外 设 模 型<br />

<br />

int <strong>ARM</strong>ul_BusRegisterPeripFunc(enum BusRegAct act,<br />

<strong>ARM</strong>ul_BusPeripAccessRegistration *breg);<br />

其 中<br />

act 是 所 需 的 操 作 act 必 须 为 以 下 其 中 一 个 值 insert 或 remove<br />

breg 是 包 含 信 息 的 <strong><strong>ARM</strong>ulator</strong> 结 构 您 可 以 通 过 调 用<br />

<strong>ARM</strong>ulif_ReadBusRange 来 获 得 此 结 构 请 参 阅 第 4-51 页<br />

<strong>ARM</strong>ulif_ReadBusRange<br />

breg 是 <strong>ARM</strong>ul_BusPeripAccessRegistration 类 型 的 一 种 结 构<br />

情 请 参 阅 <strong>ARM</strong>ul_BusPeripAccessRegistration<br />

有 关 详<br />

<strong>ARM</strong>ul_BusPeripAccessRegistration<br />

文 件 armul_bus.h 中 声 明 了 这 种 结 构 和 类 型<br />

该 文 件 位 于<br />

ExtensionKit_path/1.3/Final/platform/armulif<br />

在 该 路 径 中<br />

• platform 是<br />

— Windows 的 win_32-pentium<br />

— Linux 的 linux-pentium<br />

— Solaris 的 solaris-sparc<br />

• 对 于 Windows 请 用 \ 替 换 /<br />

声 明 如 下<br />

typedef struct <strong>ARM</strong>ul_BusPeripAccessRegistration {<br />

<strong>ARM</strong>ul_BusPeripAccessFunc *access_func;<br />

void *access_handle;<br />

uint32 capabilities; /* See PeripAccessCapability_* below */<br />

struct <strong>ARM</strong>ul_Bus *bus;<br />

/* 0=> normal peripheral, earlier in list than anything it<br />

* overlaps with. */<br />

unsigned priority;<br />

/* 0..100%<br />

* A higher number will be placed earlier in the list than<br />

* anything that it doesn't overlap with and has a lower access_frequency.<br />

*/<br />

<strong>ARM</strong> DUI 0207ASC-00 Copyright © 2002, 2003 <strong>ARM</strong> Limited 版 权 所 有 4-45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!