首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >通过JTAG的系统控制台无法执行master_write_32 -当目标正在运行时,不能这样做吗?

通过JTAG的系统控制台无法执行master_write_32 -当目标正在运行时,不能这样做吗?
EN

Stack Overflow用户
提问于 2012-07-22 23:50:48
回答 1查看 2.3K关注 0票数 4

我有一个用Verilog编写的简单控制器,用于配置Altera的TSE MAC。到目前为止,这是相当简单的。然而,我下一步要做的是设置很多Marvel PHY的设置,同时监控PHY和MAC的统计数据和错误等。在HW中这样做似乎有点过头了,所以我决定集成一个Nios CPU。但在继续并在软件中实现该组件之前,我希望使用系统控制台快速构建该想法的原型。无论如何,这是我的QSys基础系统:

MAC实例被称为tse_mac,其思想是通过CPU的data_master读/写control_port来配置它。

在设置系统并运行之后,我已经使用系统控制台连接到它。我假设它通常是有效的,因为它能够获取master服务路径:

代码语言:javascript
运行
复制
% get_service_paths master
{/devices/EP2AGX260@1#7-1/(link)/JTAG/(70:34 v3 #0)/nios2_0}

它也可以很好地打开。但是,当尝试写入32位值时,它会立即失败:

代码语言:javascript
运行
复制
% get_service_paths master
{/devices/EP2AGX260@1#7-1/(link)/JTAG/(70:34 v3 #0)/nios2_0}
% open_service master "/devices/EP2AGX260@1#7-1/(link)/JTAG/(70:34 v3 #0)/nios2_0"

% master_write_32 "/devices/EP2AGX260@1#7-1/(link)/JTAG/(70:34 v3 #0)/nios2_0" 0x400 0x00000000;
error: com.altera.systemconsole.internal.plugin.jtag.oci.Nios2DebugException: Can't do this while target is running
    while executing
"master_write_32 {/devices/EP2AGX260@1#7-1/(link)/JTAG/(70:34 v3 #0)/nios2_0} {0x400} {0x00000000}"
    while executing
"master_write_32 "/devices/EP2AGX260@1#7-1/(link)/JTAG/(70:34 v3 #0)/nios2_0" 0x400 0x00000000"
% 

以下是例外情况:

代码语言:javascript
运行
复制
Jul 22, 2012 12:17:39 PM com.altera.systemconsole.internal.core.SystemConsole logSevere
SEVERE: com.altera.systemconsole.internal.plugin.jtag.oci.Nios2DebugException: Can't do this while target is running
java.util.concurrent.ExecutionException: com.altera.systemconsole.internal.plugin.jtag.oci.Nios2DebugException: Can't do this while target is running
    at com.altera.systemconsole.internal.core.SimpleFuture$Sync.innerGet(SimpleFuture.java:169)
    at com.altera.systemconsole.internal.core.SimpleFuture.get(SimpleFuture.java:66)
    at com.altera.systemconsole.scripting.StandardCommandSet.waitForFutureResponse(StandardCommandSet.java:233)
    at com.altera.systemconsole.scripting.StandardCommandSet.peekMemoryService(StandardCommandSet.java:161)
    at com.altera.systemconsole.scripting.StandardCommandSet.readByte(StandardCommandSet.java:120)
    at com.altera.systemconsole.scripting.ScriptEngine$16.execute(ScriptEngine.java:1117)
    at com.altera.systemconsole.scripting.ScriptEngine$LegacyCommandAdapter.execute2(ScriptEngine.java:199)
    at com.altera.systemconsole.scripting.SystemConsoleThreadTCLInterpreter$2$1.run(SystemConsoleThreadTCLInterpreter.java:181)
    at com.altera.systemconsole.internal.core.SystemExecutor$4.run(SystemExecutor.java:516)
    at com.altera.systemconsole.internal.core.SystemExecutor$ComparableTask.run(SystemExecutor.java:148)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.altera.systemconsole.internal.plugin.jtag.oci.Nios2DebugException: Can't do this while target is running
    at com.altera.systemconsole.internal.plugin.jtag.oci.Nios2Debug.readMemoryIndirect(Native Method)
    at com.altera.systemconsole.internal.plugin.jtag.oci.Nios2Debug.readMemory(Nios2Debug.java:186)
    at com.altera.systemconsole.internal.plugin.jtag.oci.OciMemoryService.peek(OciMemoryService.java:158)
    at com.altera.systemconsole.internal.core.legacymaster.LegacyMasterChannel$1.run(LegacyMasterChannel.java:88)
    at com.altera.systemconsole.internal.core.SystemExecutor.addTaskIfNecessary(SystemExecutor.java:536)
    at com.altera.systemconsole.internal.core.legacymaster.LegacyMasterChannel.doReadMemory(LegacyMasterChannel.java:77)
    at com.altera.systemconsole.internal.core.legacymaster.LegacyMasterChannel.readMemory(LegacyMasterChannel.java:69)
    at com.altera.systemconsole.scripting.StandardCommandSet.peekMemoryService(StandardCommandSet.java:157)
    ... 9 more

我以前从来没有使用过系统控制台,在互联网或手册中找不到任何相关的东西。所以问题是--我做了什么错事?任何帮助解决这个问题的人都会很感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-07-25 04:25:45

该异常意味着您必须暂停/停止CPU才能执行master_write_32。要使CPU保持运行,必须使用JTAG to Avalon Master Bridge。它将作为另一个服务(即索引为1)导出,并可用于与Avalon MM组件进行通信。答案归功于guys at Altera's forum

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11601699

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档