标签: icarus

Gallio Icarus对阵Testdriven.net

使用像Testdriven.net这样的VS集成工具或使用像Icarus或NUnit GUI这样的GUI测试运行器有什么区别?

你喜欢什么,为什么?

到目前为止,我发现Icarus的报告比td.net更好,td.net只有命令行输出.但是td.net使用起来更快,我可以更轻松地执行单个测试而无需先取消其余部分.NCover集成也非常好.

tdd testdriven.net gallio icarus

6
推荐指数
1
解决办法
2190
查看次数

MbUnit Icarus在这次测试中自我毁灭

我正在尝试使用MbUnit测试多线程IO类.我的目标是让测试夹具构造函数执行3次,对于类中的每一行执行一次.然后,对于每个实例,在并行线程上多次执行测试.

但是,Icarus在TaskRunner上爆发了"索引超出范围".我无法获得完整的堆栈,它会过快地生成消息框.

我做错了什么,或者这是MbUnit/Gallio中的错误?

using System;
using System.Collections.Generic;
using System.Text;
using Gallio.Framework;
using MbUnit.Framework;
using MbUnit.Framework.ContractVerifiers;
using System.IO;

namespace ImageResizer.Plugins.DiskCache.Tests {
    [TestFixture]
    [Row(0,50,false)]
    [Row(0,50,true)]
    [Row(8000,100,true)]
    public class CustomDiskCacheTest {

        public CustomDiskCacheTest(int subfolders, int totalFiles, bool hashModifiedDate) {
            char c = System.IO.Path.DirectorySeparatorChar;
            string folder = System.IO.Path.GetTempPath().TrimEnd(c) + c + System.IO.Path.GetRandomFileName();
            cache = new CustomDiskCache(folder,subfolders,hashModifiedDate);
            this.quantity = totalFiles;

            for (int i = 0; i < quantity;i++){
                cache.GetCachedFile(i.ToString(),"test",delegate(Stream s){
                    s.WriteByte(32); //Just one space
                },defaultDate, 10);
            }
        }
        int quantity;
        CustomDiskCache cache = null;
        DateTime …
Run Code Online (Sandbox Code Playgroud)

mbunit multithreading unit-testing gallio icarus

6
推荐指数
1
解决办法
374
查看次数

简单的Verilog VPI模块,用于打开音频文件

我想写一个VPI/PLI接口,它将打开音频文件(即wav,aiff等)并将数据呈现给Verilog模拟器.我目前正在使用Icarus,并希望使用libsndfile来处理输入文件格式和数据类型转换.

我不太清楚在C代码中使用什么...已经看过IEEE 1364-2001并且仍然混淆了我应该使用哪些函数.

理想情况下,我想要一个带有数据端口(串行或并行),时钟输入和启动/停止引脚的verilog模块.我想实现两个模块,一个用于从文件中回放,另一个用于记录测试中的过滤器的输出.

我可以在C中完成所有操作,只需在我的测试平台中实例化模块,或者我必须编写一个函数(比如说$read_audio_data)和包装器模块在每个时钟脉冲上调用它吗?

嗯,或者可能是我需要创建模块然后获取它的句柄并以某种方式将值/ vect传递给句柄?

我不太关心如何设置文件名,因为我可能不会从verilog代码中做到这一点.我可能暂时坚持使用24位整数样本,并且 libsndfile应该很好地处理转换.也许,我现在会坚持连续(甚至可能以类似I2S的方式)并在需要时在Verilog中对其进行反序列化.

此外,我看过Icarus 插件,它实现了一个读取PNG文件的摄像机,尽管图像处理有很多方面,但还有音频.因此,目前代码看起来有点过于复杂 - 我没有设法让它运行.

audio verilog signal-processing libsndfile icarus

5
推荐指数
1
解决办法
2651
查看次数

Icarus verilog 转储内存阵列 ($dumpvars)

我尝试转储一个数组(reg [31:0] data [31:0]),但我无法成功。我已经尝试过 iverilog wiki 中的方法:

integer idx;
for (idx = 0; idx < 32; idx = idx + 1)
    $dumpvars(0,cpu_tb.cpu0.cpu_dp.cpu_regs.data[idx]);
Run Code Online (Sandbox Code Playgroud)

它有效,但发生了两件事。

  1. 出现警告:VCD 警告:数组字 cpu_tb.cpu0.cpu_dp.cpu_regs.data[0] 将与转义标识符冲突。
  2. 在 GTKWave 中,我在 SST 窗口中有这样的东西:\data[0][31:0]

有什么解决办法吗?

预先感谢并为我的英语感到抱歉。

memory arrays verilog dump icarus

5
推荐指数
1
解决办法
4965
查看次数

如何知道 cocotb testbench 中使用的是哪个模拟器?

为了测试我的 Verilog 设计,我使用了两个不同的模拟器:IcarusVerilator。这是工作,但它们之间存在一些差异。

例如,我无法使用 verilator 读取模块参数,但 Icarus 可以工作。

有没有办法知道 python testfile 中正在使用哪个模拟器?

我想写这样的东西:

        if SIM == 'icarus':
            self.PULSE_PER_NS = int(dut.PULSE_PER_NS)
            self.DEBOUNCE_PER_NS = int(dut.DEBOUNCE_PER_NS)
        else:
            self.PULSE_PER_NS = 4096 
            self.DEBOUNCE_PER_NS = 16777216
Run Code Online (Sandbox Code Playgroud)

能够管理两个模拟器并比较它们。

python verilog icarus verilator cocotb

3
推荐指数
1
解决办法
109
查看次数

在Verilog HDL中始终与永远相对

是什么之间的区别always关键字(always @块)和forever关键字Verilog HDL语言?

always #1 a=!a;
forever #1 a=!a;
Run Code Online (Sandbox Code Playgroud)

以下是我的发现,但我仍然不能在两者之间划清界线:

来自维基百科:

所述总是关键字作用类似于"C"构造,而(1){..}在这个意义上,它会永远执行.

来自electroSofts:

永远指令不断地重复它后面的语句.因此,它应该与程序时序控制一起使用(否则它会挂起模拟).

有人可以对此做出更明确的解释吗?谢谢!

verilog hdl icarus

2
推荐指数
1
解决办法
7430
查看次数

如何在 icarus verilog 中包含文件?

我知道基本的`include“filename.v”命令。但是,我试图包含另一个文件夹中的模块。现在,该模块还包括同一文件夹中存在的其他模块。但是,当我尝试在最顶层运行该模块时,出现错误。

C:\Users\Dell\Desktop\MIPS>iverilog mips.v
./IF/stage_if.v:2: Include file instruction_memory_if.v not found
No top level modules, and no -s option.
Run Code Online (Sandbox Code Playgroud)

在这里,我试图制作一个 MIPS 处理器,它包含在文件“mips.v”中。该文件的第一条语句是“`include“IF/stage_if.v”。并且,在 IF 文件夹中,存在许多文件,我已将它们包含在 stage_if.v 中,其中一个是“instruction_memory_if.v”。下面是目录层次图。

-IF
  instruction_memory_if.v
  stage_if.v
+ID
+EX
+MEM
+WB
mips.v
Run Code Online (Sandbox Code Playgroud)

verilog mips cpu-architecture icarus iverilog

2
推荐指数
1
解决办法
6755
查看次数

SystemVerilog 对 icarus 的支持(iverilog 编译器)

iverilog在 Mac 上使用,我在编译一些包含always_ffalways_comb块的代码时遇到问题。ModelSim 编译这些代码没有任何问题。是否可以进行配置iverilog以支持always_ffalways_comb阻止,或者编译器不支持它们?

hardware verilog system-verilog icarus iverilog

1
推荐指数
1
解决办法
8286
查看次数

在verilog中实现PIPO

我期待在verilog HDL中实现32位并行并行输出.这是我写的代码......

module pipo(input_seq, answer,reset, clock);
   input [31:0] input_seq;
   input        reset,clock;
   output [31:0] answer;

   always @ (reset)
     begin
        if(!reset)
          begin
             answer[31:0]<=1'b0;
          end
     end

   always @ (posedge clock)
     begin
        answer[31:1]<=input_seq[30:0];  
     end

endmodule
Run Code Online (Sandbox Code Playgroud)

但是,这会导致以下错误日志(使用iverilog):

pipo.v:10: error: answer['sd31:'sd0] is not a valid l-value in pipo.
pipo.v:4:      : answer['sd31:'sd0] is declared here as wire.
pipo.v:16: error: answer['sd31:'sd1] is not a valid l-value in pipo.
pipo.v:4:      : answer['sd31:'sd1] is declared here as wire.
Elaboration failed
Run Code Online (Sandbox Code Playgroud)

有什么问题?

verilog icarus

0
推荐指数
1
解决办法
1187
查看次数