Hi,
Cool, when the time comes, I'll deffinetly look into this ;)
Thanks,
Johann
Eric M. Ludlam writes:
> Hi,
>
> In semantic, each time a rule matches, it runs it's optional lambda
> expression. The return value of this expression becomes the "tag".
>
> You can put any code in there you want. For example, you could keep
> a stall stack, and increment values each time a ne instruction is
> matched.
>
> You could then have a :stall attribute for your tag when some number
> magic hits. Perhaps event only creating a tag if there is a :stall.
>
> As for highlighting, see the the doc for
> `semantic-highlight-attribute-alist' which will probably be a one
> liner to highlight problem areas.
>
> A second option is to create tags for every instruction. You
> could then post-process the entire tree.
>
> If you don't want a tag for every tag then you will need to wait for
> some far future release when work starts on doing font-lock via
> semantic parsers.
>
> Good Luck.
> Eric
>
> >>> myrkraverk@... seems to think that:
> >Hi,
> >
> >I'm working on a mode to edit vector processing unit (vpu) code in
> >emacs and was asked for stall detection. Aparently this exist in some
> >tool for pro ps2 developers.
> >
> >The VPU has 2 parallel execution units so each line (cycle) has 2
> >instructions, one called "upper" and the next "lower" and would
> >typically look like this:
> >
> > MULq.xyz VF14, VF14, Q MR32.xy VF08, VF08
> >
> >Here, "MULq" is the upper instruction, and "MR32" is the lower. (But
> >this is not really important).
> >
> >Now, since MUL has throughput/latency of 1/4, I can use MUL
> >instruction in the next line (cycle) ((latency 1)), but I can't read
> >the VF14 register until 4 lines later ((throughput 4)) or the cpu will
> >stall (and hence do nothing I could use it for in the meantime); like
> >so:
> >
> > MAX.xyw VF27, VF27, VF14 MR32.x VF02, VF01
> >
> >To confuse the issue, not all instructions have the same
> >throughput/latency nor do they always use the same execution unit.
> >The DIV (lower instruction) for example is 7/7 so I can't use a DIV,
> >SQRT or RSQRT instructions for 7 lines (without stalls), but I can use
> >other lower instructions during this time.
> >
> >So, can semantic provide me with some information to detect stalls, or
> >do I have to code some Real Magic(tm) to do this? How to actually
> >display the stall info is a different story.
> >
> >
> >Johann
> >
>
> --
> Eric Ludlam: zappo@..., eric@...
> Home: http://www.ludlam.net Siege: http://www.siege-engine.com
> Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> cedet-semantic mailing list
> cedet-semantic@...
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
--
Windows? I look out of windows.
|