ZHCUAU3K January 2018 – March 2025
编译器通过添加 __cregister 关键字来扩展 C/C++ 语言,从而使用高级别语言访问控制寄存器。
在对象上使用 __cregister 关键字时,编译器会将对象的名称与标准控制寄存器列表进行比较(请参阅表 5-5)。如果名称匹配,编译器将生成引用控制寄存器的代码。如果名称不匹配,编译器将发出错误。
以下控制寄存器在 c7x.h 头文件中声明。此外,大量扩展控制寄存器 (ECR) 在 c7x_ecr.h 中声明。
| 类别 | 寄存器 | 说明 |
|---|---|---|
| 常规控制寄存器 | CPUID | CPU ID 寄存器 |
| PMR | 电源管理寄存器 | |
| DNUM | DSP 内核数寄存器 | |
| TSC | 时间戳计数器寄存器 | |
| TSR | 任务状态寄存器 | |
| RP | 返回指针寄存器 | |
| BPCR | 分支预测器控制寄存器 | |
| STSC | 影子时间戳计数器寄存器 | |
| 计算控制寄存器 | FPCR | 浮点控制寄存器 |
| FSR | 标志状态寄存器 | |
| GPLY | 伽罗瓦多项式寄存器 | |
| GFPGFR | 伽罗瓦域多项式发生器函数寄存器 | |
| 事件控制寄存器 | DEPR | 调试事件优先级寄存器 |
| IESET | 内部异常事件集寄存器 | |
| ESTP_SS | 事件服务表指针寄存器,安全监控器 | |
| ESTP_S | 事件服务表指针寄存器,监控器 | |
| ESTP_GS | 事件服务表指针寄存器,来宾监控器 | |
| ECSP_SS | 事件上下文保存指针寄存器,安全监控器 | |
| ECSP_S | 事件上下文保存指针寄存器,监控器 | |
| ECSP_GS | 事件上下文保存指针寄存器,来宾监控器 | |
| TCSP | 任务上下文保存指针 | |
| RXMR_SS | 返回执行模式寄存器,安全监控器 | |
| RXMR_S | 返回执行模式寄存器,监控器 | |
| AHPEE | 启用最高优先级的事件寄存器,当前正在使用 | |
| PHPEE | 启用最高优先级的事件寄存器,挂起 | |
| IEBER | 内部事件广播启用寄存器 | |
| IERR | 内部异常报告寄存器 | |
| IEAR | 内部异常地址寄存器 | |
| IESR | 内部异常状态寄存器 | |
| IEDR | 内部异常数据寄存器 | |
| TCR | 测试计数寄存器 | |
| TCCR | 测试计数配置寄存器 | |
| GMER | 来宾模式启用寄存器 | |
| UMER | 用户掩码启用寄存器 | |
| SPBR | 栈指针边界寄存器 | |
| UFCMR | 用户标志清除掩码寄存器 | |
| IPE | 处理器间事件寄存器 | |
| 查找表和直方图控制寄存器 | LTBR0 至 LTBR3 | 查找表基址寄存器 |
| LTCR0 至 LTCR3 | 查找表配置寄存器 | |
| LTER | 查找表启用寄存器 | |
| 调试控制寄存器 | var tiPageName = 'Literature reader-ZHCUAU3K-zh_CN'; var tiDocType = 'User\'s Guide'; var tiLibraryStore = new com.TI.tiLibrary.tiLibraryStore(); var tiLibraryViewerStore = tiLibraryStore.viewer_store; RiotControl.addStore(tiLibraryStore); var subRoutes = riot.route.create(); subRoutes("/document-viewer/*/datasheet/*\\?*#*", function(gpn, url, params, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + gpn + "/datasheet/" + url + "#" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/datasheet/*#*", function(gpn, url, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + gpn + "/datasheet/" + url + "#" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/datasheet/*", function(gpn, url) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + gpn + "/datasheet/" + url, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/*/datasheet/*\\?*#*", function(locale, gpn, url, params, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + locale + "/" + gpn + "/datasheet/" + url + "#" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/*/datasheet/*#*", function(locale, gpn, url, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + locale + "/" + gpn + "/datasheet/" + url + "#" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/*/datasheet/*", function(locale, gpn, url) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + locale + "/" + gpn + "/datasheet/" + url, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/datasheet#*/*", function(gpn, url, fragment) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + gpn + "/datasheet#" + url + "/" + fragment, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/*/datasheet#*/*", function(locale, gpn, url, fragment) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + locale + "/" + gpn + "/datasheet#" + url + "/" + fragment, toc: true, set_content: true }); }); subRoutes("/document-viewer/lit/html/*", function(litnum) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/lit/html/" + litnum, toc: true, set_content: true }); }); subRoutes("/document-viewer/lit/html/*/*\\?*#*", function(litnum, url, params, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/lit/html/" + litnum + "/" + url + "#" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/lit/html/*/*#*", function(litnum, url, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/lit/html/" + litnum + "/" + url + "#" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/lit/html/*#*/*", function(litnum, url, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/lit/html/" + litnum + "#" + url + "/" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/lit/html/*#*/*", function(locale, litnum, url, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + locale + "/lit/html/" + litnum + "#" + url + "/" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/lit/html/*/*", function(litnum, url) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/lit/html/" + litnum + "/" + url, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/lit/html/*/*\\?*#*", function(locale, litnum, url, params, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + locale + "/lit/html/" + litnum + "/" + url + "#" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/lit/html/*/*#*", function(locale, litnum, url, anchor) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + locale + "/lit/html/" + litnum + "/" + url + "#" + anchor, toc: true, set_content: true }); }); subRoutes("/document-viewer/*/lit/html/*/*", function(locale, litnum, url) { RiotControl.trigger("ti_library_open_viewer", { document: tiLibraryViewerStore.document, documentLocale: tiLibraryViewerStore.documentLocale, url: "/document-viewer/" + locale + "/lit/html/" + litnum + "/" + url, toc: true, set_content: true }); }); var compose_url = function(q) { //URL format: scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment] var tempUrl = q.url.replace("//www.ti.com.cn/", ""); var url = tempUrl.replace("//www.ti.com.cn/", ""); if (q.search != null) { var params = ""; var hash = ""; var url_parts = url.split('#'); if (url_parts.length == 2) { url = url_parts[0]; hash = url_parts[1]; } var param_parts = url.split('?'); if (param_parts.length == 2) { url = param_parts[0]; var parsed_params = param_parts[1].split('&'); var keyword_param_found = false; for (var i = 0; i < parsed_params.length; i++) { if (parsed_params[i].indexOf('search=') == 0) { keyword_param_found = true; parsed_params[i] = 'search=' + q.search; } } if (!keyword_param_found) { parsed_params.push('search=' + q.search); } params = parsed_params.join('&'); } else { params = 'search=' + q.search; } if (params > "") { url = url + '?' + params; } if (hash > "") { url = url + '#' + hash; } } return url; }; tiLibraryViewerStore.compose_url_route = function(location, q) { return compose_url(q); }; tiLibraryViewerStore.compute_content_href = function(href, url) { return url; }; tiLibraryViewerStore.compose_topic_url = function(location, q) { return compose_url(q); }; tiLibraryViewerStore.important_notice_url = "//www.ti.com.cn/document-viewer/cn/lit/html/ZHCUAU3K/important_notice#ImpNotice001"; var ods_reader = riot.mount('ti-library-viewer', { store: tiLibraryStore.list_store, viewerstore: tiLibraryViewerStore }); riot.route.base('/'); riot.route.start(true); compute_document_locale = function(docName) { var locale = 'en_US'; if (docName) { if (docName.toLowerCase().indexOf('z')===0) { locale = 'zh_CN'; } else if (docName.toLowerCase().indexOf('j') == 0) { locale = 'ja_JP'; } } return locale; } open_reader = function() { var path = window.location.pathname.split('/'); var path_minus_filename = ''; for (var i = 0; i < path.length - 1; i++) { if (i == 0 && path[i] == '') { console.log("double slashes found in beginning of document path; treating document path as local machine path"); continue; } path_minus_filename += "/" + path[i]; } RiotControl.trigger("ti_library_open_viewer", { documentLocale: compute_document_locale( "ZHCUAU3K"), document: { href: path_minus_filename, lit_num: "ZHCUAU3K", doc_type: "User's Guide", show_toc: "true", translated_doc_type: "用户指南", gpn: "", title: "C7000 优化 C/C++ 编译器 v5.0.0.LTS", disclaimer: "本资源的原文使用英文撰写。 为方便起见,TI 提供了译文;由于翻译过程中可能使用了自动化工具,TI 不保证译文的准确性。 为确认准确性,请务必访问 ti.com 参考最新的英文版本(控制文档)。 ", product: "//www.ti.com.cn/product/cn/", email: 'mailto:?subject=ZHCUAU3K C7000 优化 C/C++ 编译器 v5.0.0.LTS&body=http://www.ti.com.cn/document-viewer/cn/lit/html/ZHCUAU3', download: '//www.ti.com.cn/cn/lit/pdf/ZHCUAU3K', tistore: '//store.ti.com/Search.aspx?k=&pt=-1', productstatusdescription: '' }, url: "/document-viewer/cn//datasheet/GUID-C74CA356-95FD-4F71-992E-5E563A66D6B1", prepopulated: true, modalOptions: { dismissible: false } }); } open_reader(); |