Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

GreenSocket:

details for tlm experts…

1 Enabling the Open SystemC User Community


May 6, 05
GreenSocket overview

GreenSocs
Generic
GP Socket
Protocol
(GP) GreenBus
Interface

GreenSocket Interface inherits much


from TLM 2.0
GreenSocket just “adds”
TLM-2.0 Services etc

SystemC

2 Enabling the Open SystemC User Community


May 6, 05
GreenSocket overview

OCP-IP
OCP-IP Socket
Protocol
OCP-IP
Interface

GreenSocket Interface inherits much


from TLM 2.0
GreenSocket just “adds”
TLM-2.0 Services etc

SystemC

3 Enabling the Open SystemC User Community


May 6, 05
GreenSocket overview

PCI
PCI Socket
Protocol
PCI
Interface

GreenSocket Interface inherits much


from TLM 2.0
GreenSocket just “adds”
TLM-2.0 Services etc

SystemC

4 Enabling the Open SystemC User Community


May 6, 05
Building a new protocol

Add convenience
Add protocol Functions for interface
Define Interface
(as close to
TLM-2.0 as
makes sense)
GreenSocket

And get all the services……

5 Enabling the Open SystemC User Community


May 6, 05
GreenSocket
• GreenSocket will inherit from the TLM 2.0 Convince sockets and
provide the following features:
• Full tool independent TLM 2.0 compatibility.
• Security (access functions to the payload)
• Memory management (memory pooling, ref-counting)
• Simple Time management (PEQ)
• Local data (local "state" for each transaction)
• Runtime Bindability and error reporting (run time "probing" of connected -
compatible - sockets)
• Configuration and configuration sharing (GreenConfig, + distributing config
options along the bus)
• Combinatorial time management (ensuring combinatorial paths are handled
"safely")
• Analysis (GreenAnalysis connection direct from a GreenSocket).
• Multi-porting (* provided by the OSCI socket)
• b_ <-> nb_ bridging (* provided by the OSCI socket)

• First release shortly after DAC…

6 Enabling the Open SystemC User Community


May 6, 05
Who’s doing what…
• GreenSocs will base ALL interfaces of GreenSocket
• AIM: IPXACT generation of interfaces - DIRECT from Interface
Repository.

• Doing OCP-IP, PCIe, and maybe others.

• Others should use GreenSocket to get the same benefits - AND


get commonality….

• Services will be common. Reduce learning cost, re-use,


adaption, etc etc etc….
• SO LONG AS EVERYBODY USES IT….

7 Enabling the Open SystemC User Community


May 6, 05
Services

8 Enabling the Open SystemC User Community


May 6, 05
TLM2 bindability
• TLM2 bindability is based on traits classes
• The OSCI TLM-2.0 Base Protocol traits class may only be
connected to other sockets using the same Base Protocol, and
“ignorable extensions and phases”
• But WHAT is ignorable?

• (The OSCI Base Protocol is intended as a “base” for protocols,


almost all protocols will need to extend it somehow).

9 Enabling the Open SystemC User Community


May 6, 05
Ignorable phases/extensions
• Ignorability
• When an extension/phase is emitted you expect something to
happen
• An extension must be important to somebody !!!
• Otherwise it would be redundant

• But… If it does not effect a block, it is “ignorable” for that block.

• The majority of phases/extensions will not be ignorable when being


emitted

10 Enabling the Open SystemC User Community


May 6, 05
Tuning phases/extensions
• Ignorability by restraint
• Some extensions, when used, must change the behavior of a
module. (non-ignorable)
• But, often a module can be written to choose whether to initiate a
transaction with this extension or not.

• If a module knows that an extension will be ignored, it can change


it’s behavior, and not “emit” that extension.

• This changes otherwise “non-ignorable” extensions into “ignorable”


extensions - so long as the initiator module can be written to
choose whether to use the extension or not.

• Extensions/phases can be ignorable in the sense that a module


could refrain from using them if it knew the connected module
doesn’t understand
• But when used the extensions/phases are not ignorable

11 Enabling the Open SystemC User Community


May 6, 05
Example
• An initiator can send 2-dimensional bursts
• Therefore it uses an extension containing the row length and the address step
• E.g. a transaction with
• Address =0x100000
• Length=15
• Row length = 5
• Address step = 20
• But this is the same as 3 transactions
• Address =0x100000, Length 5
• Address =0x100020, Length 5
• Address =0x100040, Length 5

• So, we can create a module that “chooses” to use 2-d bursts (if it knows the other modules
in the system know about 2d bursts) - or not.

• Such an initiator could talk to targets that understand the extension, as well as to targets
that don’t (in the latter case it would just send many single transactions, instead of a single
2-dimensional one)

• This can be handled BY THE SOCKET!


• The socket can be asked to perform a 2d burst. If it is connected to a “non-2d burst” object,
it will degrade the transaction into 3 transactions.
NOTE:
1. clearly this is protocol dependent
2. In general only 2 protocols will be supported, the specific protocol, and the OSCI base
protocol.

12 Enabling the Open SystemC User Community


May 6, 05
Solving Bindability
• Now what about bindability of such an initiator?
• If we define a new traits class to use the extension, bindability to
OSCI is lost, although possible…

13 Enabling the Open SystemC User Community


May 6, 05
Possible solution
• Use the OSCI traits class
• After binding, check whether the target knows the extension
• If it does, it uses 2-dimensional burst
• If it does not, it uses plain OSCI transactions
• How should it do that?

14 Enabling the Open SystemC User Community


May 6, 05
GreenSocket
• GreenSocket can tell its owner what it is connected to (plain OSCI or
another GreenSocket)
• If it is connected to another GreenSocket, it can check what
extensions/phases are understood by the other module
• So the owning module can adjust its behavior accordingly
• Two connected GreenSockets will always use the largest possible set
of extensions understood by both ends

15 Enabling the Open SystemC User Community


May 6, 05
Another example
• Imagine two protocols A and B
• A uses priority, lock, 2-dimensional bursts
• B uses priority and lock
• Using GreenSocket, a module of protocol A can talk to a module of protocol B using lock
and priority
• With plain OSCI rules, both would have distinct traits classes and they would not be
bindable
• Two special adapters would have to written
• traits class A target to traits class B initiator
• traits class B target to traits class A initiator
• If there was another protocol C (just lock extension) 4 more adapters would be needed
• traits class C target to traits class B initiator
• traits class C target to traits class A initiator
• traits class A target to traits class C initiator
• traits class B target to traits class C initiator
• With GreenSocket no adapter would be needed at all!

• (For each feature, the protocol socket built on GreenSocket would know how to “degrade” to
not use this feature, the adapters (and all varients) are “built in”).

16 Enabling the Open SystemC User Community


May 6, 05
Bindability Conclusion
• There are now 3 varieties of extension:
• Ignorable
• Ignorable by negotiation
• Non-ignorable
• GreenSocket handles all these types, and allows for the
maximum feature set to be used.

• GreenSocket based protocol sockets can greatly improve


interoperability

• Prerequisite: a global shared repository of extensions from


which protocols are built

17 Enabling the Open SystemC User Community


May 6, 05
Simplified memory management

18 Enabling the Open SystemC User Community


May 6, 05
Simplified extension access

19 Enabling the Open SystemC User Community


May 6, 05
Built in analysis features

20 Enabling the Open SystemC User Community


May 6, 05
Simplified timing handling

21 Enabling the Open SystemC User Community


May 6, 05
“GreenSocs GP Socket”
• The GP Socket is the GreenBus compatibility socket.
• Same interface to user as GreenBus (mostly)
• Generic Protocol (GP) is 3 phase - and allows bus accuracy
across a wide range of protocols.

• ….

22 Enabling the Open SystemC User Community


May 6, 05
GreenSocs Three Phase Protocol
• Based on GreenBus, Compatible with TLM-2.0
• Accurately model real protocols, including their bursting
mechanisms :
• AXI, PLB, PCIe, and OCP-IP (Only some configurations, and can
only be made available to other OCP-IP members).
Send request
Receive Acknowledge
Send Data
Receive Acknowledge
Send Response
Receive Acknowledge

Request Phase Response Phase time


Data Phase
Start Start
Start
Request Phase Response Phase
Data Phase
End End
End

23 Enabling the Open SystemC User Community


May 6, 05

You might also like