2011-12-04 16:26:32 -05:00
|
|
|
from functools import partial
|
2012-09-11 04:00:03 -04:00
|
|
|
from operator import itemgetter
|
2015-10-19 07:17:26 -04:00
|
|
|
import collections
|
2011-12-04 16:26:32 -05:00
|
|
|
|
2011-12-16 10:02:55 -05:00
|
|
|
from migen.fhdl.structure import *
|
2013-07-25 12:52:54 -04:00
|
|
|
from migen.fhdl.structure import _Operator, _Slice, _Assign, _Fragment
|
2012-01-06 18:39:28 -05:00
|
|
|
from migen.fhdl.tools import *
|
2015-09-26 06:45:10 -04:00
|
|
|
from migen.fhdl.bitcontainer import bits_for
|
2015-09-21 09:19:58 -04:00
|
|
|
from migen.fhdl.namer import build_namespace
|
2015-04-08 08:28:23 -04:00
|
|
|
from migen.fhdl.conv_output import ConvOutput
|
2011-12-16 10:02:55 -05:00
|
|
|
|
2015-09-10 23:32:47 -04:00
|
|
|
|
2015-05-23 08:01:08 -04:00
|
|
|
_reserved_keywords = {
|
2015-09-15 00:38:02 -04:00
|
|
|
"always", "and", "assign", "automatic", "begin", "buf", "bufif0", "bufif1",
|
|
|
|
"case", "casex", "casez", "cell", "cmos", "config", "deassign", "default",
|
|
|
|
"defparam", "design", "disable", "edge", "else", "end", "endcase",
|
|
|
|
"endconfig", "endfunction", "endgenerate", "endmodule", "endprimitive",
|
|
|
|
"endspecify", "endtable", "endtask", "event", "for", "force", "forever",
|
|
|
|
"fork", "function", "generate", "genvar", "highz0", "highz1", "if",
|
|
|
|
"ifnone", "incdir", "include", "initial", "inout", "input",
|
|
|
|
"instance", "integer", "join", "large", "liblist", "library", "localparam",
|
|
|
|
"macromodule", "medium", "module", "nand", "negedge", "nmos", "nor",
|
|
|
|
"noshowcancelled", "not", "notif0", "notif1", "or", "output", "parameter",
|
|
|
|
"pmos", "posedge", "primitive", "pull0", "pull1" "pulldown",
|
|
|
|
"pullup", "pulsestyle_onevent", "pulsestyle_ondetect", "remos", "real",
|
|
|
|
"realtime", "reg", "release", "repeat", "rnmos", "rpmos", "rtran",
|
|
|
|
"rtranif0", "rtranif1", "scalared", "showcancelled", "signed", "small",
|
|
|
|
"specify", "specparam", "strong0", "strong1", "supply0", "supply1",
|
|
|
|
"table", "task", "time", "tran", "tranif0", "tranif1", "tri", "tri0",
|
|
|
|
"tri1", "triand", "trior", "trireg", "unsigned", "use", "vectored", "wait",
|
|
|
|
"wand", "weak0", "weak1", "while", "wire", "wor","xnor", "xor"
|
2015-09-10 23:32:47 -04:00
|
|
|
}
|
2015-05-23 08:01:08 -04:00
|
|
|
|
|
|
|
|
2011-12-08 10:35:32 -05:00
|
|
|
def _printsig(ns, s):
|
2015-04-13 14:07:07 -04:00
|
|
|
if s.signed:
|
|
|
|
n = "signed "
|
|
|
|
else:
|
|
|
|
n = ""
|
2015-09-26 06:45:10 -04:00
|
|
|
if len(s) > 1:
|
|
|
|
n += "[" + str(len(s)-1) + ":0] "
|
2015-04-13 14:07:07 -04:00
|
|
|
n += ns.get_name(s)
|
|
|
|
return n
|
2011-12-08 10:35:32 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2015-09-15 00:38:02 -04:00
|
|
|
def _printconstant(node):
|
|
|
|
if node.signed:
|
|
|
|
return (str(node.nbits) + "'sd" + str(2**node.nbits + node.value),
|
|
|
|
True)
|
2015-04-13 14:07:07 -04:00
|
|
|
else:
|
2015-09-15 00:38:02 -04:00
|
|
|
return str(node.nbits) + "'d" + str(node.value), False
|
2012-11-28 17:18:43 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2012-11-28 17:18:43 -05:00
|
|
|
def _printexpr(ns, node):
|
2015-09-15 00:38:02 -04:00
|
|
|
if isinstance(node, Constant):
|
|
|
|
return _printconstant(node)
|
2015-04-13 14:07:07 -04:00
|
|
|
elif isinstance(node, Signal):
|
|
|
|
return ns.get_name(node), node.signed
|
|
|
|
elif isinstance(node, _Operator):
|
|
|
|
arity = len(node.operands)
|
|
|
|
r1, s1 = _printexpr(ns, node.operands[0])
|
|
|
|
if arity == 1:
|
|
|
|
if node.op == "-":
|
|
|
|
if s1:
|
|
|
|
r = node.op + r1
|
|
|
|
else:
|
|
|
|
r = "-$signed({1'd0, " + r1 + "})"
|
|
|
|
s = True
|
|
|
|
else:
|
|
|
|
r = node.op + r1
|
|
|
|
s = s1
|
|
|
|
elif arity == 2:
|
|
|
|
r2, s2 = _printexpr(ns, node.operands[1])
|
|
|
|
if node.op not in ["<<<", ">>>"]:
|
|
|
|
if s2 and not s1:
|
|
|
|
r1 = "$signed({1'd0, " + r1 + "})"
|
|
|
|
if s1 and not s2:
|
|
|
|
r2 = "$signed({1'd0, " + r2 + "})"
|
|
|
|
r = r1 + " " + node.op + " " + r2
|
|
|
|
s = s1 or s2
|
|
|
|
elif arity == 3:
|
|
|
|
assert node.op == "m"
|
|
|
|
r2, s2 = _printexpr(ns, node.operands[1])
|
|
|
|
r3, s3 = _printexpr(ns, node.operands[2])
|
|
|
|
if s2 and not s3:
|
|
|
|
r3 = "$signed({1'd0, " + r3 + "})"
|
|
|
|
if s3 and not s2:
|
|
|
|
r2 = "$signed({1'd0, " + r2 + "})"
|
|
|
|
r = r1 + " ? " + r2 + " : " + r3
|
|
|
|
s = s2 or s3
|
|
|
|
else:
|
|
|
|
raise TypeError
|
|
|
|
return "(" + r + ")", s
|
|
|
|
elif isinstance(node, _Slice):
|
|
|
|
# Verilog does not like us slicing non-array signals...
|
|
|
|
if isinstance(node.value, Signal) \
|
2015-09-26 06:45:10 -04:00
|
|
|
and len(node.value) == 1 \
|
2015-04-13 14:07:07 -04:00
|
|
|
and node.start == 0 and node.stop == 1:
|
|
|
|
return _printexpr(ns, node.value)
|
2012-02-06 12:07:02 -05:00
|
|
|
|
2015-04-13 14:07:07 -04:00
|
|
|
if node.start + 1 == node.stop:
|
|
|
|
sr = "[" + str(node.start) + "]"
|
|
|
|
else:
|
|
|
|
sr = "[" + str(node.stop-1) + ":" + str(node.start) + "]"
|
|
|
|
r, s = _printexpr(ns, node.value)
|
|
|
|
return r + sr, s
|
|
|
|
elif isinstance(node, Cat):
|
|
|
|
l = [_printexpr(ns, v)[0] for v in reversed(node.l)]
|
|
|
|
return "{" + ", ".join(l) + "}", False
|
|
|
|
elif isinstance(node, Replicate):
|
|
|
|
return "{" + str(node.n) + "{" + _printexpr(ns, node.v)[0] + "}}", False
|
|
|
|
else:
|
2015-09-15 00:38:02 -04:00
|
|
|
raise TypeError("Expression of unrecognized type: '{}'".format(type(node).__name__))
|
2011-12-08 10:35:32 -05:00
|
|
|
|
2015-09-10 23:32:47 -04:00
|
|
|
|
2012-01-07 06:19:06 -05:00
|
|
|
(_AT_BLOCKING, _AT_NONBLOCKING, _AT_SIGNAL) = range(3)
|
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2012-01-07 06:19:06 -05:00
|
|
|
def _printnode(ns, at, level, node):
|
2015-04-13 14:07:07 -04:00
|
|
|
if node is None:
|
|
|
|
return ""
|
|
|
|
elif isinstance(node, _Assign):
|
|
|
|
if at == _AT_BLOCKING:
|
|
|
|
assignment = " = "
|
|
|
|
elif at == _AT_NONBLOCKING:
|
|
|
|
assignment = " <= "
|
|
|
|
elif is_variable(node.l):
|
|
|
|
assignment = " = "
|
|
|
|
else:
|
|
|
|
assignment = " <= "
|
|
|
|
return "\t"*level + _printexpr(ns, node.l)[0] + assignment + _printexpr(ns, node.r)[0] + ";\n"
|
2015-10-19 07:17:26 -04:00
|
|
|
elif isinstance(node, collections.Iterable):
|
2015-04-13 14:07:07 -04:00
|
|
|
return "".join(list(map(partial(_printnode, ns, at, level), node)))
|
|
|
|
elif isinstance(node, If):
|
|
|
|
r = "\t"*level + "if (" + _printexpr(ns, node.cond)[0] + ") begin\n"
|
|
|
|
r += _printnode(ns, at, level + 1, node.t)
|
|
|
|
if node.f:
|
|
|
|
r += "\t"*level + "end else begin\n"
|
|
|
|
r += _printnode(ns, at, level + 1, node.f)
|
|
|
|
r += "\t"*level + "end\n"
|
|
|
|
return r
|
|
|
|
elif isinstance(node, Case):
|
|
|
|
if node.cases:
|
|
|
|
r = "\t"*level + "case (" + _printexpr(ns, node.test)[0] + ")\n"
|
2015-09-16 20:03:48 -04:00
|
|
|
css = [(k, v) for k, v in node.cases.items() if isinstance(k, Constant)]
|
|
|
|
css = sorted(css, key=lambda x: x[0].value)
|
2015-04-13 14:07:07 -04:00
|
|
|
for choice, statements in css:
|
|
|
|
r += "\t"*(level + 1) + _printexpr(ns, choice)[0] + ": begin\n"
|
|
|
|
r += _printnode(ns, at, level + 2, statements)
|
|
|
|
r += "\t"*(level + 1) + "end\n"
|
|
|
|
if "default" in node.cases:
|
|
|
|
r += "\t"*(level + 1) + "default: begin\n"
|
|
|
|
r += _printnode(ns, at, level + 2, node.cases["default"])
|
|
|
|
r += "\t"*(level + 1) + "end\n"
|
|
|
|
r += "\t"*level + "endcase\n"
|
|
|
|
return r
|
|
|
|
else:
|
|
|
|
return ""
|
|
|
|
else:
|
|
|
|
raise TypeError("Node of unrecognized type: "+str(type(node)))
|
2011-12-08 10:35:32 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2012-01-07 06:19:06 -05:00
|
|
|
def _list_comb_wires(f):
|
2015-04-13 14:07:07 -04:00
|
|
|
r = set()
|
|
|
|
groups = group_by_targets(f.comb)
|
|
|
|
for g in groups:
|
|
|
|
if len(g[1]) == 1 and isinstance(g[1][0], _Assign):
|
|
|
|
r |= g[0]
|
|
|
|
return r
|
2012-01-07 06:19:06 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2015-04-24 06:14:14 -04:00
|
|
|
def _printheader(f, ios, name, ns,
|
2015-04-24 06:54:08 -04:00
|
|
|
reg_initialization):
|
2015-04-13 14:07:07 -04:00
|
|
|
sigs = list_signals(f) | list_special_ios(f, True, True, True)
|
|
|
|
special_outs = list_special_ios(f, False, True, True)
|
|
|
|
inouts = list_special_ios(f, False, False, True)
|
|
|
|
targets = list_targets(f) | special_outs
|
|
|
|
wires = _list_comb_wires(f) | special_outs
|
|
|
|
r = "module " + name + "(\n"
|
|
|
|
firstp = True
|
2015-09-15 00:38:02 -04:00
|
|
|
for sig in sorted(ios, key=lambda x: x.duid):
|
2015-04-13 14:07:07 -04:00
|
|
|
if not firstp:
|
|
|
|
r += ",\n"
|
|
|
|
firstp = False
|
|
|
|
if sig in inouts:
|
|
|
|
r += "\tinout " + _printsig(ns, sig)
|
|
|
|
elif sig in targets:
|
|
|
|
if sig in wires:
|
|
|
|
r += "\toutput " + _printsig(ns, sig)
|
|
|
|
else:
|
|
|
|
r += "\toutput reg " + _printsig(ns, sig)
|
|
|
|
else:
|
|
|
|
r += "\tinput " + _printsig(ns, sig)
|
|
|
|
r += "\n);\n\n"
|
2015-09-15 00:38:02 -04:00
|
|
|
for sig in sorted(sigs - ios, key=lambda x: x.duid):
|
2015-04-13 14:07:07 -04:00
|
|
|
if sig in wires:
|
|
|
|
r += "wire " + _printsig(ns, sig) + ";\n"
|
|
|
|
else:
|
2015-04-24 06:14:14 -04:00
|
|
|
if reg_initialization:
|
2015-04-20 21:51:39 -04:00
|
|
|
r += "reg " + _printsig(ns, sig) + " = " + _printexpr(ns, sig.reset)[0] + ";\n"
|
2015-04-24 06:14:14 -04:00
|
|
|
else:
|
|
|
|
r += "reg " + _printsig(ns, sig) + ";\n"
|
2015-04-13 14:07:07 -04:00
|
|
|
r += "\n"
|
|
|
|
return r
|
2011-12-21 17:08:50 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2015-04-24 06:14:14 -04:00
|
|
|
def _printcomb(f, ns,
|
2015-04-24 06:54:08 -04:00
|
|
|
display_run,
|
|
|
|
dummy_signal,
|
|
|
|
blocking_assign):
|
2015-04-13 14:07:07 -04:00
|
|
|
r = ""
|
|
|
|
if f.comb:
|
2015-04-24 06:14:14 -04:00
|
|
|
if dummy_signal:
|
|
|
|
# Generate a dummy event to get the simulator
|
|
|
|
# to run the combinatorial process once at the beginning.
|
|
|
|
syn_off = "// synthesis translate_off\n"
|
|
|
|
syn_on = "// synthesis translate_on\n"
|
2015-04-20 21:51:39 -04:00
|
|
|
dummy_s = Signal(name_override="dummy_s")
|
|
|
|
r += syn_off
|
|
|
|
r += "reg " + _printsig(ns, dummy_s) + ";\n"
|
|
|
|
r += "initial " + ns.get_name(dummy_s) + " <= 1'd0;\n"
|
|
|
|
r += syn_on
|
2014-10-17 05:08:37 -04:00
|
|
|
|
2015-04-13 14:07:07 -04:00
|
|
|
groups = group_by_targets(f.comb)
|
2014-10-17 05:08:37 -04:00
|
|
|
|
2015-04-13 14:07:07 -04:00
|
|
|
for n, g in enumerate(groups):
|
|
|
|
if len(g[1]) == 1 and isinstance(g[1][0], _Assign):
|
|
|
|
r += "assign " + _printnode(ns, _AT_BLOCKING, 0, g[1][0])
|
|
|
|
else:
|
2015-04-24 06:14:14 -04:00
|
|
|
if dummy_signal:
|
2015-04-20 21:51:39 -04:00
|
|
|
dummy_d = Signal(name_override="dummy_d")
|
|
|
|
r += "\n" + syn_off
|
|
|
|
r += "reg " + _printsig(ns, dummy_d) + ";\n"
|
|
|
|
r += syn_on
|
2014-10-17 05:08:37 -04:00
|
|
|
|
2015-04-13 14:07:07 -04:00
|
|
|
r += "always @(*) begin\n"
|
|
|
|
if display_run:
|
|
|
|
r += "\t$display(\"Running comb block #" + str(n) + "\");\n"
|
2015-04-24 06:14:14 -04:00
|
|
|
if blocking_assign:
|
2015-04-20 21:51:39 -04:00
|
|
|
for t in g[0]:
|
|
|
|
r += "\t" + ns.get_name(t) + " = " + _printexpr(ns, t.reset)[0] + ";\n"
|
|
|
|
r += _printnode(ns, _AT_BLOCKING, 1, g[1])
|
|
|
|
else:
|
|
|
|
for t in g[0]:
|
|
|
|
r += "\t" + ns.get_name(t) + " <= " + _printexpr(ns, t.reset)[0] + ";\n"
|
|
|
|
r += _printnode(ns, _AT_NONBLOCKING, 1, g[1])
|
2015-04-24 06:14:14 -04:00
|
|
|
if dummy_signal:
|
2015-04-20 21:51:39 -04:00
|
|
|
r += syn_off
|
|
|
|
r += "\t" + ns.get_name(dummy_d) + " <= " + ns.get_name(dummy_s) + ";\n"
|
|
|
|
r += syn_on
|
2015-04-13 14:07:07 -04:00
|
|
|
r += "end\n"
|
|
|
|
r += "\n"
|
|
|
|
return r
|
2011-12-21 17:08:50 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2013-03-15 13:17:33 -04:00
|
|
|
def _printsync(f, ns):
|
2015-04-13 14:07:07 -04:00
|
|
|
r = ""
|
|
|
|
for k, v in sorted(f.sync.items(), key=itemgetter(0)):
|
|
|
|
r += "always @(posedge " + ns.get_name(f.clock_domains[k].clk) + ") begin\n"
|
|
|
|
r += _printnode(ns, _AT_SIGNAL, 1, v)
|
|
|
|
r += "end\n\n"
|
|
|
|
return r
|
2011-12-21 17:08:50 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2013-02-23 13:03:16 -05:00
|
|
|
def _call_special_classmethod(overrides, obj, method, *args, **kwargs):
|
2015-04-13 14:07:07 -04:00
|
|
|
cl = obj.__class__
|
|
|
|
if cl in overrides:
|
|
|
|
cl = overrides[cl]
|
|
|
|
if hasattr(cl, method):
|
|
|
|
return getattr(cl, method)(obj, *args, **kwargs)
|
|
|
|
else:
|
|
|
|
return None
|
2013-02-23 13:03:16 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2013-04-25 08:56:26 -04:00
|
|
|
def _lower_specials_step(overrides, specials):
|
2015-04-13 14:07:07 -04:00
|
|
|
f = _Fragment()
|
|
|
|
lowered_specials = set()
|
2015-09-15 00:38:02 -04:00
|
|
|
for special in sorted(specials, key=lambda x: x.duid):
|
2015-04-13 14:07:07 -04:00
|
|
|
impl = _call_special_classmethod(overrides, special, "lower")
|
|
|
|
if impl is not None:
|
|
|
|
f += impl.get_fragment()
|
|
|
|
lowered_specials.add(special)
|
|
|
|
return f, lowered_specials
|
2013-02-23 13:03:16 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2013-04-25 08:56:26 -04:00
|
|
|
def _can_lower(overrides, specials):
|
2015-04-13 14:07:07 -04:00
|
|
|
for special in specials:
|
|
|
|
cl = special.__class__
|
|
|
|
if cl in overrides:
|
|
|
|
cl = overrides[cl]
|
|
|
|
if hasattr(cl, "lower"):
|
|
|
|
return True
|
|
|
|
return False
|
2013-04-25 08:56:26 -04:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2013-04-25 08:56:26 -04:00
|
|
|
def _lower_specials(overrides, specials):
|
2015-04-13 14:07:07 -04:00
|
|
|
f, lowered_specials = _lower_specials_step(overrides, specials)
|
|
|
|
while _can_lower(overrides, f.specials):
|
|
|
|
f2, lowered_specials2 = _lower_specials_step(overrides, f.specials)
|
|
|
|
f += f2
|
|
|
|
lowered_specials |= lowered_specials2
|
|
|
|
f.specials -= lowered_specials2
|
|
|
|
return f, lowered_specials
|
2013-04-25 08:56:26 -04:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2015-04-08 08:28:23 -04:00
|
|
|
def _printspecials(overrides, specials, ns, add_data_file):
|
2015-04-13 14:07:07 -04:00
|
|
|
r = ""
|
2015-09-15 00:38:02 -04:00
|
|
|
for special in sorted(specials, key=lambda x: x.duid):
|
2015-04-13 14:07:07 -04:00
|
|
|
pr = _call_special_classmethod(overrides, special, "emit_verilog", ns, add_data_file)
|
|
|
|
if pr is None:
|
|
|
|
raise NotImplementedError("Special " + str(special) + " failed to implement emit_verilog")
|
|
|
|
r += pr
|
|
|
|
return r
|
2012-01-27 10:54:48 -05:00
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2015-03-30 07:41:16 -04:00
|
|
|
def convert(f, ios=None, name="top",
|
|
|
|
special_overrides=dict(),
|
|
|
|
create_clock_domains=True,
|
2015-04-20 21:51:39 -04:00
|
|
|
display_run=False, asic_syntax=False):
|
2015-04-13 14:07:07 -04:00
|
|
|
r = ConvOutput()
|
|
|
|
if not isinstance(f, _Fragment):
|
|
|
|
f = f.get_fragment()
|
|
|
|
if ios is None:
|
|
|
|
ios = set()
|
2014-10-17 05:08:37 -04:00
|
|
|
|
2015-11-05 02:06:33 -05:00
|
|
|
for cd_name in sorted(list_clock_domains(f)):
|
2015-04-13 14:07:07 -04:00
|
|
|
try:
|
|
|
|
f.clock_domains[cd_name]
|
|
|
|
except KeyError:
|
|
|
|
if create_clock_domains:
|
|
|
|
cd = ClockDomain(cd_name)
|
|
|
|
f.clock_domains.append(cd)
|
|
|
|
ios |= {cd.clk, cd.rst}
|
|
|
|
else:
|
|
|
|
raise KeyError("Unresolved clock domain: '"+cd_name+"'")
|
2012-01-20 16:59:40 -05:00
|
|
|
|
2015-04-13 14:07:07 -04:00
|
|
|
f = lower_complex_slices(f)
|
|
|
|
insert_resets(f)
|
|
|
|
f = lower_basics(f)
|
|
|
|
fs, lowered_specials = _lower_specials(special_overrides, f.specials)
|
|
|
|
f += lower_basics(fs)
|
2011-12-12 18:24:40 -05:00
|
|
|
|
2015-04-13 14:07:07 -04:00
|
|
|
ns = build_namespace(list_signals(f) \
|
|
|
|
| list_special_ios(f, True, True, True) \
|
2015-05-23 08:01:08 -04:00
|
|
|
| ios, _reserved_keywords)
|
2015-09-22 02:30:16 -04:00
|
|
|
ns.clock_domains = f.clock_domains
|
2015-04-13 14:07:07 -04:00
|
|
|
r.ns = ns
|
2012-01-27 10:54:48 -05:00
|
|
|
|
2015-04-13 14:07:07 -04:00
|
|
|
src = "/* Machine-generated using Migen */\n"
|
2015-04-24 06:14:14 -04:00
|
|
|
src += _printheader(f, ios, name, ns,
|
|
|
|
reg_initialization=not asic_syntax)
|
|
|
|
src += _printcomb(f, ns,
|
|
|
|
display_run=display_run,
|
|
|
|
dummy_signal=not asic_syntax,
|
|
|
|
blocking_assign=asic_syntax)
|
2015-04-13 14:07:07 -04:00
|
|
|
src += _printsync(f, ns)
|
|
|
|
src += _printspecials(special_overrides, f.specials - lowered_specials, ns, r.add_data_file)
|
|
|
|
src += "endmodule\n"
|
|
|
|
r.set_main_source(src)
|
2015-03-30 04:42:42 -04:00
|
|
|
|
2015-04-13 14:07:07 -04:00
|
|
|
return r
|