myhdl-list Mailing List for MyHDL (Page 143)
Brought to you by:
jandecaluwe
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(14) |
Nov
(4) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(1) |
Feb
(10) |
Mar
(19) |
Apr
(14) |
May
(1) |
Jun
(4) |
Jul
(10) |
Aug
|
Sep
(2) |
Oct
(7) |
Nov
(17) |
Dec
(12) |
| 2005 |
Jan
(6) |
Feb
(10) |
Mar
(17) |
Apr
(10) |
May
(9) |
Jun
(5) |
Jul
(26) |
Aug
(34) |
Sep
(10) |
Oct
(38) |
Nov
(71) |
Dec
(74) |
| 2006 |
Jan
(20) |
Feb
(20) |
Mar
(7) |
Apr
(2) |
May
(13) |
Jun
|
Jul
|
Aug
(4) |
Sep
(37) |
Oct
(43) |
Nov
(30) |
Dec
(33) |
| 2007 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
(30) |
Jun
(9) |
Jul
(1) |
Aug
|
Sep
(8) |
Oct
(13) |
Nov
|
Dec
(4) |
| 2008 |
Jan
(13) |
Feb
(46) |
Mar
(25) |
Apr
(7) |
May
(20) |
Jun
(73) |
Jul
(38) |
Aug
(47) |
Sep
(24) |
Oct
(18) |
Nov
(9) |
Dec
(36) |
| 2009 |
Jan
(31) |
Feb
(24) |
Mar
(73) |
Apr
(13) |
May
(47) |
Jun
(28) |
Jul
(36) |
Aug
(2) |
Sep
(5) |
Oct
(8) |
Nov
(16) |
Dec
(29) |
| 2010 |
Jan
(34) |
Feb
(18) |
Mar
(18) |
Apr
(5) |
May
|
Jun
(24) |
Jul
(53) |
Aug
(3) |
Sep
(18) |
Oct
(33) |
Nov
(19) |
Dec
(15) |
| 2011 |
Jan
(9) |
Feb
(4) |
Mar
(39) |
Apr
(213) |
May
(86) |
Jun
(46) |
Jul
(22) |
Aug
(11) |
Sep
(78) |
Oct
(59) |
Nov
(38) |
Dec
(24) |
| 2012 |
Jan
(9) |
Feb
(22) |
Mar
(89) |
Apr
(55) |
May
(222) |
Jun
(86) |
Jul
(57) |
Aug
(32) |
Sep
(49) |
Oct
(69) |
Nov
(12) |
Dec
(35) |
| 2013 |
Jan
(67) |
Feb
(39) |
Mar
(18) |
Apr
(42) |
May
(79) |
Jun
(1) |
Jul
(19) |
Aug
(18) |
Sep
(54) |
Oct
(79) |
Nov
(9) |
Dec
(26) |
| 2014 |
Jan
(30) |
Feb
(44) |
Mar
(26) |
Apr
(11) |
May
(39) |
Jun
(1) |
Jul
(89) |
Aug
(15) |
Sep
(7) |
Oct
(6) |
Nov
(20) |
Dec
(27) |
| 2015 |
Jan
(107) |
Feb
(106) |
Mar
(130) |
Apr
(90) |
May
(147) |
Jun
(28) |
Jul
(53) |
Aug
(16) |
Sep
(23) |
Oct
(7) |
Nov
|
Dec
(16) |
| 2016 |
Jan
(86) |
Feb
(41) |
Mar
(38) |
Apr
(31) |
May
(37) |
Jun
(11) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(1) |
Nov
(5) |
Dec
(3) |
| 2017 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(3) |
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
| 2018 |
Jan
(1) |
Feb
(1) |
Mar
(7) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(3) |
Dec
|
| 2020 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
| 2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(12) |
Dec
(11) |
| 2022 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
| 2023 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2024 |
Jan
(1) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
(2) |
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
|
From: Christopher L. F. <cf...@uc...> - 2009-06-06 23:10:49
|
On Jun 6, 2009, at 4:32 PM, Christopher L. Felton wrote:
>
>> Dear Chris,
>>
>> Thank you for your reply. I am trying to add numbers in MyHDL, I
>> tried
>> to add numbers modeled by 'intbv' in two stages; the first was simple
>> program with no 'next' command included, and the other with 'next'.
>> The first one worked as expected but the second one strangely gave
>> weird results, when the numbers are positive, but when they are
>> extended to negative ranges the interpreter complains about exceeding
>> the minimum range of 0. Here is the code:
>>
>> from myhdl import Signal, delay, always, intbv, Simulation, bin
>> from random import randrange
>> from math import pow
>>
>> def AddNum(B):
>>
>> #interval = delay(10)
>> max_num = pow(2,B-1) - 1
>> min_num = -1 * pow(2,B-1)
>>
>> a = Signal(intbv(0)[B:])
>> b = Signal(intbv(0)[B:])
>> c = Signal(intbv(0)[B+1:])
I probably didn't explain very well. Below is code that works.
from myhdl import Signal, delay, always, intbv, Simulation, bin
from random import randrange
from math import pow
def AddNum(B):
max_num = pow(2,B-1) - 1
min_num = -1 * pow(2,B-1)
a = Signal(intbv(0, min_num, max_num))
b = Signal(intbv(0, min_num, max_num))
c = Signal(intbv(0, 2*min_num, 2*max_num))
for i in range(10):
a.next = randrange(min_num+1, max_num)
b.next = randrange(min_num+1, max_num)
c.next = a + b
yield delay(10)
print "i: %s a: %s, b: %s sum = %s binary %s" %(i, a, b, c,
bin(c, B))
def main():
bitwidth = 9
inst = AddNum(bitwidth)
sim = Simulation(inst)
sim.run()
if __name__ == '__main__':
main()
>>
> The error you are seeing is correct. There is basically two modes
> for the intbv. Constraint integer (see Jan's essay for more info)
> and the regular bit-vector. When using the intbv for integer
> representation, as in your case with negative and positive numbers,
> you need to define the maximum and minimum. Instead of defining the
> number of bits you only need to define the expected max and min for
> the design.
>
> Example
> a = Signal(intbv(0, min=min_num, max=max_num))
> b = Signal(intbv(0, min=min_num, max=max_num))
> c = Signal(intbv(0, min=min_num, max=max_num))
> This is a little different than what you maybe use to in Verilog or
> VHDL but it can be very powerful. When you define the bit width it
> is expected that the intbv is used as a generic bit array (no
> numeric value). But the implicit numeric min is zero and the max is
> the size of the bit vector.
>
> Hope that helps
>
>> for i in range(10):
>>
>> a.next = randrange(0, max_num)
>> b.next = randrange(0, max_num)
>> c.next = a + b
>>
>> yield delay(10)
>> print "i: %s a: %s, b: %s sum = %s binary %s" %(i, a, b, c,
>> bin(c, B))
>>
>>
>> def main():
>> bitwidth = 9
>> inst = AddNum(bitwidth)
>> sim = Simulation(inst)
>> sim.run()
>>
>>
>> if __name__ == '__main__':
>> main()
>>
>> As I said, when negative numbers are used, i.e.
>>
>> a.next = randrange(min_num, max_num)
>> b.next = randrange(min_num, max_num)
>>
>> Python complains. What do you think is the problem?
>>
>> On Sat, Jun 6, 2009 at 5:34 PM, Christopher L.
>> Felton<chr...@gm...> wrote:
>>
>>>> a=intbv(3)[2:]
>>>> b=intbv(1)[2:]
>>>> c=a+b
>>>>
>>>> the sum (c) is not 'intbv' class, its 'long' if I'm not mistaken.
>>>> How
>>>> can we get the sum to be 'intbv' of the same bitwidth (in this case
>>>> 2)?
>>>>
>>>>
>>>>
>>> You would want to do the following (which is the same as other HDLs)
>>>
>>> a = intbv(3)[2:]
>>> b = intbv(1)[2:]
>>> c = intbv(1)[2:]
>>> c[:] = a+b
>>>
>>> As you noticed, the result of the intbv math operations returns an
>>> integer (long). What you need to do is create an intbv type for the
>>> left hand side of the operation. For the above example you will
>>> get an
>>> error. The intbv will check the limits of addition. You will
>>> need to
>>> create "c" to be large enough for the result of the addition.
>>>
>>> c = intbv(1)[3:]
>>>
>>>
>>> Hope that helps, for more background information see Jan's essay on
>>> constraint integer, http://www.jandecaluwe.com/hdldesign/counting.html
>>> .
>>>
>>> Chris
>>>
>>> ------------------------------------------------------------------------------
>>> OpenSolaris 2009.06 is a cutting edge operating system for
>>> enterprises
>>> looking to deploy the next generation of Solaris that includes the
>>> latest
>>> innovations from Sun and the OpenSource community. Download a copy
>>> and
>>> enjoy capabilities such as Networking, Storage and Virtualization.
>>> Go to: http://p.sf.net/sfu/opensolaris-get
>>> _______________________________________________
>>> myhdl-list mailing list
>>> myh...@li...
>>> https://lists.sourceforge.net/lists/listinfo/myhdl-list
>>>
>>>
>>
>>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the
> latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get_______________________________________________
> myhdl-list mailing list
> myh...@li...
> https://lists.sourceforge.net/lists/listinfo/myhdl-list
|
|
From: Christopher L. F. <chr...@gm...> - 2009-06-06 21:33:22
|
> Dear Chris, > > Thank you for your reply. I am trying to add numbers in MyHDL, I tried > to add numbers modeled by 'intbv' in two stages; the first was simple > program with no 'next' command included, and the other with 'next'. > The first one worked as expected but the second one strangely gave > weird results, when the numbers are positive, but when they are > extended to negative ranges the interpreter complains about exceeding > the minimum range of 0. Here is the code: > > from myhdl import Signal, delay, always, intbv, Simulation, bin > from random import randrange > from math import pow > > def AddNum(B): > > #interval = delay(10) > max_num = pow(2,B-1) - 1 > min_num = -1 * pow(2,B-1) > > a = Signal(intbv(0)[B:]) > b = Signal(intbv(0)[B:]) > c = Signal(intbv(0)[B+1:]) > > The error you are seeing is correct. There is basically two modes for the intbv. Constraint integer (see Jan's essay for more info) and the regular bit-vector. When using the intbv for integer representation, as in your case with negative and positive numbers, you need to define the maximum and minimum. Instead of defining the number of bits you only need to define the expected max and min for the design. Example a = Signal(intbv(0, min=min_num, max=max_num)) b = Signal(intbv(0, min=min_num, max=max_num)) c = Signal(intbv(0, min=min_num, max=max_num)) This is a little different than what you maybe use to in Verilog or VHDL but it can be very powerful. When you define the bit width it is expected that the intbv is used as a generic bit array (no numeric value). But the implicit numeric min is zero and the max is the size of the bit vector. Hope that helps > for i in range(10): > > a.next = randrange(0, max_num) > b.next = randrange(0, max_num) > c.next = a + b > > yield delay(10) > print "i: %s a: %s, b: %s sum = %s binary %s" %(i, a, b, c, bin(c, B)) > > > def main(): > bitwidth = 9 > inst = AddNum(bitwidth) > sim = Simulation(inst) > sim.run() > > > if __name__ == '__main__': > main() > > As I said, when negative numbers are used, i.e. > > a.next = randrange(min_num, max_num) > b.next = randrange(min_num, max_num) > > Python complains. What do you think is the problem? > > On Sat, Jun 6, 2009 at 5:34 PM, Christopher L. > Felton<chr...@gm...> wrote: > >>> a=intbv(3)[2:] >>> b=intbv(1)[2:] >>> c=a+b >>> >>> the sum (c) is not 'intbv' class, its 'long' if I'm not mistaken. How >>> can we get the sum to be 'intbv' of the same bitwidth (in this case >>> 2)? >>> >>> >>> >> You would want to do the following (which is the same as other HDLs) >> >> a = intbv(3)[2:] >> b = intbv(1)[2:] >> c = intbv(1)[2:] >> c[:] = a+b >> >> As you noticed, the result of the intbv math operations returns an >> integer (long). What you need to do is create an intbv type for the >> left hand side of the operation. For the above example you will get an >> error. The intbv will check the limits of addition. You will need to >> create "c" to be large enough for the result of the addition. >> >> c = intbv(1)[3:] >> >> >> Hope that helps, for more background information see Jan's essay on >> constraint integer, http://www.jandecaluwe.com/hdldesign/counting.html. >> >> Chris >> >> ------------------------------------------------------------------------------ >> OpenSolaris 2009.06 is a cutting edge operating system for enterprises >> looking to deploy the next generation of Solaris that includes the latest >> innovations from Sun and the OpenSource community. Download a copy and >> enjoy capabilities such as Networking, Storage and Virtualization. >> Go to: http://p.sf.net/sfu/opensolaris-get >> _______________________________________________ >> myhdl-list mailing list >> myh...@li... >> https://lists.sourceforge.net/lists/listinfo/myhdl-list >> >> > > > > |
|
From: Sami Al D. <sam...@gm...> - 2009-06-06 21:08:57
|
Dear Chris,
Thank you for your reply. I am trying to add numbers in MyHDL, I tried
to add numbers modeled by 'intbv' in two stages; the first was simple
program with no 'next' command included, and the other with 'next'.
The first one worked as expected but the second one strangely gave
weird results, when the numbers are positive, but when they are
extended to negative ranges the interpreter complains about exceeding
the minimum range of 0. Here is the code:
from myhdl import Signal, delay, always, intbv, Simulation, bin
from random import randrange
from math import pow
def AddNum(B):
#interval = delay(10)
max_num = pow(2,B-1) - 1
min_num = -1 * pow(2,B-1)
a = Signal(intbv(0)[B:])
b = Signal(intbv(0)[B:])
c = Signal(intbv(0)[B+1:])
for i in range(10):
a.next = randrange(0, max_num)
b.next = randrange(0, max_num)
c.next = a + b
yield delay(10)
print "i: %s a: %s, b: %s sum = %s binary %s" %(i, a, b, c, bin(c, B))
def main():
bitwidth = 9
inst = AddNum(bitwidth)
sim = Simulation(inst)
sim.run()
if __name__ == '__main__':
main()
As I said, when negative numbers are used, i.e.
a.next = randrange(min_num, max_num)
b.next = randrange(min_num, max_num)
Python complains. What do you think is the problem?
On Sat, Jun 6, 2009 at 5:34 PM, Christopher L.
Felton<chr...@gm...> wrote:
>
>> a=intbv(3)[2:]
>> b=intbv(1)[2:]
>> c=a+b
>>
>> the sum (c) is not 'intbv' class, its 'long' if I'm not mistaken. How
>> can we get the sum to be 'intbv' of the same bitwidth (in this case
>> 2)?
>>
>>
> You would want to do the following (which is the same as other HDLs)
>
> a = intbv(3)[2:]
> b = intbv(1)[2:]
> c = intbv(1)[2:]
> c[:] = a+b
>
> As you noticed, the result of the intbv math operations returns an
> integer (long). What you need to do is create an intbv type for the
> left hand side of the operation. For the above example you will get an
> error. The intbv will check the limits of addition. You will need to
> create "c" to be large enough for the result of the addition.
>
> c = intbv(1)[3:]
>
>
> Hope that helps, for more background information see Jan's essay on
> constraint integer, http://www.jandecaluwe.com/hdldesign/counting.html.
>
> Chris
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> myhdl-list mailing list
> myh...@li...
> https://lists.sourceforge.net/lists/listinfo/myhdl-list
>
--
Best Regards
Sami Aldalahmeh
|
|
From: Christopher L. F. <chr...@gm...> - 2009-06-06 16:34:25
|
> a=intbv(3)[2:] > b=intbv(1)[2:] > c=a+b > > the sum (c) is not 'intbv' class, its 'long' if I'm not mistaken. How > can we get the sum to be 'intbv' of the same bitwidth (in this case > 2)? > > You would want to do the following (which is the same as other HDLs) a = intbv(3)[2:] b = intbv(1)[2:] c = intbv(1)[2:] c[:] = a+b As you noticed, the result of the intbv math operations returns an integer (long). What you need to do is create an intbv type for the left hand side of the operation. For the above example you will get an error. The intbv will check the limits of addition. You will need to create "c" to be large enough for the result of the addition. c = intbv(1)[3:] Hope that helps, for more background information see Jan's essay on constraint integer, http://www.jandecaluwe.com/hdldesign/counting.html. Chris |
|
From: Sami Al D. <sam...@gm...> - 2009-06-06 15:24:26
|
Hi, I was experimenting with intbv(), and I found out for example if you have a=intbv(3)[2:] b=intbv(1)[2:] c=a+b the sum (c) is not 'intbv' class, its 'long' if I'm not mistaken. How can we get the sum to be 'intbv' of the same bitwidth (in this case 2)? -- Best Regards Sami Aldalahmeh |
|
From: Christopher F. <chr...@gm...> - 2009-05-28 16:06:08
|
> > > > > > The change was to the _intbv.py. All math operations were changed to > > return a intbv type versus an int type. > > Thanks for the work, that really helps. > > In your example, the peformance hit is around 7%. Not dramatic perhaps, > but not negligible either. > > On the other hand, we would probably get this back easily (and more) if > _intbv.py is redone in C, which may make a lot of sense just like Signal. > > I still hesitate. If the reason is purely esthetics, that doesn't seem > enough for the change. But if there is a valid technical reason, I have > nothing against it either. What does the community think? > > Jan > If such performance improvements were attempted would it be better to focus on the Signal class. In the profiles I have captured the Signal class consumes much more than intbv. The C implementations get tricky, cross-compile multiple platforms etc. Before such an effort is undertaken it might make sense to simply define the C interface. The numpy folks have done something similar. Defined "ctypes" types. http://www.scipy.org/Cookbook/Ctypes http://mentat.za.net/ctpug-numpy/ctypes.html If "ctype" types were defined for intbv and Signal that might be enough to start implementing portions in C-code. Ctypes might not be as efficient as actually embedding C code but could be a easier approach. I don't have much experience in this area others may want to comment. Another major bottleneck is how python handles the generators (schedules them)? Would this be correct? Is the simulation performance mainly dictated by this? It sounds like most are busy and this topic will have to be put on the back burner. Chris |
|
From: Christopher F. <chr...@gm...> - 2009-05-28 15:50:55
|
On Sat, May 16, 2009 at 2:16 AM, Jan Decaluwe <ja...@ja...> wrote: > Christopher L. Felton wrote: > > > But the questions can be asked, since the operation is broken into > > intermediate steps, could the converter do this? Could it automagically > > break a complex operation into multiple steps? > > It could potentially do this, just as it now does resizes in VHDL. > Of course it may not worth the trouble. > > > I believe you would have to be careful here though. You do not want > > complication or too much inference from the converter. You would want a > > very simple rule for Verilog that could be implemented. There are many > > scenarios where an intermediate result requires a larger bit-value. > > Basically anytime a complex operation (equation) has an increasing and > > decreasing component you can run into this simulation mismatch. If we > > prevent the operations we would have to prevent all combinations of > > increasing and decreasing, such as: > > (a + b) - c > > (a + b) >> c > > (a * b) - c > > (a * b) >> c > > (a << b) - c > > (a << b) >> c > > etc, etc. > > > > Some of these may not make sense (rarely used) but they are all (BOMK) > > valid statements. The verilog converter would have to restrict all of > > these or handle all of them. I don't know which is the best answer, yet. > > Implementing the restriction is probably easy to do: the right operand > of certain operations (>>>, -) should be a plain name. > > I'm inclined to start with this solution. I guess most designers will > find it acceptable. > > A fundamental solution would be easiest with a resize like in VHDL. > Absent that, we would have to infer intermediate variables etc., > which would add all kinds of complexities. Probably not worth the > effort at this point. > > Jan > Should we add this to the open task list ( http://www.myhdl.org/doku.php/dev:tasks)<http://www.myhdl.org/doku.php/dev:tasks>? As mentioned this is considered a bug because of the simulation mismatch. Think we have captured information on the issue. Verilog will only use the largest "size" that exists in a expression. Intermediate results will only be as large as the largest declared reg / wire. This doesn't match how python handles the operations. Since I have been following this issue, some, I can volunteer for this task. I just can't promise any fast results. Chris |
|
From: Günter D. <dan...@we...> - 2009-05-26 07:00:54
|
Hi,
I maintain a MyHDL RPM package for openSUSE. Even though the build
service also provides the possibility to build for Fedora, at the moment
I don't have the time and experience to adjust the .spec file to build
for Fedora.
I am offering my .spec file here in case someone wants to base a Fedora
build on it.
Cheers,
Guenter
-------------------------------------------------------------------------
Name: python-myhdl
Version: 0.6
Release: 1
Source: myhdl-%{version}.tar.gz
License: GPL
Autoreqprov: on
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
Group: Development/Libraries/Python
Summary: Python module for digital logic development
Url: http://myhdl.jandecaluwe.com
Packager: Guenter Dannoritzer <dan...@we...>
%{py_requires}
%description
MyHDL is an open source Python package that lets you go from Python to
silicon.
With MyHDL, you can use Python as a hardware description and
verification language.
Furthermore, you can convert implementation-oriented MyHDL code to Verilog
automatically, and take it to a silicon implementation from there.
Authors:
--------
Jan Decaluwe <ja...@ja...>
%prep
%setup -n myhdl-%{version}
%build
export CFLAGS="$RPM_OPT_FLAGS"
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT
--record-rpm=INSTALLED_FILES
%clean
rm -rf "$RPM_BUILD_ROOT"
%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc CHANGES.txt LICENSE.txt PKG-INFO README.txt
%doc example
%doc cosimulation
%changelog -n python-myhdl
* Fri Jan 09 2009 - dan...@we... - 0.6
- update to 0.6
* Mon Feb 05 2007 - dan...@we...
- initial package
|
|
From: Jan D. <ja...@ja...> - 2009-05-25 21:38:50
|
See below a mail I received to package MyHDL for Fedora. Looking for a volunteer ... -- 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 Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |
|
From: Jan D. <ja...@ja...> - 2009-05-25 21:30:36
|
Xiang Li wrote: > I agree with your idea completely. One big disadvantage of projects from > opencores.org is that many of them are lack of thorough verification. > Bugs are associated with them. Python has its merit that it is an > object oriented programming language and nowadays object oriented idea > is widely applied in SoC verification. It might be possible that we can > build a new verification methodology using MyHDL. I will try it to see > the possibility. So there you have the project that you were looking for. If you can help to get this type of work on the rails, that would be a great contribution. Jan -- 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 Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |
|
From: Xiang Li <u46...@an...> - 2009-05-21 10:03:53
|
I agree with your idea completely. One big disadvantage of projects from opencores.org is that many of them are lack of thorough verification. Bugs are associated with them. Python has its merit that it is an object oriented programming language and nowadays object oriented idea is widely applied in SoC verification. It might be possible that we can build a new verification methodology using MyHDL. I will try it to see the possibility. ----- Original Message ----- From: Jan Decaluwe <ja...@ja...> Date: Wednesday, May 20, 2009 3:40 pm Subject: Re: [myhdl-list] new example for MyHDL To: myh...@li... > Xiang Li wrote: > > Hello all, I am a new user of MyHDL project. MyHDL is really a > good > > project, which is ideal for software guys who are familiar > with python > > and trying to do hardware development . I just wrote a > miniuart project > > using MyHDL(rewrote from the source code downloaded from > opencore > > website), for those novices who just come to the hardware > world, it is a > > very good example for you. > > Actually this may be a very good idea to combine learning by newbies > and creating actual value: Redo opencores.org in MyHDL! I see a > number of advantages: > > * a large set of examples to choose from, at various complexity levels > * newbies have a clear spec, in the form of the exising implementation > * I'm sure many projects can be improved, especially in the area of > verification - MyHDL modeling might really help here > * the end result also gives something back to the community, as you > would now be able to use the core in 3 HDLs thanks to > conversion. The fact that all cores would be available in > both VHDL and > Verilog might be very interesting to opencores users. > > I guess it's OK to use the existing opencores.org infrastructure > to publish MyHDL cores. > > Jan > > -- > 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 Analog design > automation: http://www.mephisto-da.com > World-class digital design: http://www.easics.com > > > ----------------------------------------------------------------- > ------------- > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list |
|
From: Xiang Li <u46...@an...> - 2009-05-20 14:27:49
|
The attachment is the timing diagram of receiver. From this small simple uart project, we can see that whether you are using verilog, VHDL or python to describe hardware, firstly, you should have hardware structure in your mind; secondly, timing diagram in your mind. <br><br>----- Original Message -----<br>From: Xiang Li <u46...@an...><br>Date: Monday, May 18, 2009 10:57 pm<br>Subject: [myhdl-list] new example for MyHDL<br>To: myh...@li...<br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">> </font>Hello all, I am a new user of MyHDL project. MyHDL is really a good project, which is ideal for software guys who are familiar with python and trying to do hardware development . I just wrote a miniuart project using MyHDL(rewrote from the source code downloaded from opencore website), for those novices who just come to the hardware world, it is a very good example for you. But if you are the experienced guys, then it might not be useful to you. This time I first attach one part of it, the receiver part source code and the generated verilog file, the others and document will be submitted in the next few days. > -----------------------------------------------------------------<br>> -------------<br>> Crystal Reports - New Free Runtime and 30 Day Trial<br>> Check out the new simplified licensing option that enables <br>> unlimited royalty-free distribution of the report engine <br>> for externally facing server and web deployment. <br>> http://p.sf.net/sfu/businessobjects> _______________________________________________<br>> myhdl-list mailing list<br>> myh...@li...<br>> https://lists.sourceforge.net/lists/listinfo/myhdl-list |
|
From: Xiang Li <u46...@an...> - 2009-05-20 12:04:05
|
It is very simple. just use openoffice.org drawing tools is ok. ----- Original Message ----- From: Jose Cuello <jc...@gm...> Date: Wednesday, May 20, 2009 1:25 pm Subject: Re: [myhdl-list] new example for MyHDL, transciver diagram is coming To: General discussions on MyHDL <myh...@li...> > On Tue, May 19, 2009 at 9:26 PM, Xiang Li <u46...@an...> wrote: > Hi, > > This time I add a rough structure diagram of transceiver of UART program for your reference. Hopefully, it will help you to understand the code of UART transceiver. > > ----- Original Message ----- > From: Xiang Li <u46...@an...> > Date: Monday, May 18, 2009 10:57 pm > Subject: [myhdl-list] new example for MyHDL > To: myh...@li... > > > Hello all, I am a new user of MyHDL project. MyHDL is really a good project, which is ideal for software guys who are familiar with python and trying to do hardware development . I just wrote a miniuart project using MyHDL(rewrote from the source code downloaded from opencore website), for those novices who just come to the hardware world, it is a very good example for you. But if you are the experienced guys, then it might not be useful to you. This time I first attach one part of it, the receiver part source code and the generated verilog file, the others and document will be submitted in the next few days. > ----------------------------------------------------------------- > > ------------- > > Crystal Reports - New Free Runtime and 30 Day Trial > > Check out the new simplified licensing option that enables > > unlimited royalty-free distribution of the report engine > > for externally facing server and web deployment. > > http://p.sf.net/sfu/businessobjects> _______________________________________________ > > myhdl-list mailing list > > myh...@li... > > https://lists.sourceforge.net/lists/listinfo/myhdl-list > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > > > Nice diagram and it does help a lot more. Just curious, what software you use to generate those graphics? I've been trying to find a good free tool that does that, I've tried Dia but I don't like it very much. > > Thanks! > ----------------------------------------------------------------- > ------------- > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects> _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list |
|
From: Jan D. <ja...@ja...> - 2009-05-20 06:00:33
|
Xiang Li wrote:
> During the period that I was using MyHDL. I think there might be a
> improvement in the future, maybe it can be another open task. As we have
> seen that in verilog. we will define the module name and the associated
> input/output pins like below:
One module's input is always another module's output :-)
As you use MyHDL for modeling and conversion, you will note that
it works well without input/output declarations. In fact, the only
thing what could we do with this is to check whether usage
and declaration match. This may make sense, but it is not the
philosophy of dynamic languages such as Python. In other words,
it's fine for VHDL/Verilog, but not for a Python-based HDL.
I'm agree that this info is useful for human readers. The Python way is
to document parameter and their purpose in the docstring of
a function. For examples see:
http://www.myhdl.org/doku.php/cookbook:intro
Jan
--
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
Analog design automation: http://www.mephisto-da.com
World-class digital design: http://www.easics.com
|
|
From: Jan D. <ja...@ja...> - 2009-05-20 05:39:58
|
Xiang Li wrote: > Hello all, I am a new user of MyHDL project. MyHDL is really a good > project, which is ideal for software guys who are familiar with python > and trying to do hardware development . I just wrote a miniuart project > using MyHDL(rewrote from the source code downloaded from opencore > website), for those novices who just come to the hardware world, it is a > very good example for you. Actually this may be a very good idea to combine learning by newbies and creating actual value: Redo opencores.org in MyHDL! I see a number of advantages: * a large set of examples to choose from, at various complexity levels * newbies have a clear spec, in the form of the exising implementation * I'm sure many projects can be improved, especially in the area of verification - MyHDL modeling might really help here * the end result also gives something back to the community, as you would now be able to use the core in 3 HDLs thanks to conversion. The fact that all cores would be available in both VHDL and Verilog might be very interesting to opencores users. I guess it's OK to use the existing opencores.org infrastructure to publish MyHDL cores. Jan -- 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 Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |
|
From: Jose C. <jc...@gm...> - 2009-05-20 03:25:13
|
On Tue, May 19, 2009 at 9:26 PM, Xiang Li <u46...@an...> wrote: > Hi, > > This time I add a rough structure diagram of transceiver of UART program > for your reference. Hopefully, it will help you to understand the code of > UART transceiver. > > ----- Original Message ----- > From: Xiang Li <u46...@an...> > Date: Monday, May 18, 2009 10:57 pm > Subject: [myhdl-list] new example for MyHDL > To: myh...@li... > > > Hello all, I am a new user of MyHDL project. MyHDL is really a good > project, which is ideal for software guys who are familiar with python and > trying to do hardware development . I just wrote a miniuart project using > MyHDL(rewrote from the source code downloaded from opencore website), for > those novices who just come to the hardware world, it is a very good example > for you. But if you are the experienced guys, then it might not be useful > to you. This time I first attach one part of it, the receiver part source > code and the generated verilog file, the others and document will be > submitted in the next few days. > > ----------------------------------------------------------------- > > ------------- > > Crystal Reports - New Free Runtime and 30 Day Trial > > Check out the new simplified licensing option that enables > > unlimited royalty-free distribution of the report engine > > for externally facing server and web deployment. > > http://p.sf.net/sfu/businessobjects> > _______________________________________________ > > myhdl-list mailing list > > myh...@li... > > https://lists.sourceforge.net/lists/listinfo/myhdl-list > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > > Nice diagram and it does help a lot more. Just curious, what software you use to generate those graphics? I've been trying to find a good free tool that does that, I've tried Dia but I don't like it very much. Thanks! |
|
From: Xiang Li <u46...@an...> - 2009-05-20 01:26:32
|
Hi, <br><br>This time I add a rough structure diagram of transceiver of UART program for your reference. Hopefully, it will help you to understand the code of UART transceiver. <br><br>----- Original Message -----<br>From: Xiang Li <u46...@an...><br>Date: Monday, May 18, 2009 10:57 pm<br>Subject: [myhdl-list] new example for MyHDL<br>To: myh...@li...<br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">> </font>Hello all, I am a new user of MyHDL project. MyHDL is really a good project, which is ideal for software guys who are familiar with python and trying to do hardware development . I just wrote a miniuart project using MyHDL(rewrote from the source code downloaded from opencore website), for those novices who just come to the hardware world, it is a very good example for you. But if you are the experienced guys, then it might not be useful to you. This time I first attach one part of it, the receiver part source code and the generated verilog file, the others and document will be submitted in the next few days. > -----------------------------------------------------------------<br>> -------------<br>> Crystal Reports - New Free Runtime and 30 Day Trial<br>> Check out the new simplified licensing option that enables <br>> unlimited royalty-free distribution of the report engine <br>> for externally facing server and web deployment. <br>> http://p.sf.net/sfu/businessobjects> _______________________________________________<br>> myhdl-list mailing list<br>> myh...@li...<br>> https://lists.sourceforge.net/lists/listinfo/myhdl-list |
|
From: Xiang Li <u46...@an...> - 2009-05-20 00:56:02
|
During the period that I was using MyHDL. I think there might be a improvement in the future, maybe it can be another open task. As we have seen that in verilog. we will define the module name and the associated input/output pins like below: module modulename( pinname1, pinname2, ... ); input pinname1; output pinname2; ... But in MyHDL, we define it like this def modulename(pinname1, pinname2,...): Obviously, MyHDL lack of a corresponding function to define the pinname as an input or output. As I think, it might be improved in the future. |
|
From: Xiang Li <u46...@an...> - 2009-05-19 10:31:48
|
Hi all,<br><br>The new miniuart transciver file is coming along with its generated verilog file. Hopefully, you will like it<br><br>----- Original Message -----<br>From: Xiang Li <u46...@an...><br>Date: Monday, May 18, 2009 10:57 pm<br>Subject: [myhdl-list] new example for MyHDL<br>To: myh...@li...<br><br><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">> </font>Hello all, I am a new user of MyHDL project. MyHDL is really a good project, which is ideal for software guys who are familiar with python and trying to do hardware development . I just wrote a miniuart project using MyHDL(rewrote from the source code downloaded from opencore website), for those novices who just come to the hardware world, it is a very good example for you. But if you are the experienced guys, then it might not be useful to you. This time I first attach one part of it, the receiver part source code and the generated verilog file, the others and document will be submitted in the next few days. > -----------------------------------------------------------------<br>> -------------<br>> Crystal Reports - New Free Runtime and 30 Day Trial<br>> Check out the new simplified licensing option that enables <br>> unlimited royalty-free distribution of the report engine <br>> for externally facing server and web deployment. <br>> http://p.sf.net/sfu/businessobjects> _______________________________________________<br>> myhdl-list mailing list<br>> myh...@li...<br>> https://lists.sourceforge.net/lists/listinfo/myhdl-list |
|
From: 南昌 <gun...@ya...> - 2009-05-19 04:14:35
|
Hi, I am a student who is now learning hardware design, and I was a graduate from software field with some experience in python. MyHDL really helps me to understand the idea of hardware design because it gives me an alternative way for me to understand the idea. But currently the examples with MyHDL is limited. The appearance of your new example is really helpful. I look forward to seeing more parts of your example --- 09年5月18日,周一, Xiang Li <u46...@an...> 写道: 发件人: Xiang Li <u46...@an...> 主题: [myhdl-list] new example for MyHDL 收件人: myh...@li... 日期: 2009年5月18日,周一,下午8:22 Hello all, I am a new user of MyHDL project. MyHDL is really a good project, which is ideal for software guys who are familiar with python and trying to do hardware development . I just wrote a miniuart project using MyHDL(rewrote from the source code downloaded from opencore website), for those novices who just come to the hardware world, it is a very good example for you. But if you are the experienced guys, then it might not be useful to you. This time I first attach one part of it, the receiver part source code and the generated verilog file, the others and document will be submitted in the next few days. -----下面为附件内容----- ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects -----下面为附件内容----- _______________________________________________ myhdl-list mailing list myh...@li... https://lists.sourceforge.net/lists/listinfo/myhdl-list ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ |
|
From: Jose C. <jc...@gm...> - 2009-05-18 18:24:36
|
On Mon, May 18, 2009 at 8:22 AM, Xiang Li <u46...@an...> wrote: > Hello all, I am a new user of MyHDL project. MyHDL is really a good > project, which is ideal for software guys who are familiar with python and > trying to do hardware development . I just wrote a miniuart project using > MyHDL(rewrote from the source code downloaded from opencore website), for > those novices who just come to the hardware world, it is a very good example > for you. But if you are the experienced guys, then it might not be useful > to you. This time I first attach one part of it, the receiver part source > code and the generated verilog file, the others and document will be > submitted in the next few days. > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > > Thanks for sharing this, I am in the same boat as you are, I am very interested in hardware design but when you come from a software background little 'gotchas' of hardware make it a chore to get used to. Hopefully MyHDL will teach me how to translate the design patterns that I am so used to in softtware into the proper hardware ones; and if I don't I at least had fun coding it in Python! :) On that note I'd like to thank Jan Decaluwe and the rest of the MyHDL development team, I can see nothing but good things coming from this project. |
|
From: Xiang Li <u46...@an...> - 2009-05-18 12:57:19
|
Hello all, I am a new user of MyHDL project. MyHDL is really a good project, which is ideal for software guys who are familiar with python and trying to do hardware development . I just wrote a miniuart project using MyHDL(rewrote from the source code downloaded from opencore website), for those novices who just come to the hardware world, it is a very good example for you. But if you are the experienced guys, then it might not be useful to you. This time I first attach one part of it, the receiver part source code and the generated verilog file, the others and document will be submitted in the next few days. |
|
From: Jan D. <ja...@ja...> - 2009-05-16 21:43:50
|
Geoffrey Brown wrote: > I thought I'd plunge in with a recursive structure (an N-way mux) which > follows. I'm embarrassed > how long it took me to figure this out. Now here are a few questions. > > 1) I wanted to use a selector both as a bit vector and an integer. > Naturally > I made a signal from an intbv, but found the hard way that the obvious > thing, picking off bits by slicing, doesn't give you what is needed > (in this > context) -- another signal which has a subset of the bits from the > original > > I resorted to the (ugly) approach of passing an integer through the > hierarchy > so I could do the bit selection at the leaves. Another ugly solution > would > be to define the selector as a list of signals and slice this up. > The problem > with this approach is that at the top level of the design one has to > bridge > from the single intbv to list of signals. As other examples illustrate, recursive designs work quite well if you can use lists of signals. You can also use intbv Signals in recursion, but then you have to create intermediate signals and the logic that drives them explicitly. So it can be done, but this solution would indeed be rather ugly. Your examples touch the area of MyHDL that I'm least satisfied with: sometimes there is a valid need to consider the slice/index of a signal as a signal itself. Currently, this can't be done and it would require some new ideas/concepts in MyHDL. I would like to see a breakthrough here and I have some ideas, but that is a vast subject for separate thread. > Any thoughts on a more elegant approach ? > > 2) It appears that to work with lists of signals, one must ensure that > at the > instance level the list has been unpacked into individual signals and at > the top level these lists are built from individual signals. Is > this correct ? First, any restrictions are related to convertibility, not modeling. At the very top level, there is the problem that it's unclear how to map lists of signals to Verilog ports. But again, this is only at the top level of a design. In other words, it is possible that some module cannot be converted as a top level design, but is perfectly convertible within a hierarchy. I'm not exactly sure what you mean with the restriction at the instance level. Jan -- 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 Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |
|
From: Jan D. <ja...@ja...> - 2009-05-16 07:16:11
|
Christopher L. Felton wrote: > But the questions can be asked, since the operation is broken into > intermediate steps, could the converter do this? Could it automagically > break a complex operation into multiple steps? It could potentially do this, just as it now does resizes in VHDL. Of course it may not worth the trouble. > I believe you would have to be careful here though. You do not want > complication or too much inference from the converter. You would want a > very simple rule for Verilog that could be implemented. There are many > scenarios where an intermediate result requires a larger bit-value. > Basically anytime a complex operation (equation) has an increasing and > decreasing component you can run into this simulation mismatch. If we > prevent the operations we would have to prevent all combinations of > increasing and decreasing, such as: > (a + b) - c > (a + b) >> c > (a * b) - c > (a * b) >> c > (a << b) - c > (a << b) >> c > etc, etc. > > Some of these may not make sense (rarely used) but they are all (BOMK) > valid statements. The verilog converter would have to restrict all of > these or handle all of them. I don't know which is the best answer, yet. Implementing the restriction is probably easy to do: the right operand of certain operations (>>>, -) should be a plain name. I'm inclined to start with this solution. I guess most designers will find it acceptable. A fundamental solution would be easiest with a resize like in VHDL. Absent that, we would have to infer intermediate variables etc., which would add all kinds of complexities. Probably not worth the effort at this point. Jan -- 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 Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |
|
From: Jan D. <ja...@ja...> - 2009-05-16 06:46:10
|
Neal Becker wrote: >> > > I suppose (not tested) that using systemverilog cast on the operands before > the operation to cast to the wider result type would fix it? Probably yes. How does this work, like resize in VHDL? Jan -- 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 Analog design automation: http://www.mephisto-da.com World-class digital design: http://www.easics.com |