Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vhdl 在嵌套配置中找不到体系结构名称_Vhdl_Quartus - Fatal编程技术网

Vhdl 在嵌套配置中找不到体系结构名称

Vhdl 在嵌套配置中找不到体系结构名称,vhdl,quartus,Vhdl,Quartus,我正在构建一个VGA输出块,它使用提供类似接口的嵌套元素来构建图片。然后,配置确定实际屏幕布局 到目前为止,我已经为每个块创建了一个配置,但我确实希望使用一个嵌套的配置。它在中是允许的,我发现它使用这个,但是我不能让我的代码编译 在工作中有 entity everything is ... end entity; architecture syn of everything is ... begin gfx : vga; end architecture; compo

我正在构建一个VGA输出块,它使用提供类似接口的嵌套元素来构建图片。然后,
配置
确定实际屏幕布局

到目前为止,我已经为每个块创建了一个配置,但我确实希望使用一个嵌套的配置。它在中是允许的,我发现它使用这个,但是我不能让我的代码编译

工作
中有

entity everything is
    ...
end entity;

architecture syn of everything is
    ...
begin
    gfx : vga;
end architecture;

component source is
    ...
end component;

entity vga is
    ...
end entity;

architecture syn of vga is
    ...
begin
    src : source;
end architecture;

entity testpattern is
    ...
end entity;

architecture syn of testpattern is
    ...
end entity;
现在,我想使用
配置将所有这些放在一起:

configuration conf of everything is
    for syn
        for gfx : vga
            use entity work.vga(syn);
            for syn                          -- Error reported here
                for src : source
                    use entity work.testpattern(syn);
                end for;
            end for;
        end for;
    end for;
end configuration;
我从Quartus收到一条错误消息

Error (10392): VHDL Block Specification error at everything.vhd(106): cannot find "syn"
BNF表示,此时需要一个非限定的(体系结构)名称。这里缺少什么?

一些修改(添加,并将组件声明移动到架构声明部分):

您的代码分析、阐述和模拟(而完全不做任何事情)

%%ghdl-a richter.vhdl
%%ghdl-e形态
%%ghdl-r形态
%%

为源添加的实体和体系结构。 vga的组件声明。 将源的组件声明移动到vga的架构syn。 摆脱所有烦人的“…”s

您可能需要testpattern的配置,该配置使用所有内容的配置配置来让您的testbench(如果testpattern是一个testbench)进行详细说明和运行。在这里表明这一点有点为时过早

附录

今天看到你回答了一个VHDL问题后,我又看了看这个问题和你的评论:

嗯,我把组件定义放在一个包中,因为我需要在多个地方使用它。否则,最大的区别就是实体源和未使用的体系结构——我是否总是需要定义一个与组件同名的实体,即使我不打算使用它西蒙·里克特2016年10月26日2:05

我在
vga
source
的包中使用组件声明修改了上述代码,删除了source的实体和体系结构:

package components_pkg is
    component vga is
    end component;
    component source is
    end component;
end package;

---------------------------------------

use work.components_pkg.all;

entity vga is
end entity;

architecture syn of vga is

begin
    src : source;
end architecture;

---------------------------------------

use work.components_pkg.all;

entity everything is
end entity;

architecture syn of everything is

begin
    gfx : vga;
end architecture;

---------------------------------------

entity testpattern is
end entity;

architecture syn of testpattern is
begin
end architecture;

---------------------------------------

configuration conf of everything is
    for syn
        for gfx : vga
            use entity work.vga(syn);
            for syn                          -- Error reported here
                for src : source
                    use entity work.testpattern(syn);
                end for;
            end for;
        end for;
    end for;
end configuration;
这也会分析、阐述和运行(而不做任何事情)

这表明可以使用组件声明代替资源库工作中可见的实体声明

还演示了忽略未使用的组件声明(通过use子句使其可见)

您仍然收到错误,这意味着
testpattern
的架构
syn
没有在配置声明
conf
阐述的类型上进行分析

如果
syn
体系结构被注释掉,另一个VHDL工具会在清空工作库的情况下给出类似的消息-

ghdl-e形态
/usr/local/bin/ghdl1 llvm:找不到实体“testpattern”的体系结构“syn”

归根结底,当配置
conf
被细化而细化失败时,实体
testpattern
的库工作中没有找到架构
syn


您可能会注意到上面显示的设计单元(以“----…”分隔)是按分析顺序显示的。

Hm,我将
组件定义放在一个包中,因为我需要在多个位置使用它。否则,最大的区别将是
实体源
和未使用的
体系结构
——我是否总是需要定义一个与
组件
同名的
实体
,即使我不打算使用它?您问题中的代码示例不是一个,也似乎没有重现问题。我无法推断你的上下文从句,也无法猜测“…”中的内容。更改是为了允许所有实体/架构对进行分析,然后配置声明不变地工作。检查抽象模型与实际设计之间的差异。不使用的组件声明没有任何后果(只要它们在语法和语义上是正确的)。
package components_pkg is
    component vga is
    end component;
    component source is
    end component;
end package;

---------------------------------------

use work.components_pkg.all;

entity vga is
end entity;

architecture syn of vga is

begin
    src : source;
end architecture;

---------------------------------------

use work.components_pkg.all;

entity everything is
end entity;

architecture syn of everything is

begin
    gfx : vga;
end architecture;

---------------------------------------

entity testpattern is
end entity;

architecture syn of testpattern is
begin
end architecture;

---------------------------------------

configuration conf of everything is
    for syn
        for gfx : vga
            use entity work.vga(syn);
            for syn                          -- Error reported here
                for src : source
                    use entity work.testpattern(syn);
                end for;
            end for;
        end for;
    end for;
end configuration;