Welcome to HardwareForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

On-chip debugger and Pipelining

 
   Hardware Problem Solving Community! (Home) -> General Discussion RSS
Related Topics:
Putting to Chip in the MB - I know this isn't as simple as pushing the chip into the board and then putting the heatsink and fan on, or is it? This will be my first time doing this and I'm a bit worried that I might cock it up and end up blowing all the hard earned cash I have..

difference in amd chip? - Hi two amd athlon 64 4000+ chips. One the other San Diego. What is the main between the two. The San Diego uses a 90 nm process. is this I just want to purchase the better of the two. DC

has anybody had experiance with ram chip coolers? - Hi, i am buying a pair of those: to aid my cooling ram when Is it something that will make a in heat when o/c..

How to identify my graphics chip? - hi, I've bought a second hand radeon 9700 on ebay. It works fine. However I would like to know wether its build by ati or 3rd party On ati web site can seem to identify its chip. May be blind or Here are the markings on the back of..

Heatsink for Northbridge chip? - The fan on my chip has failed, and in my efforts to reduce PC noise would like to replace with a larger heatsink such as Zalman's. Problem is, I can't get the old heatsink off and I suspect it is held on with epoxy. So my questions are: Is it..
Next:  General Discussion: Need Help With SATA DVD burner  
Author Message
amitesh.hati

External


Since: Feb 20, 2008
Posts: 2



(Msg. 1) Posted: Wed Feb 20, 2008 9:16 pm
Post subject: On-chip debugger and Pipelining
Archived from groups: alt>comp>hardware (more info?)

Hi,

Hardware breakpoints in on-chip debuggers monitor the address bus to
check the execution context (and conditions) to break.

So here is a problem. Consider a CPU which has a pipelined
architecture. We have added a hardware breakpoint using a on-chip
debugger. Now if the hardware breakpoint monitors the address bus then
breakpoint hit will take place at the instruction fetch phase.

In a pipelined architecture, CPU fetches the instruction long before
the execution and also there is a possibility of not executing the
fetched instruction at all for a wrong branch prediction.

So if the CPU monitors only the ADDRESS BUS then there is a
possibility of breakpoint hit even when execution context does not
reach the breakpoint. My question is how does CPU handles it?

Regards,
Amitesh

 >> Stay informed about: On-chip debugger and Pipelining 
Back to top
Login to vote
Paul57

External


Since: Oct 09, 2004
Posts: 2479



(Msg. 2) Posted: Thu Feb 21, 2008 1:42 am
Post subject: Re: On-chip debugger and Pipelining [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

amitesh.hati wrote:
> Hi,
>
> Hardware breakpoints in on-chip debuggers monitor the address bus to
> check the execution context (and conditions) to break.
>
> So here is a problem. Consider a CPU which has a pipelined
> architecture. We have added a hardware breakpoint using a on-chip
> debugger. Now if the hardware breakpoint monitors the address bus then
> breakpoint hit will take place at the instruction fetch phase.
>
> In a pipelined architecture, CPU fetches the instruction long before
> the execution and also there is a possibility of not executing the
> fetched instruction at all for a wrong branch prediction.
>
> So if the CPU monitors only the ADDRESS BUS then there is a
> possibility of breakpoint hit even when execution context does not
> reach the breakpoint. My question is how does CPU handles it?
>
> Regards,
> Amitesh

http://www.intel.com/products/processor/manuals/

"CHAPTER 18 DEBUGGING AND PERFORMANCE MONITORING"
http://download.intel.com/design/processor/manuals/253669.pdf

"These facilities allow a debugger to be called as a separate task or as a procedure in
the context of the current program or task. The following conditions can be used to
invoke the debugger:
* Task switch to a specific task.
* Execution of the breakpoint instruction.
* Execution of any instruction.
* Execution of an instruction at a specified address.
* Read or write of a byte, word, or doubleword at a specified memory address.
* Write to a byte, word, or doubleword at a specified memory address.
* Input of a byte, word, or doubleword at a specified I/O address.
* Output of a byte, word, or doubleword at a specified I/O address.
* Attempt to change the contents of a debug register."

The description says "execution", which means the debugger is tied to
more than the address bus. It also is tied to the state through the
pipeline, enough so to determine when execution has occurred.

The above are software facilities.

There are also hardware interfaces on a processor, to aid in the use of
a logic analyzer. The logic analyzer captures address and data from the
processor, but additional signals may be provided on the processor, to
improve the precision of the information collected. Otherwise, as you
note, tracing the external (prefetch) of instructions is not precise
enough on its own, to support a logic analyzer. It is possible, in fact,
that a lot of internal state information inside the processor can be
collected, such as scanning out the entire state of the processor (via JTAG
TAP scan chain). But details on this are not available for download. The details
are provided to Tektronix and Agilent, so they can design test equipment
for hardware developers to use. In typical usage, you connect a probe
head to the processor socket, then install the processor in the probe,
and by means of the logic analyzer pods, you can collect information
from the processor. The test equipment to do stuff like this is
pretty expensive. In addition to the analyzer, you also need to
buy the disassembler software package, that creates a traceback from the
hardware events seen on the outside of the processor.

http://cp.literature.agilent.com/litweb/pdf/5989-1552EN.pdf

Paul

 >> Stay informed about: On-chip debugger and Pipelining 
Back to top
Login to vote
amitesh.hati

External


Since: Feb 20, 2008
Posts: 2



(Msg. 3) Posted: Thu Feb 21, 2008 6:12 am
Post subject: Re: On-chip debugger and Pipelining [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Feb 21, 11:42 am, Paul <nos... RemoveThis @needed.com> wrote:
> amitesh.hati wrote:
> > Hi,
>
> > Hardware breakpoints in on-chip debuggers monitor the address bus to
> > check the execution context (and conditions) to break.
>
> > So here is a problem. Consider a CPU which has a pipelined
> > architecture. We have added a hardware breakpoint using a on-chip
> > debugger. Now if the hardware breakpoint monitors the address bus then
> > breakpoint hit will take place at the instruction fetch phase.
>
> > In a pipelined architecture, CPU fetches the instruction long before
> > the execution and also there is a possibility of not executing the
> > fetched instruction at all for a wrong branch prediction.
>
> > So if the CPU monitors only the ADDRESS BUS then there is a
> > possibility of breakpoint hit even when execution context does not
> > reach the breakpoint. My question is how does CPU handles it?
>
> > Regards,
> > Amitesh
>
> http://www.intel.com/products/processor/manuals/
>
> "CHAPTER 18 DEBUGGING AND PERFORMANCE MONITORING"http://download.intel.com/design/processor/manuals/253669.pdf
>
> "These facilities allow a debugger to be called as a separate task or as a procedure in
> the context of the current program or task. The following conditions can be used to
> invoke the debugger:
> * Task switch to a specific task.
> * Execution of the breakpoint instruction.
> * Execution of any instruction.
> * Execution of an instruction at a specified address.
> * Read or write of a byte, word, or doubleword at a specified memory address.
> * Write to a byte, word, or doubleword at a specified memory address.
> * Input of a byte, word, or doubleword at a specified I/O address.
> * Output of a byte, word, or doubleword at a specified I/O address.
> * Attempt to change the contents of a debug register."
>
> The description says "execution", which means the debugger is tied to
> more than the address bus. It also is tied to the state through the
> pipeline, enough so to determine when execution has occurred.
>
> The above are software facilities.
>
> There are also hardware interfaces on a processor, to aid in the use of
> a logic analyzer. The logic analyzer captures address and data from the
> processor, but additional signals may be provided on the processor, to
> improve the precision of the information collected. Otherwise, as you
> note, tracing the external (prefetch) of instructions is not precise
> enough on its own, to support a logic analyzer. It is possible, in fact,
> that a lot of internal state information inside the processor can be
> collected, such as scanning out the entire state of the processor (via JTAG
> TAP scan chain). But details on this are not available for download. The details
> are provided to Tektronix and Agilent, so they can design test equipment
> for hardware developers to use. In typical usage, you connect a probe
> head to the processor socket, then install the processor in the probe,
> and by means of the logic analyzer pods, you can collect information
> from the processor. The test equipment to do stuff like this is
> pretty expensive. In addition to the analyzer, you also need to
> buy the disassembler software package, that creates a traceback from the
> hardware events seen on the outside of the processor.
>
> http://cp.literature.agilent.com/litweb/pdf/5989-1552EN.pdf
>
> Paul

Hi Paul,

Thanks for the help, I will go through the manual.

In the mean time I had a probable solution, if on-chip debug
controller monitors the PC rather than Address bus then the problem
will be solved. But I have no information that on-chip debug
controller monitors PC for breakpoint or not.

May be a case study on on-chip debugging will give an definite answer.

Regards,
Amitesh
 >> Stay informed about: On-chip debugger and Pipelining 
Back to top
Login to vote
Display posts from previous:   
   Hardware Problem Solving Community! (Home) -> General Discussion All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]