Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16603 Discussions

Mapping EDIF file from OrCAD Capture 9.2

Altera_Forum
Honored Contributor II
1,267 Views

Problem: Can't get Library Mapping funtion to work 

 

Description: Design for mixed signal ASIC captured and simulated in OrCAD 9.2. Need to emulate logic in a MAXII CPLD. EDIF 2.0.0 netlist generated from OrCAD needs to be mapped for use in Quartus II 8.1 

 

Design Entry Tool: OrCAD 9.2 

Output: EDIF 2.0.0 netlist 

 

Synthesis / Fitter: Quartus II 8.1 

Design file: CNTR.EDN 

Type: EDIF File 

Design entry/synthesis tool: Custom 

Library Mapping File Name: sta-alt1.lmf 

 

First attempt to compile following edit of sta-alt1.lmf alway gives the warning 

Warning: Can't locate Library Mapping File 

Any following attempts to compile do not get the warning 

 

The following errors are always generated: 

Error: Node instance "U1" instantiates undefined entity "NA2" 

Error: Node instance "U2" instantiates undefined entity "I" 

Error: Node instance "U3" instantiates undefined entity "NA2" 

Error: Node instance "U4" instantiates undefined entity "NA2" 

 

this is the library mapping file: 

LIBRARY sta-alt1 

% OrCAD STA Library to Altera Library Logic Mapping File % 

% Date: 02/19/2009 % 

% Rev Notes: % 

% 02/19/2009 - Initial build % 

% NAND2 % 

BEGIN 

FUNCTION nand2 (IN1,IN2) 

RETURNS (OUT) 

FUNCTION "NA2" ("A","B") 

RETURNS ("Z") 

END 

 

% INV % 

BEGIN 

FUNCTION not (IN) 

RETURNS (OUT) 

FUNCTION "I" ("A") 

RETURNS ("Z") 

END 

 

edif file produced from orcad: 

(edif CNTR 

(edifVersion 2 0 0) 

(edifLevel 0) 

(keywordMap (keywordLevel 0)) 

(status 

(written 

(timeStamp 2009 02 24 21 08 22) 

(program "CAPTURE.EXE" (Version "9.2.446")) 

(comment "Original data from OrCAD/CAPTURE schematic")) 

(comment "") 

(comment "Thursday, February 19, 2009") 

(comment "C:\DOCUMENTS AND SETTINGS\ALL USERS\DOCUMENTS\ALTERA\PBLCNTR.DSN") 

(comment "") 

(comment "") 

(comment "") 

(comment "") 

(comment "") 

(comment "")) 

(external OrCAD_LIB 

(edifLevel 0) 

(technology 

(numberDefinition 

(scale 1 1 (unit distance)))) 

(cell NA2 

(cellType generic) 

(comment "From OrCAD library STA_ALTERA.OLB") 

(view NetlistView 

(viewType netlist) 

(interface 

(port A (direction INPUT)) 

(port B (direction INPUT)) 

(port Z (direction OUTPUT))))) 

(cell I 

(cellType generic) 

(comment "From OrCAD library STA_ALTERA.OLB") 

(view NetlistView 

(viewType netlist) 

(interface 

(port A (direction INPUT)) 

(port Z (direction OUTPUT)))))) 

(library MAIN_LIB 

(edifLevel 0) 

(technology 

(numberDefinition 

(scale 1 1 (unit distance)))) 

(cell CNTR 

(cellType generic) 

(view NetlistView 

(viewType netlist) 

(interface 

(port TST3 (direction INPUT)) 

(port CKMAIN (direction OUTPUT)) 

(port CQN1 (direction INPUT)) 

(port CQN6 (direction INPUT))) 

(contents 

(instance U1 

(viewRef NetlistView 

(cellRef NA2 

(libraryRef OrCAD_LIB)))) 

(instance U2 

(viewRef NetlistView 

(cellRef I 

(libraryRef OrCAD_LIB)))) 

(instance U3 

(viewRef NetlistView 

(cellRef NA2 

(libraryRef OrCAD_LIB)))) 

(instance U4 

(viewRef NetlistView 

(cellRef NA2 

(libraryRef OrCAD_LIB)))) 

(net TST3 

(joined 

(portRef A (instanceRef U4)) 

(portRef A (instanceRef U2)) 

(portRef TST3))) 

(net CQN1 

(joined 

(portRef B (instanceRef U4)) 

(portRef CQN1))) 

(net CKMAIN 

(joined 

(portRef Z (instanceRef U3)) 

(portRef CKMAIN))) 

(net CQN6 

(joined 

(portRef A (instanceRef U1)) 

(portRef CQN6))) 

(net N1215400 

(joined 

(portRef B (instanceRef U3)) 

(portRef Z (instanceRef U4)))) 

(net N1215286 

(joined 

(portRef Z (instanceRef U1)) 

(portRef A (instanceRef U3)))) 

(net N12153941 

(joined 

(portRef B (instanceRef U1)) 

(portRef Z (instanceRef U2)))))))) 

(design CNTR 

(cellRef CNTR 

(libraryRef MAIN_LIB)))) 

 

 

Any Ideas? 

 

Thanks in advance, 

Eric
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
510 Views

Are you adding the .lmf as a custom file? This is done under Assignments -> EDA -> Design Entry, than choose Custom and add the .lmf below.

0 Kudos
Altera_Forum
Honored Contributor II
510 Views

Yes I am adding as a custom file with the method you described. 

 

Tool name: Custom 

Format: EDIF 

 

Signal Names 

VCC: VCC 

GND: GND 

 

Library Mapping File 

File name: ../../altera/81/quartus/lmf/sta-alt1.lmf 

 

 

I have also tried modifiying syntax in the .lmf to match what is prescribed in the help files and also matching that of existing .lmf files included in the Quartus installed lmf library 

 

I have verified that if I manually replace NA2 with nand2 and I with inv, that the EDIF file will compile synthesize, fit and program correclty. It's just a matter of getting this mapping to work
0 Kudos
Altera_Forum
Honored Contributor II
510 Views

 

--- Quote Start ---  

Yes I am adding as a custom file with the method you described. 

 

Tool name: Custom 

Format: EDIF 

 

Signal Names 

VCC: VCC 

GND: GND 

 

Library Mapping File 

File name: ../../altera/81/quartus/lmf/sta-alt1.lmf 

 

 

I have also tried modifiying syntax in the .lmf to match what is prescribed in the help files and also matching that of existing .lmf files included in the Quartus installed lmf library 

 

I have verified that if I manually replace NA2 with nand2 and I with inv, that the EDIF file will compile synthesize, fit and program correclty. It's just a matter of getting this mapping to work 

--- Quote End ---  

 

 

Hi, 

 

did you still get this message "Warning: Can't locate Library Mapping File" ? 

 

Kind regards 

 

GPK
0 Kudos
Altera_Forum
Honored Contributor II
510 Views

I still get the message once any time I edit either the design file or the .lmf file. Any attempts to compile following the first warning do not generate another warning. 

 

I have tried locating the custom .lmf in the lmf directory created when Quartus II was installed ... didn't help. 

 

Could this mean that for whatever reason, the .lmf is never being found? 

 

Can anyone see something wrong with the EDIF file that could cause this behavior? 

 

People are sucessfully using Library Mapping every day are they not?
0 Kudos
Altera_Forum
Honored Contributor II
510 Views

 

--- Quote Start ---  

I still get the message once any time I edit either the design file or the .lmf file. Any attempts to compile following the first warning do not generate another warning. 

 

I have tried locating the custom .lmf in the lmf directory created when Quartus II was installed ... didn't help. 

 

Could this mean that for whatever reason, the .lmf is never being found? 

 

Can anyone see something wrong with the EDIF file that could cause this behavior? 

 

People are sucessfully using Library Mapping every day are they not? 

--- Quote End ---  

 

 

Hi deepblue, 

 

good news, I could run your testcase sucessfully. I have the project attached. 

Look under settings -> EDA tool settings how I define the path to your lmf. 

 

Have fun 

 

GPK
0 Kudos
Altera_Forum
Honored Contributor II
510 Views

GPK, 

 

Thank-you very much for taking the time to confirm that library mapping with my EDIF files can be done. I opened the project you sent me and indeed library mapping worked. 

 

In an attempt to figure out what I was missing, I modified my existing project to match your settings. I put the design file and lmf in an identical hiearchy ... same problem as before, didn't work. 

 

Then I made a brand new project, same files, same hiearchy, same project settings, and direct to lmf file. I worked properly, just as your project did. 

 

This is a little concerning to me because it means there is some aspect of the project settings I don't know how to control. 

 

Any Ideas? 

Is there some cache that needs clearing? 

 

Thanks, 

Eric
0 Kudos
Altera_Forum
Honored Contributor II
510 Views

 

--- Quote Start ---  

GPK, 

 

Thank-you very much for taking the time to confirm that library mapping with my EDIF files can be done. I opened the project you sent me and indeed library mapping worked. 

 

In an attempt to figure out what I was missing, I modified my existing project to match your settings. I put the design file and lmf in an identical hiearchy ... same problem as before, didn't work. 

 

Then I made a brand new project, same files, same hiearchy, same project settings, and direct to lmf file. I worked properly, just as your project did. 

 

This is a little concerning to me because it means there is some aspect of the project settings I don't know how to control. 

 

Any Ideas? 

Is there some cache that needs clearing? 

 

Thanks, 

Eric 

--- Quote End ---  

 

 

Hi Eric, 

 

sometimes Quartus has problems with his own database located the "db" folder. 

In case of some strange behaviour I delete this db folder and run the project again. 

Often this helps. 

 

Kind regards 

 

GPK
0 Kudos
Reply