Fix Ubuntu 17.10 issues, bug1223 partial.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
parent
4794093aba
commit
c7cbe11ba4
2
Changes
2
Changes
|
|
@ -11,6 +11,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||||
|
|
||||||
**** The internal test_verilated test directory is moved to be part of test_regress.
|
**** The internal test_verilated test directory is moved to be part of test_regress.
|
||||||
|
|
||||||
|
**** Fix Ubuntu 17.10 issues, bug1223 partial. [John Coiner]
|
||||||
|
|
||||||
|
|
||||||
* Verilator 3.912 2017-09-23
|
* Verilator 3.912 2017-09-23
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1904,7 +1904,8 @@ void EmitCImp::emitInt(AstNodeModule* modp) {
|
||||||
bool did = false;
|
bool did = false;
|
||||||
for (AstNode* nodep=modp->stmtsp(); nodep; nodep = nodep->nextp()) {
|
for (AstNode* nodep=modp->stmtsp(); nodep; nodep = nodep->nextp()) {
|
||||||
if (AstCell* cellp=nodep->castCell()) {
|
if (AstCell* cellp=nodep->castCell()) {
|
||||||
if (!did++) {
|
if (!did) {
|
||||||
|
did = true;
|
||||||
putsDecoration("// CELLS\n");
|
putsDecoration("// CELLS\n");
|
||||||
if (modp->isTop()) puts("// Public to allow access to /*verilator_public*/ items;\n");
|
if (modp->isTop()) puts("// Public to allow access to /*verilator_public*/ items;\n");
|
||||||
if (modp->isTop()) puts("// otherwise the application code can consider these internals.\n");
|
if (modp->isTop()) puts("// otherwise the application code can consider these internals.\n");
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,10 @@ void EmitCSyms::emitSymHdr() {
|
||||||
{ // Scope names
|
{ // Scope names
|
||||||
bool did = false;
|
bool did = false;
|
||||||
for (ScopeNames::iterator it = m_scopeNames.begin(); it != m_scopeNames.end(); ++it) {
|
for (ScopeNames::iterator it = m_scopeNames.begin(); it != m_scopeNames.end(); ++it) {
|
||||||
if (!did++) puts("\n// SCOPE NAMES\n");
|
if (!did) {
|
||||||
|
did = true;
|
||||||
|
puts("\n// SCOPE NAMES\n");
|
||||||
|
}
|
||||||
puts("VerilatedScope __Vscope_"+it->second.m_symName+";\n");
|
puts("VerilatedScope __Vscope_"+it->second.m_symName+";\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -432,7 +435,10 @@ void EmitCSyms::emitSymImp() {
|
||||||
{ // Setup scope names
|
{ // Setup scope names
|
||||||
bool did = false;
|
bool did = false;
|
||||||
for (ScopeNames::iterator it = m_scopeNames.begin(); it != m_scopeNames.end(); ++it) {
|
for (ScopeNames::iterator it = m_scopeNames.begin(); it != m_scopeNames.end(); ++it) {
|
||||||
if (!did++) puts("// Setup scope names\n");
|
if (!did) {
|
||||||
|
did = true;
|
||||||
|
puts("// Setup scope names\n");
|
||||||
|
}
|
||||||
puts("__Vscope_"+it->second.m_symName+".configure(this,name(),");
|
puts("__Vscope_"+it->second.m_symName+".configure(this,name(),");
|
||||||
putsQuoted(it->second.m_prettyName);
|
putsQuoted(it->second.m_prettyName);
|
||||||
puts(");\n");
|
puts(");\n");
|
||||||
|
|
|
||||||
|
|
@ -1002,13 +1002,14 @@ sub _run {
|
||||||
if ($param{expect}) {
|
if ($param{expect}) {
|
||||||
# Compare
|
# Compare
|
||||||
my $quoted = quotemeta ($param{expect});
|
my $quoted = quotemeta ($param{expect});
|
||||||
my $bad = ($wholefile ne $param{expect}
|
my $ok = ($wholefile eq $param{expect}
|
||||||
&& $wholefile !~ /$param{expect}/ms
|
|| _try_regex($wholefile, $param{expect}) == 1
|
||||||
&& $wholefile !~ /$quoted/ms);
|
|| $wholefile =~ /$quoted/ms);
|
||||||
if ($bad) {
|
if (!$ok) {
|
||||||
#print "**BAD $self->{name} $param{logfile} MT $moretry $try\n";
|
#print "**BAD $self->{name} $param{logfile} MT $moretry $try\n";
|
||||||
next if $moretry;
|
next if $moretry;
|
||||||
$self->error("Mismatch in output from $param{cmd}[0]\n");
|
$self->error("Mismatch in output from $param{cmd}[0]\n");
|
||||||
|
$self->error("Might be error in regexp format\n") if $ok<1;
|
||||||
print "GOT:\n";
|
print "GOT:\n";
|
||||||
print $wholefile;
|
print $wholefile;
|
||||||
print "ENDGOT\n";
|
print "ENDGOT\n";
|
||||||
|
|
@ -1025,6 +1026,24 @@ sub _run {
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Little utilities
|
# Little utilities
|
||||||
|
|
||||||
|
sub _try_regex {
|
||||||
|
# Try to eval a regexp
|
||||||
|
# Returns:
|
||||||
|
# 1 if $text ~= /$regex/ms
|
||||||
|
# 0 if no match
|
||||||
|
# -1 if $regex is invalid, doesn't compile
|
||||||
|
my ($text, $regex) = @_;
|
||||||
|
my $result;
|
||||||
|
{
|
||||||
|
local $@;
|
||||||
|
eval {
|
||||||
|
$result = ($text =~ /$regex/ms);
|
||||||
|
};
|
||||||
|
$result = -1 if $@;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
sub _make_main {
|
sub _make_main {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ int main (int argc, char *argv[]) {
|
||||||
Verilated::debug(0);
|
Verilated::debug(0);
|
||||||
|
|
||||||
// Make sure public tag worked
|
// Make sure public tag worked
|
||||||
if (Vt_enum_public_p3::ZERO || Vt_enum_public_p3::ONE) {}
|
if (Vt_enum_public_p3::ZERO == Vt_enum_public_p3::ONE) {}
|
||||||
if (Vt_enum_public_p62::ZERO || Vt_enum_public_p62::ALLONE) {}
|
if (Vt_enum_public_p62::ZERO == Vt_enum_public_p62::ALLONE) {}
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
topp->eval();
|
topp->eval();
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ int main (int argc, char *argv[]) {
|
||||||
Verilated::debug(0);
|
Verilated::debug(0);
|
||||||
|
|
||||||
// Make sure public tag worked
|
// Make sure public tag worked
|
||||||
if (Vt_param_public_p::INPACK) {}
|
if (Vt_param_public_p::INPACK == Vt_param_public_p::INPACK) {}
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
topp->eval();
|
topp->eval();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue