Author Topic: Drawing a computer on paper with led pencil  (Read 3062 times)

0 Members and 1 Guest are viewing this topic.

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9933
  • Country: us
Re: Drawing a computer on paper with led pencil
« Reply #25 on: April 02, 2022, 03:08:39 am »
Of course, today we just digitize everything and solve the equations on the CUDA units of a graphics card.  Much of machine learning is based on thousands of partial differential equations being solved in a massively parallel processor.  Very cool stuff!

Yes, thats the devaluemental opinion of PPUs,  don't need em cause we have video cards already.    I just think they are a waste of space, why the need for all those hardware matrix multiplies, they are as big as square roots!   The physics system I have planned doesnt even do a single rotation, and works using centrifugal force.  Much more realistic and less operations.


We have to translate and rotate an image with millions of pixels about 60 times per second.  It's a really huge matrix multiplication.  Then we need to 'ray trace' the result to get the lighting correct every time the player moves relative to the image.  Even harder math...

It's what the users demand from the graphics system that drives the industry and as long as the CUDA units are available, we might as well use them for linear algebra.

I like playing with MATLAB's introduction to supervised learning (digit recognition) and the speedup with CUDA versus CPU is pretty substantial.  Unfortunately, the graphics unit on the HP Envy All-In-One doesn't have a very powerful NVIDIA card so I can't justify paying for the license.  Maybe later...


 
The following users thanked this post: Capernicus

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5024
  • Country: si
Re: Drawing a computer on paper with led pencil
« Reply #26 on: April 02, 2022, 01:14:59 pm »
Modern CPUs have 'huge ALUs'  that you like.

The last few generations of Intel desktop CPUs have AVX512 instructions and this means it can do a calculation on 512bits wide worth of data in a single instruction. So you could use this to do say 16 multiply operations on 32bit floats and it takes the same amount of time as doing a single float multiply. Or you could use this to add 64 different 8bit numbers together in a single instruction. Not all CPUs have AVX512 support but the older SSE instruction sets that work with 128 or 256 bits at a time are on pretty much all modern x86 CPUs. This whole thing mostly started with the Intel MMX instruction set where they got into pushing more SIMD math support into the x86 chips. This is mostly used to give them much enhanced DSP capability that comes in useful when working with large amounts of video and audio data (hence the name MMX being MultiMediaeXtension)

The ever popular ARM chips also have similar SIMD instructions, even the little CortexM4 microcontrollers, but they don't work with this many bits, since they don't have as much transistor count budget available to implement that.

PCs did have a PhysicsProcesingUnit for a brief time period. The company Ageia developed hardware acceleration for a popular physics engine called NobodeX and it did speed up physics calculations by a lot. This only lasted a few years before Nvidia bought the whole company and ported the PhysX drivers to run on there GPUs. The graphics cards already had programmable pipelines back then and lots of powerful 3D matrix math capability, so it was just a matter of porting the physics math over to what the GPU can execute. The PhysX engine can fall back to CPU mode if appropriate acceleration hardware is not available (allowing games using it to still run with worse performance) and is now ported over to even a lot of game consoles (including ones without Nvidia graphics hardware or x86 CPUs).

CPUs have gotten so fast that physics is actually easy for them (especially with the modern math instructions). So a lot of games might not even use any hardware acceleration to run them. They focus on GPU accelerated physics more when there is a lot of physics to be done, such as simulating a huge number of objects or the kind of physics where things are made from lots of tiny sub objects (like fabric, fluids, smoke, particles etc..)

When it comes to building DIY CPUs it doesn't really make sense to pursue powerful huge bit depth parallel math capability. Whatever you build is going to still be laughably slow when compared to the CPU in the slowest cheapest laptop on the market. Sticking to a reasonable number of bits is more than good enough and saves complexity and amount of wiring. You also need to write your own software to make use of it, so this takes more time for complex things that could make good efficient use of the math horsepower. The DIY CPUs are mostly about keeping things simple enough to easily understand, debug and build. With modern components these CPUs can run pretty fast anyway (compared to the equivalent CPUs of back in the day). A better place to spend the effort might be graphics hardware for your DIY CPU since you can make it do some impressive stuff with not that much logic, just moving lots of pixels around quickly.
« Last Edit: April 02, 2022, 01:17:51 pm by Berni »
 
The following users thanked this post: RJSV, Capernicus

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9933
  • Country: us
Re: Drawing a computer on paper with led pencil
« Reply #27 on: April 02, 2022, 03:22:01 pm »
With modern components these CPUs can run pretty fast anyway (compared to the equivalent CPUs of back in the day). A better place to spend the effort might be graphics hardware for your DIY CPU since you can make it do some impressive stuff with not that much logic, just moving lots of pixels around quickly.

There is an epic thread re: a VGA controller for an FPGA implementation over in the FPGA forum:

https://www.eevblog.com/forum/fpga/fpga-vga-controller-for-8-bit-computer/
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6228
  • Country: es
Re: Drawing a computer on paper with led pencil
« Reply #28 on: April 02, 2022, 03:31:13 pm »
Wasn't that hard? (Please don“t kill me)
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: Capernicus

Offline CapernicusTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 483
  • Country: au
Re: Drawing a computer on paper with led pencil
« Reply #29 on: April 02, 2022, 03:44:29 pm »
Nice picture of a computer.

Still a 512 bit adder is faster than a 512 bit multiplier by log times.  makes sense not to use mutiply at all in code.
If you can, then your hardware is smaller, takes up less estate = same thing as higher clock rate + easier to build at home.

Optimizing hardware is very similar to optimizing software, if you putting it in physically, shorter program takes up less estate.

I swear I can beat what's out there in a 1000th of the space,  just wait and see.   >:D

rstofer - yes I can put it on an fpga as well,  but If I do the hardware custom I can include analogue elements if I want, fpgas cant do that, and I get better control of everything if I do it from scratch.
« Last Edit: April 02, 2022, 03:46:04 pm by Capernicus »
 
The following users thanked this post: RJSV

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2504
  • Country: gb
  • Recovering Electrical Engineer
Re: Drawing a computer on paper with led pencil
« Reply #30 on: April 09, 2022, 10:15:23 am »
The LED pencil is an early form of light pen surely?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf