Merge pull request #113 from CastMi/original_master

Checks for pointers
This commit is contained in:
Stephen Williams 2016-07-05 07:59:16 -07:00 committed by GitHub
commit f03e9d4180
5 changed files with 173 additions and 25 deletions

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2000-2016 Stephen Williams (steve@icarus.com)
* Copyright (c) 2016 CERN Michele Castellana (michele.castellana@cern.ch)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -508,6 +509,7 @@ void NetScope::add_module_port_info( unsigned idx, perm_string name, PortType::E
unsigned long width )
{
assert(type_ == MODULE);
assert(ports_.size() > idx);
PortInfo &info = ports_[idx];
info.name = name;
info.type = ptype;

View File

@ -250,7 +250,6 @@ class NetPins : public LineInfo {
*/
class NetObj : public NetPins, public Attrib {
public:
public:
// The name of the object must be a permallocated string. A
// lex_strings string, for example.

File diff suppressed because it is too large Load Diff

View File

@ -1737,29 +1737,29 @@ static void draw_lpm_ff(ivl_lpm_t net)
nex = ivl_lpm_data(net,0);
assert(nex);
fprintf(vvp_out, "%s", draw_net_input(nex));
assert(width_of_nexus(nex) == width);;
assert(width_of_nexus(nex) == width);
nex = ivl_lpm_clk(net);
assert(nex);
assert(width_of_nexus(nex) == 1);;
assert(width_of_nexus(nex) == 1);
fprintf(vvp_out, ", %s", draw_net_input(nex));
nex = ivl_lpm_enable(net);
if (nex) {
assert(width_of_nexus(nex) == 1);;
assert(width_of_nexus(nex) == 1);
fprintf(vvp_out, ", %s", draw_net_input(nex));
} else {
fprintf(vvp_out, ", C4<1>");
}
if ( (nex = ivl_lpm_async_clr(net)) ) {
assert(width_of_nexus(nex) == 1);;
assert(width_of_nexus(nex) == 1);
fprintf(vvp_out, ", %s", draw_net_input(nex));
}
if ( (nex = ivl_lpm_async_set(net)) ) {
ivl_expr_t val = ivl_lpm_aset_value(net);
assert(width_of_nexus(nex) == 1);;
assert(width_of_nexus(nex) == 1);
fprintf(vvp_out, ", %s", draw_net_input(nex));
if (val) {
unsigned nbits = ivl_expr_width(val);

View File

@ -2,6 +2,7 @@
#define IVL_vpi_priv_H
/*
* Copyright (c) 2001-2015 Stephen Williams (steve@icarus.com)
* Copyright (c) 2016 CERN Michele Castellana (michele.castellana@cern.ch)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -227,11 +228,6 @@ struct __vpiScopedRealtime : public __vpiSystemTime {
void vpi_get_value(p_vpi_value val);
};
struct __vpiPortInfo : public __vpiHandle {
};
/*
* Scopes are created by .scope statements in the source. These
* objects hold the items and properties that are knowingly bound to a