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

SOPC: integration custom component with libraries.

Altera_Forum
Honored Contributor II
1,430 Views

Hi , 

 

I'm trying to import a custom component with the compoent editor in SOPC builder. 

The compoent use some librarie import like: 

LIBRARY ieee; 

USE ieee.std_logic_1164.all; 

USE ieee.numeric_std.all; 

library oplib; 

use oplib.stdlib.all; 

 

during the import, the tool can't recognize my library oplib and i've the error: 

Error: Error: Error (10481): VHDL Use Clause error at xxxx1.vhd(113): design library "oplib" does not contain primary unit "stdlib" File: D:/altera/10.0/..../xxxx1.vhd Line: 156 

I've copy the library files the the ip directory of altera under: 

C:\altera\10.1sp1\ip\customlib\oplib 

it dosen't help. 

is there any advanced user to help me out there? 

 

thx
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
569 Views

I've had more luck by not trying to import my actual VHDL code directly, but to first create a temporary entity definition and import relative to that, i.e., take your top-level VHDL file, and delete everything but the entity definition. Replace the architecture with something that will compile, eg. drive the outputs to static values. 

 

Since this new VHDL file has no dependencies, SOPC builder will be able to compile-check it. 

 

You can then map the ports to Avalon interfaces and get it 'working' as an SOPC recognized component. 

 

Then edit the _hw.tcl file to list the appropriate VHDL source and library files. 

 

If your _hw.tcl file only contains the top-level entity VHDL file, then so long as your Quartus project contains all the VHDL files needed to build that component, the SOPC project will compile ok. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
569 Views

Have you tried adding not only the top-level file, but also the custom libraries in the new SOPC component wizard?

0 Kudos
Altera_Forum
Honored Contributor II
569 Views

Hi guys, 

 

Thx for your answer. I've add the librairies in the tcl it didn't work. 

So what i've done is just to add the file directly. it isn't elagant but it works.
0 Kudos
Reply