Re: Integer arithmetic in hardware descriptions

2009-03-16 Thread JanC
bearophileh...@lycos.com wrote: > JanC: >> In most "modern" Pascal dialects the overflow checks can be (locally) >> enabled or disabled with compiler directives in the source code, > > I think that was possible in somewhat older versions of Pascal-like > languages too (like old Delphi versions, an

Re: Integer arithmetic in hardware descriptions

2009-03-15 Thread bearophileHUGS
JanC: > In most "modern" Pascal dialects the overflow checks can be (locally) > enabled or disabled with compiler directives in the source code, I think that was possible in somewhat older versions of Pascal-like languages too (like old Delphi versions, and maybe TurboPascals too). >so the "spee

Re: Integer arithmetic in hardware descriptions

2009-03-15 Thread JanC
bearophileh...@lycos.com wrote: > Some C# designers come from Pascal (where overflow is considered an > important thing), and they have added to dotnet ways to find when an > overflow occurs, globally in a program, locally in a piece of code, or > even in a single part of an expression. This is mu

Re: Integer arithmetic in hardware descriptions

2009-03-15 Thread bearophileHUGS
John Nagle: >I gave up on this when C came in; the C crowd was so casual about integer >overflow that nobody cared about this level of correctness. Today, of course, >"buffer overflows" are a way of life.< Experience shows that integer overflows are a very common bug. One of the huge advantages

Re: Integer arithmetic in hardware descriptions

2009-03-14 Thread John Nagle
Jan Decaluwe wrote: I am the author of MyHDL, a Python package that turns Python into a hardware description language (HDL). Integer arithmetic is very important in hardware design, but with traditional HDLs such as Verilog and VHDL it is complicated and confusing. MyHDL has a better solution, i

Integer arithmetic in hardware descriptions

2009-03-14 Thread Jan Decaluwe
I am the author of MyHDL, a Python package that turns Python into a hardware description language (HDL). Integer arithmetic is very important in hardware design, but with traditional HDLs such as Verilog and VHDL it is complicated and confusing. MyHDL has a better solution, inspired by Python's n