1 |
2 |
dargor |
|
2 |
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
3 |
|
|
<html><head><title>Python: module nocmodel.basicmodels.basic_ipcore</title>
|
4 |
|
|
</head><body bgcolor="#f0f0f8">
|
5 |
|
|
|
6 |
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
7 |
|
|
<tr bgcolor="#7799ee">
|
8 |
|
|
<td valign=bottom> <br>
|
9 |
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="nocmodel.html"><font color="#ffffff">nocmodel</font></a>.<a href="nocmodel.basicmodels.html"><font color="#ffffff">basicmodels</font></a>.basic_ipcore</strong></big></big></font></td
|
10 |
|
|
><td align=right valign=bottom
|
11 |
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/oscard/Documentos/proyectos/nocmodel-0.1/nocmodel/basicmodels/basic_ipcore.py">/home/oscard/Documentos/proyectos/nocmodel-0.1/nocmodel/basicmodels/basic_ipcore.py</a></font></td></tr></table>
|
12 |
|
|
<p><tt>Basic ipcore TLM model</tt></p>
|
13 |
|
|
<p>
|
14 |
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
15 |
|
|
<tr bgcolor="#aa55cc">
|
16 |
|
|
<td colspan=3 valign=bottom> <br>
|
17 |
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
18 |
|
|
|
19 |
|
|
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
20 |
|
|
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="logging.html">logging</a><br>
|
21 |
|
|
</td><td width="25%" valign=top><a href="myhdl.html">myhdl</a><br>
|
22 |
|
|
</td><td width="25%" valign=top><a href="networkx.html">networkx</a><br>
|
23 |
|
|
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
24 |
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
25 |
|
|
<tr bgcolor="#ee77aa">
|
26 |
|
|
<td colspan=3 valign=bottom> <br>
|
27 |
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
28 |
|
|
|
29 |
|
|
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
30 |
|
|
<td width="100%"><dl>
|
31 |
|
|
<dt><font face="helvetica, arial"><a href="nocmodel.noc_tlm_base.html#noc_tlm_base">nocmodel.noc_tlm_base.noc_tlm_base</a>
|
32 |
|
|
</font></dt><dd>
|
33 |
|
|
<dl>
|
34 |
|
|
<dt><font face="helvetica, arial"><a href="nocmodel.basicmodels.basic_ipcore.html#basic_ipcore_tlm">basic_ipcore_tlm</a>
|
35 |
|
|
</font></dt></dl>
|
36 |
|
|
</dd>
|
37 |
|
|
</dl>
|
38 |
|
|
<p>
|
39 |
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
40 |
|
|
<tr bgcolor="#ffc8d8">
|
41 |
|
|
<td colspan=3 valign=bottom> <br>
|
42 |
|
|
<font color="#000000" face="helvetica, arial"><a name="basic_ipcore_tlm">class <strong>basic_ipcore_tlm</strong></a>(<a href="nocmodel.noc_tlm_base.html#noc_tlm_base">nocmodel.noc_tlm_base.noc_tlm_base</a>)</font></td></tr>
|
43 |
|
|
|
44 |
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
45 |
|
|
<td colspan=2><tt>TLM model of a NoC ipcore. Its based on sending and receiving packets<br>
|
46 |
|
|
to a custom-based MyHDL generators. This class does not define any<br>
|
47 |
|
|
functionality.<br>
|
48 |
|
|
<br>
|
49 |
|
|
Attributes:<br>
|
50 |
|
|
* ipcore_ref: reference to ipcore base object<br>
|
51 |
|
|
<br>
|
52 |
|
|
Notes:<br>
|
53 |
|
|
* This model is completely behavioral.<br>
|
54 |
|
|
* See code comments to better understanding.<br> </tt></td></tr>
|
55 |
|
|
<tr><td> </td>
|
56 |
|
|
<td width="100%">Methods defined here:<br>
|
57 |
|
|
<dl><dt><a name="basic_ipcore_tlm-__init__"><strong>__init__</strong></a>(self, ipcore_ref)</dt></dl>
|
58 |
|
|
|
59 |
|
|
<dl><dt><a name="basic_ipcore_tlm-recv"><strong>recv</strong></a>(self, src, dest, packet, addattrs<font color="#909090">=None</font>)</dt><dd><tt>Assumptions: <br>
|
60 |
|
|
* Safely ignore src and dest arguments, because this method <br>
|
61 |
|
|
is called only by local channel object.<br>
|
62 |
|
|
* In theory src should be self.<strong>localch</strong>, and dest should be <br>
|
63 |
|
|
self.<strong>ipcore_ref</strong> . This may be checked for errors.</tt></dd></dl>
|
64 |
|
|
|
65 |
|
|
<dl><dt><a name="basic_ipcore_tlm-register_generator"><strong>register_generator</strong></a>(self, genfunction, **kwargs)</dt><dd><tt>Register a new generator for this ipcore. <br>
|
66 |
|
|
<br>
|
67 |
|
|
Arguments:<br>
|
68 |
|
|
* genfunction: function that returns a MyHDL generator<br>
|
69 |
|
|
* kwargs: optional keyed arguments to pass to genfunction call<br>
|
70 |
|
|
<br>
|
71 |
|
|
Notes:<br>
|
72 |
|
|
* This method requires that genfunction has the following prototype:<br>
|
73 |
|
|
* my_function(din, dout, tlm_ref, <other_arguments>)<br>
|
74 |
|
|
* din is a MyHDL Signal of type packet, and is the input signal <br>
|
75 |
|
|
to the ipcore. Use this signal to react to input events and <br>
|
76 |
|
|
receive input packets.<br>
|
77 |
|
|
* dout is a MyHDL Signal of type packet, and is the output <br>
|
78 |
|
|
signal to the ipcore. Use this signal to send out packets to<br>
|
79 |
|
|
local channel (and then insert into the NoC).<br>
|
80 |
|
|
* tlm_ref is a reference to this object. Normal use is to access<br>
|
81 |
|
|
logging methods (e.g. tlm_ref.<a href="#basic_ipcore_tlm-info">info</a>("message") ).<br>
|
82 |
|
|
* <other_arguments> may be defined, this method use kwargs <br>
|
83 |
|
|
argument to pass them.</tt></dd></dl>
|
84 |
|
|
|
85 |
|
|
<dl><dt><a name="basic_ipcore_tlm-send"><strong>send</strong></a>(self, src, dest, packet, addattrs<font color="#909090">=None</font>)</dt><dd><tt>Assumptions: <br>
|
86 |
|
|
* Safely ignore src and dest arguments, because this method <br>
|
87 |
|
|
is called only by this object generators, therefore it always send <br>
|
88 |
|
|
packets to the ipcore related channel.<br>
|
89 |
|
|
* In theory src should be self.<strong>ipcore_ref</strong>, and dest should be <br>
|
90 |
|
|
self.<strong>localch</strong> . This may be checked for errors.</tt></dd></dl>
|
91 |
|
|
|
92 |
|
|
<hr>
|
93 |
|
|
Methods inherited from <a href="nocmodel.noc_tlm_base.html#noc_tlm_base">nocmodel.noc_tlm_base.noc_tlm_base</a>:<br>
|
94 |
|
|
<dl><dt><a name="basic_ipcore_tlm-debug"><strong>debug</strong></a>(self, msg, *args, **kwargs)</dt><dd><tt># logging methods (only use 4 levels)</tt></dd></dl>
|
95 |
|
|
|
96 |
|
|
<dl><dt><a name="basic_ipcore_tlm-debugstate"><strong>debugstate</strong></a>(self)</dt><dd><tt># special log</tt></dd></dl>
|
97 |
|
|
|
98 |
|
|
<dl><dt><a name="basic_ipcore_tlm-error"><strong>error</strong></a>(self, msg, *args, **kwargs)</dt></dl>
|
99 |
|
|
|
100 |
|
|
<dl><dt><a name="basic_ipcore_tlm-get_generators"><strong>get_generators</strong></a>(self)</dt></dl>
|
101 |
|
|
|
102 |
|
|
<dl><dt><a name="basic_ipcore_tlm-info"><strong>info</strong></a>(self, msg, *args, **kwargs)</dt></dl>
|
103 |
|
|
|
104 |
|
|
<dl><dt><a name="basic_ipcore_tlm-warning"><strong>warning</strong></a>(self, msg, *args, **kwargs)</dt></dl>
|
105 |
|
|
|
106 |
|
|
</td></tr></table></td></tr></table>
|
107 |
|
|
</body></html>
|