From: Andrey Volkov <avolkov@varma-el.com>
To: Sylvain Munaut <tnt@246tNt.com>, Wolfgang Denk <wd@denx.de>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: [RFC] MPC5200 BestComm microcode [en]/[de]coding draft
Date: Wed, 31 Aug 2005 19:50:52 +0400 [thread overview]
Message-ID: <4315D1DC.1000607@varma-el.com> (raw)
In-Reply-To: <4309D3CF.4030201@246tNt.com>
Hello Sylvain, Wolfgang
Sorry for silence, I was out of office last week.
(And will be absent at next two weeks too).
Wolfgang, first question to you:
May be you are know where I could find (if it exist)
BestComm (SmartComm) API for mystic MGT5100?
Sylvain Munaut wrote:
>
> But I'm not sure including that into the Documentation/ directory is
> such a good idea. Changing documentation that's there requires sending
> patch to Linus and get it processed etc ... And since It's mostly
> reverse engineering, it's probably going to change often as we get a
> better understanding.
I agree with Wolfgang's opinion: when I seek description of some kernel
part, I'm firstly check Documentation/, next grepping kernel tree.
In any case, when doco will be completed it will not changed often.
>
> We could publish it as a Wiki (that's a tendency these days ;) so that
> everyone can contribute easily and post code examples etc ... What do
> you think ?
Agree, good think. Wolfgang, is it appropriately to use WIKI of denx.de?
> See comments below for the "real" comments ;)
>
>>+[18:17] WS Write Size (see above)
>>+[16:16] ??????????????
>>+[15:15] Destination index prefix,
>>+ if set (i.e. =1), then bitfield [13:10]
>>+ contain index number, and [14:14] have
>>+ meaning of indirect addressing flag.
>>+ If this field cleared then field
>>+ [14:10] contain index of VARIABLE.
>>+[14:14] Indirect addressing by idx,
>>+ (and only by idx) flag, or high bit of
>>+ variable index.
>>+[13:10] index of DESTINATION/SOURCE idx/var.
>>+
>>+[09:09] ???? For some cases 1, for another 0.????
>>+
>>+[08:08] Same as in [14:10], but for source.
>>+[07:03] Same as in [14:10], but for source.
>>+[02:00] EU3 Number of function, which will execute
>>+ on EU#3.
>
>
> [2:0] is FN but what do you exactly mean it is. The only thing I notice
> is that if it =1 then the source is "EU3()" ... whatever that means.
>
> Also, I'm not sure it has something to do with the FDT since there is
> only 3 bits.
With first 7 functions, as I understand. In theory it may be any
function (depend on functions arrangement in FDT).
>>+Note: For DRD1A exist special case, aka NOP, which act as
>>+task terminator. Fields, in this case, have next meanings:
>>+
>>+[31:28] Reserved must be 0.
>>+[27:27] TFD Transfer Frame Done.
>>+[26:26] INT Interrupt.
>>+[25:21] INIT Initiator (aka requestor) number. Usually 0,
>>+ or ALWAYS INITIATOR.
>>+[16:00] NOP code Must be 0x1f8
>
>
> Where did you see that that you could use theses bit in NOP ?
INT - was used in image_rtos1/TASK_PCI_TX for example.
INIT,TFD - my assumption, not sure certainly.
>>+Ex. Please, pay attention to first two lines: since MORE is set,
>>+codes for idx2 and var13 are in different fields, then for case
>>+where MORE is not set (var4 = var2).:
>>+ 0x10601010 -- DRD1A: var4 = var2; FN=0 MORE init=3 WS=0 RS=0
>>+ 0x00008868 -- DRD1A: idx2 = var13; FN=0 init=0 WS=0 RS=0
>>+ 0x0404c999 -- DRD1A: *idx2 = EU3(); FN=1 INT init=0 WS=2 RS=0
>>+ 0x000001f8 -- DRD1A: NOP
>>+ 0x040001f8 -- DRD1A: INT init=0
>>+
>>+Next two DRDs are ALWAYS coupled, i.e it is impossible to using
>>+DRD2B1 without preceded DRD2A, but any (?fixme?) number DRD2B1
>>+may followed by DRD2A.
>
> ? AFAIU it's either
> DRD2A, DRD2B1
> or
> DRD2A, DRDF2B2
Oops, I miss DRD2B2, but then situation become more clean:
DRD2B2 - load accumulator of execution unit.
Then 0x1f code in DRD2B1 OP2 (and may be in OP1) mean EU accumulator.
>>+2) DRD2A - setup bestcomm Execution Unit (EU)
>>+Bitfields encodings:
>>+
>>+Bits num. Name Desc
>>+[31:31] MORE ?????????
>>+[30:29] EXT must be always initialized
>>+ by 3 (binary 11)
>
>
> What I have is that
> [31:29] Always 011 - Indicates a DRD2A.
> [28:28] MORE - Same meaning as before. Just tells if the following
> (here that's the one that is after the corresponding DRD2B{1,2}) DRD is
> in the same loop or if it's in the previous loop level ?
>
>>+[27:27] TFD Transfer Frame Done.
>>+[26:21] INIT Initiator number.
>>+[20:19] RS Read Size
>>+[18:17] WS Write Size
>>+[16:04] reserved, must be 0
>
> They are the function number to use in EU#{0,1,2} but in MPC5200, only
> EU3 is implemented.
I extend description.
>>+[03:00] EU3 Number of function, which will execute
>>+ on EU#3 at DRD2B1 time.
>>+Ex:
>>+ 0x60140002 -- DRD2A: EU3=2 EXT init=0 WS=2 RS=2
>>+
>>+3) DRD2B1 - execute function and store result of it.
>
>
> Can't find the piece if paper where I wrote about DRD2B1 ...
> For DRD2B2 there is only 1 example I know of, so quite hard to deduce
> anything.
Two if be more precisely :), both in CRC16 u-code.
>>+4) LCD - run followed loop microcode, or may be used for checking
>>+some conditions. LCD may be nested (only two levels are supported).
>
> Two levels ? Didn't know that but sure there is no example with 3 levels.
Ok, I remove this sentence, it was born, because I doesn't found
how loops are terminated (as you point, it was absence of bit in
DRD :) ).
--
Regards
Andrey Volkov
next prev parent reply other threads:[~2005-08-31 15:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-18 18:05 [RFC] MPC5200 BestComm microcode [en]/[de]coding draft Andrey Volkov
2005-08-22 13:31 ` Sylvain Munaut
2005-08-22 13:48 ` Wolfgang Denk
2005-08-31 15:50 ` Andrey Volkov [this message]
2005-08-31 20:46 ` Wolfgang Denk
2005-09-01 12:15 ` Andrey Volkov
2005-09-01 14:25 ` Sylvain Munaut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4315D1DC.1000607@varma-el.com \
--to=avolkov@varma-el.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=tnt@246tNt.com \
--cc=wd@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).