Implementing an 8 bit fixed point register

2008-07-01 Thread nickooooola
Hello to all I'm about to write a simulator for a microcontroller in python (why python? because I love it!!!) but I have a problem. The registry of this processor are all 8 bit long (and 10 bit for some other strange register) and I need to simulate the fixed point behaviour of the register,

Re: Implementing an 8 bit fixed point register

2008-07-01 Thread moogyd
On 1 Jul, 08:57, nickola [EMAIL PROTECTED] wrote: Hello to all I'm about to write a simulator for a microcontroller in python (why python? because I love it!!!) but I have a problem. The registry of this processor are all 8 bit long (and 10 bit for some other strange register) and I

Re: Implementing an 8 bit fixed point register

2008-07-01 Thread Mel
nickola wrote: Hello to all I'm about to write a simulator for a microcontroller in python (why python? because I love it!!!) [...] The registry of this processor are all 8 bit long (and 10 bit for some other strange register) and I need to simulate the fixed point behaviour of the

Re: Implementing an 8 bit fixed point register

2008-07-01 Thread Grant Edwards
On 2008-07-01, nickola [EMAIL PROTECTED] wrote: Hello to all I'm about to write a simulator for a microcontroller in python (why python? because I love it!!!) but I have a problem. The registry of this processor are all 8 bit long (and 10 bit for some other strange register) and I need

Re: Implementing an 8 bit fixed point register

2008-07-01 Thread nickooooola
Thanks to all for the responses! to MEl: I also want to build a pic simulator, but I want to do this as python for big project learning exercise, I have used python in the past only for small script and now I want to use it for something more big. do you have some code to share? myhdl seems

Re: Implementing an 8 bit fixed point register

2008-07-01 Thread Terry Reedy
nickola wrote: Hello to all I'm about to write a simulator for a microcontroller in python (why python? because I love it!!!) but I have a problem. The registry of this processor are all 8 bit long (and 10 bit for some other strange register) and I need to simulate the fixed point

Re: Implementing an 8 bit fixed point register

2008-07-01 Thread Grant Edwards
On 2008-07-01, Terry Reedy [EMAIL PROTECTED] wrote: nickola wrote: Hello to all I'm about to write a simulator for a microcontroller in python (why python? because I love it!!!) but I have a problem. The registry of this processor are all 8 bit long (and 10 bit for some other

Re: Implementing an 8 bit fixed point register

2008-07-01 Thread Terry Reedy
Grant Edwards wrote: On 2008-07-01, Terry Reedy [EMAIL PROTECTED] wrote: nickola wrote: Hello to all I'm about to write a simulator for a microcontroller in python (why python? because I love it!!!) but I have a problem. The registry of this processor are all 8 bit long (and 10 bit

Re: Implementing an 8 bit fixed point register

2008-07-01 Thread Grant Edwards
On 2008-07-01, Terry Reedy [EMAIL PROTECTED] wrote: A bytearray subclass could enforce that all 'bits' (stored as bytes) are 0 or 1, have a customized representation to your taste, and add methods like .flipall(). It seems like implementing ALU operations on such arrays would be a lot more