1 |
2 |
dargor |
|
2 |
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
3 |
|
|
<html><head><title>Python: class noc_tlm_base</title>
|
4 |
|
|
</head><body bgcolor="#f0f0f8">
|
5 |
|
|
<p>
|
6 |
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
7 |
|
|
<tr bgcolor="#ffc8d8">
|
8 |
|
|
<td colspan=3 valign=bottom> <br>
|
9 |
|
|
<font color="#000000" face="helvetica, arial"><strong>nocmodel.noc_tlm_base</strong> = <a name="nocmodel.noc_tlm_base">class noc_tlm_base</a></font></td></tr>
|
10 |
|
|
|
11 |
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
12 |
|
|
<td colspan=2><tt>Base class for NoC TLM simulator.<br>
|
13 |
|
|
<br>
|
14 |
|
|
This class add methods to a NoC object, required for the TLM model. Each <br>
|
15 |
|
|
derived class must override the methods:<br>
|
16 |
|
|
<br>
|
17 |
|
|
* <a href="#nocmodel.noc_tlm_base-__init__">__init__</a>() : its constructor contains the object TLM model (data <br>
|
18 |
|
|
structures, generators, etc).<br>
|
19 |
|
|
* <a href="#nocmodel.noc_tlm_base-send">send</a>() <br>
|
20 |
|
|
* <a href="#nocmodel.noc_tlm_base-recv">recv</a>()<br>
|
21 |
|
|
<br>
|
22 |
|
|
Other methods are related to simulation configuration and logging support.<br> </tt></td></tr>
|
23 |
|
|
<tr><td> </td>
|
24 |
|
|
<td width="100%">Methods defined here:<br>
|
25 |
|
|
<dl><dt><a name="noc_tlm_base-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
26 |
|
|
|
27 |
|
|
<dl><dt><a name="noc_tlm_base-debug"><strong>debug</strong></a>(self, msg, *args, **kwargs)</dt><dd><tt># logging methods (only use 4 levels)</tt></dd></dl>
|
28 |
|
|
|
29 |
|
|
<dl><dt><a name="noc_tlm_base-debugstate"><strong>debugstate</strong></a>(self)</dt><dd><tt># special log</tt></dd></dl>
|
30 |
|
|
|
31 |
|
|
<dl><dt><a name="noc_tlm_base-error"><strong>error</strong></a>(self, msg, *args, **kwargs)</dt></dl>
|
32 |
|
|
|
33 |
|
|
<dl><dt><a name="noc_tlm_base-get_generators"><strong>get_generators</strong></a>(self)</dt></dl>
|
34 |
|
|
|
35 |
|
|
<dl><dt><a name="noc_tlm_base-info"><strong>info</strong></a>(self, msg, *args, **kwargs)</dt></dl>
|
36 |
|
|
|
37 |
|
|
<dl><dt><a name="noc_tlm_base-recv"><strong>recv</strong></a>(self, src, dest, data, addattrs<font color="#909090">=None</font>)</dt><dd><tt>RECV method: this method MUST be called only by the send<br>
|
38 |
|
|
method of the object who started the transaction.<br>
|
39 |
|
|
<br>
|
40 |
|
|
Arguments:<br>
|
41 |
|
|
* src: source object (or router address) that call this method, i.e. the<br>
|
42 |
|
|
object that starts the transaction.<br>
|
43 |
|
|
* dest: destination object (or router address) that receive the data in<br>
|
44 |
|
|
the transaction. This method will call dest' recv method.<br>
|
45 |
|
|
* data: data to be sent. Can be anything, but normally is an object of<br>
|
46 |
|
|
type packet.<br>
|
47 |
|
|
* addattrs: optional dictionary with additional arguments<br>
|
48 |
|
|
<br>
|
49 |
|
|
@return Must return a number: 0 for everything OK, != 0 to show an error<br>
|
50 |
|
|
relevant to the caller, an exception in case of attribute error</tt></dd></dl>
|
51 |
|
|
|
52 |
|
|
<dl><dt><a name="noc_tlm_base-send"><strong>send</strong></a>(self, src, dest, data, addattrs<font color="#909090">=None</font>)</dt><dd><tt>SEND method: this method MUST be called only by the local<br>
|
53 |
|
|
object who wants to start a transaction.<br>
|
54 |
|
|
<br>
|
55 |
|
|
This function will call the recv method in the right object.<br>
|
56 |
|
|
<br>
|
57 |
|
|
Arguments:<br>
|
58 |
|
|
* src: source object (or router address) that call this method, i.e. the<br>
|
59 |
|
|
object that starts the transaction.<br>
|
60 |
|
|
* dest: destination object (or router address) that receive the data in<br>
|
61 |
|
|
the transaction. This method will call dest' recv method.<br>
|
62 |
|
|
* data: data to be sent. Can be anything, but normally is an object of<br>
|
63 |
|
|
type packet.<br>
|
64 |
|
|
* addattrs: optional dictionary with additional arguments<br>
|
65 |
|
|
<br>
|
66 |
|
|
Return: Must return a number: 0 for everything OK, != 0 to show an error<br>
|
67 |
|
|
relevant to the caller, an exception in case of attribute error</tt></dd></dl>
|
68 |
|
|
|
69 |
|
|
<dl><dt><a name="noc_tlm_base-warning"><strong>warning</strong></a>(self, msg, *args, **kwargs)</dt></dl>
|
70 |
|
|
|
71 |
|
|
</td></tr></table>
|
72 |
|
|
</body></html>
|