Re: [myhdl-list] Verification of signed intbv
Brought to you by:
jandecaluwe
From: Euripedes R. F. <roc...@gm...> - 2014-03-25 19:01:50
|
Christopher, I'll try to give a full code with description, but to make it clear. I'm using python unittest to structure my tests. Inside the class I have a method caled bench that returns a simulation object with the necessary methods for verification. I have several tests using this structure, so each test_ method has it's stimulus/check pair. When the data in the test list is negative I receive |data|. I'll paste some testing code in eda playground to show how I'm working. Thanks Euripedes 2014-03-25 15:41 GMT-03:00 Christopher Felton <chr...@gm...>: > On 3/24/2014 6:38 PM, Euripedes Rocha Filho wrote: > > Hi, > > I'm using myhdl as a verification language with sucess so far. I'm using > > python unittes to structurc my tests and now I'm facing a problem with > the > > assertion when I have negative numbers. > > > > My tests are structured with a stimulus and a check module, the relevant > > code: > > > > stimulus(port list): > > for i in test_signal_list : > > input.next = intbv(i, min = -16,max = 16) > > yield posdge(clk) > > > > check(port list): > > assertEqual(test_signal, outport) > > > > I hope that the code above make my approach clear. The fact is that when > I > > have a negative input the assert fail(-8 in -> 8 out) the module under > test > > don't make any modification in this ports the signal just goes out > > untouched, the module job is to place a set of outputs '1' to route the > > signal, the port goes through the module just to have a standart > interface. > > I can't figure what I'm doing wrong. Someone can help me? > > > > regards > > > > Euripedes > > > > Euripedes, > > I am not sure if I follow you descriptions, and > the applicability to the negative values of intbv? > (how does the test structure related to negative > values of intbv?) > > Maybe you can provide a complete working (sandbox) > example? Something like the following (links). The > following doesn't conform to your outline but it is a > complete example that can be tested. > > > http://www.edaplayground.com/x/37E > https://gist.github.com/cfelton/9768361 > > Regards, > Chris > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > |