I had a simple controller written in Verilog that was configuring Altera's TSE MAC. Up to this point, it was fairly simple. However, what I wanted to do next is to set a lot of Marvel PHY's settings as well as keep monitoring both PHY and MAC for statistics and errors, etc. Doing that in HW seems like an overkill, so I have decided to incorporate a Nios CPU. But before going ahead and implementing the component in software, I wanted to quickly prototype the idea using System Console. Anyhow, here is my QSys base system:
The MAC instance is called tse_mac
and the idea is to configure it by reading/writing to control_port
through CPU's data_master
.
After getting the system up and running, I've connected to it using System Console. I assume it generally works because it is able to get master
service path:
% get_service_paths master
{/devices/EP2AGX260@1#7-1/(link)/JTAG/(70:34 v3 #0)/nios2_0}
It also opens fine. However, it fails right away when trying to write 32-bit value:
% 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"
%
Here is the exception:
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
I have never used System Console before and could not find anything related on the Internet or in the manual. So the question is — what wrongdoing am I committing? Any help solving the problem is appreciated.