Last visit was: Thu May 01, 2025 12:08 pm
It is currently Thu May 01, 2025 12:08 pm



 [ 114 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8
 rf68000 - 68k similar core 
Author Message

Joined: Sat Feb 02, 2013 9:40 am
Posts: 2307
Location: Canada
Dealing with all the different data sizes on a 64-bit machine is problematic. I was just going to follow the x386 style and support only bytes or 64-bit ops for 64-bit mode.
The 68k stores floats using 96-bits IIRC. I was just going to support only 96-bit precision floats.
There are some extra encodings available for immediate values if the 68020+ versions of the processor are not fully supported.

_________________
Robert Finch http://www.finitron.ca


Fri Jul 12, 2024 4:46 pm WWW

Joined: Thu Jan 17, 2013 4:38 pm
Posts: 54
robfinch wrote:
Chose to put the cpu width bits in the page management table entry.[/attachment]

Ooh! I like your thinking. My ideas for a fantasy-RISC would have encodings for 2x16, 1x32, 3x42[128] and 3x42[128VLIW] (all being subsets of the next one, VLIW apart), but if you don't need to micro-optimize and switch sizes then the MMU could save bits on choosing that.

One of the things I wanted to have the MMU handle was if data are considered big or little endian. And possibly a few things involving what protection level you are running at purely based on the PC.
Oh yeah, while at it, having separate MMUs for instructions and data - hopefully free up more page bits, more parallellism&performance?


Fri Jul 12, 2024 7:57 pm

Joined: Sat Feb 02, 2013 9:40 am
Posts: 2307
Location: Canada
Quote:
Oh yeah, while at it, having separate MMUs for instructions and data -

Separate MMUs for instructions and data is an interesting idea. The page table entries could be made specific for instructions or data. Might not need all the access rights for each type, so could conserve bits. However, it may be more resource efficient to have just a single MMU.
There is just a single 128-bit bus connecting the core to the outside world, and the MMU is attached to this. It could possibly tell the difference between code and data, and manage each separately.

*****

Sketched out a 68k design using 20-bit instruction parcels. This allows for 16 data and 16 address registers. It also allows an additional operand size ‘.O’ for octabyte. The instruction set remains much the same. Branches have 12-bit or 20-bit displacements available. Added a CLRM – clear multiple registers instruction.

This was mainly just an exercise, no plans to implement. Got me started thinking about RiSCV and implementing a clear multiple registers with that processor. It could be done using a two-deep register file where one depth always contains zeros. When a register is ‘cleared’ the depth pointer could be incremented to point to a zero value on read. When a register is written the depth pointer could be decremented so the actual value is readable.
This would be using the LUT ram to multiplex a zero to the output when the register is clear.
A bitmask could be used to clear selected registers by or'ing the mask with the depth pointers.

_________________
Robert Finch http://www.finitron.ca


Sat Jul 13, 2024 10:04 am WWW

Joined: Mon Oct 07, 2019 2:41 am
Posts: 768
Why do you need to clear registers?
Throws in a DCA from a old PDP8. :)


Sat Jul 13, 2024 10:37 pm

Joined: Sat Feb 02, 2013 9:40 am
Posts: 2307
Location: Canada
Quote:
Why do you need to clear registers?

I have heard that it is good for some security / crypto type apps where registers are cleared on function entry or exit.

Usually several registers need to be cleared. This can be handled using a single bit FF to indicate the register value is zero. So only a single bit need be manipulated rather than all 64.

DCA=?

_________________
Robert Finch http://www.finitron.ca


Sun Jul 14, 2024 1:34 am WWW

Joined: Mon Oct 07, 2019 2:41 am
Posts: 768
It might be better to clear on function entry, in the case of a trojan subroutine.

The PDP 8 is the classic old school computer.
Copied off the web
12 bit program counter
12 bit ac + link bit
4096 words of memory

Code:
DEC's 1965 PDP-8 Pocket Reference Card
PDP 8 INSTRUCTION LIST


Mnemonic  Code          Operation                 Cycles

BASIC INSTRUCTIONS


 AND      0000  logical AND                           2
 TAD      1000  2's complement add                    2
 ISZ      2000  increment and skip if zero            2
 DCA      3000  deposit and clear AC                  2
 JMS      4000  jump to subroutine                    2
 JMP      5000  jump                                  1
 IOT      6000  in-out transfer                   2 1/2
 OPR      7000  operate                               1

GROUP 1 OPERATE MICROINSTRUCTIONS (1 CYCLE)

                                              Event Time
 NOP      7000  no operation                          1
 CLA      7200  clear AC                              1
 CLL      7100  clear link                            1
 CMA      7040  complement AC                         1
 CML      7020  complement link                       1
 RAR      7010  rotate AC and link right one          2
 RAL      7004  rotate AC and link left one           2
 RTR      7012  rotate AC and link right two          2
 RTL      7006  rotate AC and link left two           2
 IAC      7001  increment AC                          2

GROUP 2 OPERATE MICROINSTRUCTIONS (1 CYCLE)


                                              Event Time
 SMA      7500  skip on minus AC                      1
 SZA      7440  skip on zero AC                       1
 SPA      7510  skip on plus AC                       1
 SNA      7450  skip on non zero AC                   1
 SNL      7420  skip on non-zero link                 1
 SZL      7430  skip on zero link                     1
 SKP      7410  skip unconditionally                  1
 OSR      7404  inclusive OR, switch register with AC 2
 HLT      7402  halts the program                     1
 CLA      7600  clear AC                              1


Mnemonic  Code          Operation                 Cycles

COMBINED OPERATE MICROINSTRUCTIONS


 CIA      7041  complement and increment AC           1
 LAS      7604  load AC with switch register          1
 STL      7120  set link (to 1)                       1
 GLK      7204  get link (and put int AC bit 11)      1
 CLA CLL  7300  clear AC and link                     1
 CLA IAC  7201  set AC = 1                            1
 CLA CMA  7240  set AC = -1                           1
 CLL RAR  7110  shift positive number one right       1
 CLL RAL  7104  shift positive number one left        1
 CLL RTL  7106  clear link, rotate 2 left             1
 CLL RTR  7112  clear link, rotate 2 right            1
 SZA CLA  7640  skip if AC = 0, then clear AC         1
 SZA SNL  7460  skip if AC = 0, or link is 1, or both 1
 SNA CLA  7650  skip if AC /= 0, then clear AC        1
 SMA CLA  7700  skip if AC < 0, then clear AC         1
 SMA SZA  7540  skip if AC <= 0                       1
 SMA SNL  7520  skip if AC < 0 or line is 1 or both   1
 SPA SNA  7550  skip if AC > 0                        1
 SPA SZL  7530  skip if AC >= 0 and if the link is 0  1
 SPA CLA  7710  skip of AC >= 0, then clear AC        1
 SNA SZL  7470  skip if AC /= 0 and link = 0          1


|d|i|g|i|t|a|l| EQUIPMENT CORPORATION
   PRINTED IN U.S.A.    25-5/65
I


Sun Jul 14, 2024 8:55 am

Joined: Sat Feb 02, 2013 9:40 am
Posts: 2307
Location: Canada
The PDP8 is pretty impressive for 1965.

I started working on a more contemporary architecture. 32x64-bit regs. 8x8 bit condition registers.

_________________
Robert Finch http://www.finitron.ca


Mon Jul 15, 2024 6:46 am WWW

Joined: Mon Oct 07, 2019 2:41 am
Posts: 768
What FPGA and tool chain are you using?


Tue Jul 16, 2024 3:31 am

Joined: Sat Feb 02, 2013 9:40 am
Posts: 2307
Location: Canada
Quote:
What FPGA and tool chain are you using?
xc7a200t FPGA and free Vivado toolset. The 68k will fit into a much smaller FPGA.

The newer design, while similar to a PowerPC, uses 16-bit instruction parcels. Subroutine calls store the return address on the stack rather than in a link register. So there are no link registers. Some instructions like RTS, RTI, and SC are only 16-bit. Other instructions like CMP 64-bit immediate take up 80-bits. Subroutine calls are 48-bit to support a 42-bit routine address. Branches are 32-bit, supporting a 21-bit branch target range.

The CPU has only a single mode of operation. To handle other modes of operation multiple cores will be used.

_________________
Robert Finch http://www.finitron.ca


Wed Jul 17, 2024 3:46 am WWW
 [ 114 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8

Who is online

Users browsing this forum: claudebot and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software