Thread: [myhdl-list] Lists of signals don't appear in vcd file
Brought to you by:
jandecaluwe
From: Frederik T. <sp...@ne...> - 2012-03-27 14:43:33
Attachments:
gtkwave.png
gtkwave2.png
|
Hello everybody, I have a question concerning lists of signals. Whenever I use a list of signals I don't see they don't appear in the vcd file created by traceSignals(), see gtkwave.png . An example: def shiftregister(clk, reset_n, en, din, dout, N, bitwidth): ''' clk -- clock reset_n -- low active reset en -- enable, high active din -- data in div -- data in valid dout -- data out dov -- data out valid N -- number of registers ''' LMAX = 2**(bitwidth-1) regs = [Signal(intbv(0, max=LMAX, min=-LMAX)) for ii in range(N)] @always(clk.posedge, reset_n.negedge) def rtl(): if reset_n == 0: for ii in range(N): regs[ii].next = 0 else: if en: for ii in range(N-1): regs[ii+1].next = regs[ii] regs[0].next = din @always_comb def comb(): dout.next = regs[N-1] return rtl, comb >% >% >% >% >% >% >% >% bitwidth = 16 N = 4 tb = traceSignals(testBenchshiftregister, N, bitwidth) sim = Simulation(tb) sim.run() If I add the signals reg1, reg2, reg3, reg4 = [Signal(intbv(0, max=LMAX, min=-LMAX)) for ii in range(N)] # N is 4 the signals appear in the vcd file like in gtkwave2.png . So what am I doing wrong? Using lists of signals is more generic than the other way but obiously not debuggable. Kind regards Frederik |
From: Christopher F. <chr...@gm...> - 2012-03-27 15:26:02
|
On 3/27/2012 9:43 AM, Frederik T. wrote: > Hello everybody, > > I have a question concerning lists of signals. Whenever I use a list of > signals I don't see they don't appear in the vcd file created by > traceSignals(), see gtkwave.png . > That is correct, currently a "List of Signals" is not traced with traceSignals. Regards, Chris |
From: Oscar D. <osc...@gm...> - 2012-03-28 11:28:44
|
2012/3/27 Christopher Felton <chr...@gm...>: > On 3/27/2012 9:43 AM, Frederik T. wrote: >> Hello everybody, >> >> I have a question concerning lists of signals. Whenever I use a list of >> signals I don't see they don't appear in the vcd file created by >> traceSignals(), see gtkwave.png . >> > > That is correct, currently a "List of Signals" is not traced with > traceSignals. I had this problem a couple months ago, and I make a custom vcd generator that adds manually the signals that you need, assuming you had the references to the desired signals (and it supports lists and dicts of signals). The main idea is to make an object that returns generators that react to traced signals and generate the vcd file. It is completely unrelated to traceSignals function. It works for my needs but I'm afraid it needs refactoring. I can send my code if you need it, anyway I'm planning to fix it, upload somewhere and receive feedback on the list. As soon I fix it I'll announce it on the list. > > Regards, > Chris > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list Best regards -- Oscar Díaz Key Fingerprint = 904B 306C C3C2 7487 650B BFAC EDA2 B702 90E9 9964 gpg --keyserver subkeys.pgp.net --recv-keys 90E99964 I recommend using OpenDocument Format for daily use and exchange of documents. http://www.fsf.org/campaigns/opendocument |
From: Frederik T. <sp...@ne...> - 2012-03-28 11:59:11
|
Hello Oscar, that sounds great. I would test it, if it would help you. Regards, Frederik Am 28.03.2012 13:28, schrieb Oscar Diaz: > 2012/3/27 Christopher Felton <chr...@gm...>: >> On 3/27/2012 9:43 AM, Frederik T. wrote: >>> Hello everybody, >>> >>> I have a question concerning lists of signals. Whenever I use a list of >>> signals I don't see they don't appear in the vcd file created by >>> traceSignals(), see gtkwave.png . >>> >> >> That is correct, currently a "List of Signals" is not traced with >> traceSignals. > > I had this problem a couple months ago, and I make a custom vcd > generator that adds manually the signals that you need, assuming you > had the references to the desired signals (and it supports lists and > dicts of signals). The main idea is to make an object that returns > generators that react to traced signals and generate the vcd file. It > is completely unrelated to traceSignals function. > > It works for my needs but I'm afraid it needs refactoring. I can send > my code if you need it, anyway I'm planning to fix it, upload > somewhere and receive feedback on the list. > > As soon I fix it I'll announce it on the list. > >> >> Regards, >> Chris >> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> myhdl-list mailing list >> myh...@li... >> https://lists.sourceforge.net/lists/listinfo/myhdl-list > > Best regards > |
From: Oscar D. <osc...@gm...> - 2012-03-28 13:09:06
Attachments:
signal_monitor.py
|
2012/3/28 Frederik T. <sp...@ne...>: > Hello Oscar, > > that sounds great. I would test it, if it would help you. This is a "very" preliminary version of signal_monitor, a class to generate vcd files in myhdl. As you can guess, it has little documentation (sorry for that) and probably needs a lot of adjustments and improvements. Feel free to test it and send me any suggestions, doubts or even complains about it. I'll try to finish it ASAP and upload in the myhdl wiki (or somewhere else if needed). I hope this helps you or anyone on the mail list. Best regards > > > Regards, > > Frederik > > Am 28.03.2012 13:28, schrieb Oscar Diaz: >> 2012/3/27 Christopher Felton <chr...@gm...>: >>> On 3/27/2012 9:43 AM, Frederik T. wrote: >>>> Hello everybody, >>>> >>>> I have a question concerning lists of signals. Whenever I use a list of >>>> signals I don't see they don't appear in the vcd file created by >>>> traceSignals(), see gtkwave.png . >>>> >>> >>> That is correct, currently a "List of Signals" is not traced with >>> traceSignals. >> >> I had this problem a couple months ago, and I make a custom vcd >> generator that adds manually the signals that you need, assuming you >> had the references to the desired signals (and it supports lists and >> dicts of signals). The main idea is to make an object that returns >> generators that react to traced signals and generate the vcd file. It >> is completely unrelated to traceSignals function. >> >> It works for my needs but I'm afraid it needs refactoring. I can send >> my code if you need it, anyway I'm planning to fix it, upload >> somewhere and receive feedback on the list. >> >> As soon I fix it I'll announce it on the list. >> >>> >>> Regards, >>> Chris >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF email is sponsosred by: >>> Try Windows Azure free for 90 days Click Here >>> http://p.sf.net/sfu/sfd2d-msazure >>> _______________________________________________ >>> myhdl-list mailing list >>> myh...@li... >>> https://lists.sourceforge.net/lists/listinfo/myhdl-list >> >> Best regards >> > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list -- Oscar Díaz Key Fingerprint = 904B 306C C3C2 7487 650B BFAC EDA2 B702 90E9 9964 gpg --keyserver subkeys.pgp.net --recv-keys 90E99964 I recommend using OpenDocument Format for daily use and exchange of documents. http://www.fsf.org/campaigns/opendocument |
From: Frederik T. <sp...@ne...> - 2012-03-28 19:52:40
|
Hello everybody, I just had a look into _traceSignals.py . I wrote a few lines to write flattened memories into the vcd file. The vcd standard does not support multidimensional arrays. You can see it in the attached screenshot. If you have a signal like ram = [Signal(intbv(0, max=LMAX, min=-LMAX)) for i in range(N)] the list items now appear as ram(0), ram(1), .. , ram(N-1) in the vcd file. I attached a patch and the patched files, too. It would be nice if you could test this code on your designs. If there might be any problems or there are any please report them to me. This patch announces a new trace option called "traceSignalsAndMemories". If you use "traceSignals" no memories are dumped. Example: # The normal trace tb = traceSignals(testBenchDut) sim = Simulation(tb) sim.run() # can be changed to tb = traceSignalsAndMemories(testBenchDut) sim = Simulation(tb) sim.run() # .. to trace the memories as well. It works with both the stable 0.7-version and the version from the repository. Happy debugging, Frederik Am 28.03.2012 15:08, schrieb Oscar Diaz: > 2012/3/28 Frederik T. <sp...@ne...>: >> Hello Oscar, >> >> that sounds great. I would test it, if it would help you. > > This is a "very" preliminary version of signal_monitor, a class to > generate vcd files in myhdl. As you can guess, it has little > documentation (sorry for that) and probably needs a lot of adjustments > and improvements. Feel free to test it and send me any suggestions, > doubts or even complains about it. I'll try to finish it ASAP and > upload in the myhdl wiki (or somewhere else if needed). > > I hope this helps you or anyone on the mail list. > > Best regards > >> >> >> Regards, >> >> Frederik >> >> Am 28.03.2012 13:28, schrieb Oscar Diaz: >>> 2012/3/27 Christopher Felton <chr...@gm...>: >>>> On 3/27/2012 9:43 AM, Frederik T. wrote: >>>>> Hello everybody, >>>>> >>>>> I have a question concerning lists of signals. Whenever I use a list of >>>>> signals I don't see they don't appear in the vcd file created by >>>>> traceSignals(), see gtkwave.png . >>>>> >>>> >>>> That is correct, currently a "List of Signals" is not traced with >>>> traceSignals. >>> >>> I had this problem a couple months ago, and I make a custom vcd >>> generator that adds manually the signals that you need, assuming you >>> had the references to the desired signals (and it supports lists and >>> dicts of signals). The main idea is to make an object that returns >>> generators that react to traced signals and generate the vcd file. It >>> is completely unrelated to traceSignals function. >>> >>> It works for my needs but I'm afraid it needs refactoring. I can send >>> my code if you need it, anyway I'm planning to fix it, upload >>> somewhere and receive feedback on the list. >>> >>> As soon I fix it I'll announce it on the list. >>> >>>> >>>> Regards, >>>> Chris >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> This SF email is sponsosred by: >>>> Try Windows Azure free for 90 days Click Here >>>> http://p.sf.net/sfu/sfd2d-msazure >>>> _______________________________________________ >>>> myhdl-list mailing list >>>> myh...@li... >>>> https://lists.sourceforge.net/lists/listinfo/myhdl-list >>> >>> Best regards >>> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> myhdl-list mailing list >> myh...@li... >> https://lists.sourceforge.net/lists/listinfo/myhdl-list > > > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > > > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list |
From: Christopher F. <chr...@gm...> - 2012-06-27 18:14:42
|
On 6/27/2012 12:15 PM, Jan Decaluwe wrote: > I am considering to incorporate this feature more > or less as per this patch. > > I don't want to create a different function - this > could be a configuration of traceSignals. > > One question: should I make memory tracing optional? > Or is it something that people just will always > want to use when available? > > Jan > > I vote always on. If it were to be optional, I believe the use case is when modeling large memories. For a larger memory you might not want the overhead. In this case I would want a method to disable only for a particular LoS and not all LoS. My main use case for LoS is not to model RAM or ROM but for modularity. Regards, Chris |
From: Jan D. <ja...@ja...> - 2012-06-27 21:41:29
|
On 06/27/2012 08:14 PM, Christopher Felton wrote: > On 6/27/2012 12:15 PM, Jan Decaluwe wrote: >> I am considering to incorporate this feature more >> or less as per this patch. >> >> I don't want to create a different function - this >> could be a configuration of traceSignals. >> >> One question: should I make memory tracing optional? >> Or is it something that people just will always >> want to use when available? >> >> Jan >> >> > > I vote always on. > > If it were to be optional, I believe the use case is when modeling large > memories. For a larger memory you might not want the overhead. In this > case I would want a method to disable only for a particular LoS and not > all LoS. My main use case for LoS is not to model RAM or ROM but for > modularity. I have implemented it such that it is on by default, and controlled by setting 'traceSignals.tracelists'. Only in 0.8-dev, this qualifies as a new feature instead of a bug. -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |
From: Christopher F. <chr...@gm...> - 2012-07-12 22:34:10
|
On 6/27/2012 4:40 PM, Jan Decaluwe wrote: > On 06/27/2012 08:14 PM, Christopher Felton wrote: >> On 6/27/2012 12:15 PM, Jan Decaluwe wrote: >>> I am considering to incorporate this feature more >>> or less as per this patch. >>> >>> I don't want to create a different function - this >>> could be a configuration of traceSignals. >>> >>> One question: should I make memory tracing optional? >>> Or is it something that people just will always >>> want to use when available? >>> >>> Jan >>> >>> >> >> I vote always on. >> >> If it were to be optional, I believe the use case is when modeling large >> memories. For a larger memory you might not want the overhead. In this >> case I would want a method to disable only for a particular LoS and not >> all LoS. My main use case for LoS is not to model RAM or ROM but for >> modularity. > > I have implemented it such that it is on by default, > and controlled by setting 'traceSignals.tracelists'. > Only in 0.8-dev, this qualifies as a new feature instead > of a bug. > Just wanted to say, this is a really nice feature! Thanks to Frederik and Jan D. for adding this feature! It is nice, in gtkwave you can create a group of the explicit LoS and open/close (expand/hide) with a 'T'. Regards, Chris |
From: Frederik T. <f...@ne...> - 2012-08-01 17:14:15
|
You're welcome. Kind regards, Frederik Teichert Am 13.07.2012 00:33, schrieb Christopher Felton: > On 6/27/2012 4:40 PM, Jan Decaluwe wrote: >> On 06/27/2012 08:14 PM, Christopher Felton wrote: >>> On 6/27/2012 12:15 PM, Jan Decaluwe wrote: >>>> I am considering to incorporate this feature more >>>> or less as per this patch. >>>> >>>> I don't want to create a different function - this >>>> could be a configuration of traceSignals. >>>> >>>> One question: should I make memory tracing optional? >>>> Or is it something that people just will always >>>> want to use when available? >>>> >>>> Jan >>>> >>>> >>> >>> I vote always on. >>> >>> If it were to be optional, I believe the use case is when modeling large >>> memories. For a larger memory you might not want the overhead. In this >>> case I would want a method to disable only for a particular LoS and not >>> all LoS. My main use case for LoS is not to model RAM or ROM but for >>> modularity. >> >> I have implemented it such that it is on by default, >> and controlled by setting 'traceSignals.tracelists'. >> Only in 0.8-dev, this qualifies as a new feature instead >> of a bug. >> > > Just wanted to say, this is a really nice feature! Thanks > to Frederik and Jan D. for adding this feature! It is nice, > in gtkwave you can create a group of the explicit LoS and > open/close (expand/hide) with a 'T'. > > Regards, > Chris > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > |
From: Jan D. <ja...@ja...> - 2012-06-27 17:16:25
|
I am considering to incorporate this feature more or less as per this patch. I don't want to create a different function - this could be a configuration of traceSignals. One question: should I make memory tracing optional? Or is it something that people just will always want to use when available? Jan On 03/28/2012 09:52 PM, Frederik T. wrote: > Hello everybody, > > I just had a look into _traceSignals.py . I wrote a few lines to write > flattened memories into the vcd file. The vcd standard does not support > multidimensional arrays. You can see it in the attached screenshot. > > If you have a signal like > > ram = [Signal(intbv(0, max=LMAX, min=-LMAX)) for i in range(N)] > > the list items now appear as ram(0), ram(1), .. , ram(N-1) in the vcd file. > > I attached a patch and the patched files, too. > > It would be nice if you could test this code on your designs. If there > might be any problems or there are any please report them to me. > > This patch announces a new trace option called > "traceSignalsAndMemories". If you use "traceSignals" no memories are dumped. > > Example: > > # The normal trace > tb = traceSignals(testBenchDut) > sim = Simulation(tb) > sim.run() > > # can be changed to > tb = traceSignalsAndMemories(testBenchDut) > sim = Simulation(tb) > sim.run() > # .. to trace the memories as well. > > It works with both the stable 0.7-version and the version from the > repository. > > > Happy debugging, > > Frederik > > > Am 28.03.2012 15:08, schrieb Oscar Diaz: >> 2012/3/28 Frederik T.<sp...@ne...>: >>> Hello Oscar, >>> >>> that sounds great. I would test it, if it would help you. >> >> This is a "very" preliminary version of signal_monitor, a class to >> generate vcd files in myhdl. As you can guess, it has little >> documentation (sorry for that) and probably needs a lot of adjustments >> and improvements. Feel free to test it and send me any suggestions, >> doubts or even complains about it. I'll try to finish it ASAP and >> upload in the myhdl wiki (or somewhere else if needed). >> >> I hope this helps you or anyone on the mail list. >> >> Best regards >> >>> >>> >>> Regards, >>> >>> Frederik >>> >>> Am 28.03.2012 13:28, schrieb Oscar Diaz: >>>> 2012/3/27 Christopher Felton<chr...@gm...>: >>>>> On 3/27/2012 9:43 AM, Frederik T. wrote: >>>>>> Hello everybody, >>>>>> >>>>>> I have a question concerning lists of signals. Whenever I use a list of >>>>>> signals I don't see they don't appear in the vcd file created by >>>>>> traceSignals(), see gtkwave.png . >>>>>> >>>>> >>>>> That is correct, currently a "List of Signals" is not traced with >>>>> traceSignals. >>>> >>>> I had this problem a couple months ago, and I make a custom vcd >>>> generator that adds manually the signals that you need, assuming you >>>> had the references to the desired signals (and it supports lists and >>>> dicts of signals). The main idea is to make an object that returns >>>> generators that react to traced signals and generate the vcd file. It >>>> is completely unrelated to traceSignals function. >>>> >>>> It works for my needs but I'm afraid it needs refactoring. I can send >>>> my code if you need it, anyway I'm planning to fix it, upload >>>> somewhere and receive feedback on the list. >>>> >>>> As soon I fix it I'll announce it on the list. >>>> >>>>> >>>>> Regards, >>>>> Chris >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> This SF email is sponsosred by: >>>>> Try Windows Azure free for 90 days Click Here >>>>> http://p.sf.net/sfu/sfd2d-msazure >>>>> _______________________________________________ >>>>> myhdl-list mailing list >>>>> myh...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/myhdl-list >>>> >>>> Best regards >>>> >>> >>> ------------------------------------------------------------------------------ >>> This SF email is sponsosred by: >>> Try Windows Azure free for 90 days Click Here >>> http://p.sf.net/sfu/sfd2d-msazure >>> _______________________________________________ >>> myhdl-list mailing list >>> myh...@li... >>> https://lists.sourceforge.net/lists/listinfo/myhdl-list >> >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> >> >> >> _______________________________________________ >> myhdl-list mailing list >> myh...@li... >> https://lists.sourceforge.net/lists/listinfo/myhdl-list > > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > > > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |