use of de.neemann.digital.analyse.SplitPinString in project Digital by hneemann.
the class Vivado method writeConstraints.
private void writeConstraints(CodePrinter out, HDLModel model) throws IOException {
for (HDLPort p : model.getMain().getPorts()) {
if (p.getBits() == 1) {
writePin(out, p.getName(), p.getPinNumber());
if (p.getPinNumber().equals(clockPin))
out.print("create_clock -add -name sys_clk_pin -period ").print(periodns).print(" -waveform {0 5} [get_ports ").print(p.getName()).println("]");
} else {
SplitPinString pins = SplitPinString.create(p.getPinNumber());
for (int i = 0; i < p.getBits(); i++) writePin(out, p.getName() + "[" + i + "]", pins.getPin(i));
}
out.println();
}
out.println("set_property CFGBVS VCCO [current_design]");
out.println("set_property CONFIG_VOLTAGE 3.3 [current_design]");
}
Aggregations