new FabricTree((FpgaBenkoBox[])ihornports.toArray(new FpgaBenkoBox[0]),
"funnel",
"ihorn");
-
+
if (quiet) return;
System.out.println("`include \"macros.v\"");
System.out.println("module fabric(clk, data_Memory0_command_r, data_Memory0_command_a, data_Memory0_command,");
System.out.println(" wire [(`PACKET_WIDTH-1):0] data_"
+getUniqueName(ship)+"_"+port.getName()+";");
+ System.out.println("wire [(`PACKET_WIDTH-1):0] ihornleft;");
+
System.out.println("");
instructions.dumpChannels(false);
System.out.println("");
}
}
+
+ System.out.println("funnel ihornfun(clk,"+
+ " ihornleft_r, ihornleft_a, ihornleft,"+
+ " ihorn_r, ihorn_a, ihorn,"+
+ " source_r, source_a, source);");
+ System.out.println("horn tophorn(clk,"+
+ " ihornleft_r, ihornleft_a, ihornleft,"+
+ " instruction_r, instruction_a, instruction,"+
+ " dest_r, dest_a, dest);");
/*
- System.out.println("funnel topfun(clk,"+
- " dest_r, dest_a, dest,"+
- " source_r, source_a, source,"+
- " data_Memory0_dhorn_r, data_Memory0_dhorn_a, data_Memory0_dhorn);");
- */
System.out.println("assign instruction_r = ihorn_r;");
System.out.println("assign ihorn_a = instruction_a;");
System.out.println("assign instruction = ihorn;");
System.out.println("assign dest_r = source_r;");
System.out.println("assign source_a = dest_a;");
System.out.println("assign dest = source;");
+ */
System.out.println("endmodule");
}
if (end-start == 1) {
FpgaBenkoBox p = ports[start];
if (prefix.equals("instruction")) {
- p.instr_addr = addr;
- p.instr_bits = bits;
+ p.instr_addr = (addr<<1);
+ p.instr_bits = bits+1;
} else if (prefix.equals("dest")) {
- p.addr = addr;
- p.bits = bits;
+ p.addr = (addr << 1) | 1;
+ p.bits = bits+1;
if (bits >= 11)
throw new RuntimeException("too many benkoboxen!");
int count = 0;