04-05-2011 05:43 PM
I'm using EDK 13.1 to design a fsl coprocessor. To proof the FSL link, I am trying to simply use the autogenerated summation design. When I run the autogenerated selftest code with the debugger in SDK. I noticed that when a "get" instruction is executed the PC jumps back an instruction causing a tight loop of the previous instruction and get instructions to be executed. In the ISA, I see no mention that the "get" instruction should be able to alter the PC value and am completely stumped as to why this would occur.
I noticed upon subsequent evaluation that the first interation of the for loop which contains the "get" instruction is executed correctly but subsequent interations generate the issue described above.
Additionally, the MSR[FSL] bit is zero during the exection. The correct behaviour accoring to the MB reference manual.
Essentially, this causes a hang on these two instructions therefore not allowing anymore code to execute. Has anyone else noticed this issue with there FSL peripherals in the newest version of EDK?
I can provide any and all additional information that may be needed.
04-05-2011 11:07 PM
"get" instruction can't modify the PC address so it will not change the PC.
How does the instruction sequence look? Have you disassembled the code?
04-07-2011 10:25 AM
04-08-2011 12:09 AM
I can't see the video.
It would be more helpful if you show a simulation waveform on MicroBlaze execution where the "get" instruction is doing something weird. Just add all "Trace_*****" signals on MicroBlaze to the waveform.
Also if you can show us the .mhs file so I can check if there is something missing.
04-08-2011 09:03 AM
I uploaded the video to youtube. Click the link above to view.
You have asked for a trace and I can use chipscope to generate it for you; however, what would you like me to trigger on.
The MHS is attached.
04-10-2011 11:25 PM
1. You are tapping the FSL connection in .mhs for connecting the chipscope.
Have you looked at the hdl/system.vhd to see if all signals gets connected correct? (Both for chipscope and for the FSL connection)
2. When tracing MicroBlaze executions, there are a number of trace signals to use.
If you have room, take all TRACE_ signals on MicroBlaze, otherwise these are the most important ones:
You can find more information on these in the MicroBlaze reference guide.
Trigger when MicroBlaze is executing the put and/or get instruction.
3. Your setting on MicroBlaze can be more optimized.
C_USE_BARREL = 1 will improve performance since C program tends to use shifting a lot.
04-27-2011 04:18 PM
Sorry, I haven't responded sooner. Got side tracked on another project. I looked for thoose signals but they are not available in Chipscope.
I then looked into doing a full blown simulation but my project uses SRAM and is such unable to be simulated. Let me know if there is anything else I can provide that may help in debugging this.
04-27-2011 11:24 PM - edited 04-27-2011 11:24 PM
If you add chipscope to the .mhs file using XPS, all MicroBlaze trace signals are available to connect to Chipscope.
This is how I usually do (using 13.1):
In the system.mhs file:
On MicroBlaze core I add this:
At the end of the .mhs file I add this:
PARAMETER INSTANCE = chipscope_ila_0
PARAMETER HW_VER = 1.04.a
PARAMETER C_TRIG0_UNITS = 4
PARAMETER C_TRIG0_TRIGGER_IN_WIDTH = 197
PARAMETER C_NUM_DATA_SAMPLES = 4096
PARAMETER C_TRIG0_UNIT_COUNTER_WIDTH = 10
PARAMETER C_TRIG0_UNIT_MATCH_TYPE = extended
PORT chipscope_ila_control = chipscope_ila_0_icon_control
PORT TRIG0 = microblaze_0_interrupt & Trace_Instruction & Trace_Valid_Instr & Trace_PC & Trace_Reg_Write & Trace_Reg_Addr & Trace_MSR_Reg & Trace_New_Reg_Value & Trace_Exception_Taken & Trace_Exception_Kind & Trace_Jump_Taken & Trace_Data_Address & Trace_Data_Read & Trace_Data_Write & Trace_Data_Write_Value & Trace_Data_Byte_Enable & Trace_MB_Halted
PORT CLK = clk_100_0000MHzMMCM0
PARAMETER INSTANCE = chipscope_icon_0
PARAMETER HW_VER = 1.05.a
PARAMETER C_NUM_CONTROL_PORTS = 1
PORT control0 = chipscope_ila_0_icon_control
After the bitfile is generated, the tool will generate a chipscope .cdc file which makes it much easier to setup the chipscope analyzer waveform. It's located at implementation/<ila name in mhs>_wrapper/<ila name in .mhs>.cdc
In the example above it will be implementation/chipscope_ila_0_wrapper/chipscope_ila_0.cdc