Add support for ivl_const_{file,lineno}
This patch adds support for ivl_const_file() and ivl_const_lineno() to the target interface.
This commit is contained in:
parent
6ddf754082
commit
f01b25b60c
2
ivl.def
2
ivl.def
|
|
@ -16,6 +16,8 @@ ivl_design_time_precision
|
|||
|
||||
ivl_const_bits
|
||||
ivl_const_delay
|
||||
ivl_const_file
|
||||
ivl_const_lineno
|
||||
ivl_const_real
|
||||
ivl_const_signed
|
||||
ivl_const_type
|
||||
|
|
|
|||
|
|
@ -591,6 +591,9 @@ extern int ivl_const_signed(ivl_net_const_t net);
|
|||
extern unsigned ivl_const_width(ivl_net_const_t net);
|
||||
extern double ivl_const_real(ivl_net_const_t net);
|
||||
|
||||
extern const char* ivl_const_file(ivl_net_const_t net);
|
||||
extern unsigned ivl_const_lineno(ivl_net_const_t net);
|
||||
|
||||
/* extern ivl_nexus_t ivl_const_pin(ivl_net_const_t net, unsigned idx); */
|
||||
/* extern unsigned ivl_const_pins(ivl_net_const_t net); */
|
||||
|
||||
|
|
|
|||
12
t-dll-api.cc
12
t-dll-api.cc
|
|
@ -186,6 +186,18 @@ extern "C" ivl_expr_t ivl_const_delay(ivl_net_const_t net, unsigned transition)
|
|||
return net->delay[transition];
|
||||
}
|
||||
|
||||
extern "C" const char*ivl_const_file(ivl_net_const_t net)
|
||||
{
|
||||
assert(net);
|
||||
return net->file.str();
|
||||
}
|
||||
|
||||
extern "C" unsigned ivl_const_lineno(ivl_net_const_t net)
|
||||
{
|
||||
assert(net);
|
||||
return net->lineno;
|
||||
}
|
||||
|
||||
extern "C" ivl_nexus_t ivl_const_nex(ivl_net_const_t net)
|
||||
{
|
||||
assert(net);
|
||||
|
|
|
|||
3
t-dll.cc
3
t-dll.cc
|
|
@ -2192,6 +2192,9 @@ bool dll_target::net_const(const NetConst*net)
|
|||
des_.consts.resize( des_.consts.size() + 1 );
|
||||
des_.consts[des_.consts.size()-1] = obj;
|
||||
|
||||
obj->file = net->get_file();
|
||||
obj->lineno = net->get_lineno();
|
||||
|
||||
make_const_delays_(obj, net);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue