Author Topic: If you developed your own CPU...  (Read 413 times)

zedd151

  • Member
  • *****
  • Posts: 1931
If you developed your own CPU...
« on: January 08, 2023, 02:53:46 AM »
If you developed your own CPU what would it have that present offerings from Intel and AMD lack?
Me, I would have plenty of registers for sure. Say 32 registers with the majority able to be used without saving/restoring except when the original contents MUST be saved.
And direct memory to memory copy, is another one that would be nice. 
Of course it would have to be able to support Windows. Or vice versa.  :tongue:   But then it would be nice if Windows users (meaning programmers of course  :tongue: )  had a say in how Windows is devloped, which in itself is a whole other topic.   :badgrin:


Just an odd thought this beautiful Saturday morning!  "Stop me stop me oh stop me, stop me if this has been done before..."   :smiley:
Regards, zedd.
:tongue:

vitsoft

  • Regular Member
  • *
  • Posts: 15
    • vit$oft
Re: If you developed your own CPU...
« Reply #1 on: January 08, 2023, 09:52:28 AM »
It has been already done several times, for instance by Agner Fog at https://www.forwardcom.info/

zedd151

  • Member
  • *****
  • Posts: 1931
Re: If you developed your own CPU...
« Reply #2 on: January 08, 2023, 10:21:32 AM »
It has been already done several times, for instance by Agner Fog at https://www.forwardcom.info/
But has it been done here on this forum?   :rolleyes:  I'd like to hear from people that I actually know, i.e., forum members:tongue:
Regards, zedd.
:tongue:

jj2007

  • Member
  • *****
  • Posts: 13657
  • Assembly is fun ;-)
    • MasmBasic
Re: If you developed your own CPU...
« Reply #3 on: January 08, 2023, 10:57:12 AM »
And direct memory to memory copy, is another one that would be nice.

But has it been done here on this forum?

See m2m in macros.asm :cool:

zedd151

  • Member
  • *****
  • Posts: 1931
Re: If you developed your own CPU...
« Reply #4 on: January 08, 2023, 01:19:27 PM »
See m2m in macros.asm :cool:
Duh, that's not direct memory to memory copy, but a 'workaround method', as is mrm. And I expected some form of intelligent responses.  :rolleyes:   What was I thinking?
« Last Edit: January 08, 2023, 07:58:36 PM by zedd151 »
Regards, zedd.
:tongue:

jj2007

  • Member
  • *****
  • Posts: 13657
  • Assembly is fun ;-)
    • MasmBasic
Is there intelligent life in this forum?
« Reply #5 on: January 08, 2023, 09:04:27 PM »
I expected some form of intelligent responses.  :rolleyes:   What was I thinking?

 :joking: :rofl: :greenclp:

zedd151

  • Member
  • *****
  • Posts: 1931
Is there intelligent life in this forum?
« Reply #6 on: January 08, 2023, 09:10:03 PM »
What was I thinking?

 :joking: :rofl: :greenclp:
:tongue:
Quote from: jj
Is there intelligent life in this forum?
Apparently not.   :badgrin:
Regards, zedd.
:tongue:

jj2007

  • Member
  • *****
  • Posts: 13657
  • Assembly is fun ;-)
    • MasmBasic
Re: If you developed your own CPU...
« Reply #7 on: January 08, 2023, 09:19:35 PM »
And direct memory to memory copy, is another one that would be nice.

movsb

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10313
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: If you developed your own CPU...
« Reply #8 on: January 08, 2023, 11:49:09 PM »
For the true purist,

    mov rax, rcx

Registers are memory, albeit very fast but still memory.   :icon_idea:
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

daydreamer

  • Member
  • *****
  • Posts: 2305
  • my kind of REAL10 Blonde
Re: If you developed your own CPU...
« Reply #9 on: January 09, 2023, 12:34:18 AM »
In digital electronics,had task to wire several nand gates to first make 4bit adder
Second task add more nand gates that perform 4bit neg= adder changes to subtractor
I think that low level skill combined with port asm snippets/macros to microcode is needed
To be able make new instructions
Thanks to very big chips nowadays,gpu pixelshaders already has instructions dreamed of earlier
1 cycle trigo functions thanks to luts in hardware
And newer pixelshader versions come with more instructions,like earlier changes in x86 ,286,386,486,586,686,earliest x64
Memtomem copy if not directly supported on main cpu,could be performed with gpu if you use vram instead
Using one of apis that let you create graphics surface in vram and switch between locked (cpu can read/write) and unlocked
About 32 registers,there already are more than that in x64
16 gp regs+control regs,rip reg,16 xmm/ymm regs+control reg,8 fpu regs+control regs

my none asm creations
http://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

mikeburr

  • Member
  • **
  • Posts: 186
Re: If you developed your own CPU...
« Reply #10 on: January 10, 2023, 10:54:24 AM »
i implemented a series of maths functions
1) a series of 32 x 32 cyclic registers a bit like the FPU except that it is more flexible
2) the maths functions have virtually no limit on the length of the string [ i didnt concatenate registers i simply converted to asci to BCD and wrote routines
     that divided or multiplied similar to the sort of thing you wd do on a scrap of paper
in a separate program
1) i wrote a probably unique method of analysing combinations of items using number theory [i did wonder about patenting it if possible as i used it to determine how i
    might divide a canvas but it has uses in load balancing say in a computer kernel, two dimensional planning of space or 3 dim loading of vehicles ] .. it wd be a gd
    candidate but requires powerful computing and can produce a lot of info .. i did try and get in touch with David May [ Inmos and dev worker for Iann Barron] but got no
   reply
regards mike b

Shintaro

  • Member
  • **
  • Posts: 213
  • Thoughts create Realaties
Re: If you developed your own CPU...
« Reply #11 on: January 10, 2023, 12:29:01 PM »
Hmm...most of the things that annoyed me have been done, like needing a separate FPU. Maybe the on-die GPU has already been done, I don't touch new hardware much anymore as it seems to have become more like what new people to the saxophone get: GAS (Gear Acquisition syndrome), gotta have the latest and greatest.

From a retro point of view:
A CPU that is backwards compatible with older CPU sockets. Where the CPU could sense that it was being used on old hardware and shut off incompatible features, it would need an adapter socket though.
“Wyrd bið ful āræd. Fate is inexorable.”

daydreamer

  • Member
  • *****
  • Posts: 2305
  • my kind of REAL10 Blonde
Re: If you developed your own CPU...
« Reply #12 on: January 12, 2023, 08:49:28 PM »
From a retro point of view:
A CPU that is backwards compatible with older CPU sockets. Where the CPU could sense that it was being used on old hardware and shut off incompatible features, it would need an adapter socket though.
About no fpu
Think there is old masm directive to send fpu code to fpu emulated library
Haven't yet tried use it with my scalar SSE2 functions
About GAS
I was developing SSE tutorial while needing test programming, so it doesn't ended up only theoretical based,when I started only has amd SSE caps
So got duo core Intel which had SSE2 +more caps and has dual core and mobile ati
But amd was faster with old 1995 legacy cg app
Took many years after before I used SSE2
Got 4 core cpu few years old
Just recently made SIMT programming more than 10+ years after I got the dual core

Old hardware lacking functions : missing other chip that sends interrupt signal makes cpu not use that kind of interrupt


my none asm creations
http://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

FORTRANS

  • Member
  • *****
  • Posts: 1227
Re: If you developed your own CPU...
« Reply #13 on: January 14, 2023, 11:14:13 PM »
Hi,

About no fpu
Think there is old masm directive to send fpu code to fpu emulated library
Haven't yet tried use it with my scalar SSE2 functions

   The MASM option to use an emulated FPU was of limited use
in my experience.  It required that that you had a "library" of
FPU functions from a HLL.  When I tried to link a program to
such a library, I had problems.  In my case the particular
instructions I was trying to use were not part of the emulation
code that I had access to.  So it did not work.  It had nothing
to do with SSE.

   There were TSRs that provided a emulated FPU for programs
that used the FPU.  Some of those were very useful to me.
Though they were noticeably slower than a real FPU.

Regards,

Steve N.