2002-06-30 04:21:31 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2002 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
|
|
|
|
|
* General Public License as published by the Free Software
|
|
|
|
|
* Foundation; either version 2 of the License, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
|
|
|
*/
|
|
|
|
|
#if !defined(WINNT)
|
2002-07-08 00:32:15 +02:00
|
|
|
#ident "$Id: net_nex_output.cc,v 1.3 2002/07/07 22:32:15 steve Exp $"
|
2002-06-30 04:21:31 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
# include "config.h"
|
|
|
|
|
|
|
|
|
|
# include <iostream>
|
|
|
|
|
|
|
|
|
|
# include <cassert>
|
|
|
|
|
# include <typeinfo>
|
|
|
|
|
# include "netlist.h"
|
|
|
|
|
# include "netmisc.h"
|
|
|
|
|
|
|
|
|
|
void NetProc::nex_output(NexusSet&out)
|
|
|
|
|
{
|
|
|
|
|
cerr << get_line()
|
|
|
|
|
<< ": internal error: NetProc::nex_output not implemented"
|
|
|
|
|
<< endl;
|
|
|
|
|
}
|
|
|
|
|
|
2002-07-01 02:54:21 +02:00
|
|
|
void NetAssignBase::nex_output(NexusSet&out)
|
2002-06-30 04:21:31 +02:00
|
|
|
{
|
2002-07-01 02:54:21 +02:00
|
|
|
NetNet*lsig = lval_->sig();
|
|
|
|
|
assert(lsig);
|
|
|
|
|
assert(lval_->more == 0);
|
|
|
|
|
|
|
|
|
|
for (unsigned idx = 0 ; idx < lsig->pin_count() ; idx += 1)
|
|
|
|
|
out.add(lsig->pin(idx).nexus());
|
|
|
|
|
|
2002-06-30 04:21:31 +02:00
|
|
|
}
|
|
|
|
|
|
2002-07-08 00:32:15 +02:00
|
|
|
void NetCase::nex_output(NexusSet&out)
|
|
|
|
|
{
|
|
|
|
|
for (unsigned idx = 0 ; idx < nitems_ ; idx += 1) {
|
|
|
|
|
|
|
|
|
|
assert(items_[idx].statement);
|
|
|
|
|
items_[idx].statement->nex_output(out);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2002-06-30 04:21:31 +02:00
|
|
|
void NetCondit::nex_output(NexusSet&out)
|
|
|
|
|
{
|
2002-07-01 02:54:21 +02:00
|
|
|
if (if_ != 0)
|
|
|
|
|
if_->nex_output(out);
|
|
|
|
|
if (else_ != 0)
|
|
|
|
|
else_->nex_output(out);
|
2002-06-30 04:21:31 +02:00
|
|
|
}
|
|
|
|
|
|
2002-07-01 02:54:21 +02:00
|
|
|
void NetEvWait::nex_output(NexusSet&out)
|
|
|
|
|
{
|
|
|
|
|
assert(statement_);
|
|
|
|
|
statement_->nex_output(out);
|
|
|
|
|
}
|
2002-06-30 04:21:31 +02:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* $Log: net_nex_output.cc,v $
|
2002-07-08 00:32:15 +02:00
|
|
|
* Revision 1.3 2002/07/07 22:32:15 steve
|
|
|
|
|
* Asynchronous synthesis of case statements.
|
|
|
|
|
*
|
2002-07-01 02:54:21 +02:00
|
|
|
* Revision 1.2 2002/07/01 00:54:21 steve
|
|
|
|
|
* synth_asych of if/else requires redirecting the target
|
|
|
|
|
* if sub-statements. Use NetNet objects to manage the
|
|
|
|
|
* situation.
|
|
|
|
|
*
|
2002-06-30 04:21:31 +02:00
|
|
|
* Revision 1.1 2002/06/30 02:21:32 steve
|
|
|
|
|
* Add structure for asynchronous logic synthesis.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|