RE: Minor TLM enhancements/fixes

From: Jerome CORNET <jerome.cornet@st.com>
Date: Tue Nov 23 2010 - 09:08:14 PST

John, all, some remarks below.

From: john.aynsley@doulos.com [mailto:john.aynsley@doulos.com]
Sent: Monday, November 22, 2010 5:35 PM
To: Jerome CORNET
Cc: owner-systemc-p1666-technical@eda.org; P1666 Technical WG
Subject: Re: Minor TLM enhancements/fixes

>>I'll give my opinion:
>> Re. adding const methods to initiator and target sockets, yes, that sounds like a good idea. Of course, it would require a new release of the TLM-2.0 kit.
Sure, that would require minor modifications of the existing kit. I already have got a modified version compiling and running, that I can provide.

>> Regarding the use of the data pointer with TLM_IGNORE_COMMAND and the use of the response status with DMI and Debug, I think your proposals would have been a good idea at the time we created the TLM-2.0 standard. >>However, given that the TLM-2.0 standard has been out there for 2 years now and a legacy codebase is building up, I would be against making either change now because those changes could potentially break existing code. Base >>protocol targets can assume a non-zero data pointer with TLM_IGNORE_COMMAND, and are not obliged to set the response status for DMI or Debug.
>> Note that custom protocols can already use the rules you propose.

This is a truly important question here. Indeed, we have to take care of backward compatibility (else we hurt the ecosystem). I am on the same page as you on the intent. However, we have to balance that we the need
for the standard to evolve to address real world situations that had not been taken care of at the time of creation of the standard. Let's remember that at that time, compromises were done to allow the standard to go out in time (as many years had already been spent on it).
 Let us examine in details the backward compatibility issue, w.r.t to the various requests:

- On the use of data pointer with TLM_IGNORE_COMMAND:

o In many cases, the IP will just do nothing upon reception of an IGNORE command because it does not support any extension. Changing the rule has not effect on backward compatibility here.

o In cases where the receiving IP supports extensions and say, user-defined commands, it will indeed have a special handling for TLM_IGNORE_COMMAND and possibly

use the data pointer, in which case it could take advantage of the non-null data pointer assumption. However, it can well receive a IGNORE transaction with an extension

that it does not understand, so before using the data pointer of the transaction or any other field, it'd better first test presence of a well-known extension. To summarize,

either the target receives a transaction with an extension it understands, and then the data pointer will anyway be non-null if it assumed so, - or - the extension is unknown

and anyway the target will not take advantage of the data pointer, which can then be left to null. No effect on backward compatibility either.

o Finally, we have the case of protocol checkers, or IPs that deeply checks compliance of transactions upon reception. In that case indeed, the IP will need modification to avoid

complaining about the a null data pointer with an ignore command. However, it is highly probable that the IP will need modification because of IEEE itself, since - as I made

the remark for TLM 2.0.1 (for which we did similar adjustments)- the clause number will again change from TLM 2.0.1 to IEEE. So, the error reporting code will have to be changed

anyway to report clause numbers refering to an up-to-date document (as we have done to align on TLM 2.0.1 in the past).

- Regarding the response status with DMI/Debug as well as the huge limitations of the debug interface w.r.t to byte enable, and other attributes:
These limitations really hinder TLM-2 usability and using custom protocols will not solve the problem as it would have done in other situations. This is because even with a custom protocol you end up with the need to plug other vendor's IPs.

o I plug a third-party subsystem on my own platform with my custom protocol. I am therefore able to use the response status in my own platform, but not when crossing the boundaries of the third

party subsystem. I send a DMI transaction to the third party subsystem, which do not complete it because of an addressing error. I end up believing the subsystem does not support DMI: time is lost in interactions with the IP provider , for nothing... whereas the field is there in the DMI transaction! We just can't use it.

o I have to generate debug transactions with byte enable and with the guarantee that no side effect will be performed upon reception. I can depart from base protocol and use them for my own platform with custom protocol, but what do I do when crossing a third-party subsystem boundary? How can I rephrase my byte enable debug transaction as a truly base-protocol transaction with only unaligned addresses and sizes that I could send on the debug interface? No way. Maybe send it through the transport interface where the rules allow to use every attribute, but then I have no guarantee about the side effects. What do I do?
Now, imagine we decide to change the rules a bit and allow use of all attributes with debug interface. What will existing IPs do upon reception of a transaction, say, with a non-null byte enable pointer? They will complain and return an error. What does need to be changed? Nothing, except possibly the wording of the error message. Any IP has the right to return error if it does not support a given combination of generic payload attributes.
To summarize, I really believe that a useful standard is one that lives and evolves. What I am proposing here are minor changes with limited backward compatibility problems. No code modification to the TLM kit is required (except for the first point of the email), only the wording needs to be adjusted.

>> With Debug and TLM_IGNORE_COMMAND, 12.3.4 e) is explicit that the target shall not execute a read or a write but may do something else, possibly using extensions. With TLM_IGNORE_COMMAND the target is free to return ?>> whatever value it likes as the value of transport_dbg. I would be happy to spell that out more explicitly.

Re-reading your answer I understand that we have to proceed in such a way that existing uses are not forbidden by a more explicit wording. However, I guess that a non-zero value (if the command have to return "OK" in the response status sense) will fit. What do others think?

Best regards,

Jerome

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Nov 23 09:09:02 2010

This archive was generated by hypermail 2.1.8 : Tue Nov 23 2010 - 09:09:05 PST