Verilog Yosys——编译.dot文件成功,但查看器(xdot)可以';我不能预览它

Verilog Yosys——编译.dot文件成功,但查看器(xdot)可以';我不能预览它,verilog,yosys,Verilog,Yosys,我有两个模块,每个模块都在单独的verilog文件中。一个文件是带有顶部模块的double\u shift\u reg.v: `include "./shift_reg.v" `default_nettype none module double_shift_reg(clk, shi, in, out); input wire clk; // Clock input wire shi; // Shift enable input wire in;

我有两个模块,每个模块都在单独的verilog文件中。一个文件是带有顶部模块的
double\u shift\u reg.v

`include "./shift_reg.v"

`default_nettype none

module double_shift_reg(clk, shi, in, out);

    input wire clk; // Clock
    input wire shi; // Shift enable
    input wire in; // Input information
    output wire out; // Output information

    wire d1; // Data 1
    wire d2; // Data 2

    shift_reg r1(.clk(clk), .rst(1'b0), .shi(shi), .in(in), .out(d1));
    shift_reg r2(.clk(clk), .rst(1'b0), .shi(shi), .in(in), .out(d2));

    assign out = d1 ^ d2;


    `ifdef FORMAL
        
        reg [2:0] f_counter;
        always @(posedge clk)
        begin
            assert(out == 0);
            f_counter = f_counter + 1;
            if (f_counter == 1'b1111)
                assume(shi);

        end

    `endif // FORMAL  

endmodule
另一个文件是一个
shift_reg.v
,其中一个模块
shift_reg
,在顶部模块内使用:

`default_nettype none

module shift_reg(clk, rst, shi, in, out);

    input wire clk; // Input clock
    input wire rst; // Input reset
    input wire shi; // Shift enable
    input wire in; // Input information
    output wire out; // Output bit

    parameter wid = 8; // Shift register's width
    
    parameter ini = {{(wid - 1){1'b0}}, 1'b1}; // Shift register's initial state

    reg [(wid - 1):0] s_reg;
    initial s_reg = ini;

    always @(posedge clk)
    begin
        if(rst)
            s_reg <= ini;
        else if(shi)
            s_reg[(wid - 1):0] <= {in, s_reg[(wid - 1):1]};
    end

    assign out = s_reg[0];

endmodule
最后一部分的编译消息,即
-p“show-prefix$(file\u main)-notitle-colors 2-width-format dot”
如下所示:

-- Running command `show -prefix double_shift_reg -notitle -colors 2 -width -format dot' --

4. Generating Graphviz representation of design.
Writing dot description to `double_shift_reg.dot'.
Dumping module double_shift_reg to page 1.
Dumping module shift_reg to page 2.

Warnings: 1 unique messages, 1 total
End of script. Logfile hash: e53dd145db
CPU: user 0.02s system 0.01s, 
只有一个警告,没有错误。。。但当预览器打开I
.dot
时,我得到一个错误:


当我只为一个包含一个模块的verilog文件创建
.dot
文件时,这种情况从未发生过。我是否遗漏了一些关键部分?

我不知道这是否是解决您问题的方法(很遗憾,我无法发表评论),但我注意到我将尝试以下几点:

  • 您只读取顶层模块,而不读取第二个设计实体
  • 删除层次结构时,请使用显式“-top”选项
  • 试着把你的设计展平。如果您只对顶层模块感兴趣,请将另一个模块声明为黑盒

  • 这对我来说一直有效,但我直接使用graphviz的点工具。

    我不知道这是否是您问题的解决方案(不幸的是,我不能写评论),但我注意到我将尝试以下几点:

  • 您只读取顶层模块,而不读取第二个设计实体
  • 删除层次结构时,请使用显式“-top”选项
  • 试着把你的设计展平。如果您只对顶层模块感兴趣,请将另一个模块声明为黑盒
  • 这一直对我有效,但我直接使用graphviz的点工具

    -- Running command `show -prefix double_shift_reg -notitle -colors 2 -width -format dot' --
    
    4. Generating Graphviz representation of design.
    Writing dot description to `double_shift_reg.dot'.
    Dumping module double_shift_reg to page 1.
    Dumping module shift_reg to page 2.
    
    Warnings: 1 unique messages, 1 total
    End of script. Logfile hash: e53dd145db
    CPU: user 0.02s system 0.01s,