Page 1 of 1
512 bit shift register
Posted: Thu May 04, 2017 8:00 pm
by BobF
Hello gang,
Ok, I need some help once more. Can anyone tell me why this Shift Register uses up so many cpu cycles when connected to the audio out, scope, etc. and is there a fix. If you have one PLEASE up an example.
Thanks as always, BobF.....
Re: 512 bit shift register
Posted: Fri May 05, 2017 11:13 am
by TrojakEW
The question is what are you after? Single Bobs D Flip Flop module use about 0,2% of CPU. U have 16 of these in one Bobs 16Bit ShiftRegistor thats average 3,2% CPU per this module. U have 4 of these in one Bobs 64BitShiftRegistor module so it is 12.8% CPU and together 8 of these modules 102.4% CPU on older i5. There is no fix for that only replace whole module with something else that will do what are you after.
Re: 512 bit shift register
Posted: Fri May 05, 2017 2:33 pm
by BobF
Thanks TrojakEW,
I agree. Do I have any assembly coders that would volunteer to write me a nice optimized single D-Flip Flop . Thank you very much in advance if someone does.
Later then, BobF.....
Re: 512 bit shift register
Posted: Wed May 17, 2017 11:03 am
by TrojakEW
Well what I mean to say was not rewrite this modules to code/asm but first to understand what is suppose to do to signal and this may lead you to simpler solution ten using this.
From what I see your result on oscilloscope without DC filter is always rectified square at same frequency as first (main) wave. Frequency settings for second wave doesnt change anything till lower frequencies (about 400 or lower) then it becomes inaccurate.
With added DC it is just simple square*0.5main wave amplitude. So the question is why use this 512 bit shift or what are you after in this example.
Re: 512 bit shift register
Posted: Wed May 17, 2017 9:36 pm
by BobF
Hello TrojakEW,
In the end my idea failed! Sometimes I make things NOT because they are needed by me or someone else, but just because it is a challenge . I was trying to make a delay line using shift registers, in total there was to be 1024 of them.
A problem arose with the large cpu usage , that I (with help) was able to over come, but the bigger problem was the analog to digital converter module I created only worked for very low frequencies. It required very high clock frequencies that of course you just can not get. Anyone have any cool analog to digital converter ideas.
So that's it, thanks for your comments, I really do appreciate them.
Cheers, BobF.....
Re: 512 bit shift register
Posted: Fri Jun 23, 2017 6:40 pm
by pshannon
BobF wrote:Hello TrojakEW,
In the end my idea failed! Sometimes I make things NOT because they are needed by me or someone else, but just because it is a challenge . I was trying to make a delay line using shift registers, in total there was to be 1024 of them.
A problem arose with the large cpu usage , that I (with help) was able to over come, but the bigger problem was the analog to digital converter module I created only worked for very low frequencies. It required very high clock frequencies that of course you just can not get. Anyone have any cool analog to digital converter ideas.
So that's it, thanks for your comments, I really do appreciate them.
Cheers, BobF.....
BobF,
I looked at your design. From a real world perspective, that would be a great way to do it with IC chip flipflops ect. From a virtual synth/ sound module, it would be math equations to convert these numbers to give the desired results you are looking for. I can't tell you what to use off the top, I am hoping this sends you down the right path. Good luck.
Regards,
QuadBIT
Re: 512 bit shift register
Posted: Sun Jun 25, 2017 3:57 am
by BobF
Hi QuadBIT,
I did actually make a working hardware version. It used what's called a Sigma Delta Modulator, to do the A to D and a integrator/lowpass filter for the D to A. It worked quite well, but the clock speeds were in the mega-hertz.
No way within Flowstone.
Working on other stuff now, but may come back to it in the future.
Cheers, BobF.....