use of de.neemann.digital.hdl.vhdl2.entities.VHDLEntity in project Digital by hneemann.
the class VHDLCreator method printNodeBuiltIn.
private void printNodeBuiltIn(HDLNodeBuildIn node) throws HDLException, IOException, HGSEvalException {
VHDLEntity entity = library.getEntity(node);
String hdlEntityName = entity.print(out, node);
node.setHdlEntityName(hdlEntityName);
}
use of de.neemann.digital.hdl.vhdl2.entities.VHDLEntity in project Digital by hneemann.
the class VHDLLibrary method getEntity.
/**
* Gets the entity of the given node
*
* @param node the node
* @return the entity
* @throws HDLException HDLException
*/
public VHDLEntity getEntity(HDLNode node) throws HDLException {
String elementName = node.getElementName();
VHDLEntity e = map.get(elementName);
if (e == null) {
try {
e = new VHDLTemplate(elementName);
map.put(elementName, e);
} catch (IOException ex) {
ex.printStackTrace();
LOGGER.info("could not load '" + VHDLTemplate.neededFileName(elementName) + "'");
}
}
if (e == null)
throw new HDLException(Lang.get("err_vhdlNoEntity_N", elementName));
return e;
}
Aggregations