V0.8: Get arrayed instance ports correct.
This is a back port from development of the code to get the arrayed instance port order correct (MSB to LSB).
This commit is contained in:
parent
ca5d265350
commit
e8bc5aefb4
|
|
@ -448,7 +448,11 @@ void PGModule::elaborate_scope_mod_(Design*des, Module*mod, NetScope*sc) const
|
|||
|
||||
/* Stash the instance array of scopes into the parent
|
||||
scope. Later elaboration passes will use this vector to
|
||||
further elaborate the array. */
|
||||
further elaborate the array.
|
||||
|
||||
Note that the array is ordered from LSB to MSB. We will use
|
||||
that fact in the main elaborate to connect things in the
|
||||
correct order. */
|
||||
sc->instance_arrays[get_name()] = instances;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -663,7 +663,9 @@ void PGModule::elaborate_mod_(Design*des, Module*rmod, NetScope*scope) const
|
|||
unsigned prts_pin_count = 0;
|
||||
|
||||
for (unsigned inst = 0 ; inst < instance.count() ; inst += 1) {
|
||||
NetScope*inst_scope = instance[inst];
|
||||
// Scan the instances from MSB to LSB. The port
|
||||
// will be assembled in that order as well.
|
||||
NetScope*inst_scope = instance[instance.count()-inst-1];
|
||||
|
||||
// Scan the module sub-ports for this instance...
|
||||
for (unsigned ldx = 0 ; ldx < mport.count() ; ldx += 1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue