Contact: SweePoh, Quek (Kevin). Testech Electronics Pte Ltd.
Block 1014, #02-194, Geylang East Ave 3, Singapore 389729.
Tel: (+65)-67492162 Fax: (+65)-67494246 Email: email@example.com URL: www.testech-elect.com
Nohau EMUL51/EA768-ETR64-50 is a high performance real time in circuit emulator capable of 50MHZ emulation speed. It has 64KFrame Hardware Buffer that allows real time execution trace history, Code Coverage, Performance Analysis, and automatic Bank switching support. The sophisticated conditional trigger and filters can be configured and viewed without intrusion into real time emulation.
In addition, the Seehau debugger supports in-line compiling and assembling, and provides both numerical and graphical display for the code coverage, performance analysis
A versatile macro systems with its own debugging environment allows you to create macro or record it from user click and playback, so that you can setup the same debugging situation everytimes. The seehau debugger supports TCP/IP, OLE capability, and Support over IP allows users at multiple sites to access an emulator.
the Nohau Seehau51 into your system. When the Seehau51 runs, it
will bring up a Emulation Configuration Menu (or you can select Start-> Seehau
51 -> Config.
a) Support the Emulator Emulation Memory, Pod Type, and the Trace type (in this tutorial, we had a Nohau Enhanced Trace ETR64, and note that a 256KFrame Hardware Trace is also available).
Click Next and select the default HW Configuration for the EMUL51. (This screen can also be access from Seehau51 -> Config Emulator -> Hdw Config Tab).
BrkPt Replacement optionally uses software breakpoint, but since the Nohau emulator has hardware breakpoint, we did not want to select it. Mask interrupt on steps, prevent the code from stepping into a high frequency interrupt (example a short timer interrupt) during stepping). In addition, you can specify P3.6 and P3.7 to be used in normal mode (that is RD and WR signal) or normal Input or output IO pin.
Clock (MHz) Field: This field contains the time base reference for trace timestamps only. The timestamps calculation assumes standard 8051 timing using 12 clock per bus cycles. Enter the followings:-
If you are using a standard part, enter the crystal or oscillator frequency.
If you are using a Dallas 520/530/320/323 part, enter 1.5x the crystal/oscillator frequency.
If you are using a Philips or Temic X2 part, enter 2x the crystal/oscillator frequency.
If you are using a Philips MX pod, enter 2x the external frequency.
Click Finish. Now you can runs the Seehau51 program.
2) Before you use the emulator, you must configure the emulator. In Seehau debugger, click on Config -> Emulator. It is now assume that you had already setup the "Hdw Config" tab as shown in step 1.
3) Now select "Misc Setup" tab.
Select the Program Counter if you wants to override Reset vector (that is preprogram the Program counter upon reset).
Select the Stack Pointer if you wants to override the SP with a designated value.
4) Select the "Map Config" Tab.
By default, the code and xdata memory were all map to the emulator. If you have IO map peripheral on your target board, you must map those range to the external IO address, so that read/write will be send to the external peripheral instead of emulator internal xdata memory.
5) If your target uses bank switching, you must configure this tab prior to emulation. Refer to the Pod Card for the settings on the Bank Switching. In addition , you must do the followings :-
Set the jumpers on teh emulator board correctly for bank switching operation.
Check that bank switch wires on the pod are setup correctly.
6) If you are debugging code running from target ROM/EPROM/Flash, you can perform source level debugging by loading symbols only. Do the following:
From the Seehau main menu bar, click the config menu
From the prefernce tab, clear the "Code" option. Then click OK.
From the Seehau menu menu bar, Select "File" and then "Load Code". Seehau will then only load the symbols only and read/execute code from target ROM.
1) Select File -> Load Code -> /Nohau/Seehau51/Examples/timer.abs file.
2) Click on the source step button. It is execute the assembly startup code, and break on the C main code (that is the first C source code line).
3) In the Space Type region of the data window status bar, that has Int. Code... Click and select data or Shadow RAM (in this tutorial, the Nohau EMUL768 has shadow RAM that allows you to view variable in RAM that changes while the emulator is running full speed).
In the Format Type region of the data windows status bar, change the display format to ASCII.
4) Click on "View" -> "Symbol Browser". Seehau51 has symbol browser allowing you to browse through all public, functions and vairables. If you click on any selected function name, the source window will jump to the selected function routine immediately. Likewise, if you right click on a variable and you may add it to the inspect/watch window.
5) Click on "View" -> "SF Regs". It allows you to select all the processor registers. Press the ">" button to place selected Special function registers onto the right pane. When finish, select all the registers, right click on the mouse, and select either "Add To Reg1" window or "Add to New" Window". Now you should be able to see the selected special function register in your peripheral registors window.
6) In the souce windows, select a function call inside the main routine and then right click. Set a hardware breakpoint.
7) Now in the main toolbar, click on "GO" icon. The emualtor will execute and then break on the function call where you had set a breakpoint. You can then use the toolbar or the "RUN" menu, to setp into, step over, reset, animate (that is auto stepping the code), Go to a cursor position.
1) Trace is a comprehensive tool use to assist your debugging problem, such as interrupt routine that needs to complete its course (SPI, I2C, serial interrupt etc), or diagnose interrmitten problem such as stack overuns, malicious pointer, inadvertent overwrite of global memory, re-entrant functions problem etc. The Nohau Enhanced Trace Options allows:-
Execution Trace History with Time stamps, Trace Filter, Trace capture of Address/Data Value/Cycle Type and up to 18 external inputs. Base on combination of these fields, you can setup trigger and/or filter condition to control the trace recording so that you will be be swamp with too much trace data and instead only capture trace of what you actually wanted to see in your code. Execution Trace is available with Advance Trace Option and Enhanced Trace options.
Perform Code Coverage which is a very powerful software quality analysis tools. This allows you to view which code has been executed at least once, and which code has never been executed at all. Code Coverage is only available with Enhanced Trace option.
Performance Anlaysis: Finds where your CPU spends its time, analysis software bottleneck. Performance Analysis is available with Advance Trace Option and Enhanced Trace options.
By default HW trace automatically starts recording when you begin code execution. When you stop execution, the trace history is display automatically.
2) Simple Trace:
Set a breakpoint in your code, and then select Go until it hits the breakpoint. When it stops, the hardware trace will be automatically uploaded to the trace window. If you wants to see Source level trace in C, in the trace window, right click and select "Display Mode" and chose "Source" view. Notice the below screen that the trace window shows the C execution history until it hit the breakpoint.
Nohau Trace Window allows you to synchronous the Trace Window to your source window. This save you time, by automatically scrolling your source windows to sync with your HW Trace window. You can change the Trace Display Mode to "Trace Mode". Right click on the Trace Window toolbar, and you can select what you wish to display in the Trace Window.
Frame Number is on far left of window. Frame 0 always represent the trigger frame. If there is no trigger, frame 0 is the last frame in teh buffer.
Address display address of bus cycle in Hex notation.
FWR shows the cycle type: First Byte of Fetch, Write, Read, or othe rframes (shown with a dash).
Sy0 & SY1 display status of the SY0 and SY1 in puts from the pod board.
In addition, you can see the trace window in raw bus cycle,
and view Time stamps in various options.
Relative Time: Amount of elapsed time for the current instruction.
Absolute Time: Amount of elapsed time since the beginning of execution.
Relative Cycle: Number of CPU cycles for the current instruction.
Absolute Cycle: Total Number of CPU cycles since the beginning of execution.
Nohau Hardware Trace function has many feature to expediate Trace analysis by select the "Trace" menu.
Code Coverage is available on all the Nohau hardware Trace (Advanced Trace or Enhanced Trace). It allows you to see which part of your code has been executed at least once, and which line of your code is never executed. It is a powerful software quality analysis tools that runs on the hardware target.
To runs code coverage, reset your CPU. Then select the Tools -> Code Coverage and the Code Coverage window will open. Click on Run. When you stop emulation, the code coverage window will be updated. You can view a summary of the code covearage results, or view the address range that had been executed or a syntax color of your source code for detailed coverage in color coded view.
PPA (performance analysis) allows you to find software bottleneck of your code, and tells you where the CPU spends its time. You setup the bin by using the symbol function browser, and then when you runs the PPA, it is dynamically updated while the code is running.
To run PPA, select "Tools" -> "PPA". Then click on the "+" icon to add bins to the window using the symbol browser. Then all the bins are added, you click on "RUN" to run the PPA and view the window being dynamically updated while the code is running on the target.
Nohau tools menu provides a target memory test utility. You can use this to test the memory systems on your target board, checking devices, address bus and databus.
Select "Tools" -> "Memory Testing" and then enter the address and pattern that you wish to runs on your target board.
You can configure the Trace for advanced capability. Use the "Trace Configuration" dialog box by selecting "Trace Config" from the Trace menu, or from "Config" Menu, click "Trace". This section is very comprehensive and you may skip this portion if it is not of interest, but it shows very powerful Trace trigger and condition capability of the Nohau Seehau debugger.
No Trig: Disable trigger. Collects data continiously in FIFO buffer.
Trig on A: Trigger when A condition is met.
Trig on B: Trigger when B condition is met
A then B: A condition to be met first, follows by B condition.
A Loop: Trigger after A condition is met n times, where n is loop count field.
B Loop: Trigger after B condition is met n times, where n is loop count field.
A Loop then B: A condition met for n times, follows by B condition.
A then B Loop: A condition must be met first, follows by B codnition n times.
No: Emulation does not stop as a result of trace condition.
On Trig: Emulation stops when trace condition is met.
on B: Emulation stops when B condition is met.
Record: Click the down arrow and select one of the following options.
Int Record: Control which frames are recorded by the trace board. Click the down arrow and select one of the following options.
Below shows the Nohau Trace Configuration Window. You can see a example on how to set this Trace window.
This section describe how to setup the emulator trace to trigger on a specific condition with the following parameters:-
To capture the trace, on the Seehau Speedbar, click the reset button and then click on GO icon. As soon as the trigger condition is met, the Trace display window automatically updates. Frame 0 is the trigger point which is entry to function Main.
The follows explains the various field and their purpose in the Condition tab, for the Nohau enhanced trace options
Type: Select one of the following Bus cycle types:
- None: Don't care.
- Read: A data read.
- Write: A data write
- R/W: A data read or write
- Fetch: A code Fetch.
E0: External input pins on the Pod. Select High, Low or None (don't care).
E1: External Input pin on the pod. Select High, Low or None (don't care).
SY0: External Input pin on the pod. Select High, Low or None (don't care).
SY1: External Input pin on the pod. Select High, Low or None (don't care).
Below is a screen of the Trace Conditions setup window.
This section describe how to setup the emulator to filter data writes with the following parameters:
To capture the trace, on the Seehau speedbar, click Reset Button, and then click GO button.
As soon as the trigger condition is met, the Trace window automatically updates. Cycle 0 is the trigger point which is the first write to Timer.sec
It is possible to enter multiple qualifiers under a single condition. When a trace condition has multiple qualifiers the fields in the qualifiers are logically ORed together.
Nohau Seehau debugger can be integrated into any third party IDE such as Tasking EDE, Keil uVision2, IAR Embedded WorkBench, Hitech 8051. This ensure that when you starts Seehau Debugger, it will launch only 1 instance of the Seehau51 Debugger. This program is provided by Nohau is called the SLaunch.exe
Nohau supports the CMX RTX51 RTOS kernel Aware using an OCX plugin (optional) and the uCOS-II RTOS, as well as custom RTOS. See below RTOS aware for CMX RTX51.
Link: SeeHau Useful tips (Set
environment, save macros and miscellanous confiugration.
Link: Device Programmer for MCS51 and Memories
Link: 8051 Compiler, 8051 Real Time RTOS and TCP-IP stack
Back To Nohau Tutorial Page
Back to Nohau Main Page | Back to Testech Home Page | Compiler | RTOS | Emulator/Debugging