Skip to content
Snippets Groups Projects
Commit f703ef43 authored by Daniela Genius's avatar Daniela Genius
Browse files

bugfix Loader: number of channels=number of signals

parent a46a3e85
No related branches found
No related tags found
No related merge requests found
...@@ -44,22 +44,25 @@ ...@@ -44,22 +44,25 @@
package ddtranslatorSoclib.toTopCell; package ddtranslatorSoclib.toTopCell;
import avatartranslator.AvatarRelation;//DG 23.06.
import avatartranslator.AvatarSpecification;//DG 23.06.
import ddtranslatorSoclib.AvatarChannel; import ddtranslatorSoclib.AvatarChannel;
public class Loader { public class Loader {
public static AvatarSpecification avspec;
static private String loader; static private String loader;
private final static String NAME_CLK = "signal_clk"; private final static String NAME_CLK = "signal_clk";
private final static String CR = "\n"; private final static String CR = "\n";
private final static String CR2 = "\n\n"; private final static String CR2 = "\n\n";
public Loader(){ public Loader(AvatarSpecification _avspec){
avspec =_avspec;
} }
public static String getLoader() { public static String getLoader(AvatarSpecification _avspec) {//DG 23.06.
avspec =_avspec;//DG 23.06.
int nb_clusters=TopCellGenerator.avatardd.getAllCrossbar().size(); int nb_clusters=TopCellGenerator.avatardd.getAllCrossbar().size();
//nb_clusters=2; //nb_clusters=2;
...@@ -92,10 +95,19 @@ public class Loader { ...@@ -92,10 +95,19 @@ public class Loader {
// We generated so far until arriving at first channel segment, if any // We generated so far until arriving at first channel segment, if any
//current hypothesis : one segment per channel //current hypothesis : one segment per channel
int j=0; int j=0;
for (AvatarChannel channel : TopCellGenerator.avatardd.getAllMappedChannels()) { //for (AvatarChannel channel : TopCellGenerator.avatardd.getAllMappedChannels()) {
loader = loader + ".channel" + j + ";"; //DG 23.06. per signal!!hack pour l'instant
j++; int i=0;
//for (i=0;i<30;i++){
for(AvatarRelation ar: avspec.getRelations()) {
for(i=0; i<ar.nbOfSignals() ; i++) {
loader = loader + ".channel" + i + ";";
i++;
} }
}
// We resume the generation of the fixed code // We resume the generation of the fixed code
loader = loader + ".cpudata;.contextdata\");" + CR ; loader = loader + ".cpudata;.contextdata\");" + CR ;
loader = loader + " } else {" + CR ; loader = loader + " } else {" + CR ;
......
...@@ -182,7 +182,7 @@ public class TopCellGenerator ...@@ -182,7 +182,7 @@ public class TopCellGenerator
config + config +
Code.getCode() + Code.getCode() +
MappingTable.getMappingTable() + MappingTable.getMappingTable() +
Loader.getLoader() + Loader.getLoader(avspec) + //DG 23.06.
Declaration.getDeclarations() + Declaration.getDeclarations() +
Signal.getSignal() + Signal.getSignal() +
NetList.getNetlist(icn,tracing) + NetList.getNetlist(icn,tracing) +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment