verilog like class w/ bitslicing & int/long classtype

Stef Mientki stef.mientki at gmail.com
Thu Jan 29 18:13:16 EST 2009


mark.seagoe at gmail.com wrote:
> Thanks.  So far these solutions will return strings.  So I can't
> really treat it like a variable, yet still perform bitslice on it,
> since I need a special class to do bitslice and bit selection, but as
> soon as I try to pass it into some other function to check a bit, I
> gotta then do another operation to convert back to a variable.
>
> So I can get it to a point where I can do shadow_register[3] and get
> the value of any bit, or I can do shadow_register[4:2] and get a
> bitslice, and I can write them just as easily at this point.  If I add
> the __new__ method into the class, the instance obj becomes int, but
> is no longer slicable.  I think it looks like I can't have it both
> ways.
> --
> http://mail.python.org/mailman/listinfo/python-list
>   
there are a few vhdl projects,
can't find my links right now
- myhdl
- something like pysystemC

maybe you can find the answer there

cheers,
Stef



More information about the Python-list mailing list