Add support for ivl_logic_{file,lineno}
The logic devices were missing the file/line number interface. This patch adds the routines and propagates the information as needed.
This commit is contained in:
parent
ce7a6fa0da
commit
69ec4cfc6d
2
ivl.def
2
ivl.def
|
|
@ -85,6 +85,8 @@ ivl_logic_basename
|
|||
ivl_logic_delay
|
||||
ivl_logic_drive0
|
||||
ivl_logic_drive1
|
||||
ivl_logic_file
|
||||
ivl_logic_lineno
|
||||
ivl_logic_name
|
||||
ivl_logic_pin
|
||||
ivl_logic_pins
|
||||
|
|
|
|||
10
ivl_target.h
10
ivl_target.h
|
|
@ -217,6 +217,7 @@ typedef enum ivl_expr_type_e {
|
|||
IVL_EX_EVENT = 17,
|
||||
IVL_EX_MEMORY = 4,
|
||||
IVL_EX_NUMBER = 5,
|
||||
IVL_EX_REALNUM = 16,
|
||||
IVL_EX_SCOPE = 6,
|
||||
IVL_EX_SELECT = 7,
|
||||
IVL_EX_SFUNC = 8,
|
||||
|
|
@ -225,8 +226,7 @@ typedef enum ivl_expr_type_e {
|
|||
IVL_EX_TERNARY = 11,
|
||||
IVL_EX_UFUNC = 12,
|
||||
IVL_EX_ULONG = 13,
|
||||
IVL_EX_UNARY = 14,
|
||||
IVL_EX_REALNUM = 16
|
||||
IVL_EX_UNARY = 14
|
||||
} ivl_expr_type_t;
|
||||
|
||||
/* This is the type code for an ivl_net_logic_t object. */
|
||||
|
|
@ -246,12 +246,12 @@ typedef enum ivl_logic_e {
|
|||
IVL_LO_NOTIF0 = 10,
|
||||
IVL_LO_NOTIF1 = 11,
|
||||
IVL_LO_OR = 12,
|
||||
IVL_LO_PMOS = 17,
|
||||
IVL_LO_PULLDOWN = 13,
|
||||
IVL_LO_PULLUP = 14,
|
||||
IVL_LO_RCMOS = 23,
|
||||
IVL_LO_RNMOS = 15,
|
||||
IVL_LO_RPMOS = 16,
|
||||
IVL_LO_PMOS = 17,
|
||||
IVL_LO_XNOR = 18,
|
||||
IVL_LO_XOR = 19,
|
||||
|
||||
|
|
@ -864,6 +864,9 @@ extern unsigned ivl_file_table_size(void);
|
|||
extern int ivl_island_flag_set(ivl_island_t net, unsigned flag, int value);
|
||||
extern int ivl_island_flag_test(ivl_island_t net, unsigned flag);
|
||||
|
||||
extern const char* ivl_logic_file(ivl_net_logic_t net);
|
||||
extern unsigned ivl_logic_lineno(ivl_net_logic_t net);
|
||||
|
||||
/* LOGIC
|
||||
* These types and functions support manipulation of logic gates. The
|
||||
* ivl_logic_t enumeration identifies the various kinds of gates that
|
||||
|
|
@ -1024,7 +1027,6 @@ extern const char* ivl_udp_row(ivl_udp_t net, unsigned idx);
|
|||
extern unsigned ivl_udp_rows(ivl_udp_t net);
|
||||
extern const char* ivl_udp_name(ivl_udp_t net);
|
||||
|
||||
|
||||
extern const char* ivl_lpm_file(ivl_lpm_t net);
|
||||
extern unsigned ivl_lpm_lineno(ivl_lpm_t net);
|
||||
|
||||
|
|
|
|||
12
t-dll-api.cc
12
t-dll-api.cc
|
|
@ -693,6 +693,18 @@ extern "C" int ivl_island_flag_test(ivl_island_t net, unsigned flag)
|
|||
return net->flags[flag];
|
||||
}
|
||||
|
||||
extern "C" const char*ivl_logic_file(ivl_net_logic_t net)
|
||||
{
|
||||
assert(net);
|
||||
return net->file.str();
|
||||
}
|
||||
|
||||
extern "C" unsigned ivl_logic_lineno(ivl_net_logic_t net)
|
||||
{
|
||||
assert(net);
|
||||
return net->lineno;
|
||||
}
|
||||
|
||||
extern "C" const char* ivl_logic_attr(ivl_net_logic_t net, const char*key)
|
||||
{
|
||||
assert(net);
|
||||
|
|
|
|||
3
t-dll.cc
3
t-dll.cc
|
|
@ -942,6 +942,9 @@ void dll_target::logic(const NetLogic*net)
|
|||
|
||||
make_logic_delays_(obj, net);
|
||||
|
||||
obj->file = net->get_file();
|
||||
obj->lineno = net->get_lineno();
|
||||
|
||||
scope_add_logic(scop, obj);
|
||||
}
|
||||
|
||||
|
|
|
|||
4
t-dll.h
4
t-dll.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __t_dll_H
|
||||
#define __t_dll_H
|
||||
/*
|
||||
* Copyright (c) 2000-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2011 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -467,6 +467,8 @@ struct ivl_net_logic_s {
|
|||
|
||||
perm_string name_;
|
||||
ivl_scope_t scope_;
|
||||
perm_string file;
|
||||
unsigned lineno;
|
||||
|
||||
unsigned npins_;
|
||||
ivl_nexus_t*pins_;
|
||||
|
|
|
|||
Loading…
Reference in New Issue