Hi,
I tried to parse a file exported from Allegro. The parser throws the exception \"direction of port not specified\". I couldnt find anything wrong in the input file and also looking at the EdifParserCore.port() method I couldnt figure out what is actually going wrong. Using v.0.5.2 of byuediftools.
I attached the java stack trace and the file that is causing the exception.
Direction of port not specified
edu.byu.ece.edif.util.parse.ParseException: Direction of port not specified
at edu.byu.ece.edif.util.parse.EdifParserCore.port(EdifParserCore.java:867)
at edu.byu.ece.edif.util.parse.EdifParserCore.myInterface(EdifParserCore.java:770)
at edu.byu.ece.edif.util.parse.EdifParserCore.view(EdifParserCore.java:692)
at edu.byu.ece.edif.util.parse.EdifParserCore.cell(EdifParserCore.java:625)
at edu.byu.ece.edif.util.parse.EdifParserCore.libraryDefinition(EdifParserCore.java:571)
at edu.byu.ece.edif.util.parse.EdifParserCore.library(EdifParserCore.java:546)
at edu.byu.ece.edif.util.parse.EdifParserCore.edif(EdifParserCore.java:461)
at edu.byu.ece.edif.util.parse.EdifParser.translate(EdifParser.java:61)
at edu.byu.ece.edif.util.parse.EdifParser.translate(EdifParser.java:122)
at izm.sdi.techcomposer.filter.EdifFileReader.readFile(EdifFileReader.java:233)
at izm.sdi.techcomposer.filter.FileReader.doInBackground(FileReader.java:64)
at izm.sdi.techcomposer.filter.FileReader.doInBackground(FileReader.java:1)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Allegro exported schematic in edif 2 0 0 format
Can you upload a copy of the offending EDIF file? It looks like a bad EDIF file to me but I would need to look at the netlist to see if there is a bug in the parser.
Hi, thanks for the quick reply. At first i guessed also that the input file was malformed, but I'm in doubt since it is a direct export from Allegro. I already attached the file in my initial post. If you have problems with it I can send to you directly by mail.
The parser currently is hard coded to require a direction on the port. A direction is not technically required but our data structures were created with the intent of analyzing the topology of a netlist created by a synthesis tool. As such, these data structures require a port direction. The parser could be changed to support ports without a direction but it would take some work. I will put this on a future issues list but it will probably not be addressed for some time.
As a side note, the netlist that was uploaded uses a lot of "graphical" syntax for drawing components in a schematic environment. This particular EDIF package is currently configured to manage the netlist subset of EDIF and does not support any of these graphical elements (such as figureGroup, color, text, etc.). Unfortunately, the parser accepts these but does not represent this information in the data structure.