You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -11,6 +11,7 @@ ShowToc: true # Determines whether to display the Table of Contents (TOC) for
11
11
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12
12
weight: 1# The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
13
13
---
14
+
14
15
Transaction-Level Modeling 2.0 (TLM-2.0) is a modeling methodology defined in IEEE 1666-2023.
15
16
Instead of communicating through individual signals at every clock cycle, modules exchange complete **transactions** (read/write requests) using C++ function calls.
16
17
This raises the abstraction level, dramatically increasing simulation speed and enabling early software development before RTL is available.
@@ -243,13 +244,52 @@ annotation and temporal decoupling
243
244
244
245
----
245
246
246
-
-**Non-blocking transport interface**
247
-
- Each transaction has multiple timing points.
248
-
- Uses **all paths**.
249
-
- A transaction is finished through multiple calls or a single call.
250
-
251
-
----
252
-
247
+
## 7. Non-blocking Transport Interface
248
+
- A transaction is break downed into multiple `phrases transition`.
249
+
- Each phrases transition is associated with a `timing point`
250
+
- Each `call/return` from the `non-blocking transport method` may `correspond to` a `phrase transition`
251
+
- By restricting the number of timing points to two, it is possible to use the nb transport interface with the LT code style (not recommend)
252
+
- It uses **all paths**, and interfaces `tlm_fw_nonblocking_transport_if` vs `tlm_bw_nonblocking_transport_if`
253
+
> **Cơ chế truyền tham số của non-blocking transport interface tương tự blocking transport interface ở chỗ:
254
+
truyền tham chiếu không const (non-const reference) tới transaction object truyền timing annotation
255
+
Điểm khác biệt là: non-blocking transport method còn truyền thêm một phase để biểu thị trạng thái của transaction
256
+
và trả về một giá trị enum để cho biết việc return từ function có đồng thời là một lần chuyển phase hay không**
257
+
258
+
### 7.1. Paths `nb_transport_fw` and `nb_transport_bw`
259
+
260
+
-`nb_transport` methods shall not call `wait`
261
+
- several successive calls to `nb_transport_fw` from the same process could each initiate separate transactions without having to wait for the first transaction to complete
262
+
- the `final timing point of a transaction` may be marked by a call to or a `return` from S`nb_transport` on either the forward path or the backward path.
263
+
264
+
### 7.1. Transaction Argument
265
+
- 1 transaction = 1 object (while it is active)
266
+
- That object moves back and forth between modules
267
+
- Everyone touches the same object, not copies
268
+
=> don't overwrite data too early or reuse object before transaction finishes
269
+
270
+
### 7.2. Phrase Argument
271
+
- phase = control signal for "who can touch the transaction and when", including:
272
+
-**BEGIN_REQ**: initiator controls
273
+
-**END_REQ**: target takes over
274
+
-**BEGIN_RESP**: target controls
275
+
-**END_RESP**: initiator finishes
276
+
277
+
278
+
### 7.3. <tlm_sync_enum> Return Value
279
+
-**TLM_ACCEPTED**:
280
+
- The callee must not modify the transaction object, phase, or time argument.
281
+
- Indicates that the return path is not used.
282
+
- The caller typically needs to wait/yield for a future response.
283
+
-**TLM_UPDATED**:
284
+
- Indicates that the return path is used.
285
+
- The protocol state has advanced (phase transition occurred).
286
+
- The caller must inspect updated arguments and react accordingly.
287
+
-**TLM_COMPLETED**:The callee has completed the transaction (at this socket).
288
+
- The transaction object and time may be modified.
289
+
- The phase is undefined and should be ignored.
290
+
- No further nb_transport calls are allowed for this transaction on this socket.
291
+
- Completion does not guarantee success, need to check response status.
292
+
---
253
293
## 1.8 Examples
254
294
## 1.8.1 Connection
255
295
-**Module and socket:**
@@ -427,206 +467,3 @@ class InitiatorModule : public sc_module, public tlm::tlm_bw_transport_if<> {
0 commit comments